Skip to content

fix(ci): guard corpus-pin audits against an empty LANGUAGE_CRUCIBLE_REF - #2637

Merged
squid-protocol merged 1 commit into
mainfrom
fix/crucible-ref-fork-guard
Sep 1, 2026
Merged

fix(ci): guard corpus-pin audits against an empty LANGUAGE_CRUCIBLE_REF#2637
squid-protocol merged 1 commit into
mainfrom
fix/crucible-ref-fork-guard

Conversation

@squid-protocol

Copy link
Copy Markdown
Owner

Description

Found via #2628, our first fork PR in a long while. It arrived with four red audits — both
crucible-audit modes, tree-sitter-accuracy-audit, tri-comparison-audit — all dying
identically at fatal: Remote branch not found in upstream origin, before any engine code ran.

Root cause: GitHub withholds repository variables (like secrets) from pull_request runs raised
from a fork, so vars.LANGUAGE_CRUCIBLE_REF expands to an empty string and the workflows run
git clone --branch "". The variable itself is fine (v1.2.0); it is simply not visible to the
run. rosetta-audit dodged this only because it happens to spell the lookup
vars.KEYWORD_ROSETTA_REF || 'main'.

Changes

  • Guard the clone in the five corpus-backed workflows: fail with an explicit ::error:: naming
    the fork limitation and pointing at CONTRIBUTING.md, instead of a bare git error.
  • CONTRIBUTING.md: new Checks that cannot run on fork PRs section.
  • CONTRIBUTING.md: add rosetta-audit as a fourth entry under CI Pipeline & Baselines.

Why not || 'main'

That is what rosetta-audit does, and it would turn these four checks green on fork PRs — but
these pins exist to make the audits deterministic. Falling back to the corpus's main would audit
against a snapshot nobody chose and hand back an authoritative-looking wrong answer, in either
direction. A legible failure is better than a silent substitution. Making these audits actually
run for fork contributors is a separate policy question (label-gated re-run, workflow_run,
or a committed default pin) worth deciding on its own merits.

Note on rosetta-audit

Its || 'main' fallback has the same determinism gap — on a fork PR it silently audits against
corpus main rather than KEYWORD_ROSETTA_REF. It produced a correct result on #2628, so this
PR leaves it alone, but it is worth a follow-up.

Core Engine Modification Checklist

Not applicable — no engine code changes. CI configuration and contributor documentation only.

Cross-repo

None required.

Refs #2628, #2557

GitHub withholds repository variables -- like secrets -- from pull_request
runs raised from a fork, so `vars.LANGUAGE_CRUCIBLE_REF` expands to an empty
string there and the five corpus-backed workflows ran `git clone --branch ""`,
failing with a bare `fatal: Remote branch  not found in upstream origin`
before any engine code was exercised.

#2628 is the first fork PR this repo has seen in a long while, which is why
this went unnoticed: it arrived with four red audits that had nothing to do
with the contributor's change.

Guard the clone instead of falling back to the corpus's `main`: these pins
exist to make the audits deterministic, and silently auditing against a
different corpus snapshot would trade a confusing failure for an
authoritative-looking wrong answer. The guard fails with an explicit
`::error::` explaining the fork limitation and pointing at CONTRIBUTING.md.

Also document what a fork contributor should expect, and add the
`rosetta-audit` cross-language gate (#2557) to the baselines section -- it
shipped without a CONTRIBUTING entry, so the cross-repo re-baseline protocol
it depends on was undiscoverable from here.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@github-actions

github-actions Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

🐦‍⬛ Muninn Security Scan

✅ No security issues found.

🐦‍⬛ Powered by Muninn · Skald Lab

@squid-protocol
squid-protocol merged commit 335858b into main Sep 1, 2026
30 checks passed
@squid-protocol
squid-protocol deleted the fix/crucible-ref-fork-guard branch September 1, 2026 21:59
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.

1 participant