Skip to content

id(session): implement the documents/document frame pair (D1-040, from #535) #3762

Open

Description

@dezren39

What

Implement the D1-040 design: a documents/document ClientFrame/ServerFrame pair in the world-session protocol, modelled on records, so web and CLI clients can read the public documents — today reachable only from the SSH shell, which reads the shared server blob store directly. Scope is server-wide parity (the design's Decision 1): the frames expose exactly the set SSH exposes today; per-world scoping waits on the deferred per-world document store and is out of scope here.

Design

doc/2026-11-01T16-05-00Z_design_documents_session_frames/2026-11-01T16-05-00Z_design_documents_session_frames.md (lands with PR #3760; tracker #535 item D1-040). The design is decided — frame shapes, authorization, bounds, the serving-logic move, and test expectations are all pinned there. Read it first; this issue is the delivery vehicle, not a second design pass.

Acceptance criteria

  • ClientFrame::Documents { capability, prefix, after } and ClientFrame::Document { capability, name } in pkgs/id/src/world_session/types.rs; ServerFrame::Documents { names, next_after } and ServerFrame::Document { name, size, text } per the design (no sequence on the list frame — the design records why)
  • Serving logic (list_public_documents / read_public_document and their name/bounds rules) lives in the session layer next to records_session; authorization is the records rule (join capability → participant_id, else join denied); the design's one structural unknown — how the session layer reaches the blob store the SSH shell holds today — is resolved and noted on this issue
  • SSH shell is frame-backed: command_frame gains documents / documents_continue / document arms mirroring records; rendered SSH output (public named files: listing, [listing truncated], --- {name} ({size} bytes; read-only) --- header, /help) is byte-identical to before
  • Contract updated on both sides: frames named in pkgs/id/src/shell_contract and the shared frame contract; web contract tests extended; web client gains the minimal list + read documents panel the design specifies
  • Tests per the design's test expectations: session tests mirroring records_session (paging, prefix, after exclusivity, oversized/non-viewable/missing refusals, join denied), contract accept/refuse cases, existing SSH document shell tests passing against the frame-backed path
  • Existing mcpx/id CI green in GitHub Actions on the PR (note: pkgs/mcpx conformance has a pre-existing compile break on main — features_test.go:308 — do not chase it here)

Out of scope

Links

Activity

  1. added
    kind/featureNew feature or capability request
    priority/normalOrdinary priority (the default)
    app/idPackage/app: id (pkgs/ or apps/ in this repo)
    effort/mMedium: expected under 1 day of work
    on Nov 1, 2026
  2. developing-today commented on Nov 1, 2026

    @developing-today
    Contributor
  3. added
    queue/queuedHas a queued task in the Supabase agent queue
    source/creatorFiled by the new-issue-creator job
    task/triageQueue packet kind: verify, reproduce, and route this item
    on Nov 3, 2026
  4. developing-today commented on Nov 3, 2026

    @developing-today
    Contributor

    agent-note:v1
    state: triaged (coverage pass)
    Coverage pass 2026-11-03: reviewed in the fleet-wide per-issue pass (drift / overlap / already-handled / stale / blockers / ordering). Verdict: still live; queued in repo-health-code-pilot as triage at priority 40 (priority/normal). If this is already handled at current main, the triage closes it with evidence; if it needs splitting, the triage files the split.
    Found via: coverage pass 2026-11-03

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

    @dezren39
    MemberAuthor

    agent-note:v1
    state: picked up (task 8289, triage)
    Agent: repo-worker-code — OpenChamber scheduled lane 335a5d1f-bfc1-4831-99ea-850c8939a727
    Task: revalidate at current main; inspect the previous handoff and scope a fix or close with evidence.

  7. dezren39 commented on Nov 3, 2026

    @dezren39
    MemberAuthor

    agent-note:v1
    state: triaged (task 8289)
    Agent: repo-worker-code — OpenChamber scheduled lane 335a5d1f-bfc1-4831-99ea-850c8939a727
    Found via: current-main triage of queue task 8289

    Revalidated open at current main (origin/main 1d8356f). The design PR #3760 is merged; PR search found no implementation PR for #3762. Main still has list_public_documents / read_public_document in pkgs/id/src/world_ssh.rs (~1455/1506), called by SSH command arms (~805/822); there are no Documents / Document session frames in pkgs/id/src. The issue's stated gap remains live.

    Implementation scope is ready as written: move the existing public-document serving logic behind the session protocol, add the paired list/read frames and authorization, make SSH frame-backed, update shared contracts and the minimal web panel, and retain the specified paging/refusal/output compatibility tests. Design decisions are settled by #3760; #548 is already closed. No split or additional blocker is needed; issue #3762 itself is the implementation handoff. No code change made in this triage.

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/featureNew feature or capability requestpriority/normalOrdinary priority (the default)source/creatorFiled by the new-issue-creator jobtask/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