Repository navigation
Conversation
The CLI already requires an explicit session on a leased remote connection, but a direct RPC or socket caller could still omit it and land in the shared default session. HTTP and socket intake now mark a missing or blank session on the daemon-only request envelope. Admission refuses a marked request that allocates a provider lease or carries a lease, with the existing REMOTE_SESSION_REQUIRED reason, before anything is allocated or dispatched. A provider named without a lease stays allowed, and an explicit session name, including "default", counts as named. Closes callstack#4171
agent_device.install_from_source did not record an omitted session, so an unnamed install could reach the provider lease held by the default session. A batch step also lost the marker, so a step carrying lease flags passed admission. Lease-exempt commands such as session_list now read only a lease they carry themselves, so an unnamed inventory command still answers while the default session holds a provider lease. The refusal also names the session parameter for direct RPC callers, and the ledger now digests the shared session helper and describes blank names for released clients correctly.
…eued requests Only inventory and lease-lifecycle commands now ignore the lease on the session they resolve. artifacts and events act through that session, so an unnamed request for them is refused again. Admission also repeats the check under the session lock, because an unnamed request can wait behind an open that leaves a provider lease on the session.
Both resolve the session's device, so an unnamed request could inspect a device another caller leased. An explicit list now names the commands that never read the session, and every other command stays refused. release_materialized_paths joins that list, because it uses no session.
|
@airowe is attempting to deploy a commit to the Callstack Team on Vercel. A member of the Team first needs to authorize it. |
There was a problem hiding this comment.
All reported issues were addressed across 21 files
Reply with feedback, questions, or to request a fix.
View guided diff | Re-trigger cubic
A blank session name was marked as unnamed but stayed its own session, so the marker described a request that still ran somewhere else. HTTP and socket intake now both resolve a missing or blank name to the default session. A mutation case holds the marker in place, and the transport tests assert that the handler ran on that session.
There was a problem hiding this comment.
All reported issues were addressed across 9 files (changes from recent commits).
Reply with feedback, questions, or to request a fix.
View guided diff | Re-trigger cubic
|
Reviewed 8c61837. The refusal does not yet cover the public Node client, so I would not merge this as is. The daemon decides "caller named no session" only from the raw session string at the socket and HTTP intake (request-admission.ts#L198). The Node client always sends the literal session Not blocking, and fine to take or leave: Would one intake helper in the daemon core, called by the socket parser and every HTTP builder, be simpler? It would return the session and The only failing check is Vercel, which asks for Callstack team authorization for this fork and is not a build failure. The other 13 checks, including unit and smoke, pass at this commit. There are no conflicts. Before merge, the maintainer needs to decide on the |
… no session The Node client always sends the literal default session and reports the omission in meta.sessionExplicit, so intake never marked it and an unnamed leases.allocate still allocated a lease. One intake helper now decides this for the socket and every HTTP builder, and lease RPC params carry the fact. The commands that ignore their session's lease become a registry trait. Docs examples and in-repo clients on a provider lease now name a session.
|
What changed
One gap your request shape would have missed Your open questions
The cost is wider than old callers The gate passed at 🤖 Generated with Claude Code |
There was a problem hiding this comment.
All reported issues were addressed across 27 files (changes from recent commits).
Reply with feedback, questions, or to request a fix.
View guided diff | Re-trigger cubic
The lease RPC projection dropped flags.session and forwarded sessionExplicit false, so a caller that named its session in flags was refused there but not on the command method. The route now forwards the shared predicate's answer. Also cover the lease method in the real-daemon test and document where each method reads the fact.
The lease RPC builder needs the predicate, and importing it from the contracts hub made three entry surfaces evaluate more modules. The record module is already in those closures.
|
The earlier findings from the first review are fixed at 0dc46ec, and I have no new code findings. I only read the code. I did not run tests or Not blocking, and you can take or leave these: The iOS smoke failure looks unrelated. The The two open P1 threads on the literal Before merge, a maintainer needs to sign off on refusing |
|
The answers to what you left unverified:
The two P1 threads: I resolved them with a reply declining the change, before your comment. They remain listed under Unresolved in the PR body, and the decision is still yours. Reopen them if you'd rather track it there. 🤖 Generated with Claude Code |
|
The code at 071a06e looks good. The change since the earlier review (0dc46ec, #4177 (comment)) only touches a daemon comment, and all 14 earlier threads are now resolved. I did not re-check those threads beyond that comment-only change, and I did not run the eager-closure-budgets check or any tests locally. The Vercel failure is a git authorization link for the website deploy. The change touches no website code, so it is likely unrelated. The other 13 checks pass. Cubic has not reviewed this head yet. Before merge, the Vercel team authorization needs to be done, and the maintainer decision on refusing |
…sed-session-admission # Conflicts: # test/wire-compat/ledger.json
|
e2e prep for this break: tester-army/e2e#1513 names the session on its lease clients (BrowserStack/TestMu AI allocate+heartbeat, Limrun allocate+install). Checked on a real daemon at 3707e62: an unnamed client is refused with REMOTE_SESSION_REQUIRED, and a named one can allocate and heartbeat. The same change also works on 0.21.35. |
…sed-session-admission # Conflicts: # website/docs/docs/client-api.md
Summary
The CLI requires a named session on a leased remote connection, but a direct RPC, socket, or Node client caller could omit it and land on the shared
defaultsession. Against a real daemon, an unnamedleases.allocateallocated a proxy lease.One intake helper now decides this for the socket and every HTTP builder. A request names no session when its session is missing or blank, or when
meta.sessionExplicitisfalsewith noflags.session. Admission refuses it withREMOTE_SESSION_REQUIREDwhen it would allocate or act through a provider lease. Lease RPC params now carrysessionExplicit, sonamesSessionExplicitlymoved tokernel/recordto keep lease-scope's eager closure flat.Breaking for callers: unnamed Node and MCP clients on a provider lease, and unnamed
doctorandcapabilitieson a leased session, are refused. Six docs pages showed such clients and now name a session.Closes #4171.
Validation
Tested
fac7ed586.pnpm check:affected --run --head fac7ed586: all selected checks passed (11 passed, 7 skipped). A real-client test covers the reproduction. Not device-facing. Earlier8c6183747gate failures were outside this diff, cause unproven. Apple Smoke:capture-closehit theswiftc30s timeout, also on main7b3f63fea.Unresolved:
meta.sessionExplicit: false.sessionExpliciton the lease RPC, so their unnamed lease calls still pass.071a06ed2and ran nothing.🤖 Generated with Claude Code