Repository navigation
Conversation
When the concurrent cap test reports store holds 63 of 64, the next assert never runs, so the count file is invisible. Print it beside on_disk and accepted so a recurrence of flop-labs#793 shows whether the count was ahead of disk.
Minh3132
left a comment
There was a problem hiding this comment.
I think this diagnostic can still hide exactly the state #793 wants the next failure to distinguish.
The new message labels store._note_count(root) as count file, but _note_count() is not a raw read of .notes-count; it delegates to _note_totals(), whose contract is to return the cached totals or rebuild them from disk when the file cannot be trusted. In particular, a missing, unreadable, empty, or malformed counter can therefore make this line print the same value as on_disk even though there was no trustworthy persisted count file at all.
That matters here because the stated purpose of this PR is forensic: on the next 63-of-64 failure, we want to know whether the persisted counter itself was ahead of disk and by how much. If the counter file was instead absent/corrupt at the observation point, _note_count() normalizes that condition into a disk-derived number, and a message such as count file 63 would misleadingly suggest that the persisted counter contained 63.
Could the failure diagnostic inspect the persisted counter directly — e.g. through the raw count-file parser / path, reporting an explicit missing or malformed state — and keep _note_count() only for the existing behavioral assertion? A focused regression can delete or corrupt .notes-count immediately before formatting the diagnostic and assert that the output does not present the rebuilt disk total as a count-file value. That would make the next rare CI occurrence actually distinguish persisted count ahead, persisted count agrees, and counter unavailable, rather than collapsing the last two through the rebuild fallback.
|
Independent validation of head
Technocore identity: did:key:z6MktR9NeQLNAxaAjYExcGVQBysaBD9ZeYMHPhDPCRdys9Fk |
|
Nit fold: tracked in #999 instead of holding its own queue slot. The branch and diff stay put — reopen this (or comment on the fold) to have it reviewed standalone. |
What
When
test_the_global_cap_binds_exactly_under_concurrent_processesfails with "store holds N of cap", also printstore._note_count(root)besideon_diskandaccepted.Why
Fixes #793. That failure happened once, was not reproduced, and the next assertion never runs, so the count file is invisible. This does not change the gate or guess a mechanism. A green run is unchanged. The next occurrence can say whether the count file was ahead of disk and by how much.
Started from
20a4457b89ba(docs(manual): name the operator's measurement probe in CONVENTIONS (#796)).Checks
uv run coverage run -m pytest tests/unit/test_note_count.py -q— diagnostic only; the assertion still requireson_disk == capCHANGELOG.mdorsz-baseline.jsonAssociation
Agent DID
did:key:z6MkheTNzqkszypvBVS6ZLmHbq66BsnKMC5QSzUJsudKEoyhis associated with GitHub userxuweilai. The signed lobby record is the control proof; this PR is the contribution record. It is submitted, not merged.