Skip to content

fix(t27b): reference cache writes whole rows, keys on t27c content - #6333

Merged
gHashTag merged 1 commit into
masterfrom
claude/t27b-refcache
Oct 5, 2026
Merged

gHashTag merged 1 commit into
masterfrom
claude/t27b-refcache

Conversation

@gHashTag

@gHashTag gHashTag commented Oct 5, 2026

Copy link
Copy Markdown
Owner

Closes #6332. Refs #6063.

What changed (cli/t27b/src/blockers.rs only; lower.rs untouched)

  • Whole rows. cache_row formats a row (key, path, verdict) into one buffer, newline included, with tabs/newlines in the path and newlines in the reason turned into spaces. CacheWriter opens the cache once in append mode and writes each row with a single write_all under a mutex shared by every worker. Before, writeln! on a per-row handle could split a row into several writes.
  • Content key. binary_stamp = FNV-1a over the t27c binary's bytes, computed once in RefRunner::new, replacing size+mtime. A byte-identical copy hits; a rebuilt binary misses. Old caches are still read by read_cache; their rows just never match. read_cache also now requires a 16-hex-digit key.

Tests (cli/t27b/tests/refcache.rs)

  • 16 threads x 200 appends (rows up to ~3 KB) -> exactly 3200 lines, each path matching its key and each verdict decoding to what was written.
  • A copy with a different mtime gets the same stamp; same-size different bytes get a different one; a missing binary is an error.
  • Damaged/garbage/old rows are skipped harmlessly; a missing cache file reads as empty.
  • Negative control: putting the old per-row writeln! append back makes the concurrency test fail.

cargo test -p t27b: all suites pass (refcache 4/4, blockers 6, differential 14, encoder 5, macho 1, memory 8, source 24, vacuous 3).

🤖 Generated with Claude Code

Each --reference-cache row is formatted into one buffer and written
with a single write_all under one lock shared by all workers, so rows
cannot interleave. The t27c part of the key is an FNV-1a hash of the
binary's bytes, read once per run, instead of its size and mtime, so a
byte-identical copy of t27c hits. Old caches are still read; their rows
just miss. Tests in cli/t27b/tests/refcache.rs.

Closes #6332

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Oct 5, 2026

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-10-05 01:59:32 UTC

Summary

Status Count
Total Open PRs 46
PRs with Failing Checks 34
PRs with All Checks Green 12
READY 11
FAILING 34
PENDING 0
NO CHECKS YET 0

These columns do not partition: 11 + 34 + 0 + 0 = 45, and there are 46 open PRs. A PR is being counted twice or not at all.

Seal Status

  • ⚠️ STALE -- sha256(compiler.rs)=8597b6ded596 != 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).

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.

t27b corpus --reference-cache: interleaved rows and an mtime-keyed cache

1 participant