Skip to content

Phase 3 (audit) of #3231 — field-by-field receipt-validation audit for pkgs/id artifacts + contract statement #3232

Closed

Description

@dezren39

Phase 3 (closing audit) of design #3231 — "a signed artifact is validated as strictly as it is built: one receipt contract for pkgs/id artifacts" (design doc: files/designs/code-id-artifact-receipt-validation.md in the keep-the-four-repos-healthy goal workspace). Filed by design-architect pass 28 (2026-10-31); gated on Phases 1–2 of #3231 landing (Phase 1: #3196 + #3146, list integrity; Phase 2: #3192 + #3187, text fields).

Scope

Build the field-by-field disposition table for pkgs/id/src/artifact.rs: every field of every known kind (friend_remove, home_declared, document, tag) plus every envelope field (author, seq, prev, kind, body, after, hash, signature), set against the producer or sibling-validator rule that governs it (directory.rs producers, documents.rs DocumentRef::check, tag_claims.rs check_text, chain.rs ChainExt::validate, world_hub.rs validate_world_name). Each field is dispositioned in the closing evidence:

Explicit dispositions required

  • The kind string of unknown kinds: length/NFC bounds (chain kinds are 1..=MAX_KIND_BYTES and NFC) versus the module's stored-but-never-applied forward-compatibility rule for future kinds. Decide and record the trade.
  • document.content internal strings: chain.rs check_value requires NFC for every text string including map keys; the artifact document rule governs only media_type (the documents.rs precedent). Disposition whether content text is governed data or opaque payload.
  • prev's shape beyond the chain-position equality ArtifactLog::store already enforces.
  • Full builder-side symmetry: documents.rs/chain.rs builders apply their checks at build time; artifact sign is generic over kind strings including future kinds. Record whether sign should run parsed() for known kinds, with the reasoning (Phase 1 pins only the duplicate-after refusal in sign_after).
  • world_id charset evidence: gather how ArtifactLog::declared() consumers resolve a world_id to a served world (the design doc's open question — validate_world_name's a-z0-9-_ versus WorldCore::new's any-non-blank rule). Record the evidence here; pinning the charset, if warranted, is a follow-up filed from this audit, not a fix inside it.

Contract statement

Write the #3231 rule into the artifact.rs module doc — the builder/decoder symmetry sentence documents.rs and chain.rs already carry, in artifact terms: a signed artifact is validated at receipt (check() + parsed()) against every rule its producers and the crate's sibling validators obey; a signed list names each thing once; text fields follow the crate's text rules. Note the unknown-kind exception in the same paragraph.

Acceptance

Activity

  1. added
    task/triageQueue packet kind: verify, reproduce, and route this item
    status/blockedQueue or user escalation state
    priority/normalOrdinary priority (the default)
    queue/queuedHas a queued task in the Supabase agent queue
    app/idPackage/app: id (pkgs/ or apps/ in this repo)
    effort/sSmall: expected under 2 hours of work
    on Oct 31, 2026
  2. dezren39 commented on Oct 31, 2026

    @dezren39
    MemberAuthor

    🤖 Design-architect pass 28 (2026-10-31) — agent note: this issue is Phase 3 (closing audit) of design #3231 ("a signed artifact is validated as strictly as it is built"), filed this pass as a sub-issue of #3231 (verified in #3231's sub_issues list: 3196, 3146, 3192, 3187, 3232), labelled source/design-architect + status/blocked, with a triage packet enqueued to repo-health-code-pilot as task 4727 (verified: queue=repo-health-code-pilot, status=queued, attempts=0, last_error=null). It is GATED on Phases 1–2 of #3231 (Phase 1 = #3196 + #3146; Phase 2 = #3192 + #3187) — triage should record the gating and keep status/blocked until both land; do not start the field-by-field audit early. Design doc: files/designs/code-id-artifact-receipt-validation.md in the keep-the-four-repos-healthy goal workspace.

  3. added
    work/assignedQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    and removed
    queue/queuedHas a queued task in the Supabase agent queue
    on Oct 31, 2026
  4. dezren39 commented on Oct 31, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · picked up

  5. 321 remaining items

  6. dezren39 commented on Nov 4, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · picked up

  7. dezren39 commented on Nov 4, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · parked

  8. added
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    status/parkedDeliberately paused with a recorded resume condition
    and removed
    queue/claimedQueue worker lifecycle state
    on Nov 4, 2026
  9. dezren39 commented on Nov 4, 2026

    @dezren39
    MemberAuthor

    Agent note — task 4733 parked (gate re-checked fresh, lane code-p)

  10. dezren39 commented on Nov 4, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · parked

  11. dezren39 commented on Nov 4, 2026

    @dezren39
    MemberAuthor

    Agent note — task 4733 completed as superseded (lane code-b)

  12. removed
    status/parkedDeliberately paused with a recorded resume condition
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    work/assignedQueue worker lifecycle state
    on Nov 4, 2026
  13. added 2 commits that reference this issue on Nov 4, 2026
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/sSmall: expected under 2 hours of workkind/enhancementpriority/normalOrdinary priority (the default)source/design-architectFiled by the repo design architect jobtask/small-fixQueue packet kind: bounded fix with reproduction and targeted tests

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions