test(server): pin mutation/command error paths with wire-level tests#4
Open
grrowl wants to merge 1 commit into
Open
test(server): pin mutation/command error paths with wire-level tests#4grrowl wants to merge 1 commit into
grrowl wants to merge 1 commit into
Conversation
Adds 9 tests in tests/error-paths.test.ts covering the server's previously-uncovered error paths: execute-throw atomicity (single and multi-op rollback), authorize-fail before any write, unknown mutation/ command rejection, exactly-once replay of a rejected txId, command-boom execute throw, unknown-command UNKNOWN_COMMAND code, retention-floor reconnect reset + fresh snapshot, and readSyncSnapshot unknown-collection throw. Also adds a `boom` command to tests/test-worker.ts (one defineCommand only). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Executes plan 001 from the advisor audit (deep audit @ 8e157ef). Tests only — no src changes.
What
9 wire-level tests in
tests/error-paths.test.ts(+ a throwingboomcommand in the test worker) pinning the previously-untested error paths:executethrow mid-transactionSync→ rejected, rolled back, no delta leakUNKNOWN_COMMAND) rejectionsresetfollowed by fresh snapshot, order assertedreadSyncSnapshotthrows on unknown collectionReview notes
since >= floor-1catch-up branch by design).Base for the stacked PRs #—(004) and #—(005).
🤖 Generated with Claude Code