feat(ci): promote the certain-exempt docs core to merge-queue trust#6047
feat(ci): promote the certain-exempt docs core to merge-queue trust#6047PerishCode wants to merge 9 commits into
Conversation
Split the exempt surface into a certain-tier core (docs/, apps/landing-page/, .vscode/, .idea/, .github/ISSUE_TEMPLATE/, LICENSE, CODEOWNERS) and the medium residue (global markdown regex, workflow exacts, nix). A merge-queue group confined to the core now drops to the unconditional floor lanes instead of running everything; replaying the last 398 first-parent merges puts that at 12.3% of queue traffic. The promotion is backed by a new floor-lane guard check, "certain-exempt surface consumption": no skippable-lane source may reference a certain-exempt path (dot-relative literals flagged everywhere; bare repo-relative literals flagged outside test fixtures). guard.ts gains --list-checks as the machine registry, and the rule-table invariant test now requires every certain rule's guard field to resolve to a live check.
The living framework for confidence-tier changes: medium-tier cheap loop vs certain-tier deliberate loop, the three-sentence promotion discipline, guard strength levels and floor placement, evidence recipes (replay, offline plan, queue trace extraction), tooling graduation criteria, and the open questions deliberately left undecided. Indexed from AGENTS.md and .github/AGENTS.md required reading.
mrcfps
left a comment
There was a problem hiding this comment.
@PerishCode Thanks for the careful measurement, containment goldens, and documented promotion methodology. The scope behavior and focused validation look solid; I found one merge-safe guard-coverage gap where the blanket test-fixture exemption can hide genuine repository-root reads. Tightening that boundary would make the new certain-tier invariant more durable.
🔁 Powered by Looper · runner=reviewer · agent=codex · An autonomous AI dev team for your GitHub repos.Generated-By: looper 0.11.0 (runner=fixer, agent=codex)
|
Looper fixer round complete — b56bc20
🔁 Powered by Looper · runner=fixer · agent=codex · An autonomous AI dev team for your GitHub repos. |
mrcfps
left a comment
There was a problem hiding this comment.
@PerishCode Thank you for the careful follow-up on the earlier fixture exemption and for the strong scope goldens and methodology write-up. The current tree and focused validation look sound; I found one merge-safe static-analysis gap worth tightening so the new certain-tier boundary remains dependable as path construction evolves.
🔁 Powered by Looper · runner=reviewer · agent=codex · An autonomous AI dev team for your GitHub repos.…ring The review round established that apps/daemon/tests/runtimes/trae-cli.test.ts genuinely reads docs/agent-adapters.md. Its exemption from the consumption guard was justified by a wiring fact (the ci.yml daemon lane runs only project-watchers.test.ts) stated as prose, which would rot silently if the lane ever widened. Make the exception conditional on that exact ci.yml needle: when the daemon lane changes, the exemption disappears and the guard reports the read, forcing reclassification instead of trusting a stale rationale.
|
Follow-up on the fixer round, from the author side: @mrcfps's finding is confirmed and was a real hole. The original fixture-tolerance rule assumed bare One hardening on top (723faea): the trae-cli exception was justified by a wiring fact ("not selected by any ci.yml daemon-test lane") stated as prose. That fact is true today — the daemon lane runs only On the red Web workspace tests job: |
Backfill the pattern the first review round produced: guard allowlist entries justified by local definitional facts may stay prose, but entries justified by remote mutable facts (lane wiring, gate topology) must be conditional on a checked precondition so the exception dies loudly with its premise. Records the trae-cli/daemon-lane needle as the worked example.
mrcfps
left a comment
There was a problem hiding this comment.
@PerishCode Thank you for the careful follow-up: the test-fixture handling is now much narrower, the real docs consumer is tied to current lane wiring, and the confidence methodology is substantially clearer. I verified all changed ranges and reran the 36-case scope suite, scripts TypeScript check, and full repository guard successfully. I found one additional merge-safe gap in how that lane-wiring precondition is enforced; the existing unresolved static path-composition thread also still applies, so I have not duplicated it here.
🔁 Powered by Looper · runner=reviewer · agent=codex · An autonomous AI dev team for your GitHub repos.Generated-By: looper 0.11.0 (runner=fixer, agent=codex)
|
Looper fixer round complete — 3682778
🔁 Powered by Looper · runner=fixer · agent=codex · An autonomous AI dev team for your GitHub repos. |
Generated-By: looper 0.11.0 (runner=fixer, agent=codex)
|
Looper fixer round complete — 6849e86
🔁 Powered by Looper · runner=fixer · agent=codex · An autonomous AI dev team for your GitHub repos. |
mrcfps
left a comment
There was a problem hiding this comment.
@PerishCode Thank you for the quick, careful follow-up on the earlier guard feedback. The certain-tier scope behavior, current workflow wiring, and focused validation are sound; I found one remaining merge-safe command-normalization gap in the new exclusivity check that is worth closing so the conditional exception stays fail-closed as CI syntax evolves.
🔁 Powered by Looper · runner=reviewer · agent=codex · An autonomous AI dev team for your GitHub repos.Generated-By: looper 0.11.0 (runner=fixer, agent=codex)
|
Looper fixer round complete — 7852a1e
🔁 Powered by Looper · runner=fixer · agent=codex · An autonomous AI dev team for your GitHub repos. |
mrcfps
left a comment
There was a problem hiding this comment.
@PerishCode Thank you for the careful follow-up and the added selector-form coverage. The certain-tier scope behavior, guard, documentation, and focused validation are otherwise coherent; I found one remaining merge-safe parsing gap in the conditional daemon-test exception that is worth making fail-closed.
🔁 Powered by Looper · runner=reviewer · agent=codex · An autonomous AI dev team for your GitHub repos.Generated-By: looper 0.11.0 (runner=fixer, agent=codex)
|
Looper fixer round complete — 5935905
🔁 Powered by Looper · runner=fixer · agent=codex · An autonomous AI dev team for your GitHub repos. |
mrcfps
left a comment
There was a problem hiding this comment.
@PerishCode I reviewed all changed ranges on the current head, including the certain-tier rule split, fail-closed scope behavior, guard registration, consumption scanner and daemon-command inventory, methodology documentation, and the expanded scope fixture matrix. I also verified this exact checkout with the 37-case focused scope suite, the full repository guard, the scripts TypeScript check, and the full workspace typecheck; all passed. The latest tokenization follow-up closes the prior command-order gap cleanly. Thank you for the careful measurement, strong containment tests, and patient hardening across the review rounds—this is thoughtful CI work. 🙌
🔁 Powered by Looper · runner=reviewer · agent=codex · An autonomous AI dev team for your GitHub repos.
Why
#6029 landed the confidence-tiered scope rule structure as a deliberate degenerate case: all rules
medium, thecertainset empty, the merge queue running everything. This PR is the promised cold start — the first certain-tier promotion — chosen and sized by measurement rather than intuition.The pain: merge-queue runs are all-or-nothing. Replaying the last 398 first-parent merges through the evaluator shows 14.1% touched only the exempt surface (docs, landing-page, editor configs), and 12.3% stay pure under a narrowed, guardable core — yet every one of those merges ran the full lane set (~51 runner-minutes of skippable lanes per run, measured across recent successful queue runs; UI P0 alone is ~31 of them). Docs and translation PRs pay a ~10-minute merge latency for browser suites that cannot observe them.
The promotion is statable in three sentences: promote the
docs//apps/landing-page//editor-config exempt core tocertain, guarded by a new floor-lane check asserting no skippable-lane source consumes those paths; a pure-core queue group now drops to the two unconditional floor lanes; measured tonnage is 12.3% of queue traffic (queue groups are effectively single-PR: 429 merges vs 440 successful queue runs this month, so the per-merge replay transfers directly).The second deliverable is the methodology this decision was made with:
specs/current/ci.mdrecords the medium/certain iteration loops, the three-sentence promotion discipline, guard strength levels and floor placement rules, and the replay recipes — so the next promotion is a rule-table diff plus evidence, not a re-derivation.What users will see
No product-facing change. For contributors and maintainers:
docs/,apps/landing-page/,.vscode/,.idea/,.github/ISSUE_TEMPLATE/,LICENSE,.github/CODEOWNERSnow runs only preflight + workspace unit tests (~4 min wall-clock instead of ~10). Any other file in the group escalates and keeps the full plan, exactly as before. Root markdown (README.mdetc.) deliberately stays medium-tier.pnpm guardgains a "certain-exempt surface consumption" check: a repo-relativedocs/...(or other certain-exempt) reference in gate-lane source now fails guard with a rationale and an exit path. Dot-relative references are flagged everywhere; bare literals only outside test fixtures (Vitest cwds make bare fixture paths unable to reach repository docs).scripts/guard.ts --list-checksprints the check-name registry; the rule-table invariant test resolves every certain rule'sguardfield against it, so a certain rule can never silently outlive its guard.specs/current/ci.mdis the new required reading before changing confidence or guard fields (indexed fromAGENTS.mdand.github/AGENTS.md).Surface area
apps/weborapps/desktop(including Electron menu bar)odsubcommand or flag, newtools-dev/tools-pack/tools-prflag, or newOD_*env var/api/*endpoint, new SSE event, or changed shape inpackages/contractsskills/,design-systems/,design-templates/, orcraft/, or change to the skills protocolTRANSLATIONS.mdfor the locale workflow)package.jsonWhat's in here (by commit)
feat(ci): the promotion + guard.exempt-surfacesplits intocertain-exempt-surface(the promotable core,confidence: "certain", guard named) and the medium residue (global*.mdregex, trusted-workflow exacts,nix/); the residue carriesexcludeWhenover the core so min-confidence co-matching cannot neutralize the promotion fordocs/**.md. New guard checkscripts/check-certain-exempt-consumption.tsscans gate-lane sources (rootscripts/excluded — floor-owned code runs on every plan and legitimately reads docs, e.g. product neutrality) with a two-level precision rule tuned against the real false-positive corpus (24 project-fixture hits at the naive level, 1 true consumer at the final level:tools/releasereadingdocs/CHANGELOG, which executes in no ci.yml lane — allowlisted with rationale). Goldens: one new case pins the divergence (pure-core queue group → floor lanes), the adjacent case pins containment (a group withREADME.mdstill runs everything), and new invariants pin no-co-match and guard resolution.docs(ci): the methodology.specs/current/ci.md+ index lines. Owns confidence-tier evolution; topology stays with.github/AGENTS.md.Expected effect (measured)
Bug fix verification
Not a bug fix. Behavior-change containment is pinned the same way #6029 pinned behavior preservation: the golden that changes is the proof of the promotion; the goldens that do not change (root-markdown group, mixed group, resolution-failure fail-open, 300-file ceiling) are the proof of its limits.
Validation
pnpm guard(including the new check; it caught its own test's fixture snippets during development — allowlisted with rationale)pnpm typechecksurfaces touched:pnpm exec tsc -p scripts/tsconfig.json --noEmit+@open-design/e2etypecheckpnpm --filter @open-design/e2e test tests/scripts/scopes.test.ts— 36 passing (19 goldens including the new divergence case, queue failure paths, rule-table invariants, consumption-guard precision semantics)pnpm --filter @open-design/e2e test tests/packaged-smoke-workflow.test.ts— 52 passing (no topology entanglement)scripts/scopes.ts plan --context merge-queue --files docs/architecture.md apps/landing-page/src/index.astro LICENSE→ zero escalations, floor lanes onlyAdjacent issues
e2e/tests/**arms no e2e Vitest lane on PR runs; consequently edits to the trusted atom workflows (comment.atom.ymletc.) run the workflow-topology tests only in the merge queue, nowhere on the PR itself. Pre-existing; deserves its own medium-tier rule PR.mocks/**is fallback-classified into Playwright lanes instead of the daemon tests that consume it (~1% tonnage; worked-example candidate for the medium loop).🤖 Generated with Claude Code