Repository navigation
Closed
Labels
app/idPackage/app: id (pkgs/ or apps/ in this repo)Package/app: id (pkgs/ or apps/ in this repo)effort/mMedium: expected under 1 day of workMedium: expected under 1 day of workkind/bugSomething isn't working (prefixed form of the classic bug label)Something isn't working (prefixed form of the classic bug label)meta/enrichedIntake review done: acceptance criteria, links, and normalized labels addedIntake review done: acceptance criteria, links, and normalized labels addedpriority/normalOrdinary priority (the default)Ordinary priority (the default)source/queue-workerFiled or worked by the queue/worker pilotFiled or worked by the queue/worker pilotstatus:donetask/triageQueue packet kind: verify, reproduce, and route this itemQueue packet kind: verify, reproduce, and route this item
Description
Receipt-audit follow-up from #3232 / design #3231
Envelope.verify currently verifies the signature but does not validate Envelope.id's producer shape (16 random bytes rendered as 32 lowercase hex characters). Directory.receive persists any correctly signed ID into request/seen state. A noncanonical signed request ID such as r1 can flow through Directory.friendship_requests into a friend_remove artifact, whose receipt validation rejects it under #3146; the friendship then cannot be removed through the normal artifact path.
Scope
- Validate the canonical ID shape at fresh friend-request admission (and relevant persisted-entry boundaries).
- Preserve a safe removal path for already-persisted noncanonical IDs; do not make old friendships permanently unremovable.
- Add regressions for admission and legacy-state removal.
- Keep this separate from the Phase 3 (audit) of #3231 — field-by-field receipt-validation audit for pkgs/id artifacts + contract statement #3232 audit; do not weaken the friend_remove.requests receipt contract.
Evidence: #3232 comment #3232 (comment); current source pkgs/id/src/directory.rs (Envelope::verify, Directory::receive, Directory::friendship_requests) and pkgs/id/src/artifact.rs (friend_remove parsing).
Acceptance criteria
- Fresh friend-request admission validates the canonical envelope ID shape (16 random bytes as 32 lowercase hex characters) before persistence.
- Already-persisted noncanonical IDs retain a safe removal path — old friendships are not permanently unremovable.
- Regression tests cover both fresh admission rejection and legacy-state removal.
- The
friend_remove.requestsreceipt contract (id(artifact): friend_removerequestsis the one known-kind body parsed() never validates — any count, any shape, any length passes, and every string lands permanently in the directory's removed_requests void guard #3146) is not weakened.
Metadata
Metadata
Assignees
Labels
app/idPackage/app: id (pkgs/ or apps/ in this repo)Package/app: id (pkgs/ or apps/ in this repo)effort/mMedium: expected under 1 day of workMedium: expected under 1 day of workkind/bugSomething isn't working (prefixed form of the classic bug label)Something isn't working (prefixed form of the classic bug label)meta/enrichedIntake review done: acceptance criteria, links, and normalized labels addedIntake review done: acceptance criteria, links, and normalized labels addedpriority/normalOrdinary priority (the default)Ordinary priority (the default)source/queue-workerFiled or worked by the queue/worker pilotFiled or worked by the queue/worker pilotstatus:donetask/triageQueue packet kind: verify, reproduce, and route this itemQueue packet kind: verify, reproduce, and route this item
Activity
developing-today commentedon Nov 4, 2026
CODE-1393
dezren39 commentedon Nov 4, 2026
Intake review
requestsis the one known-kind body parsed() never validates — any count, any shape, any length passes, and every string lands permanently in the directory's removed_requests void guard #3146'sfriend_remove.requestsvalidation. Evidence: Phase 3 (audit) of #3231 — field-by-field receipt-validation audit for pkgs/id artifacts + contract statement #3232 comment 6578677909; source inpkgs/id/src/directory.rsandpkgs/id/src/artifact.rs. Sibling follow-ups: id(artifact): preserve pre-upgrade log replay for duplicate after and non-NFC fields #5625, id(artifact): validate known-kind bodies in generic signing helpers #5623.Directory::receiveadmission; for persisted noncanonical IDs, allow removal via a path that carries the stored ID verbatim without re-deriving it through the rejecting parser.— fleet monitor intake, 2026-11-04
65 remaining items
dezren39 commentedon Nov 5, 2026
🤖 Agent note · handed off
opencodefix(id/directory): validate friend-request IDs at admission, preserve…
developing-today commentedon Nov 5, 2026
🤖 Agent note · done
direct(attempt 4/4, resumed — not restarted)cargo test --manifest-path pkgs/id/Cargo.toml --lib— 2271 + 317 passed, 0 failed (directory subset 69/69, including the new property tests for admission shape and removal recovery). Squash-merged PR fix(id/directory): validate friend-request IDs at admission, preserve legacy removals (#5624) #6239; issue id(directory): validate friend-request IDs before persistence and preserve legacy removals #5624 auto-closed.developing-today commentedon Nov 5, 2026
🤖 Agent note · done (already_done — queue bookkeeping only)
direct, so this lane revalidated fresh instead of handing off.already_doneand the evidence above. No new code work was done or needed.