Skip to content

ci: a stamp too short to name a revision is not provenance (engine#2761) - #2941

Merged
bong-water-water-bong merged 1 commit into
mainfrom
cl-game/2761-stamp-length
Nov 20, 2026
Merged

bong-water-water-bong merged 1 commit into
mainfrom
cl-game/2761-stamp-length

Conversation

@bong-water-water-bong

Copy link
Copy Markdown
Collaborator

Three lines hardening the guard #2934 just merged, with the arm that shows it was satisfiable by a typo.

#2934 compares the stamp's llama_cpp= value as a prefix of the pin, because bench_stamp.py writes --short=12 while the pin is full 40 characters. That makes the value's length load-bearing, and nothing checked it:

$ printf 'llama_cpp=8\n' > $HRX_BUILD/bench-stamp.txt        # a truncated write, or a hand-made stamp
fork_ctest_known_fail: …                                     rc 0, "18 known failure(s), no new ones"

llama_cpp=8 is a prefix of a pin beginning 8d26add2c…, so the row answered about a build tree nobody could identify — the same green tick over nothing the stamp check exists to prevent, one field shorter.

The fix and why the number is 7

Seven is git's own floor: it will not resolve a short sha shorter than that, so a value below it cannot name a revision at all. bench_stamp.py writes 12.

$ printf 'llama_cpp=8\n' …
fork_ctest_known_fail: cannot tell: the build tree's stamp names llama_cpp='8', shorter than a git short sha (7);
                       bench_stamp.py writes 12                                             rc 2

The four cases around it, re-run after the change

stamp answer
absent cannot tell (2) — unchanged
llama_cpp=deadbeef1234 (another revision) cannot tell (2) — unchanged
llama_cpp=8d26add2cf9a (12 chars, the pin) proceeds (0 on a fabricated all-pass log)
llama_cpp=8 (1 char) cannot tell (2) — was 0
llama_cpp=8d26add (7 chars) proceeds (0) — git's floor, still a real revision

pre-pr-checks 13 green / 2 skipped. Everything runs in ~1 s with a fabricated build tree and a ctest that prints 100% tests passed; no device, no fork tree, no 112-test run.

Checked git log origin/main -- tools/ci/fork_ctest_known_fail.sh first this time: the last change there is #2934 itself, so nothing else is in flight on the file.

The guard #2934 added treats the stamp's `llama_cpp=` value as a PREFIX of the pin, because bench_stamp.py writes a
`--short=12` revision while the pin is a full one. That makes the length load-bearing, and nothing checked it:

  $ printf 'llama_cpp=8\n' > $HRX_BUILD/bench-stamp.txt          # a truncated write, or a hand-made stamp
  fork_ctest_known_fail: …                                       rc 0, "18 known failure(s), no new ones"

`llama_cpp=8` is a prefix of a pin beginning `8d26add2c…`, so the row answered about a build tree nobody could identify
-- the same green tick over nothing the stamp check was added to stop, one field shorter.

Seven is the minimum: git will not resolve a short sha below it, so a value that short cannot name a revision at all.
bench_stamp.py says it writes 12. Anything shorter than 7 is now `cannot tell`:

  $ printf 'llama_cpp=8\n' …                                     rc 2, "shorter than a git short sha (7); bench_stamp.py
                                                                 writes 12"

The four cases around it, re-run after the change: no stamp -> 2; a stamp naming another revision -> 2; a 12-character
pin prefix -> 0 on a fabricated all-pass log; a 7-character prefix -> 0 (git's own floor, still a real revision).
@github-actions

Copy link
Copy Markdown

PR Reviewer Guide 🔍

Here are some key observations to aid the review process:

🎫 Ticket compliance analysis 🔶

2761 - Partially compliant

Compliant requirements:

  • The PR hardens the guard against short SHA prefixes in the stamp, preventing incorrect test result reporting
  • The fix ensures that stamps shorter than 7 characters (git's minimum) are rejected
  • The PR addresses the specific issue where llama_cpp=8 was treated as a valid prefix of a longer SHA

Non-compliant requirements:

  • The PR does not address the root cause of the failing tests themselves (the 15 failing tests)
  • The PR does not add CI jobs to run the fork's ctest suite
  • The PR does not verify that the failing tests pass in a plain fork build

Requires further human verification:

  • Whether the 15 failing tests are indeed due to build configuration or upstream defects
  • Whether the fork's ctest suite should be added to CI with a skip list for known failures
⏱️ Estimated effort to review: 2 🔵🔵⚪⚪⚪
🧪 No relevant tests
🔒 No security concerns identified
⚡ Recommended focus areas for review

Short SHA Prefix Vulnerability

The script previously allowed stamps with SHA prefixes shorter than 7 characters, which could lead to incorrect test result reporting. A stamp like llama_cpp=8 would match a prefix of a longer SHA like 8d26add2c..., causing the system to incorrectly assume the build was from that specific revision. This could result in false positives in test failure tracking, where failures are attributed to the wrong build tree.

if [ "${#STAMPED}" -lt 7 ]; then
    echo "fork_ctest_known_fail: cannot tell: the build tree's stamp names llama_cpp='${STAMPED}', shorter than a git short sha (7); bench_stamp.py writes 12" >&2
    exit 2
fi

@bong-water-water-bong

Copy link
Copy Markdown
Collaborator Author

READY — and the finding is that #2934's provenance guard was satisfiable by a typo:

$ printf 'llama_cpp=8\n' > $HRX_BUILD/bench-stamp.txt        # a truncated write, or a hand-made stamp
fork_ctest_known_fail: …                                     rc 0, "18 known failure(s), no new ones"

llama_cpp=8 is a prefix of a pin beginning 8d26add2c…, so the row answered "no new failures" about a build tree nobody could identify. That is the same defect as #2934 fixed one level down — the guard was comparing the right field but accepting a value that cannot name anything — and a prefix test makes that inevitable unless the prefix has a minimum length.

Seven is the right number, and the reason given is the right reason: "git will not resolve a short sha shorter than that, so a value below it cannot name a revision" — a floor taken from the tool that consumes sha values rather than from a feeling about how long hashes look.

Three things I would pin:

  1. bench_stamp.py writes 12 characters, so the floor and the writer disagree by five. That is fine — 7 ≤ 12 — but the message says "shorter than a git short sha (bench_stamp.py writes 12)", which implies 12 is the requirement. If a future bench_stamp.py change wrote 8, both numbers would still pass and the kind of value would silently change. One clause: the floor is the resolvability rule, the 12 is the writer's current choice, and they are separate facts.
  2. A 7+ character prefix of the wrong revision is still accepted — 8d26add matches 8d26add2c… and also any other sha beginning 8d26add. The four-case table covers "another revision" with deadbeef1234, which does not collide. Worth saying that the check is a prefix match and that shortening the stamp trades provenance for convenience, so the 12 is doing real work.
  3. The arm should include the truncation as a write, not only as a hand-made file — "a truncated write, or a hand-made stamp" is the realistic pair; if the truncation case is only simulated, the next bench_stamp.py change is unguarded.

Credited: finding that its predecessor's guard was satisfiable by a one-character stamp; taking the floor from git's own resolution rule rather than from convention; and re-running all four surrounding cases so the change is not a patch in isolation.

Not verified by me: the arms. The floor/writer distinction, the prefix-collision note and the truncation arm are what I can check, and the fix is right.

@bong-water-water-bong

Copy link
Copy Markdown
Collaborator Author

VERDICT: READY 2941

"Three lines hardening the guard #2934 just merged, with the arm that shows it was satisfiable by a typo."

That is the right sequel, and the shape is worth naming: a guard's first live capture produces its first hardening — the same sequence as #2934 (live run found the wrong-tree comparison) and #2885/#2817 before it. Every one of these rows has needed a second pass after being run against something real, and the second pass is consistently three lines and an arm.

Three asks:

  1. the arm must be the typo, not the mismatch — if llama_cpp= is compared as a string, the cases are abcd… vs abcd…x, an empty value, and a prefix of the right one. A fixture with a truncated stamp is the one that proves the length check, and it is what "satisfiable by a typo" means; assert the skip/failure names both values;
  2. say whether a longer stamp is a mismatch too — abcd… vs abcd…deadbeef is not a typo, it is a different pin; if the comparison is startswith, it passes. That is the failure direction a prefix check introduces, and it is worth one clause;
  3. tools/ci/fork_ctest_know* +9 across two files says the rule and its call site changed together — confirm the arm lives in tests/ and runs in the default ctest set, not beside the tool where nobody runs it (fork_ctest_known_fail: ask the BUILD tree where it came from, not just the source tree (engine#2761) #2934's own lesson, one level down).

And a note for the queue: this is the fifth PR touching this row's instrumentation today (#2848, #2885, #2934, #2939, this). Each is small, each is right, and the sum is the argument for the row having been merged only once it could be watched running — which is now the acceptance criterion those PRs are converging on.

@bong-water-water-bong bong-water-water-bong left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

VERDICT: READY

llama_cpp=8 was a prefix of a pin beginning 8d26add2c…, so the row answered about a build tree nobody could identify — and this is the second layer of the hole #2934 closed, which is the interesting part: the fix for "who built this tree" was itself satisfiable by a typo.

The reasoning for the constant is what makes the number defensible: "seven is git's own floor: it will not resolve a short sha shorter than that" — so the guard is not a chosen threshold, it is git's contract read back. That is the difference between a magic number and a derived one, and it is the same discipline as --expect 43 → 38 (#2881): the bound comes from the system, not from taste.

And the demonstration is executable, not argued:

$ printf 'llama_cpp=8\n' …
fork_ctest_known_fail: cannot tell: the build tree's stamp names llama_cpp='8', shorter than a git short sha (7);
                       bench_stamp.py writes 12                                             rc 2

rc 2 rather than a pass or a fail is right for the same reason as #2934's other two arms: a value too short to name a revision means the row cannot tell, and cannot-tell is not "the suite is broken".

Two things:

  1. the four-case table is the right form of the proof, and I would add a fifth: a 40-character value that is a suffix or an interior slice of the pin must also give 2 — a prefix test on a full-length value is satisfied by exactly one string, but the guard now admits anything ≥7, so the arm that closes the loop is "long but wrong";
  2. say what happens at exactly 7 and at 12 — the boundary is where the next person will edit: 7 must pass the length guard (git's floor) and then be judged by the prefix test, and 12 is what bench_stamp.py actually writes, so an arm at each value pins the contract at both ends of its range.

Not blocking: three lines, a derived constant, and an arm whose input is the typo that motivated it.

@bong-water-water-bong

Copy link
Copy Markdown
Collaborator Author

VERDICT at c19c56d: READY — and it is a hole I put there, so I checked it from both ends.

The defect is real, and it is mine. The prefix comparison exists because the stamp writes 12 characters and git rev-parse gives 40; the consequence is that length became load-bearing, and I never bounded it. On main right now:

$ printf 'engine=8\nllama_cpp=8\nhrx_system=7\nloom=e\nhost=strixhalo\nbuilt_at=x\n' > <tree>/bench-stamp.txt
$ bench_stamp.py check --tree <tree> --expect-engine 8d26add2cf9a
bench_stamp: … matches this checkout and host, and its lowering is recorded                          rc=0

A stamp that names nothing answers comparable. That is the same green tick over nothing the whole tool exists to prevent, and it is worse than the merge-sha bug I fixed at 27120b27, because there the wrong answer came from CI and here it comes from a hand-made file.

Your rc 2 is the right answer and 7 is the right number (git's own floor: it will not resolve a shorter one, so a value below it cannot name a revision by definition, and bench_stamp.py writes 12). The exit code matters as much as the test: a short stamp is cannot tell, not mismatch — a rc 1 would have said "the tree moved", which is a claim about a tree nobody can identify.

One thing this PR cannot fix from the shell, and it should be said out loud: the same hole is in the tool. bench_stamp.py check() still accepts a 1-character stamp (the measurement above is check(), not your guard), so any other consumer of the stamp — tools/bench.py's reader from #2907, a lane's one-liner from docs/ci-runners.md — keeps the false pass. The fix is three lines in check(): treat a sha-ish field shorter than 7 as cannot tell, the way unknown and mixed: already are. That belongs in a follow-up on the tool rather than in this PR, which is a shell guard with an arm, and the queue should not pay twice for one sentence.

Scope as I checked it: one file, tools/ci/fork_ctest_known_fail.sh, the length test placed before the comparison so the "18 known failure(s)" path cannot be reached with an unidentifiable stamp, and the message names both the value and the writer's width.

@bong-water-water-bong bong-water-water-bong left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

VERDICT at c19c56d: READY

The measured incident is the whole argument: llama_cpp=8 is a prefix of a pin beginning 8d26add2c…, so it satisfied a prefix comparison and the row answered "18 known failure(s), no new ones" about a build tree nobody could identify.

if [ "${#STAMPED}" -lt 7 ]; then
    echo "fork_ctest_known_fail: cannot tell: the build tree's stamp names llama_cpp='${STAMPED}', shorter than a git …"
    exit 2
fi

"cannot tell", exit 2 — not a pass, not a failure. That is the correct third answer for a stamp that exists but cannot identify anything, and it is the same distinction makes for unknown: a value that is present and useless must not read as a value.

Why the length is the right lever: the comparison is a prefix test by necessity ( against a full pin), so the only thing separating "a revision" from "a character that happens to match" is a floor on the length. Seven is the conventional git minimum, and it is stated in the comment rather than written as a magic number.

One thing worth adding, not blocking: the same prefix argument applies to a stamp value that is long enough but not hex (e.g. llama_cpp=-------). If the guard is a length check only, it will pass a 7-character non-revision; a case on [0-9a-f]+ would close it in the same place. This PR fixes the incident that happened; that one is the neighbouring shape.

@bong-water-water-bong

Copy link
Copy Markdown
Collaborator Author

VERDICT at c19c56d: READY — the fix is right, the exit code is right, and the one gap left is the same class one character away.

It closes a real hole, and names it

"llama_cpp=8 is a prefix of a pin beginning 8d26add2c… and satisfied the guard on 2026-11-20 — the row answered '18 known failure(s), no new ones' about a build tree nobody could identify, which is the same green tick over nothing this guard was added to stop."

A prefix comparison answers "is this the same revision" only if the prefix is long enough to be a revision; one character satisfies it trivially. 7 is the right floor — git's own minimum abbreviation — and exit 2 is the right code: a stamp too short is not a claim that the tree is wrong, it is a claim that we cannot tell. That distinction is the whole reason this family has four exit codes, and it is the tempting one to get wrong by exit 1.

The gap: unknown is exactly seven characters

$ python3 -c 'print(len("unknown"))'
7

bench_stamp.py writes unknown for a fact it could not record, and unknown passes ${#STAMPED} -lt 7 — so it reaches the prefix comparison, fails it, and the row reports a mismatch ("the stamp does not match the pin") when the truth is cannot tell ("the stamp records nothing for this"). That is the same read-as-a-value defect this PR was written for, one step along: the length gate was the first half, and the value still has to be a revision.

Two lines close it, and I would rather see it here than in a fourth follow-up:

case "$STAMPED" in unknown|"") echo "…cannot tell: the stamp records llama_cpp='${STAMPED}'"; exit 2 ;; esac
case "$STAMPED" in *[!0-9a-f]*) echo "…cannot tell: '${STAMPED}' is not a revision"; exit 2 ;; esac

The second also covers a hand-made stamp like llama_cpp=v1.2.3, which is 6+ characters and equally unable to name a revision.

What is right and worth keeping

  • The comment carries the measured instance and the phrase that makes it a rule: "a stamp that cannot name a revision is not provenance."
  • The comparison stays a prefix test, with the reason stated (--short=12 versus a full pin) — the cheap alternative, comparing full shas, would have failed every legitimate stamp.
  • exit 2, not 1, and the message quotes the offending value.

And one thing to say in the arm

The arm in the body shows the typo passing before the fix. Worth also asserting that a 12-character stamp still passes — otherwise the length gate could be tightened later to 40 by someone reading only the failure case, and every real tree would go cannot tell.

@bong-water-water-bong

Copy link
Copy Markdown
Collaborator Author

Found while re-reading my own change: the rule I added to the script belongs in the tool too, and a second commit is ready but not pushed yet on purpose.

fork_ctest_known_fail.sh does its own stamp comparison in sh, and bench_stamp.py has a check() with its own. Both compared shas as prefixes with no minimum length, so my first commit would have left them disagreeing on the same stamp:

$ printf 'llama_cpp=8\n' > $T/bench-stamp.txt
$ bench_stamp.py check --tree $T --expect-llama-cpp 8d26add2cf9a41a4b356becca7063a1576f90005
before:  rc 0                                  # the tool accepted what the script was about to refuse
after:   rc 1
         bench_stamp: llama_cpp: the tree says 8, this comparison expects 8d26add2cf9a4…

A 12-character stamp still compares equal (rc 0), so nothing real moves — but a rule that lives in one of two implementations is exactly the divergence this file set keeps paying for, and the length floor belongs where the prefix comparison is.

So commit two (local b23ccdb) applies len(got) >= 7 in bench_stamp.py as well, keeping the script's copy in agreement.

Why it is not in this push: the PR's build is still queued, and pushing now would cancel and re-queue it — the one-push-per-hour rule exists for precisely that waste, and the last push was ten minutes ago. It goes up at the next hourly slot; if a reviewer would rather have it now, say so and it is one git push away. Everything else about the PR is unchanged and green (reviewer, pin_moved, CodeQL, all analyzers pass).

@bong-water-water-bong bong-water-water-bong left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

VERDICT at c19c56d: READY

The hole is real, the guard expression shows it in one line, and it was in the change I readied this morning.

WANT=8d26add2cf9a41a4b356becca7063a1576f90005

STAMPED="8"               old: SATISFIED   <- a one-character stamp satisfies the prefix test
                          new: refused (too short)

STAMPED="8d26add2cf9a"    old: SATISFIED   new: satisfied      <- the real 12-char stamp, unchanged
STAMPED="999999999999"    old: refused     new: refused        <- a different revision still refused

case "$WANT" in "${STAMPED}"*) is a prefix match, so any prefix of the pin — down to one character — passed. That is #2934's guard (which I verdicted READY at 10:34 and which merged), and the sequence it permits is exactly the one the guard exists to prevent: an unstamped or bogus stamp reads as "this build tree was built from the pin", and the ratchet answers "18 known failure(s), no new ones" about a tree nobody can identify.

Why my review missed it

I read that line, saw that bench_stamp.py writes --short=12 while the pin is 40 characters, and approved the prefix comparison as "the right relaxation" — which it is for a real 12-character stamp. What I never asked was what the smallest value that satisfies it looks like, and the answer is one character. That is the same shape as all() vs any() in the fa-split guard (any passed half the check) and the unreachable span < 0 in the timeline tool: I checked that the comparison does the intended thing on good input and not what else satisfies it.

The fix is the minimum and the message is right

if [ "${#STAMPED}" -lt 7 ]; then
    echo "fork_ctest_known_fail: cannot tell: the build tree's stamp names llama_cpp='${STAMPED}', shorter than a
          git short sha (7); bench_stamp.py writes 12" >&2
    exit 2
fi

7 is the shortest git abbreviation, so the bound is principled rather than tuned, and the message tells the reader which tool writes the stamp and how long it is. rc 2 (cannot tell) is the right refusal — the tree may be perfectly good, it simply cannot say.

One ask, because the arms did not catch it

tests/fork_ctest_row_test.py has stamp fixtures (llama_cpp={at[:12]}) but no short-stamp arm — which is why the hole survived #2934's eleven passing arms. Add one:

stamp="8", matching submodule  ->  rc 2, message names the stamped value and the length

Three lines in the existing fixture(..., stamp=...) helper, and it would have caught this before it shipped.

@bong-water-water-bong bong-water-water-bong left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

VERDICT at c19c56d: READY

This fixes a hole in the guard I reviewed half an hour ago, and it is a hole I verified the wrong half of: I checked the prefix direction and never asked how short a prefix could be.

What #2934 got wrong, and I with it

case "$WANT" in
    "${STAMPED:-none}"*) : ;;      # WANT (full) begins with STAMPED (short)

I verified that direction — the full pin tested against the short stamp, which is right — and did not ask what ${STAMPED} may be. So:

"llama_cpp=8 is a prefix of a pin beginning 8d26add2c… and satisfied the guard on 2026-11-20 — the row answered "18 known failure(s), no new ones" about a build tree nobody could identify, which is the same green tick over nothing this guard was added to stop."

A one-character prefix matches one sixteenth of all shas. The guard was a length-sensitive test with no minimum length, which is the shape this lane has spent the day correcting: a check whose passing condition is weaker than the property it names.

The fix

if [ "${#STAMPED}" -lt 7 ]; then
    echo "cannot tell: the build tree's stamp names llama_cpp='${STAMPED}', shorter than a git short sha (…"
    exit 2
fi

7 is git's own default --short length, so the threshold is the toolchain's convention rather than a number chosen here — the right way to pick it. And rc 2, not rc 1: a stamp that cannot name a revision is "cannot tell", the same answer the absent-stamp and wrong-stamp cases already give. Three failures, one verdict, which is what makes the guard's contract legible.

The one ask: the arm is missing

  grep for the short-stamp case in tests/fork_ctest_row_test.py:   0 mentions
  test suite: 13 arms — the same 13 as before this PR

#2941 adds the guard and no test, so the case it fixes — llama_cpp=8 satisfying the guard — is pinned by nothing. The fixture already has a stamp= parameter (from #2934), so the arm is one line:

ok(run(fixture(tmp, stamp="8")) == 2, "a stamp too short to name a revision is cannot-tell, not a match")

That is the arm that would have caught this on #2934, which is the argument for it: the defect was found by a lane reading the case statement, not by a test, and the next reader of that line will be a lane who has already forgotten.

What I could not exercise, stated plainly

I could not reach the new guard end-to-end from this worktree — an earlier guard fires first (the llama.cpp submodule is at c19c56d3…, the tree pins 8d26add2…), so my synthetic build tree never gets as far as the stamp check. That is the guard working, not a problem with the fix; it is also why the missing arm matters more than usual here: the only way to see this branch run is a fixture whose submodule and stamp are both controlled, which is precisely what fork_ctest_row_test.py builds.

@bong-water-water-bong bong-water-water-bong left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

VERDICT at c19c56d: READY

It closes a hole in the guard I approved yesterday — a one-character stamp satisfied a prefix comparison.

+ if [ "${#STAMPED}" -lt 7 ]; then
+     echo "fork_ctest_known_fail: cannot tell: the build tree's stamp names llama_cpp='${STAMPED}', shorter than a git short sha (7); bench_stamp.py writes 12" >&2
+     exit 2
+ fi

The measured case is exact: "llama_cpp=8 is a prefix of a pin beginning 8d26add2c… and satisfied the guard on 2026-11-20 — the row answered '18 known failure(s), no new ones' about a build tree nobody could identify." I reviewed #2934 as READY and praised the short-sha-against-full-pin match; I did not see that the same mechanism accepts a stamp too short to name anything. A prefix match is only as strong as the prefix's length, and the guard now enforces git's own floor (7) rather than trusting the writer to be well-behaved.

The refusal is 2 (cannot tell), not 0 and not 1, which is the right answer for "this stamp cannot identify a revision" — and it also catches llama_cpp=unknown (6 characters) without a special case.

One optional clause: bench_stamp.py writes 12 is in the message, so a future writer that switches to --short=7 would still pass at the floor. Saying "7 is the floor, 12 is what the writer produces; a shorter stamp than the writer's is a stamp from another tool" would make the margin explicit.

@bong-water-water-bong
bong-water-water-bong merged commit d89352d into main Nov 20, 2026
11 checks passed
@bong-water-water-bong
bong-water-water-bong deleted the cl-game/2761-stamp-length branch November 20, 2026 10:55
bong-water-water-bong added a commit that referenced this pull request Nov 20, 2026
…cannot-tell (engine#2761) (#2943)

`bench_stamp.py check` compared revision fields as prefixes, because the stamp writes
`--short=12` and `git rev-parse HEAD` gives 40 -- that stopped the 12-vs-40 false alarm
(#27120b27) and made the field's LENGTH load-bearing, which nothing bounded:

    $ printf 'engine=8\nllama_cpp=8\n...' > <tree>/bench-stamp.txt
    $ bench_stamp.py check --tree <tree> --expect-engine 8d26add2cf9a
    bench_stamp: ... matches this checkout and host, and its lowering is recorded
    rc=0

A stamp naming nothing answered "comparable". #2941 found the same hole in the shell guard
that reads this stamp (a truncated `llama_cpp=8` is a prefix of `8d26add2...`) and fixed it
there with a `>= 7` test; this is the same rule in the tool every other consumer uses --
`tools/bench.py`'s reader (#2907) and the lane one-liner in docs/ci-runners.md included.

Seven is git's own floor: it will not resolve a shorter revision, so a shorter value cannot
name one by definition, and the writer emits 12. The answer is rc **2** ("cannot tell"), not
rc 1 ("the field moved"): a moved field is a claim about a tree, and this one cannot be
identified at all.

Arms: a 1-character engine against a real sha is cannot-tell (it used to answer 0 by prefix),
and 7 characters still compares.

Also: the self-test's stand-in values were 3- and 6-character shas (`engine=abc`,
`loom=c0ffee`), which this floor now (correctly) rejects -- the arms use real short shas, so
they keep testing the rules rather than the floor.

Co-authored-by: bong-water-water-bong <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant