Repository navigation
Description
The merge bus refuses a candidate whose detect jobs failed, because skipped is only trustworthy when the job that decided to skip succeeded. Nothing protects a human doing the same thing.
The hole
Every expensive job gates on needs.detect.outputs.*. When a detect job fails, its dependents report skipped, and branch protection accepts skipped as satisfied. A PR can therefore show all twelve required contexts satisfied with not one of them having run, and mergeStateStatus: CLEAN.
Observed on #473 (2026-11-05): two Rust files changed, all three detect jobs failed in the Actions-minutes outage, every required context skipped, PR reported CLEAN. It was mergeable by hand with nothing compiled or tested. Re-running CI turned it genuinely red.
This also defeats the aggregator gates: test and DuckLake + extensions e2e carry if: !cancelled() && needs.detect.outputs.code == 'true', so with detect failed the gate is skipped before its fail-closed case can run. The aggregator pattern assumes detect succeeds.
What exists today
Only the bus checks it, and only for its own candidates. The query is documented in the ci-and-supply-chain skill:
gh api repos/:owner/:repo/commits/<head_sha>/check-runs --paginate \
--jq '[.check_runs[]|select(.name|startswith("detect"))|select(.conclusion=="failure")]|length'
Options
- Make the detect jobs fail the gate rather than skip it. The cleanest fix, but it cannot be done by making the detect contexts required: there are three of them under two names, and a required context that legitimately does not report blocks every PR forever — the trap the
plan (<env>)episode already cost. An aggregator that treats an emptyneeds.detect.outputs.*as failure is the shape to look at. - Or accept it and make the check cheap to run by hand, e.g. a one-line alias, and say so in the skill's "merging" section.
Not urgent — it needs a CI outage to arise, and outages are visible. But it is a false green of exactly the class this repo keeps engineering against, and right now the only thing that catches it is a tool nobody is obliged to use.
Product context (2026-11-26)
Why this matters for the API product: Merge-gate trust. A PR that compiled and tested nothing must not be mergeable, and that includes infra changes to the platform the API runs on.
Current state: Mostly fixed for rust and frontend, still open for infra.
- Fixed in ce3fd01 (2026-11-09): the aggregators now run with
if: always()and callscripts/ci/gate-selection.sh. Its line 5 fails whenDETECT_RESULT != success. That coverstest(rust.yml:835-853),DuckLake + extensions e2e(rust.yml:1173-1193) andplaywright functional tier(frontend.yml:306-325). A failed rust or frontenddetectnow turns a required context red. That closes the fix(engine): a correction pass records the mode RUN_MODES declares #473 shape. - Still open:
infra.yml'sterraform plangate isif: !cancelled() && needs.detect.outputs.infra == 'true'(infra.yml:413). Itsvalidateandhelpersjobs gate the same way (:185,:258). Ifdetect infra changesfails, all three required Terraform contexts skip and count as satisfied.plan-gateusesgate-all-legs.sh, which never looks atdetect. - Original body now wrong: "only the bus checks it" is out of date. The merge bus was removed in a4cb602 (2026-11-20). The manual check now lives in
land-pr(SKILL.md:67,references/polling.md:26-30), which is what the "make it cheap by hand" option asked for. - Other required jobs (
fmt + clippy + docs,cargo-deny,entities, the frontend lint and audit jobs,postgres.js) still skip on a failed detect. They are covered only because a sibling aggregator in the same workflow now fails.
Definition of done:
- With
detect infra changesforced to fail on an infra-only PR,terraform plan(or another required infra context) concludesfailure, and a fork PR still passes. - Add a test case for that in
scripts/ci/test_ci_selection.pyor an equivalent.
Size: ~0.25 engineer-weeks.
Activity
[-]a hand-merge can still land a PR whose CI verified nothing[/-][+]infra.yml: a failed `detect infra changes` leaves all three Terraform required contexts skipped, so an unverified infra PR reads CLEAN[/+]ci(infra): a failed detect turns `terraform plan` red instead of skip…