close-report: a per-area required-suite set (gate 4 only refutes LISTED failing tests) #1943
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.
Dependencies
No dependencies set.
Reference
Matou/idss#1943
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?
Split out of #1940 (named there under "Out of scope").
Close-report gate 4 refutes
status:successonly on a listed failing test (tests[]with a non-zeroexit_code). An agent that simply omits a required suite fromtests[]passes gate 4 clean — the same root as the #1934/#1933 holes #1940 closed (the agent chooses its own evidence), but a different fix: a per-area required-suite set (e.g. touchinginternal/idp/**requires theinternal/idpgo test intests[]), checked inclose-report-lib.shthe way gate 7'smirrors.tsvis a repo-level registry.Not judging completeness in general — just refusing a close whose changed_files touch an area whose required suite is absent from
tests[].Advances the #1929-retro line. Ref #1940.
Ruled by agent under ADR 0174 — veto anytime.
Category:
enhancement· State:ready-for-sessionRuling: ready to build — but for an interactive agent session, not the swarm.
Why
ready-for-session, notready-for-agent: the whole change lives in.sandcastle/close-report-lib.sh(and its test.sandcastle/tests/close-report-lib-test.sh) —a protected
.sandcastle/path (#445). A swarm worker must never edit the machinery that judgesits own work, and
.sandcastle/list-ready-tasks.shreads onlyready-for-agent, so this labelkeeps the ticket out of the queue and in reach of a session — exactly the rail #1940 itself
landed on (a
sandcastle:commit).Why this is a two-way door: the new check is additive and default-open (an envelope whose
changed_filestouch no registered area is unaffected, so every currently-passing close stillpasses), and it is fully revertible by a later commit. Provable by the existing
.sandcastle/tests/close-report-lib-test.sh(where gates 4/6/7 already live) pluspreflight-swarm.sh'sguard_close_reportself-test. Not on the one-way-door list.Brief
What: close the gate-4 omission hole. Gate 4 refutes
status:successonly against a listedfailing test; an agent that simply omits a required suite from
tests[]passes clean. Add aper-area required-suite set: if
changed_filestouch a registered area, its required suite mustbe present in
tests[](independent of whether other listed tests pass).Where:
.sandcastle/close-report-lib.sh, following the shape of gate 7 (mirrors.tsv) — arepo-level registry file mapping an area glob → required suite id, read by the library the same way
mirrors.tsvis. Keep the library pure/offline (no network); the area→suite map is a static file.Acceptance:
changed_filesmatch a registered area but whosetests[]omit that area'srequired suite is refused, naming the area and the missing suite.
envelope still passes).
.sandcastle/tests/close-report-lib-test.shcover: area-touched-suite-present(pass), area-touched-suite-omitted (refuse), no-area (pass), malformed-registry (fail closed);
guard_close_reportself-test extended.Scope guard: this is not general completeness judging (that's
unproven_by_seam, prose only) —only a required-suite-presence check keyed on touched areas. Seed the registry conservatively
(e.g.
internal/idp/**→ theinternal/idpgo suite) so it never over-refuses.Ref: #1940 (gates 4/6/7), STATUS.md 2026-09-27 #1940 entry. Advances the #1929-retro line.
Close-report — #1943 DONE (gate 8: required-suites)
Ruled by agent under ADR 0174 — veto anytime.
What landed. Close-report gate 8 (
required-suites): on astatus:successclose, achanged_filesentry matching an area in a new repo-local.sandcastle/required-suites.tsv(area-glob<TAB>suite-token[|alt…]) demands that at least onetests[]command contains one of that area's|-separated suite tokens — else the close is refused, naming the area and the suite it never ran. Gate 4 only refutes a listed test that exited non-zero; an agent that simply omits a required suite fromtests[]passed gate 4 clean (the #1934/#1933 evidence-choosing root, a different hole). The area-glob is a bash pattern (*spans/, sointernal/idp/*.gomatches nested Go files incl._test.go); a malformed registry line fails closed for every close, exactly as gate 7'smirrors.tsvdoes. Additive + default-open: no registry / no area match /status != success→ no-op, so every existing passing envelope still passes.Seeded with the area the retro named:
internal/idp/*.go → go test ./internal/idp/|go test ./...— a whole-module run from the repo root exercises the same package, so it is a valid alternative to the targeted run.Where it lives. The gate logic is in the vendored
close-report-lib.sh(+ its test +preflight-swarm.sh), which is drift-gated byte-identical toMatou/dev-factory. So it landed upstream first and was re-vendored (the #1940 shape):4ec278d297995c78b7d41a760e5680c6e753d237(direct push to main).04dcedae4d4dbeec2bde33c8e63a14d722080ec3onmain—FACTORY_REF 117a6cfd→4ec278d, the three vendored files byte-identical, plus the repo-local pieces (required-suites.tsv, the{{ENRICH:workflow-verify}}enrichment re-rendered intoprompt.mditem 8,STATUS.md).Proof (two-way door).
internal/idp/appdoor.go, lists onlygo test ./broker/...) passes clean on the pre-gate-8 lib (rc=0, the hole) and is refused on the new lib (rc=1).internal/idpcommit:go test ./internal/idp/...✅,go test ./...✅,go test ./broker/...❌,npm test❌.close-report-lib-test.sh— 36 checks (6 new: omitted / targeted / whole-module-alt / blocked-exempt / malformed-fails-closed / default-open) green.close-report-test.sh— 95 green.preflight-swarm.sh'sguard_close_reportgains a gate-8 fixture.check-harness-driftgreen at4ec278d.Revertible by commit/config; nothing one-way was touched.
Not done here (follow-up already tracked): the global
to-ticketsSKILL.mdfield carry is #1942 (a~/.claude/skills/skill absent from this host).