fix(required-gate): decouple language lanes from pr-contract#73
Merged
Conversation
A failing PR body must not suppress real CI. The seven downstream lanes were gated on pr-contract success, so a contract failure skipped every lane and the decision job reported a misleading "node ci ... skipped" while no CI actually ran. Lanes now depend on detect alone; the decision job remains the single aggregator that requires both the contract and the lanes, so a malformed body still blocks merge — with real signal. Invert the workflow-structure tests that encoded the coupling as the spec, and add a test asserting the decision job still enforces the contract after decoupling. Closes #72 Refs ArchonVII/archon#200, ArchonVII/archon#202 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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
Decouples the seven downstream lanes in the reusable
repo-required-gate.ymlfrompr-contract, so a failing PR body can no longer skip real CI.Root cause (filed as #72; surfaced downstream as ArchonVII/archon#200): every lane (
node-ci,go-ci,python-ci,workflow-validation,policy-validation,dependency-review,snapshot-validation) carriedneeds: [detect, pr-contract]plus anif:clause gating onneeds.pr-contract.result == 'success'. A contract failure made every lane skip; thedecisionjob then requirednode ci == success, sawskipped, and emitted a misleading "node ci ... required but result was skipped" while no CI had run.After this change, lanes depend on
detectalone. Thedecisionjob is unchanged and stays the single aggregator that requires both the contract and the lanes — so a malformed body still blocks merge, now with real lane signal instead of a phantom skip.Changes
.github/workflows/repo-required-gate.yml: removepr-contractfromneeds:and drop the contract-gatingif:clause on all 7 lanes; add a WHY comment citing the incident.scripts/workflow-structure.test.mjs: invert the two tests that encoded the coupling as the spec; add a test asserting thedecisionjob still enforces the contract; addgo-cito the lane coverage (was omitted).Verification
npm test— 122/122 pass (was 120 pass / 2 fail before the test inversion)actionlint .github/workflows/repo-required-gate.yml— cleandecisionjob still requirespr contractsuccess (new test + manual read)Verification Notes
Ran the full vitest suite in the source checkout after the change: 6 files, 122 tests, all green. The two previously-failing tests (
gates expensive PR jobs on the cheap PR contract,lets explicit pr-contract opt-outs continue to downstream jobs) were inverted to assert decoupling; a new test (still enforces the PR contract in the decision job after decoupling) guards against silently dropping enforcement. actionlint 1.7.7 reports no errors. Theself-testworkflow re-runs vitest live on this PR sincescripts/**changed.Limitation: GitHub's runtime evaluation of the
if:/needsgraph is only exercised by a real consumer run; the structural tests assert YAML shape, not runtime. The decoupling is correct by construction (no laneneeds/ifreferences pr-contract) and thedecisionaggregator is untouched.Docs / Changelog
CI-internal reusable-workflow fix; no consumer-facing input or API changed (
run-pr-contractinput and its default staytrue).Rollout
Reusable-workflow internals only — consumers pin
@v1. After merge, advance the movingv1tag to the merged commit so consumers pick up the fix (per archon-ecosystem-sync). No consumer caller files need editing. Archon's local workaround (ArchonVII/archon#202) keeps working and may optionally be reverted to the shared contract later.Closes #72
🤖 Generated with Claude Code