Problem
scripts/check_fetchall.sh / tests/test_fetchall_guard.py record each legacy raw .fetchall() site in scripts/baselines/fetchall_existing.txt keyed by file:line:content. The line number makes the baseline fragile: any PR that adds/removes lines in node/rustchain_v2_integrated_v2.2.1_rip200.py above a baselined call shifts that call's line number, so it no longer matches its baseline entry and the guard reports it as a 'new unannotated' site — turning the blocking test check RED on main and on every open PR.
This has now required manual resyncs twice in one day (#6870, then #6871 after #6866 shifted lines again). It's whack-a-mole.
Proposed fix
Key the baseline by content, not file:line:
- Store
file:normalized_content (drop the line number) in the baseline.
- In the guard, transform both the scan and the baseline the same way before comparing.
- To preserve detection of a newly-added call whose content duplicates an existing one, compare as a multiset (e.g.
sort | uniq -c counts per file:content) rather than sort -u, so adding an Nth identical-content call still trips the guard.
Acceptance
- Adding/removing unrelated lines in a node file does NOT change the guard result (no false 'new' from line shifts).
- A genuinely-new
.fetchall() (new content, or an additional instance of existing content) IS still flagged.
tests/test_fetchall_guard.py updated to cover: (a) a line-shift produces no error, (b) a new distinct call is caught, (c) a duplicate-content new call is caught.
- Migrate
scripts/baselines/fetchall_existing.txt to the new format.
Why it matters
This is the same class of recurring CI tax as the miner-checksum manifest (fixed structurally by the auto-regen hook #6857) and the clawrtc flaky test (#6863). A line-independent guard ends the resync treadmill for good.
Filed after resyncing the baseline twice (#6870, #6871) in one session.
Problem
scripts/check_fetchall.sh/tests/test_fetchall_guard.pyrecord each legacy raw.fetchall()site inscripts/baselines/fetchall_existing.txtkeyed byfile:line:content. The line number makes the baseline fragile: any PR that adds/removes lines innode/rustchain_v2_integrated_v2.2.1_rip200.pyabove a baselined call shifts that call's line number, so it no longer matches its baseline entry and the guard reports it as a 'new unannotated' site — turning the blockingtestcheck RED on main and on every open PR.This has now required manual resyncs twice in one day (#6870, then #6871 after #6866 shifted lines again). It's whack-a-mole.
Proposed fix
Key the baseline by content, not
file:line:file:normalized_content(drop the line number) in the baseline.sort | uniq -ccounts perfile:content) rather thansort -u, so adding an Nth identical-content call still trips the guard.Acceptance
.fetchall()(new content, or an additional instance of existing content) IS still flagged.tests/test_fetchall_guard.pyupdated to cover: (a) a line-shift produces no error, (b) a new distinct call is caught, (c) a duplicate-content new call is caught.scripts/baselines/fetchall_existing.txtto the new format.Why it matters
This is the same class of recurring CI tax as the miner-checksum manifest (fixed structurally by the auto-regen hook #6857) and the clawrtc flaky test (#6863). A line-independent guard ends the resync treadmill for good.
Filed after resyncing the baseline twice (#6870, #6871) in one session.