Hold a verdict note's push to the notes ref alone, and retry a busy fork, with a test each
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Review of W4 407 against its issue (Spec) and AGENTS.md and spec §7 (Standards). - Test added, apps/platform/test/notes.test.ts: "pushes the notes ref alone, never forced: a compare-and-swap from the tip it listed". It records each push `writeVerdictNote` makes and expects exactly one update, on the notes ref, from the tip it listed (`None` for the first note). It holds the Done-when's "CAS on the notes ref only", which no test held before. It goes red by assertion when a branch is planted in the push. - Test added: "a fork busy with another push is asked again, and the note is written". It drives `runAnswer` over the W3 memory world, with the fork's first notes push failing `HostBusy`. It expects two pushes and the note equal to the project's verdict. It goes red by assertion with `Effect.retry(noteRetry)` removed. The run races `Effect.forever(TestClock.adjust(...))`, so the backoff passes on the TestClock, and the test fails rather than hangs when the retry is gone. - notes.ts: the git blob framing (`blob <n>\0` + bytes) was built twice, once for the blob id and once for the loose object, each time by spreading the bytes into a number array. Both now use one `framed` helper. - Not changed, recorded in the issue's Comments for 499: notes.ts repeats `@repo/git/notes`' `notesAt`, `deflate` and verdict encoding, and reads the notes tree twice per write. `noteCommit` keeping the earlier blobs would remove both, and it fixes the isogit Lander's canonical note over `/binding` (217 #7). That change belongs to packages/git, outside 407's territory. - bun run fix && bun run verify green: platform tests 257; bytes platform 1,516,272 of 1,665,000.
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Diff stats
2 files+106 added−22 removed
- tests:+93 added−7 removed
- other:+13 added−15 removed