Repository navigation
fix(devtools): wire lab-policy gates into the live CI, not just build_verify_steps - #3587
Merged
Merged
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (7)
📝 WalkthroughWalkthroughThe change routes quick CI verification through ChangesVerification and CI policy
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Problem: devtools/verify.py's build_verify_steps() keeps demo-tour-freshness inside the `if lab:` block, so it never runs in `devtools verify`, `devtools verify --quick` (the pre-push hook), or CI -- only the manual `devtools verify --lab`/`--all` opt-in exercises it (polylogue-ze5i). The committed docs/examples/demo-tour/ fixture had drifted (a `healed_tiers` key the demo receipts code had already grown was missing from the committed report.json/transcript.txt/command-output), invisible to every standing gate. What changed: regenerated the demo tour and copied the fresh evidence into docs/examples/demo-tour/ so the check is green again. Moved the "lab policy demo-tour-freshness" step from the `if lab:` block into the default `if not commit:` block (same tier as schema-versioning and classifier-fingerprints) with a comment explaining why it's safe to gate: fully deterministic (wall-clock timing already masked before comparison) and fixed-cost against one committed fixture, unlike backlog-hygiene/ bead-graph (which scan the whole Beads corpus and are left --lab-only, also documented inline). Also fixed test_quick_verify_omits_pytest, which hardcoded the exact step list and was already failing on master before this change (missing "lab policy classifier-fingerprints", added in an earlier PR without a matching test update). Verification: `devtools test tests/unit/devtools/test_verify.py` (88 passed). `devtools lab policy demo-tour-freshness` now passes standalone. Ref polylogue-ze5i Co-Authored-By: Claude <[email protected]>
Problem: docs/examples/demo-tour/ had drifted from what `polylogue demo tour` actually emits -- report.json was missing the `healed_tiers` key the demo receipts code had already grown, and the completion-claim sample manifest hash had shifted accordingly. Nothing caught this because devtools lab policy demo-tour-freshness only ran behind `devtools verify --lab` (see the paired devtools/verify.py commit promoting it into the default gate). What changed: ran `polylogue demo tour --out-dir polylogue-demo-tour --force` and copied the regenerated report.json/report.md/transcript.txt/ command-output/01-claim-versus-receipt.txt into docs/examples/demo-tour/. Wall-clock timing fields differ run-to-run by design (masked by the freshness check itself); the only substantive diff is the added healed_tiers key. Verification: `devtools lab policy demo-tour-freshness` passes. Ref polylogue-ze5i Co-Authored-By: Claude <[email protected]>
Problem: CircleCI's quick-gate job hand-picked five discrete steps (render-all-check, ruff check, ruff format, mypy) as a stand-in for `devtools verify --quick`, per its own header comment. That subset had drifted from the real thing: devtools/verify.py's default `if not commit:` block has grown to ~17 steps over time (topology/layering/closure-matrix, lab schema roundtrip, manifests, ci-workflows, doc-commands, docs-coverage, test-infra-currency, pytest-timeout-overrides, degrade-loudly, hash-boundary-census, schema-versioning, classifier-fingerprints, schema promotion audit, and now demo-tour-freshness), none of which quick-gate ever ran. The schema-versioning check specifically was wired only into .github/workflows/ci.yml, a GitHub Actions workflow that does not execute (GHA is billing-locked; CircleCI is the only live CI in this repo) -- so the migration-number collision behind PR #3566/#3568 that made the live archive briefly unqueryable (fixed by hand in PR #3573) would not have been caught by any CI that actually ran, despite appearing "CI-gated" in ci.yml. See polylogue-ze5i. What changed: replaced the four hand-picked ruff/mypy/render-all steps with a single `devtools verify --quick` call, which is the real superset and self-heals going forward -- any future step added to build_verify_steps' default block is automatically covered without a matching CircleCI edit. `devtools verify public-claims --json` stays separate since it is not part of that default block. Added a `lab-policies` job, wired into the existing nightly scheduled workflow alongside full-suite, running the 7 `lab policy *` checks that remain intentionally --lab-only (timestamp-doctrine, insight-honesty, demo-packet-registry, docs-drift, campaign-archive-boundaries, backlog-hygiene, bead-graph) so a continuously-failing policy is at least visible on a schedule instead of reachable only via a human remembering `devtools verify --lab`. Each step uses `when: always` so backlog-hygiene/bead-graph's known pre-existing backlog debt (485 findings / 225 missing-AC beads) does not mask a regression in one of the other five checks in the same job. Verification: reintroduced the exact migration-number-collision shape (bumped INDEX_SCHEMA_VERSION without a lifecycle.py delta declaration) and confirmed `devtools verify --quick` -- the command now wired into quick-gate -- fails with "Policy violation: each index schema bump needs a declared delta class"; reverted. Also confirmed demo-tour-freshness catches injected drift in docs/examples/demo-tour/report.json; reverted. `python -c "import yaml; yaml.safe_load(open('.circleci/config.yml'))"` parses cleanly; `devtools verify ci-workflows` passes (pre-existing unrelated warning on .github/workflows/ci.yml, not touched here). Ref polylogue-ze5i Co-Authored-By: Claude <[email protected]>
Sinity
force-pushed
the
feature/chore/lab-policy-gate-placement
branch
from
August 2, 2026 20:36
0425422 to
0821280
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes the gate-placement question in polylogue-ze5i for all 10
devtools lab policy *checks. Promotesdemo-tour-freshness(previously red) into the default verify gate alongsideschema-versioning/classifier-fingerprints, fixes CircleCI'squick-gatejob so it actually runs that gate instead of a stale hand-picked subset, and wires the remaining 7--lab-only checks into a new nightly CircleCI job so a continuously-failing policy is at least visible.Problem
Measured 2026-07-28 (polylogue-ze5i): schema-versioning, demo-tour-freshness, backlog-hygiene, and bead-graph all sat behind
devtools verify --lab, which no standing gate runs. A migration-number collision (PR #3566/#3568) made the live archive briefly unqueryable and was only caught by hand afterward (PR #3573).A prior session moved
schema-versioning(andclassifier-fingerprints) out of--labintodevtools/verify.py's defaultif not commit:block. But investigating further this session found that promotion was hollow in practice: CircleCI'squick-gatejob -- the only CI that actually runs in this repo (GitHub Actions is billing-locked/dark;.github/workflows/ci.ymlreferencesschema-versioningbut does not execute) -- hand-picked five discrete steps (render all --check,public-claims, ruff, mypy) instead of callingdevtools verify --quick. None ofverify topology/verify layering/schema-versioning/classifier-fingerprints/schema promotion audit/etc. (~17 steps total) ever ran in live CI.demo-tour-freshnessitself was red: the committeddocs/examples/demo-tour/fixture was missing ahealed_tierskey the demo receipts code had already grown.Solution
devtools/verify.py: movedlab policy demo-tour-freshnessfrom theif lab:block into the defaultif not commit:block, with a comment on why it's safe to gate every push (deterministic -- wall-clock timing already masked before comparison -- and fixed-cost against one committed fixture, unlike the corpus-scanningbacklog-hygiene/bead-graph). Added an explanatory comment on why those two stay--lab-only.docs/examples/demo-tour/: regenerated viapolylogue demo tour --out-dir polylogue-demo-tour --forceand copied the fresh evidence in, fixing the drift..circleci/config.yml: replacedquick-gate's four hand-picked steps with a singledevtools verify --quickcall (public-claims stays separate since it isn't part of that block) -- this self-heals going forward, since any future addition tobuild_verify_steps' default block is automatically covered without a matching CircleCI edit. Added alab-policiesjob wired into the existing nightly scheduled workflow, running the 7 checks that remain intentionally--lab-only (timestamp-doctrine,insight-honesty,demo-packet-registry,docs-drift,campaign-archive-boundaries,backlog-hygiene,bead-graph), each step usingwhen: alwaysso the two known-red corpus-scan checks don't mask a regression in the other five.tests/unit/devtools/test_verify.py: fixedtest_quick_verify_omits_pytest's hardcoded step list, which was already failing on master before this change (missingclassifier-fingerprints, added in an earlier PR without a matching test update).Verification
devtools test tests/unit/devtools/test_verify.py-- 88 passed.devtools verify --quick-- green end-to-end, ~90-105s total.INDEX_SCHEMA_VERSIONbump with nolifecycle.pydelta declaration) and confirmeddevtools verify --quick-- the exact command now wired into CircleCI'squick-gate-- fails withPolicy violation: each index schema bump needs a declared delta class; reverted.docs/examples/demo-tour/report.jsonand confirmeddevtools lab policy demo-tour-freshnesscatches it; reverted.python -c "import yaml; yaml.safe_load(open('.circleci/config.yml'))"parses cleanly;devtools verify ci-workflowspasses (one pre-existing, unrelated warning on.github/workflows/ci.yml, not touched here).Not run: the actual CircleCI pipeline (can't trigger from here) -- verified locally that the exact command it now calls (
devtools verify --quick) behaves as claimed.Ref polylogue-ze5i
Summary by CodeRabbit
Bug Fixes
Documentation
Tests