Skip to content

feat(j5): J5's client reads run over WebSocket methods - #584

Merged
Jacksondr5 merged 5 commits into
j5/mainfrom
j5/reads-over-socket
Oct 13, 2026
Merged

Jacksondr5 merged 5 commits into
j5/mainfrom
j5/reads-over-socket

Conversation

@Jacksondr5

@Jacksondr5 Jacksondr5 commented Oct 13, 2026 •

Copy link
Copy Markdown
Owner

Problem

J5's client reads called J5's own HTTP routes, each with its own authentication check, error shape and "is this route missing" probe, and through three different client code paths. Upstream's rule, written in its own code, is that a small read is a socket query and a large, compressible payload goes over HTTP. Part of #506 (step 3; the change stream that replaces the polls is the next PR in this stack).

What changed

  • 14 reads moved onto WebSocket RPC methods: the Inbox list and open count, Crew proposals, Crew runtime requests, Crew memberships, the Fleet, spawned children, the archive preflight, participant identities, the peer list, the three playbook reads (library, a thread's runs, all runs) and the artifact list. Each handler calls one service method and maps its failure. The route logic moved into ClientReadsService, and WorkspacePlaybooks now resolves the workspace for every playbook request that names one (read, export, delete, rename), as asked in review of feat(j5): J5's client actions run over WebSocket methods, with permission checks at submission #524.
  • Their HTTP routes are removed. Clients and server update together, as for the actions in feat(j5): J5's client actions run over WebSocket methods, with permission checks at submission #524.
  • Reading one artifact's content stays on HTTP. It can be up to 5 MB, and a third more as base64. Upstream keeps payloads like that off the socket (its pull-request diff route says so), and caps its own socket file read at 1 MB.
  • The client uses upstream's query helper (createEnvironmentRpcQueryAtomFamily), or createEnvironmentRpcCommand for a one-off read. The hand-written response schemas and the hand-rolled bearer/DPoP request in the archive flow are deleted.
  • The per-route probe is gone. A server is unsupported when it does not report j5ProjectLedger; the Inbox, Fleet, Crew, peer and playbook views then send it no reads. A J5 server too old to have a read shows "This view needs a newer server. Update the server hosting this environment, then try again."
  • Guests. The guest gate (feat(server): a guest's connection reaches only what its grants cover #561) refuses every method it does not name, so a guest is refused all of these reads. As with the HTTP reads, a client that knows its connection is a guest's sends none of them and shows no playbook boards.
  • The polling timers are unchanged here.

Behaviour differences from the routes

  • A read failure shows the server's own refusal, or the read's general words for a server fault. Nothing depends on an HTTP status.
  • On the Inbox list, a missing local person is now a refusal in its own words, as it already was for the open count.
  • A playbook workspace that cannot be resolved because of a server fault says "Could not resolve the workspace." and is logged; it was a bare 500.
  • The archive preflight no longer sends the unused archived field.
  • The moved reads no longer have their 10-second HTTP timeout; they follow the socket, as upstream's queries do.
  • Authorization is per socket for these reads, as recorded for the actions in FORK.md case 64.

Verification

  • Typecheck clean in contracts, client-runtime, web, mobile and server. Lint and format clean on the changed files.
  • Reviewed by an Opus 5.5 subagent reading by ref: no blocking findings; its stale-doc and dead-code findings are fixed in 348cfbaccc.
  • Tests, after the rebase onto guest sharing: contracts 689, client-runtime (src/j5, src/state) 906, web src/j5 278, mobile src/j5 31, server (src/j5, src/auth, src/observability, ws.test.ts) 1,225.
  • Every behaviour test of a removed route was ported to the handler or service that replaced it. Tests of HTTP mechanics (status codes, body parsing, route authentication) were dropped; scope tests cover every new method, including access:read for the peer list.

UI changes

Nothing a person sees is meant to change. Each pair is the same scenario on j5/main and on this branch, at 1280×800 in the light theme. Real model turns produced them, so wording, times and some row order differ between the two.

Before After
Inbox with one open question before after
Fleet with a Crew before after
Sidebar Crew chip and expanded seat before after
Playbook library before after
Artifacts list and preview (the after shot also lists the large test file) before after
Connections with no peers before after
Archive dialog for a Captain, listing its seat before after

Head only, from the two-server run (the test rig cannot run a base server and a peer at once):

After
A 325 KB HTML artifact read over HTTP after
Connections listing the peer after
Inbox questions from two servers after
Fleet rows labelled by server after

Not captured: the "needs a newer server" message (it needs an older server) and a seat's approval card (see Live testing).

Live testing

Pass on a79227a904, the head before the rebase onto guest sharing (#536, #561, #577); the rebased head is covered by the live test of #586, which sits on top of it. Run by a GPT-6 Astra peer agent on an isolated server, with Claude Haiku 5.5 for the turns. Report: artifacts/test-reports/j5-reads-over-socket.md.

  • Found and fixed during the test: a direct visit to /artifacts stayed on "not connected" until Try again, because the page waited for the HTTP connection and the list now needs the socket. Fixed in 348cfbaccc and retested on a fresh load and a reload.
  • Ran live: an agent's question through bell, Inbox, answer and Answered; a Crew from proposal through approval, Fleet, sidebar chip and children, the Captain's archive dialog, archive and Retired crews; a playbook run on the board and the Fleet; an artifact list and read, with a 325 KB HTML file over HTTP.
  • Transport: every moved read was seen on the WebSocket; the 13 removed paths return 404; the j5 a2a peer list CLI still works.
  • Read-only session: every moved read succeeds with orchestration:read alone, and the peer list is refused for lack of access:read.
  • Recovery: a restart at rest, and a socket-only disconnect in the same document, both brought the reads back with no manual reload.
  • Two peered servers: Inbox and Fleet merge and label both servers; both peer lists are right.

Not exercised live

  • A seat's approval card with a real approval in it. The test Crew's seat ran with full access and asked for none; the empty list read succeeded.
  • Settings → Connections rendered from the second server (its read and its CLI passed).
  • Mobile, the desktop app, relay and tunnel connections, and a client against an older server.

For a person to test by hand (optional): approve a Crew whose seat needs approval for commands, have the seat run one, and confirm the request shows in the bell and Inbox, can be answered, and then leaves.

Upstream impact

  • packages/contracts/src/rpc.ts: one more .merge(J5ClientReadRpcGroup) and its import (FORK.md case 64).
  • packages/client-runtime/src/state/environmentHttpAuth.ts is unchanged: its raw request helper (case 34) stays, with artifact read as its only caller. Moving that route into upstream's typed HTTP API would be a new edit to an upstream contract file to remove one already-recorded helper, so refactor(j5): move Squadron and inbox routes to a typed HttpApiGroup #137 is left open for that decision.
  • FORK.md cases 21, 23, 34 and 64 are rewritten for the moved reads. No upstream method's scope or handler changes.

Checklist

  • One concern: the description has no "also"
  • Tests cover the changed behavior (backend changes ship with focused tests)
  • UI changes: before/after screenshots above, and a video for motion or interaction — no motion changed
  • Live testing: the section above says what ran live and what did not
  • Upstream-owned files: each one is recorded in FORK.md (case text and file-table row) in this PR
  • Upstream product: any change to what upstream's product does has a human decision linked above and a register entry in docs/j5/product/upstream.md — none changed
  • Surfaces: entry points, clients, providers, contracts, reverse states, connection modes (see AGENTS.md) — web and mobile share the moved atoms; mobile, relay and tunnel are not run live
  • Docs: definitions under docs/j5/product/ and user docs rewritten where this changes them — none describe the transport

Built by Claude Opus 5.5 in Claude Code, with Opus 5.5 subagents.

🤖 Generated with Claude Code

@vercel

vercel Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
j5-code Ready Ready Preview Oct 13, 2026 3:53am UTC

Request Review

@github-actions github-actions Bot added vouch:trusted Author is trusted by repo permissions or the VOUCHED list. size:XXL 1,000+ effective changed lines (test files excluded in mixed PRs). labels Oct 13, 2026
@coderabbitai

coderabbitai Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Warning

Review limit reached

  • Run on-demand review

This review includes 81 billable files and costs up to $20.25.

  • Ask an admin to make reviews automatic

Open in CodeRabbit

Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing.

Or wait 22 minutes for your next included review.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available. Your 62 included PR review attempts over the past 7 days set your current allowance at 1 review per hour.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Path: .coderabbit.config.ts
  • Review profile: CHILL
  • Plan: Essentials
  • Run ID: 40c14eea-7e93-4c84-8060-80178076ea30
📥 Commits

Reviewing files that changed from the base of the PR and between e021d59832b9269b980fce9f759862a8403607db and 2a97bf7.

📒 Files selected for processing (81)
  • FORK.md
  • apps/mobile/src/j5/playbooks/PlaybookBoard.tsx
  • apps/server/src/j5/a2a/AgentCrewReadsHttp.ts
  • apps/server/src/j5/a2a/ClientReadsHttp.test.ts
  • apps/server/src/j5/a2a/ClientReadsHttp.ts
  • apps/server/src/j5/a2a/ClientReadsService.test.ts
  • apps/server/src/j5/a2a/ClientReadsService.ts
  • apps/server/src/j5/a2a/CrewProposalsHttp.test.ts
  • apps/server/src/j5/a2a/CrewProposalsHttp.ts
  • apps/server/src/j5/a2a/CrewRuntimeRequestsHttp.test.ts
  • apps/server/src/j5/a2a/CrewRuntimeRequestsHttp.ts
  • apps/server/src/j5/a2a/HumanInboxHttp.test.ts
  • apps/server/src/j5/a2a/HumanInboxHttp.ts
  • apps/server/src/j5/a2a/J5AuthenticatedRoutes.ts
  • apps/server/src/j5/a2a/PeerAdminService.ts
  • apps/server/src/j5/a2a/PeerHttp.ts
  • apps/server/src/j5/a2a/PreArchiveFactsHttp.test.ts
  • apps/server/src/j5/a2a/PreArchiveFactsHttp.ts
  • apps/server/src/j5/a2a/README.md
  • apps/server/src/j5/a2a/SpawnedChildrenHttp.ts
  • apps/server/src/j5/a2a/clientReadRpc.test.ts
  • apps/server/src/j5/a2a/clientReadRpc.ts
  • apps/server/src/j5/a2a/crewMembershipsRead.test.ts
  • apps/server/src/j5/a2a/crewMembershipsRead.ts
  • apps/server/src/j5/a2a/fleetRead.test.ts
  • apps/server/src/j5/a2a/fleetRead.ts
  • apps/server/src/j5/a2a/httpSupport.ts
  • apps/server/src/j5/a2a/preArchiveFactsRead.test.ts
  • apps/server/src/j5/a2a/preArchiveFactsRead.ts
  • apps/server/src/j5/a2a/spawnedChildrenRead.test.ts
  • apps/server/src/j5/a2a/spawnedChildrenRead.ts
  • apps/server/src/j5/artifacts/ArtifactHttp.test.ts
  • apps/server/src/j5/artifacts/ArtifactHttp.ts
  • apps/server/src/j5/artifacts/artifactRpc.test.ts
  • apps/server/src/j5/artifacts/artifactRpc.ts
  • apps/server/src/j5/playbooks/PlaybookHttp.test.ts
  • apps/server/src/j5/playbooks/PlaybookHttp.ts
  • apps/server/src/j5/playbooks/PlaybookLibraryHttp.test.ts
  • apps/server/src/j5/playbooks/PlaybookLibraryHttp.ts
  • apps/server/src/j5/playbooks/WorkspacePlaybooks.ts
  • apps/server/src/j5/playbooks/playbookRpc.test.ts
  • apps/server/src/j5/playbooks/playbookRpc.ts
  • apps/server/src/j5/wsRpc.test.ts
  • apps/server/src/j5/wsRpc.ts
  • apps/server/src/j5/wsRpcAggregates.ts
  • apps/server/src/j5/wsRpcScopes.ts
  • apps/server/src/testUtils/shardWeights.json
  • apps/web/src/j5/a2a/archiveFlow.test.ts
  • apps/web/src/j5/a2a/archiveFlow.ts
  • apps/web/src/j5/a2a/archiveFlowClient.test.ts
  • apps/web/src/j5/a2a/archiveFlowClient.ts
  • apps/web/src/j5/a2a/humanInboxClient.test.ts
  • apps/web/src/j5/a2a/humanInboxClient.ts
  • apps/web/src/j5/a2a/humanInboxCountClient.test.ts
  • apps/web/src/j5/a2a/humanInboxCountClient.ts
  • apps/web/src/j5/artifacts/ArtifactsPage.connection.test.tsx
  • apps/web/src/j5/artifacts/ArtifactsPage.tsx
  • apps/web/src/j5/artifacts/artifactClient.ts
  • apps/web/src/j5/crew/CrewMembershipsClient.ts
  • apps/web/src/j5/playbooks/PlaybookBoard.tsx
  • apps/web/src/j5/playbooks/PlaybookRefresh.test.tsx
  • apps/web/src/j5/playbooks/PlaybookRunsSection.tsx
  • apps/web/src/j5/state.ts
  • apps/web/src/j5/threads/SpawnedChildrenClient.ts
  • apps/web/test/j5.ts
  • packages/client-runtime/src/j5/actions.test.ts
  • packages/client-runtime/src/j5/http.test.ts
  • packages/client-runtime/src/j5/http.ts
  • packages/client-runtime/src/j5/readSources.test.ts
  • packages/client-runtime/src/j5/readSources.ts
  • packages/client-runtime/src/j5/scopedThreadReadStore.test.ts
  • packages/client-runtime/src/j5/scopedThreadReadStore.ts
  • packages/client-runtime/src/j5/serverCompatibility.test.ts
  • packages/client-runtime/src/j5/sharing.test.ts
  • packages/client-runtime/src/j5/state.test.ts
  • packages/client-runtime/src/j5/state.ts
  • packages/contracts/src/artifacts.ts
  • packages/contracts/src/j5.ts
  • packages/contracts/src/j5/artifacts.ts
  • packages/contracts/src/j5/playbook.ts
  • packages/contracts/src/rpc.ts

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Path: .coderabbit.config.ts
  • Review profile: CHILL
  • Plan: Essentials
  • Run ID: 47285f10-ce66-43fe-8143-39f6bec23a09
📥 Commits

Reviewing files that changed from the base of the PR and between 01bef0d and e021d59832b9269b980fce9f759862a8403607db.

📒 Files selected for processing (77)
  • FORK.md
  • apps/mobile/src/j5/playbooks/PlaybookBoard.tsx
  • apps/server/src/j5/a2a/AgentCrewReadsHttp.ts
  • apps/server/src/j5/a2a/ClientReadsHttp.test.ts
  • apps/server/src/j5/a2a/ClientReadsHttp.ts
  • apps/server/src/j5/a2a/ClientReadsService.test.ts
  • apps/server/src/j5/a2a/ClientReadsService.ts
  • apps/server/src/j5/a2a/CrewProposalsHttp.test.ts
  • apps/server/src/j5/a2a/CrewProposalsHttp.ts
  • apps/server/src/j5/a2a/CrewRuntimeRequestsHttp.test.ts
  • apps/server/src/j5/a2a/CrewRuntimeRequestsHttp.ts
  • apps/server/src/j5/a2a/HumanInboxHttp.test.ts
  • apps/server/src/j5/a2a/HumanInboxHttp.ts
  • apps/server/src/j5/a2a/J5AuthenticatedRoutes.ts
  • apps/server/src/j5/a2a/PeerAdminService.ts
  • apps/server/src/j5/a2a/PeerHttp.ts
  • apps/server/src/j5/a2a/PreArchiveFactsHttp.test.ts
  • apps/server/src/j5/a2a/PreArchiveFactsHttp.ts
  • apps/server/src/j5/a2a/README.md
  • apps/server/src/j5/a2a/SpawnedChildrenHttp.ts
  • apps/server/src/j5/a2a/clientReadRpc.test.ts
  • apps/server/src/j5/a2a/clientReadRpc.ts
  • apps/server/src/j5/a2a/crewMembershipsRead.test.ts
  • apps/server/src/j5/a2a/crewMembershipsRead.ts
  • apps/server/src/j5/a2a/fleetRead.test.ts
  • apps/server/src/j5/a2a/fleetRead.ts
  • apps/server/src/j5/a2a/preArchiveFactsRead.test.ts
  • apps/server/src/j5/a2a/preArchiveFactsRead.ts
  • apps/server/src/j5/a2a/spawnedChildrenRead.test.ts
  • apps/server/src/j5/a2a/spawnedChildrenRead.ts
  • apps/server/src/j5/artifacts/ArtifactHttp.test.ts
  • apps/server/src/j5/artifacts/ArtifactHttp.ts
  • apps/server/src/j5/artifacts/artifactRpc.test.ts
  • apps/server/src/j5/artifacts/artifactRpc.ts
  • apps/server/src/j5/playbooks/PlaybookHttp.test.ts
  • apps/server/src/j5/playbooks/PlaybookHttp.ts
  • apps/server/src/j5/playbooks/PlaybookLibraryHttp.test.ts
  • apps/server/src/j5/playbooks/PlaybookLibraryHttp.ts
  • apps/server/src/j5/playbooks/WorkspacePlaybooks.ts
  • apps/server/src/j5/playbooks/playbookRpc.test.ts
  • apps/server/src/j5/playbooks/playbookRpc.ts
  • apps/server/src/j5/wsRpc.test.ts
  • apps/server/src/j5/wsRpc.ts
  • apps/server/src/j5/wsRpcAggregates.ts
  • apps/server/src/j5/wsRpcScopes.ts
  • apps/server/src/testUtils/shardWeights.json
  • apps/web/src/j5/a2a/archiveFlow.test.ts
  • apps/web/src/j5/a2a/archiveFlow.ts
  • apps/web/src/j5/a2a/archiveFlowClient.test.ts
  • apps/web/src/j5/a2a/archiveFlowClient.ts
  • apps/web/src/j5/a2a/humanInboxClient.test.ts
  • apps/web/src/j5/a2a/humanInboxClient.ts
  • apps/web/src/j5/a2a/humanInboxCountClient.test.ts
  • apps/web/src/j5/a2a/humanInboxCountClient.ts
  • apps/web/src/j5/artifacts/artifactClient.ts
  • apps/web/src/j5/crew/CrewMembershipsClient.ts
  • apps/web/src/j5/playbooks/PlaybookBoard.tsx
  • apps/web/src/j5/playbooks/PlaybookRefresh.test.tsx
  • apps/web/src/j5/playbooks/PlaybookRunsSection.tsx
  • apps/web/src/j5/state.ts
  • apps/web/src/j5/threads/SpawnedChildrenClient.ts
  • apps/web/test/j5.ts
  • packages/client-runtime/src/j5/actions.test.ts
  • packages/client-runtime/src/j5/http.test.ts
  • packages/client-runtime/src/j5/http.ts
  • packages/client-runtime/src/j5/readSources.test.ts
  • packages/client-runtime/src/j5/readSources.ts
  • packages/client-runtime/src/j5/scopedThreadReadStore.test.ts
  • packages/client-runtime/src/j5/scopedThreadReadStore.ts
  • packages/client-runtime/src/j5/serverCompatibility.test.ts
  • packages/client-runtime/src/j5/state.test.ts
  • packages/client-runtime/src/j5/state.ts
  • packages/contracts/src/artifacts.ts
  • packages/contracts/src/j5.ts
  • packages/contracts/src/j5/artifacts.ts
  • packages/contracts/src/j5/playbook.ts
  • packages/contracts/src/rpc.ts
💤 Files with no reviewable changes (23)
  • apps/server/src/j5/a2a/CrewProposalsHttp.test.ts
  • apps/server/src/j5/a2a/PreArchiveFactsHttp.test.ts
  • packages/contracts/src/artifacts.ts
  • apps/server/src/j5/a2a/HumanInboxHttp.test.ts
  • apps/web/src/j5/a2a/humanInboxCountClient.test.ts
  • apps/web/test/j5.ts
  • apps/server/src/j5/a2a/ClientReadsHttp.test.ts
  • apps/server/src/j5/a2a/CrewRuntimeRequestsHttp.test.ts
  • apps/server/src/j5/playbooks/PlaybookHttp.ts
  • apps/web/src/j5/a2a/humanInboxClient.test.ts
  • apps/server/src/j5/a2a/HumanInboxHttp.ts
  • apps/server/src/j5/a2a/CrewRuntimeRequestsHttp.ts
  • apps/server/src/j5/a2a/CrewProposalsHttp.ts
  • apps/server/src/j5/playbooks/PlaybookLibraryHttp.ts
  • apps/server/src/j5/playbooks/PlaybookLibraryHttp.test.ts
  • apps/web/src/j5/a2a/archiveFlowClient.test.ts
  • apps/server/src/j5/playbooks/PlaybookHttp.test.ts
  • apps/server/src/j5/a2a/PreArchiveFactsHttp.ts
  • apps/web/src/j5/a2a/humanInboxCountClient.ts
  • apps/web/src/j5/a2a/humanInboxClient.ts
  • apps/server/src/j5/a2a/AgentCrewReadsHttp.ts
  • apps/server/src/j5/a2a/ClientReadsHttp.ts
  • apps/server/src/j5/a2a/SpawnedChildrenHttp.ts

Included review availability: This review used your included allowance. 0 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 1 review per hour.

📝 Walkthrough

J5 client reads move from authenticated HTTP routes to WebSocket RPCs across contracts, server handlers, the client runtime, and web and mobile clients. Artifact listing also moves to RPCs. Artifact-content reads and specified peer HTTP routes remain.

Changes: J5 Client Read RPC Migration

Layer / File(s) Summary
Define J5 read RPC contracts
packages/contracts/src/j5.ts, packages/contracts/src/j5/artifacts.ts, packages/contracts/src/j5/playbook.ts, packages/contracts/src/rpc.ts, packages/contracts/src/artifacts.ts
Contracts add client-read methods and schemas, artifact listing, and playbook library and run reads. The associated HTTP path constants are removed.
Implement client-read services
apps/server/src/j5/a2a/ClientReadsService.ts, apps/server/src/j5/a2a/*Read.ts, apps/server/src/j5/a2a/*Http.ts, apps/server/src/j5/a2a/J5AuthenticatedRoutes.ts, apps/server/src/j5/a2a/*.test.ts, apps/server/src/j5/a2a/README.md
ClientReadsService adds read methods and dependencies. Dedicated readers implement membership, fleet, pre-archive facts, and spawned-child reads. The corresponding HTTP routes are removed, and tests cover the read implementations.
Register RPC handlers and authorization
apps/server/src/j5/a2a/clientReadRpc.ts, apps/server/src/j5/a2a/PeerAdminService.ts, apps/server/src/j5/a2a/PeerHttp.ts, apps/server/src/j5/artifacts/*, apps/server/src/j5/wsRpc*.ts, apps/server/src/j5/wsRpc.test.ts
The server registers client-read handlers and scopes. Artifact listing is served by an RPC, while artifact-content reads remain HTTP. Peer listing calls PeerAdminService and retains its HTTP route.
Move playbook reads and workspace operations to RPCs
apps/server/src/j5/playbooks/*, apps/server/src/testUtils/shardWeights.json
Playbook RPCs add library and run-list reads. Workspace resolution and store operations are handled by makeWorkspacePlaybooks. The playbook HTTP routes are removed, and RPC tests cover read and workspace behavior.
Use WebSocket RPCs in the client runtime
packages/client-runtime/src/j5/*
J5 reads use environment RPC methods instead of HTTP helpers. The runtime checks server configuration for ledger support and maps unknown RPC tags to newer-server errors.
Update application clients and support behavior
apps/web/src/j5/*, apps/mobile/src/j5/playbooks/PlaybookBoard.tsx, apps/web/test/j5.ts, FORK.md
Application clients use RPCs for migrated reads and gate playbook queries using ledger capability configuration. Archive warning checks distinguish null from missing values. Documentation describes the migration and retained HTTP routes.

Priority: ➖ Normal

Estimated code review effort: 4 (Complex) | ~50 minutes

Change: Refactor

Sequence Diagram(s)

sequenceDiagram
  participant Client as J5 client
  participant Runtime as j5Environment
  participant RPC as J5 WebSocket RPC
  participant Handler as clientReadRpc
  participant Reads as ClientReadsService
  Client->>Runtime: request a client read
  Runtime->>RPC: send method and request data
  RPC->>Handler: dispatch authorized method
  Handler->>Reads: invoke read service
  Reads-->>Handler: return read result
  Handler-->>RPC: return result or mapped error
  RPC-->>Runtime: return RPC response
  Runtime-->>Client: provide query result
Loading
Merge Risk: ⚪ Minimal · up to e021d

The review found no concrete defect in moving J5 client reads to WebSocket methods. Live testing is still pending, but the review found no merge-blocking risk.

Pre-merge checks · Passed 4
Passed Passed checks (4 passed)
Check name Status Explanation
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Title check Passed The title clearly and concisely identifies the main change: moving J5 client reads to WebSocket methods.
Description check Passed The description includes all required sections and provides detailed problem, implementation, UI, live-testing, upstream-impact, verification, and checklist information. It also documents the remainin…
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

Jacksondr5 and others added 4 commits October 12, 2026 22:26
J5's client reads called J5's own HTTP routes, each with its own
authentication, error shape and "is this route missing" probe. Upstream's
rule is that a small read is a socket query and a large, compressible
payload goes over HTTP.

Fourteen reads move to RPC methods: the Inbox list and open count, Crew
proposals, runtime requests and memberships, the Fleet, spawned children,
the archive preflight, participant identities, the peer list, the three
playbook reads and the artifact list. Their routes are removed. Reading
one artifact's content stays on HTTP, because it can be megabytes.

Part of #506 (step 3).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The list is read over the socket now, which comes up after the prepared
connection the page waited for, so a direct visit to /artifacts failed as
"not connected" until Try again. Found in live testing.

Review fixes: FORK.md no longer names deleted route files, and says which
views skip an unsupported server.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Rebased onto guest sharing (#536, #561, #577). The guest gate refuses every
J5 read by default; the client now skips them for a connection it knows is a
guest's, as it did for the HTTP reads, and hides the playbook boards.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@Jacksondr5
Jacksondr5 merged commit 0dee520 into j5/main Oct 13, 2026
36 checks passed
@Jacksondr5
Jacksondr5 deleted the j5/reads-over-socket branch October 13, 2026 04:48
Jacksondr5 added a commit that referenced this pull request Nov 23, 2026
Jacksondr5 added a commit that referenced this pull request Nov 23, 2026

This branch was successfully deployed

1 active deployment
Preview — 2a97bf74 Deployed Oct 13, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XXL 1,000+ effective changed lines (test files excluded in mixed PRs). vouch:trusted Author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant