Skip to content

id(artifact): validate known-kind bodies in generic signing helpers #5623

Closed

Description

@dezren39

Receipt-audit follow-up from #3232 / design #3231

The public SignedArtifact::sign / sign_after helpers are generic over kind strings. They enforce sequence/after construction rules and sign arbitrary JSON, but do not call the known-kind parser. Consequently, a direct caller can obtain a signed friend_remove, home_declared, document, or tag value that parsed() / ArtifactLog::insert refuses. ArtifactLog::sign and the directory's document/tag producers also reach the shared receipt check only on insertion, after a temporary signature has been made.

Scope

  • Make known-kind signing/build paths refuse the same typed-body rules as receipt.
  • Preserve unknown-kind forward compatibility: unknown kinds remain signable envelope-only and parsed() continues returning None.
  • Keep authenticity failures distinct from Forbidden policy failures.
  • Add focused construction-vs-receipt symmetry tests for known kinds and unknown kinds.

This is not implemented in the #3232 audit. See the field-by-field disposition and evidence in the follow-up PR for issue #3232. after builder symmetry is already enforced by #3196 / PR #5576.

Acceptance criteria

  • Known-kind signing/build paths (SignedArtifact::sign / sign_after and the shared producers) refuse the same typed-body rules that receipt (parsed() / ArtifactLog::insert) enforces.
  • Unknown kinds remain signable envelope-only, and parsed() continues returning None for them (forward compatibility preserved).
  • Authenticity failures stay distinct from Forbidden policy failures.
  • Focused construction-vs-receipt symmetry tests exist for known kinds and unknown kinds.

Activity

  1. developing-today commented on Nov 4, 2026

    @developing-today
    Contributor
  2. added
    kind/bugSomething isn't working (prefixed form of the classic bug label)
    priority/normalOrdinary priority (the default)
    effort/mMedium: expected under 1 day of work
    app/idPackage/app: id (pkgs/ or apps/ in this repo)
    source/queue-workerFiled or worked by the queue/worker pilot
    meta/enrichedIntake review done: acceptance criteria, links, and normalized labels added
    on Nov 4, 2026
  3. dezren39 commented on Nov 4, 2026

    @dezren39
    MemberAuthor

    Intake review

  4. added
    queue/queuedHas a queued task in the Supabase agent queue
    task/triageQueue packet kind: verify, reproduce, and route this item
    work/assignedQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    and removed on Nov 5, 2026
  5. 12 remaining items

  6. 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 5, 2026
  7. developing-today commented on Nov 5, 2026

    @developing-today
    Contributor

    agent-note:v1
    task: 10523
    lane: code-u
    state: parked
    summary: Implementation complete and PR opened: PR #6240 (branch queue/10523-5623-sign-validate-known-kinds, commit a118611). SignedArtifact::sign/sign_after now validate known-kind bodies via the receipt check itself; unknown kinds unchanged. Verified on the laptop: cargo test --lib artifact:: 38 passed; full id lib 2256 passed, 0 failed. Task parked for CI: PR checks (native arm64 determinism, id builds without world feature, guard PR check list) were still queued after the 5-minute polling window, and no Codex review comments were present at park time.
    next: on resume, re-check PR #6240 checks and any Codex findings (disposition each), then merge under the standing criteria and complete task 10523.

  8. added a commit that references this issue on Nov 5, 2026
  9. dezren39 commented on Nov 5, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · done

  10. 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
    status/triagedTriaged and routed (see agent note)
    on Nov 5, 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/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/normalOrdinary priority (the default)source/queue-workerFiled or worked by the queue/worker pilottask/triageQueue packet kind: verify, reproduce, and route this item

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions