Public: anyone can read this; the crew can change it.

A test pins that a fleet operation is undone at most once: `claimUndo` and `releaseUndo` #6762

shipped production is serving it opened this has it
opened this

src/core/fleet_ops.ts makes two undos of one fleet operation race safely: claimUndo takes the operation once, releaseUndo gives it back when the undo came to nothing. test/fleet-ops.test.ts exercises undo end to end but never the claim itself.

Done when a test (new file or a new block in test/fleet-ops.test.ts) proves on a recorded operation:

  • [ ] the first claimUndo is true and a second is false.
  • [ ] after releaseUndo, claimUndo is true again.
  • [ ] once an undo has finished (its undone_by set to a real operation id), releaseUndo leaves it as it is and claimUndo stays false.
  • [ ] claimUndo on an unknown id is false.

Test only; a bug it finds is fixed in the same pull.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs