Repository navigation
feat(j5): J5's client reads run over WebSocket methods - #584
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Warning Review limit reached
This review includes 81 billable files and costs up to $20.25.
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. View limit details
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to
|
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]>
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]>
a79227a to
380a726
Compare
Co-Authored-By: Claude Opus 5.5 <[email protected]>
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
ClientReadsService, andWorkspacePlaybooksnow 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.createEnvironmentRpcQueryAtomFamily), orcreateEnvironmentRpcCommandfor a one-off read. The hand-written response schemas and the hand-rolled bearer/DPoP request in the archive flow are deleted.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."Behaviour differences from the routes
archivedfield.Verification
src/j5,src/state) 906, websrc/j5278, mobilesrc/j531, server (src/j5,src/auth,src/observability,ws.test.ts) 1,225.access:readfor the peer list.UI changes
Nothing a person sees is meant to change. Each pair is the same scenario on
j5/mainand 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.Head only, from the two-server run (the test rig cannot run a base server and a peer at once):
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./artifactsstayed 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.j5 a2a peer listCLI still works.orchestration:readalone, and the peer list is refused for lack ofaccess:read.Not exercised live
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.tsis 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.Checklist
FORK.md(case text and file-table row) in this PRdocs/j5/product/upstream.md— none changedAGENTS.md) — web and mobile share the moved atoms; mobile, relay and tunnel are not run livedocs/j5/product/and user docs rewritten where this changes them — none describe the transportBuilt by Claude Opus 5.5 in Claude Code, with Opus 5.5 subagents.
🤖 Generated with Claude Code