Skip to content

id(artifact): peer pulls halt on pre-upgrade home_declared entries — the #3187 strict receipt needs a trusted historical cutoff for receive_artifact #4459

Closed

Description

@dezren39

Problem

PR #4449's sibling PR #4432 (issue #3187, Phase 2 of design #3231) bounds home_declared world_id in SignedArtifact::parsed() (max 64 bytes, no whitespace-only, no control/format characters) and refuses duplicate endpoints. Local history is covered: replay of an existing log uses a lenient path (parsed_for_replay), so a world whose log already holds an over-bound declaration still reopens (pinned by the PR's a_legacy_home_declaration_still_replays test).

The peer-pull path is not covered (CodeRabbit Major on PR #4432, verified 2026-11-02): Directory::receive_artifact (pkgs/id/src/directory.rs:1380) calls the strict artifact.parsed()?, and the refusal ends the page in apply_page / the pull in pull_within. A peer whose signed chain contains a pre-upgrade declaration with an over-bound world_id therefore cannot be pulled past that entry — later artifacts from that account never apply. The declaration is signed and cannot be rewritten.

What is needed

A design decision, under design #3231's one-receipt-contract (the #3232 Phase 3 audit may be the right venue):

  • Choose a trusted cutoff that marks pre-upgrade chain state for the receive path (candidates: per-account chain position/seq at upgrade time, a protocol/version marker, an explicit allowlist of known legacy artifact hashes) and name its authoritative source.
  • Peer provenance alone is not a validation boundary, and the local replay path (parsed_for_replay) must not simply be reused for pulled artifacts.
  • The strict bound keeps applying to genuinely new receipts either way.

Until that cutoff exists, PR #4432's strict-receipt behavior is the conservative default and its merge is held on this question (queue task 5758 parked with this issue as the resume condition).

Links

Acceptance criteria

Activity

  1. added
    kind/bugSomething isn't working (prefixed form of the classic bug label)
    priority/lowNice to have; do when convenient
    app/idPackage/app: id (pkgs/ or apps/ in this repo)
    effort/mMedium: expected under 1 day of work
    meta/enrichedIntake review done: acceptance criteria, links, and normalized labels added
    on Nov 2, 2026
  2. dezren39 commented on Nov 2, 2026

    @dezren39
    MemberAuthor

    Intake review

    Related: Follow-up of code issue #3187 (strict receive) per the title; sibling code issue #4457 is the Phase 3b follow-up of #3456 in the same area. No merged PR addressing the home_declared pull halt was found at this pass.

    Notes: Labels at filing: kind/bug, priority/low, app/id. This pass adds status/needs-triage, effort/m, the acceptance section, meta/enriched. Priority stays low per the filer (upgrade-path edge, not a live-data halt).

    Risks: Loosening receive strictness carelessly reopens the #3187 hole; the fix must distinguish pre-upgrade entries from corrupt ones by version/shape, not by ignoring errors.

    Suggested approach: Reproduce with a pre-upgrade journal fixture, add the versioned migration/skip path in the pull, and pin both behaviors (old entry tolerated, corrupt entry rejected) in tests.

    — fleet monitor intake enrichment, 2026-11-02.

  3. added
    source/creatorFiled by the new-issue-creator job
    task/triageQueue packet kind: verify, reproduce, and route this item
    on Nov 3, 2026
  4. dezren39 commented on Nov 3, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · handed off (task 8402, re-handoff)

  5. added
    queue/claimedQueue worker lifecycle state
    and removed on Nov 3, 2026
  6. 298 remaining items

  7. added
    work/assignedQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    and removed on Nov 11, 2026
  8. dezren39 commented on Nov 11, 2026

    @dezren39
    MemberAuthor

    agent-note:v1
    Agent: repo-worker-code / any-a
    State: picked up
    Task: repo-queue task 15019
    Verified: issue #4459 OPEN, no hard-stop labels; PR #6407 OPEN at head 116f3ff (unchanged since 2026-11-10); design decision read in full (issue note 6805847508, PR note 6805848941).
    Next: revise PR #6407 in place on its branch — remove the format_version emission/cutoff marker, make per-account chain position the sole cutoff source (strict when position is unknown), rebase on current main, re-run the pkgs/id artifact tests plus a signed-format compat pin, then merge under the standing criteria.

  9. dezren39 commented on Nov 11, 2026

    @dezren39
    MemberAuthor

    agent-note:v1
    Agent: repo-worker-code / any-a
    State: done
    Task: repo-queue task 15019
    PR: #6407 MERGED, merge commit af726f2 (head 3f8e0a2); issue #4459 closed by the merge.
    What changed vs the previous PR design: the format_version marker is gone entirely — nothing about what signers emit changes, and a new compat pin (a_newly_signed_artifact_verifies_under_the_pre_cutoff_signed_format) proves a newly signed artifact verifies under the unchanged signed_bytes. The cutoff is receive-side chain position: ArtifactLog::insert_received in the id-sync crate (the wire layer moved there in the #4406 split; the PR was ported across it) grants the bounded world-id exception only to an artifact extending the author's held chain before the first strict-valid artifact that receiver accepted for that author; position-unestablished artifacts validate strictly, as do signature and all other structural rules at every position. The typed legacy note still surfaces in pull outcomes.
    Verification: cargo test --lib artifact:: on the merged head — facade 12 passed, id-sync 31 passed (both pull-path regressions updated to the chain-position cutoff plus the compat pin); full pkgs/id lib suite 1925 passed. One unrelated pre-existing failure in the wider run (id-core frames byte-refusal test) fails identically on clean main and is already filed as #8354.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

app/idPackage/app: id (pkgs/ or apps/ in this repo)effort/mMedium: expected under 1 day of workkind/bugSomething isn't working (prefixed form of the classic bug label)meta/enrichedIntake review done: acceptance criteria, links, and normalized labels addedpriority/lowNice to have; do when convenientsource/creatorFiled by the new-issue-creator job

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions