You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
tdd: a hand-ordered test passes for an invariant-over-sequence contract that seeded interleaving breaks #1489
I've read SCOPE.md and checked .out-of-scope/, and this isn't covered by either.
This issue is about one problem.
I searched open and closed issues for a duplicate.
Skill
tdd
What went wrong
The feature was document version restore (rewind a work log to rebuild a past state) over two documents. The contract is "after restore, state equals the snapshot", which must hold after any sequence of ops.
Following the skill, the agent wrote one hand-ordered test: every op once, all document A ops, then all document B ops. It passed.
A seeded random interleaving across both documents, with restore and save inserted mid-sequence, then found two real bugs: hidden state was not captured in the restore record, and position gaps broke a contiguity assumption.
The skill's guidance (one seam, one test, expected values from an independent source) doesn't cover contracts that are invariants over sequences. For those, a single hand-ordered example passes while real orderings fail.
Proposed change
For invariant-over-sequence contracts (undo/redo, rewind, sync, replay), add one seeded interleaved run that includes the restore op itself. Assert at every step against snapshots taken during the run. Keep each failing seed as a deterministic regression test.
Activity