Skip to content

fix(sieve C9): pin the git abbreviation length t27c bakes in (Refs #8178) - #11792

Merged
gHashTag merged 1 commit into
masterfrom
fix/c9-build-identity
Oct 23, 2026
Merged

gHashTag merged 1 commit into
masterfrom
fix/c9-build-identity

Conversation

@gHashTag

Copy link
Copy Markdown
Collaborator

What

Pin the git abbreviation length that bootstrap/build.rs bakes into T27C_BUILD_GIT. A bare
git rev-parse --short HEAD sizes the abbreviation by the clone's object count, so a depth-1
clone (what actions/checkout makes) bakes 7 characters and a full clone 9, and two builds of one
commit disagree (sieve C9, measured in #8148, fix #8178).

The fix is one line of argument:

.args(["-c", "core.abbrev=9", "rev-parse", "--short", "HEAD"])

which pins the length to 9 — the same abbreviation the full clone already carries — and makes the
identity clone-independent. The measured --remap-path-prefix=$CARGO_HOME=/cargo half (#8148
builds F, G, Z, specs/compiler/theory/reproducible.t27) is the standing release/lab instruction.

Refs #8178, Refs #6488.

Measured locally (this PR, rustc 1.99.0 (b940084d7 2026-09-28), cargo 1.99.0)

All three builds give one sha256:

Build Clone CARGO_HOME sha256
A full (worktree at 9ab1b08) $HOME/.cargo fa51d1c15cadd5b2b9ea28e461f28ce3bde18433d85a6cd1f92ac8ec072c2151
B depth-1 (git clone --depth 1) $HOME/.cargo fa51d1c15cadd5b2b9ea28e461f28ce3bde18433d85a6cd1f92ac8ec072c2151
C depth-1 a 750 MB copy of $HOME/.cargo ($TMPDIR/cargo-home2) fa51d1c15cadd5b2b9ea28e461f28ce3bde18433d85a6cd1f92ac8ec072c2151

RUSTFLAGS --remap-path-prefix=$CARGO_HOME=/cargo was used for all three. Each binary carries
t27c-bootstrap@0.5.2+9ab1b089e (nine characters, clone-independent), 21 /cargo/registry
references and 0 absolute ~/.cargo or build-directory references.

Negative control (the unfixed path, measured on the same shallow clone before the fix): a bare
git rev-parse --short HEAD prints 9ab1b08 (seven characters), and a build of that tree
gives 3fdd825fbd28c383c345bca6d9f9ba7373779f56d1fe90143b8f693a0d93475e — the disagreement
between a depth-1 and a full clone that #8148 reported (477efb0f against c661e5ec).

Budget

bootstrap/build.rs is an existing foreign file. This PR is +7/-7, net 0 lines, within the
check_budget() cap (40 added per file, 80 per PR, never more added than deleted); no
owner-approved-foreign label is needed for an edit to an existing foreign file. No .t27 spec
changed, so no spec seal moves.

What remains (and why the issue stays open)

Test plan

  • cargo build --release -p t27c in the full clone (RUSTFLAGS remap) — exit 0.
  • cargo build --release -p t27c in a --depth 1 clone (RUSTFLAGS remap) — exit 0, sha equal.
  • cargo build --offline --release -p t27c in the depth-1 clone against a second
    CARGO_HOME (750 MB copy) — exit 0, sha equal.
  • producer identity is nine characters in both clones; zero absolute cache paths in the binary.
  • both Railway labs rebuild and agree (see above).

, Refs #6488)

build.rs ran bare `git rev-parse --short HEAD`: git sizes the abbreviation by the
clone's object count, so a depth-1 clone (actions/checkout) bakes 7 characters and
a full clone 9, and two builds of one commit disagree (measured in #8148, builds
A/C/D). Pinning -c core.abbrev=9 on the command makes the identity
clone-independent, equal to the full clone's abbreviation. With the measured
RUSTFLAGS --remap-path-prefix=$CARGO_HOME=/cargo (builds F, G, Z,
specs/compiler/theory/reproducible.t27) both named C9 causes close.

Foreign budget: bootstrap/build.rs +7/-7, net 0 lines (existing file, no label).

Refs #8178 -- the two-lab rebuild and the sieve cell flip remain.
@github-actions

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-10-23 12:06:47 UTC

Summary

Status Count
Total Open PRs 20
PRs with Failing Checks 18
PRs with All Checks Green 2
READY 1
FAILING 18
PENDING 0
NO CHECKS YET 0

These columns do not partition: 1 + 18 + 0 + 0 = 19, and there are 20 open PRs. A PR is being counted twice or not at all.

Seal Status

  • ⚠️ STALE -- sha256(compiler.rs)=5aec047d42ec != manifest seal=87e5cbd3ad94.
    The committed NMSE numbers were certified against an older compiler.rs.
    Run scripts/reseal-check.sh locally for the two-step reseal command (advisory; not a merge gate).

@tri-claw

tri-claw Bot commented Oct 23, 2026

Copy link
Copy Markdown

Summary by t27-bees

This change pins the git abbreviation length to 9 characters in bootstrap/build.rs so that shallow (depth-1) clones and full clones produce identical build identities for the same commit, fixing sieve C9 reproducibility failures measured in #8148.

Worth a look

  • bootstrap/build.rs:116 — The added -c core.abbrev=9 flag relies on git's -c config override, which has existed since git 1.7.2 (2010). On an extraordinarily old git it would be ignored, falling back to the default abbreviation length and re-introducing the clone-depth discrepancy.

Read: 1 files, +7 -7, the whole diff. Head 9ab1b08. Model: openai-compatible/nvidia/nemotron-3-ultra-550b-a55b. Commands: @t27-bees review | summary | help | pause | resume. Free for every repository.

@gHashTag
gHashTag merged commit 89d05ac into master Oct 23, 2026
27 of 38 checks passed
@gHashTag
gHashTag deleted the fix/c9-build-identity branch October 23, 2026 12:33
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.

t27c build is not reproducible: git short-sha length and CARGO_HOME path are baked into the binary (sieve C9)

2 participants