Skip to content

wavecoord 0.1.3

Choose a tag to compare

@jellologic jellologic released this 18 Oct 21:14
· 20 commits to main since this release
1c6f3ae

Fixed

  • The fence test oracle folded the wrong event log. CI on main (macos-latest, Python 3.9) failed test_fence_invariant for seed 44 with six safety and integration failures and no fault. The fence and the server were right; the oracle was wrong. The oracle's fold cache (tests/fenceworld.py, ofold) was keyed by id(events). A process of the test pool runs several seeds, and the event list of seed 44 got the id of the freed list of an earlier seed. The oracle then extended that seed's fold with the events of seed 44, so it saw leases of another run and said that correct writes were not ok(W). The same alias can also hide a real violation. Now the cache holds the list it folded and is used only for that same object with the same last event. The invariant predicate (docs/design/edit-fence.md, section 2.2) did not change. PR #11 did not cause the failure: the code before #11 fails the same way when the id is reused. The new OracleCacheTest checks that a cached fold equals a fresh fold, that this check catches the old cache (seeded defect O1), and runs seed 44 after seed 5 in one process with a forced id reuse (the CI failure).
  • The override journal lost a write after a lost answer. fence.journal_flush sends the journal with the idempotency key fence-override:<nonce>:<first n>. When the first send was logged but its answer was lost (a fault), and a write was added to the journal before the retry, the retry had the same key. The server returned the first notice, and the client removed all entries of the larger batch, so the new write never reached the lead. Now only the entries that the acknowledged notice holds leave the journal (fence.acked_entries), and the flush sends again with a new key while it makes progress, so one reachable call sends the whole journal. Found by a 300-seed soak run (seed 72857574); the code before PR #11 has the same bug. New seeded defect D23 with the table check journal_retry_check and the unit test test_flush_retry_after_lost_answer_keeps_new_entries.
  • Fence simulation: the agent's config trick reached the default branch. The simulation's trick operation writes fence: "off" into the worktree copy of .claude/wavecoord.json (D13: the fence ignores it). A commit with git add -A staged it, and a merge put it on the default branch, so the lead's mode became off and the lead check expected ask (seed 289598702). The fence did what section 8 of the design says (the config on the default branch is the authority). The simulation keeps its config fixed, so it now keeps the trick file out of commits.