3.1 KiB
3.1 KiB
| cairn | change |
|---|---|
| tasks | duplicate-link-id-mints-an-item |
Tasks
- Bump io-pimdir (and io-replica through it) to the releases carrying the minted key and no ambiguity surface. Neither is released yet, so
[patch.crates-io]points both at the sibling checkouts (path = "../io-pimdir",path = "../io-replica") instead of the stale git revisions it named, which resolve to no minted key at all. The whole local suite is testable end to end that way. - Point the two
[patch.crates-io]entries back at git, or drop them for the publishedversionrequirements, once io-pimdir and io-replica are released. A path patch is a working-tree convenience and must not ship in a release. - Audit src/pimdir/ for a read that assumes one item per identity: none found. Every read addresses by
seq(parse_idthenget_item), the keyset cursor inscan_itemspages onlink_id, which stays unique per collection, andEnvelope.message_idis display-only with no consumer keying on it. Nothing in the repo readsambiguous_handlesorReplicaStatus::Ambiguous, so io-pimdir's removal is not breaking here. mid:translation at the seam: already gone. No occurrence outside cairn/log and one historical proposal, andadd_messagepasses the derived bare id straight through.add_messageneeds no change: it stages the derived bareMessage-IDand returns it for display only, and a collision parks in the store rather than minting.- Fix the stale rationale the
mid:era left behind, which the audit found still asserting the opposite of the new rule: src/pimdir/backend.rs around theadd_messagedoc and its test rationale both say an append "deduplicates against a synced copy rather than linking one message twice". A colliding staged add parks (pimdir SPEC §15.3); it neither deduplicates nor mints. Both now say what happens and why the store answers a source and a producer differently. - Tests: two items of one mailbox whose bodies carry one
Message-IDproject two envelopes with distinct public ids.two_items_sharing_a_message_id_project_two_public_idsin src/pimdir/backend.rs, over two hand-built items, the second under a minteddup:key. Nothing beyond that is testable here, the repo having no store fixture and every pimdir test being a unit test over a hand-built item; the parking behaviour is the store owner's and is tested in io-pimdir. cargo test(119 passed),cargo clippy --all-targets(one pre-existing warning in src/wizard/search.rs, untouched),cargo fmt.- CHANGELOG
### Fixed: a duplicated message no longer disappears from the pimdir backend's listing. - Fold
delta.mdintocairn/spec/backends.md. Two requirements move, not one:pimdir shows a short public id, andpimdir is a reader and a producer, never the owner, whose last paragraph is the survivingmid:-era sentence ("SHALL spell the link id the way the store it writes to already does, so an added message deduplicates against a synced copy"). Both halves of it are now wrong. The added requirement heads the pimdir cluster; its scenario is prose, no spec file here carrying a scenario block. - Append the log entry; mark
landed.