Add public API boundary checks
This commit is contained in:
@@ -481,7 +481,7 @@ guidance and documented the command contract.
|
||||
|
||||
## Stage 3: Protect public contracts and dependency direction
|
||||
|
||||
Status: Pending. Depends on Stage 2.
|
||||
Status: Complete. Depends on Stage 2.
|
||||
|
||||
1. Add a compiled-export boundary checker for both facades using `go list` export
|
||||
data and `go/types`. Inspect exported signatures, fields, callbacks, aliases,
|
||||
@@ -499,6 +499,15 @@ Acceptance: actual exports pass and meaningful negative fixtures fail. Tests
|
||||
inspect contracts and imports, with no fixed inventory of future internal
|
||||
package names. Extend these checks as subsequent exports land.
|
||||
|
||||
Completion evidence: added `internal/apicheck`, which loads compiled exports
|
||||
from `go list -deps -export` and inspects signatures, fields, aliases, generic
|
||||
constraints, and pointer and value method sets through `go/types`. The checks
|
||||
pass for both public facades and enforce internal import direction and the
|
||||
runtime dependency boundary. Negative fixtures detect leaked types, aliases,
|
||||
callbacks, generic constraints, and promoted implementation methods; a private
|
||||
implementation field and selected standard-library contracts pass. Added the
|
||||
checker command and internal package inventory to the canonical developer docs.
|
||||
|
||||
## Stage 4: Implement profile loading and command adaptation
|
||||
|
||||
Status: Pending. Depends on Stage 3.
|
||||
|
||||
Reference in New Issue
Block a user