feat(ci): structural drift gate for cascade list vs manifest (RFC #388 PR-3) - #2561
Merged
Merged
Conversation
…PR-3) Closes the recurrence path of PR #2556. The data fix realigned 8→4 templates in publish-runtime.yml's TEMPLATES variable, but the underlying drift hazard was unguarded — the next manifest change could silently leave cascade out of sync again. This gate fails any PR that changes manifest.json or publish-runtime.yml in a way that makes the cascade list diverge from manifest workspace_templates (suffix-stripped). Either direction is caught: missing-from-cascade templates that won't auto-rebuild on a new wheel publish (the codex-stuck-on-stale-runtime bug class — PR #2512 added codex to manifest, cascade wasn't updated, codex stayed pinned to its last-built runtime version for weeks). extra-in-cascade cascade dispatches to deprecated templates (the wasted-API-calls + dead-CI-noise class — PR #2536 pruned 5 templates from manifest; cascade kept dispatching to all 8 until PR #2556). Triggers narrowly: only on PRs that touch manifest.json, publish-runtime.yml, or the script itself. Fast (single grep+sed+comm pipeline, no Go build). Surfaced during the RFC #388 prior-art audit; folded in as the structural follow-up to the data fix #2556 promised. Self-tested both failure modes locally before commit: - Drop codex from cascade → script fails with "MISSING: codex" - Add langgraph to cascade → script fails with "EXTRA: langgraph" Refs: https://github.com/Molecule-AI/molecule-controlplane/issues/388 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
HongmingWang-Rabbit
requested a review
from hongmingwang-moleculeai
as a code owner
May 3, 2026 10:53
HongmingWang-Rabbit
enabled auto-merge
May 3, 2026 10:54
HongmingWang-Rabbit
pushed a commit
that referenced
this pull request
Jun 12, 2026
…-check job (hung-run bound)' (#2561) from fix/gate-check-v3-timeout into main
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 recurrence path of PR #2556. The data fix realigned 8→4 templates in
publish-runtime.yml's TEMPLATES variable, but the underlying drift hazard was unguarded — the next manifest change could silently leave cascade out of sync again.What it gates
Any PR that changes `manifest.json` or `publish-runtime.yml` in a way that makes the cascade list diverge from manifest `workspace_templates` (suffix-stripped). Either direction is caught:
Implementation
`scripts/check-cascade-list-vs-manifest.sh` — bash, jq, single grep+sed+comm pipeline (~50 lines). Triggers narrowly: only on PRs that touch `manifest.json`, `publish-runtime.yml`, or the script itself.
Self-tested both failure modes locally before commit
Drop `codex` from cascade → script fails with `MISSING: codex`.
Add `langgraph` to cascade → script fails with `EXTRA: langgraph`.
Current staging cascade aligned with manifest → script passes (4 entries).
A subtle bug I caught while writing this
First draft used `\s*` in the sed pattern. macOS BSD sed doesn't recognize `\s` — treats it as literal `s` with `*` quantifier (matching empty-prefix-of-literal-s). The pattern "matched" but didn't strip the leading whitespace, so the captured group was ` TEMPLATES="claude-code hermes openclaw codex"`, which then split into garbage tokens.
Fixed to `[[:space:]]` which works on both BSD and GNU sed. Documented inline so the next person adding a similar script doesn't re-stumble.
Refs
Test plan
🤖 Generated with Claude Code