Skip to content

fix(required-gate): decouple language lanes from pr-contract#73

Merged
ArchonVII merged 1 commit into
mainfrom
fix/required-gate-decouple-contract
Jun 14, 2026
Merged

fix(required-gate): decouple language lanes from pr-contract#73
ArchonVII merged 1 commit into
mainfrom
fix/required-gate-decouple-contract

Conversation

@ArchonVII

Copy link
Copy Markdown
Owner

Summary

Decouples the seven downstream lanes in the reusable repo-required-gate.yml from pr-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) carried needs: [detect, pr-contract] plus an if: clause gating on needs.pr-contract.result == 'success'. A contract failure made every lane skip; the decision job then required node ci == success, saw skipped, and emitted a misleading "node ci ... required but result was skipped" while no CI had run.

After this change, lanes depend on detect alone. The decision job 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: remove pr-contract from needs: and drop the contract-gating if: 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 the decision job still enforces the contract; add go-ci to 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 — clean
  • YAML parse — OK
  • decision job still requires pr contract success (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. The self-test workflow re-runs vitest live on this PR since scripts/** changed.

Limitation: GitHub's runtime evaluation of the if:/needs graph is only exercised by a real consumer run; the structural tests assert YAML shape, not runtime. The decoupling is correct by construction (no lane needs/if references pr-contract) and the decision aggregator is untouched.

Docs / Changelog

CI-internal reusable-workflow fix; no consumer-facing input or API changed (run-pr-contract input and its default stay true).

Rollout

Reusable-workflow internals only — consumers pin @v1. After merge, advance the moving v1 tag 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

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>
@ArchonVII
ArchonVII merged commit 217b85b into main Jun 14, 2026
1 check passed
@ArchonVII
ArchonVII deleted the fix/required-gate-decouple-contract branch June 14, 2026 00:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ci(required-gate): pr-contract failure fail-fast-skips all language CI lanes

1 participant