fakes: testing-seam — fakes out of production packages, real wiring explicit and loud #132
Labels
No labels
agent-blocked
agent-working
autopilot
bug
deferred
deploy-pending
enhancement
landing-pr
model-haiku
model-opus
model-sonnet
needs-design
needs-info
needs-triage
no-triage
out-of-scope
priority
ready-for-agent
ready-for-human
ready-for-session
rehearsal-183
snapshot-pending
standing-drive
wayfinder:grilling
wayfinder:map
wayfinder:prototype
wayfinder:research
wayfinder:task
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Depends on
Reference
Matou/idss#132
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Parent
Standards debt (test infrastructure in
internal/<pkg>/testing/). Filed from Ben's rulings 2026-07-26 after the review sweep of6596977..9e946b7: integration-last was deliberate seam-first sequencing — now build the integration layer; and pay all standards debt now. Ben's ruling: fakes become strictly a testing seam.What to build
The eleven fake files move from their production packages into
internal/<pkg>/testing/sub-packages. Production wiring (helper, control plane, agent) selects real adapters explicitly and fails loud at startup when unconfigured — never fake-by-default; dev/demo runs opt into fakes deliberately via an explicit mode. An ADR note records the ruling.Acceptance criteria
testing/sub-package.Blocked by
Task manifest
Done — landed on
origin/mainasd8fa075.What shipped (ADR 0100,
docs/adr/0100-fakes-are-strictly-a-testing-seam-production-fails-loud.md):internal/<pkg>/testing/sub-packages:clantesting,foundingtesting,breakglasstesting,jointesting,rescuetesting,updatetesting. No production package carries a fake constructor for these seams, and no production (default-build) code imports a…/testingsub-package — verified (go build ./...links no fake).founding.Newno longer fakes-by-default — its broker/DNS/reachability/clan/fleet/enrolment/laptop adapters are injected via the existingWith*options or left unset.found/clan/break-glass) and agent (join/enroll) return an honest startup error naming the unwired seam. Proven by//go:build !devstartup tests in each cmd package and by binary smoke (e.g.helper foundon the production build exits 1 with "the founding seam has no adapter configured … never fakes (ADR 0100)"). The control plane already used honest empty placeholders (unchanged).wiring_prod.go(//go:build !dev) fails loud;wiring_dev.go(//go:build dev) wires the fakes from the testing sub-packages.scripts/seam-smoke.shnow builds+vets both tags so the dev wiring cannot rot; the app boot integration test builds the helper with-tags dev.package <pkg>_test), reaching unexported symbols only through test-onlyexport_test.gobridges (production API never widened).Acceptance criteria:
testing/sub-package.-tags dev) drives every seam flow; suites green from their new home.Verification: both Go modules build/vet/test green under the default and
-tags devbuilds;gofmtclean; no newgovet/staticcheck/ineffassign/unusedfindings; broker module clean.Noted for a possible follow-up (outside the named eleven-file scope): a few inline test-only fake helpers remain in production files —
member/monitor/fleetstate(FakeIDP,FakeHeartbeats, …) andrescueledgersFakeClock. They are never wired fake-by-default in production, so the rulings core intent already holds for them; relocating them is a separate, member-heavy refactor.restingIdentitySide.Pairfails loud, so the ledger flips tooperatorbut no key, no audit and no door fan-out land #1570