Conversation
…#482) promote() and MailClient moved a record into cur/ with a rename, so a colliding filename overwrote an already-delivered record. Both now place the record with the shared placeCurRecord() exclusive link: on a collision an identical delivery is dead-lettered as a replay and a different record under the same filename is dead-lettered as an integrity error naming the record id, leaving the delivered record untouched.
Collaborator
Author
482 sweep — every sentence the diff adds or changes, and its callMeasured against the code the diff introduces. packages/agent/src/lib/mailbox-policy.ts
packages/agent/src/io/mail.ts
packages/cli/src/utils/mail.ts
test/mail-cur-writers.test.ts
.changelog/unreleased/fixed-482-first-delivery-no-replace.md
Tests (names / comments)
Not fixed / noted
|
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configuration
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Mechanical merge: no conflicts. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…st titles say dead-lettered (#482) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… delivery content (#482) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ender-controlled wrapper (#482) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…r test reaches collision handling (#482) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…can never rewrite cur/ (#482) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ing replay (#482) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ages/pi-tps-mail Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…at (#482) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…cturally, never by content (#482) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…/ record; a consumed ID is a replay Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…o-replace guarantee Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…cement (#482) Co-Authored-By: Claude Opus 5.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.
Closes #482.
First delivery never replaces or writes through an existing
cur/record.A delivery never replaces an existing
cur/record: both writers place it with an exclusive hard link.Evidence
Measured on 1973cb4:
bun run build: exit 0.tsc --noEmit -p packages/{agent,cli}/tsconfig.json: exit 0 each.packages/agent/test/io.test.ts): 14 pass / 0 fail, exit 0.test/mailbox-policy.test.ts: 3 pass / 0 fail, exit 0.packages/cli/test/mail-promote-scratch.test.ts: 4 pass / 0 fail, exit 0.packages/cli/test/mail-slice-a-followups.test.ts: 52 pass / 0 fail, exit 0.test/mail-cur-writers.test.ts: 12 pass / 0 fail, exit 0.Measured on 238511f:
bun run lint:ci: exit 0.node scripts/changelog-fragments.mjs check: exit 0.