Commit 3de598f
committed
fix(tests): un-hardcode the PreCompact fixture timestamp (time bomb)
tests/test-native-points.sh failed on main from 2026-09-05 with:
FAIL PRECOMPACT: takes a snapshot when work is unfinished
FAIL THE CALLER: PostCompact reports the SNAPSHOT, not the changed disk
Root cause: the PreCompact run fixture hardcoded
updated_at: "2026-09-02T00:00:00Z". The chain under test goes
precompact-snapshot.sh -> compound-v-dashboard.py resume, and resume filters on
DEFAULT_RESUME_MAX_AGE_HOURS = 72.0. Once wall-clock passed 72h after that
literal date, resume returned empty, so the hook wrote no snap-* file and the
PostCompact reader had nothing to read. Both assertions then failed - not a
flake, a date-triggered break that would have stayed broken.
Proof: same fixture with --max-age-hours 100000 prints
'UNFINISHED COMPOUND V WORK ... updated 3d ago'; with the default window it
prints nothing.
Fix: generate updated_at with now_ts(), which the file's three other run
fixtures (lines 119, 395, 461) already do. This one was the only literal.
tests/test-native-points.sh: 128 passed, 0 failed.1 parent ce4cb19 commit 3de598f
1 file changed
Lines changed: 9 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
848 | 848 | | |
849 | 849 | | |
850 | 850 | | |
851 | | - | |
852 | | - | |
853 | | - | |
854 | | - | |
| 851 | + | |
| 852 | + | |
| 853 | + | |
| 854 | + | |
| 855 | + | |
| 856 | + | |
| 857 | + | |
| 858 | + | |
| 859 | + | |
855 | 860 | | |
856 | 861 | | |
857 | 862 | | |
| |||
0 commit comments