Skip to content

πŸ§‘β€πŸ’» chore: lint: keep sdk and the extensions away from internal - #46

Merged
pascalandy merged 1 commit into
mainfrom
m02/t2-import-boundary
Oct 12, 2026
Merged

pascalandy merged 1 commit into
mainfrom
m02/t2-import-boundary

Conversation

@pascalandy

@pascalandy pascalandy commented Oct 11, 2026 •

Copy link
Copy Markdown
Owner

Why

M02-T2 asks just lint to keep sdk/, extensions/, and the fixture away from core's internal/ packages, so a bundled extension can leave the binary without a rewrite.

Scope

  • .golangci.yml enables depguard with the rule public, which denies github.com/pascalandy/nicely/internal to every Go file under sdk/ or extensions/, tests excepted, so tests still read the docs through internal/specdoc
  • The Proves line of the card no longer puts just lint in a code span, which the plan check would read as a path

Verification

A temporary sdk/runner/boundary_probe.go that imports internal/specdoc failed the lint:

sdk/runner/boundary_probe.go:3:8: import 'github.com/pascalandy/nicely/internal/specdoc' is not allowed from list 'public': the SDK and the extensions reach core only through the CLI and the environment, as AGENTS.md says (depguard)

The same import in boundary_probe_test.go passed. just check passes.

Checklist

  • 1. Spec: SDK in contract.md says that just lint enforces the boundary
  • 2. Scenario: the temporary import above fails the lint
  • 3. Code: the lint passes without it
  • 4. Text: n/a, no user-facing text
  • 5. Checks: just check passes
  • 6. Docs: M02-T2 is done
  • 7. Sign off: just signoff runs at the merge, as the Merge section of AGENTS.md says

by Opus-5.5 via Claude Code

@pascalandy pascalandy self-assigned this Oct 11, 2026
@pascalandy
pascalandy force-pushed the m02/t2-import-boundary branch from 2c1a796 to 6d416b2 Compare October 11, 2026 14:56
@pascalandy
pascalandy force-pushed the m02/t2-import-boundary branch 2 times, most recently from 4b5e3ab to a9da72e Compare October 11, 2026 15:22
@pascalandy
pascalandy force-pushed the m02/t2-import-boundary branch from a9da72e to ae0d86f Compare October 11, 2026 15:26
@pascalandy
pascalandy force-pushed the m02/t1-sdk-packages branch 2 times, most recently from 5283d24 to 279e7e3 Compare October 11, 2026 15:35
@pascalandy
pascalandy force-pushed the m02/t2-import-boundary branch 2 times, most recently from 36efdda to e10ec5d Compare October 11, 2026 15:42
@pascalandy
pascalandy force-pushed the m02/t2-import-boundary branch from e10ec5d to a298133 Compare October 11, 2026 15:44
@pascalandy
pascalandy force-pushed the m02/t1-sdk-packages branch 2 times, most recently from c6d2a2e to b61cbc2 Compare October 11, 2026 15:52
@pascalandy
pascalandy force-pushed the m02/t2-import-boundary branch 2 times, most recently from 2e3c4f5 to ce4e632 Compare October 11, 2026 17:13
- Purpose: M02-T2 asks just lint to enforce that the SDK, the extensions, and the fixture never import core's internal/ packages, so a bundled extension can leave the binary without a rewrite
- Impact: depguard rejects such an import outside tests, while tests still read the docs through internal/specdoc. A temporary import of internal/specdoc from sdk/runner failed the lint with the depguard rule public

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@pascalandy
pascalandy force-pushed the m02/t2-import-boundary branch from ce4e632 to 776e4b8 Compare October 12, 2026 14:49
@pascalandy
pascalandy changed the base branch from m02/t1-sdk-packages to main October 12, 2026 15:25
@pascalandy
pascalandy merged commit 776e4b8 into main Oct 12, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant