Repository navigation
test: an unreadable pg_config's stamp key keeps 8 hex characters, not 3 (#1478) - #1479
Conversation
OffgridwithJD
left a comment
There was a problem hiding this comment.
@jdatcmd Approve. I reproduced it by sourcing each revision's lib.sh and calling pgc_source_stamp_path on the two new paths:
| revision | …/pg_config.broken |
…/pg_config.broken2 |
|---|---|---|
| main | .pgc_source_stamp.0.nolib235 |
.pgc_source_stamp.0.nolib235: the same |
7b14409f |
…nolib23593d63 |
…nolib2356c898 |
The md5s are 23593d63… and 2356c898…, so the fixture really does collide at three hex characters and separate at eight, as the comment says. Pinning a known collision, instead of hoping the random mktemp paths hit one, is what makes the arm red on every run against main.
Thanks for tracking #1476's suites (PG 18) failure to this. It was the only CI red in that chain, and I hadn't attributed it.
🤖 Generated with Claude Code
7b14409 to
f419d18
Compare
|
@OffgridwithJD, your approval is on 7b14409, and CI's The new head, f419d18, is rebased on main and adds one commit with only the bookkeeping:
Measured:
The rebase applied without conflicts, and the two original files are unchanged. Could you re-approve f419d18? |
f419d18 to
7bfa451
Compare
|
@OffgridwithJD, #1480 landed under this, so I've re-anchored it. New head: 7bfa451, on main 489e3ff.
|
… 3 (#1478) pgc_source_stamp_path keyed an unreadable pg_config on md5(path) cut to three hex characters, 4096 values. Selftest 340's "two unreadable pg_configs do not alias onto one stamp" builds its two broken pg_configs in a random mktemp directory, so they collided about once in 4096 runs. #1476's suites (PG 18) job hit one, though the same head passed twice locally. Red first: a new arm uses two paths, under /tmp/pgc-collide-870, whose md5s share their first three hex characters (235) and differ at eight. With three characters it is SAME on every run; the key now keeps eight, as the readable branch does, and the arm reads "different". The paths need not exist: the key hashes the path string. harness_selftest 1246/1246; the guards pass (438). The measured example in 340's comment is re-measured for the new width. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
harness_selftest is a ledger-covered suite, so CI's gate refused the new check "two unreadable pg_configs whose short hashes collide still get different stamps" as one the ledger had never seen. It enters as never observed red on PG15-19, measured by a selftest run on each major (1246 passed on all five). The census moves 2889 -> 2890. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
7bfa451 to
5254750
Compare
|
@OffgridwithJD, #1482 landed, so I've re-anchored this again. New head: 5254750, on main ab01660.
Please approve 5254750. I'll merge it before my next ledger PR, so it won't need re-anchoring again. |
OffgridwithJD
left a comment
There was a problem hiding this comment.
@jdatcmd Re-approving at 5254750.
- Code:
lib.shand selftest 340 differ from main exactly as they did at7b14409f, the head I approved. Only the ledger row and the budget paragraph moved. - Census: the tsv at 5254750 holds 4102 rows, 2942 never and 1160 dated, which equals the paragraph (4101 + 1, 2941 -> 2942). The one new row is
harness_selftest/340…/two unreadable pg_configs whose short hashes collide still get different stamps, never.
🤖 Generated with Claude Code
Fixes #1478. It touches no ledger file, so it merges in any order.
The bug
pgc_source_stamp_pathkeyed an unreadable pg_config onmd5(path)cut to three hex characters, which is 4096 values. Selftest 340 builds its two broken pg_configs in a randommktempdirectory, so they aliased about once in 4096 runs. #1476'ssuites (PG 18)job hit one.Red first
A new arm,
two unreadable pg_configs whose short hashes collide still get different stamps, uses two paths under/tmp/pgc-collide-870. Their md5s share their first three hex characters (235) and differ at eight (23593d63against2356c898).got [SAME] want [different], on every runThe paths need not exist: the key hashes the path string.
Runs
harness_selftest1246/1246 (the 1245 plus this arm); the guards pass (438).nolib6f4922f4).Twin: this is lib.sh's own selftest. The pytest harness keys its builds separately (
pgc_cluster.build_once), so there's no pytest counterpart to change.🤖 Generated with Claude Code