Skip to content

fix(daemon): answer a busy device without naming another proxy client's session - #4953

Merged
thymikee merged 9 commits into
0.22from
fix/0.22-reply-session-visibility
Nov 22, 2026
Merged

thymikee merged 9 commits into
0.22from
fix/0.22-reply-session-visibility

Conversation

@thymikee

@thymikee thymikee commented Nov 22, 2026 •

Copy link
Copy Markdown
Member

Summary

On a shared proxy, a busy-device reply could disclose another client's session address (#4923). Open contention and wait progress use the same visibility check. A public-network or tenant-scoped caller learns only listable leased or tenant-scoped holders. Local device recovery can also name an unleased local holder in another workspace. Shutdown and doctor require listing visibility. The sessions guide and CLI help explain when a claim error shows the owner and state directory. No wire schema change.

Before / after

  • Shared-proxy open against another client's leased device returns DEVICE_IN_USE. Base names the holder. Head omits the address. The lease owner still sees it.
  • Local implicit open against another workspace's providerless leased holder named it on 3fb31b9. Head omits it from the message, details, and close hint.
  • Local implicit shutdown against another workspace's unleased holder named it on b1ee621. Head restores the base behavior and omits it.

Validation

At 8b7857ebd9, 50 targeted tests and 950 eager-closure tests pass. The leased workspace open regression fails on 3fb31b9 and passes at head. Format, lint, typecheck, Fallow audit against origin/0.22, and all runnable affected checks pass. At 7876b90221, 135 CLI help tests and lint pass for the documentation follow-up. Hosted CI covers the remaining checks.

Closes #4923

@github-actions

github-actions Bot commented Nov 22, 2026 •

Copy link
Copy Markdown
Contributor

Size Report

Metric Base Current Diff
Installed (including dependencies) 6.07 MB 6.08 MB +1.9 kB
Package (unpacked) 6.07 MB 6.08 MB +1.9 kB
Package (download) 1.86 MB 1.86 MB +716 B

Startup median (7 runs, lower is better):

Scenario Base Current Diff
CLI --version 21.1 ms 22.7 ms +1.6 ms
CLI --help 40.8 ms 41.9 ms +1.0 ms

@apex-sentinel-staging

This comment has been minimized.

@apex-sentinel-staging apex-sentinel-staging Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apex Sentinel: 2 new findings on 179cee3. The verdict and the full list are in the summary comment.

Comment on lines 204 to +211
const claim =
claims.find((candidate) => candidate.deviceKey === deviceKey) ??
claims.find((candidate) => isClaimOfHostScopedDevice(identity, candidate));
return claim ? { claimedBy: { session: claim.session, workspace: claim.workspace } } : {};
// A claim owned by a session of this daemon that the request may not see is listed without its
// owner: the label would be another client's session handle (#4923). `open` still refuses the
// device, and `device status` stays the host-level view of who holds a device.
if (!claim || !claimOwnerVisible(req, sessionStore, claim)) return {};
return { claimedBy: { session: claim.session, workspace: claim.workspace } };

@apex-sentinel-staging apex-sentinel-staging Bot Nov 22, 2026 •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No longer raised on 2289035: deferred by thymikee in this comment.

🟡 Minor · devices drops the claim marker entirely from a peer, so a busy device looks unclaimed

Behind a shared proxy token, claimedByProjection returns {} instead of { claimedBy: { session, workspace } }, so a device another client holds shows no claim marker in devices output and reads as free to take. The visibility rule only needs to hide the name—the fact that the device is claimed isn't secret (a peer learns it by trying open). This contradicts the help text the same PR added: "devices marks rows that are claimed, so pick an unclaimed device instead of contending."

Suggested change

Report the device as claimed (a nameless marker) rather than returning no projection at all, or amend the new shared-proxy sentence in cli-help.ts so users know an unmarked devices row does not mean the device is free behind a shared token.

Details

Also raised here

Also raised at this location by persona senior-developer: devices now marks an invisibly-claimed device as free; help still says it does not — A peer client on a shared proxy token runs devices and the row for the device another client's leased session holds comes back with no claimedBy (inventory.ts:210 returns {}), so the row reads as free — yet open on that same device is refused with DEVICE_IN_USE. The owning help text this PR edits still promises the opposite: "devices marks rows that are claimed, so pick an unclaimed device instead of contending" (cli-help.ts:331), so the new shared-proxy line at 330 sends a caller to pick exactly the device that will refuse it. Either mark the row claimed without the owner (a boolean, or claimedBy: undefined plus a claimed: true flag) or state in the same help paragraph that a row can read unclaimed behind a shared token and still refuse.

persona: javascript, maintainability, senior-developer

Useful? Reply @apex-sentinel-staging like, or @apex-sentinel-staging dislike <why> if it is not.

Reply @apex-sentinel-staging note ... to add context, or @apex-sentinel-staging pivot ... if it is wrong — I will re-check the cited code.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in bdc238c. A claim of this daemon whose label resolves to no stored session, such as transient:install, is named again to a local request, so devices and the claim-conflict refusal report it as on 0.22. A tenant-scoped request still gets no owner for such a label: on a proxy shared under one token, the tenant prefix does not tell one client's ended session from another's. That is the case the proxy test covers. New unit test: a local request keeps the owner of transient:install. It fails without the fix.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deferred, no change in this PR. claimedBy carries session and workspace as required fields. Showing a claim marker without its owner would change the wire shape of devices for released clients, and that is a separate ADR 0006 decision. Meanwhile a peer's open on that device still gets DEVICE_IN_USE, so a peer cannot take the device by mistake.

@apex-sentinel-staging

This comment has been minimized.

@thymikee

Copy link
Copy Markdown
Member Author

The change at bdc238c still leaks other sessions to proxy clients, so it needs one more fix before merge. All 16 checks pass at this commit, and there are no conflicts.

mayNameSession (session-routing.ts:379) widens the visibility predicate with the #2580 exception without checking who is asking. claimOwnerVisible (line 396) returns true for every claim another daemon wrote, again without checking the requester. A tenant-scoped (proxy) request that opens a device held by a local cwd or named-local session gets DEVICE_IN_USE naming that session address and a close --session hint. A tenant request blocked by another daemon's claim gets that owner's session, workspace path and state dir. The same widening reaches the devices claimedBy projection, the doctor same-device list and the takeover warning. The new tests assert both leaks with the default tenant request. A proxy client then learns sessions it cannot see or act on, which breaks the rule that a reply names another session only when sessionVisibleToRequest allows it. The #2580 reason (the owner closes it from that folder) applies only to a local caller. The rule to state in mayNameSession is: a tenant-scoped request learns only what createSessionVisibilityPredicate shows it, and both the local-workspace exception and the other-daemon-claim exception apply only when resolveSessionScope(req).kind !== 'tenant'. claimOwnerVisible must follow the same test in its foreign-stateDir branch. Please flip the two test expectations and add a proxy-route case where the holder is a local session.

The new help sentence at cli-help.ts:330 says both DEVICE_IN_USE flavors omit the owner behind a shared proxy token, and only the lease-id caller learns the name. The other-daemon claim and the local-session holder are still named to a tenant caller. Agents read this as a guarantee. The fix above makes the sentence true. Otherwise, narrow it to holders that are another proxy client's leased or tenant-scoped session.

claimedByProjection (inventory.ts:210) returns {} when the owner is not visible. A proxy peer then sees a device that another client holds as unclaimed. The help sentence next to it (cli-help.ts:331), 'devices marks rows that are claimed, so pick an unclaimed device instead of contending', becomes false for that caller. A proxy caller that follows it picks a busy device and gets DEVICE_IN_USE. The wire-shape deferral for the marker is fair. The help still needs one clause: behind a shared proxy token, a row claimed by another client's session is not marked, and open answers DEVICE_IN_USE.

The open inline thread on the unmarked claimed row (#4953 (comment)) still stands. The thread on unresolved or transient claims (#4953 (comment)) is fixed at this commit, because a local request keeps that owner and only a tenant request loses it, so it can be resolved.

Not blocking, and these can be taken or left: three predicates now answer 'may this reply name this holder?' (session-shutdown.ts:66 uses createSessionVisibilityPredicate directly, so it hides what open names), so making mayNameSession the single gate there would help; request-router.ts:531 judges against the scoped request, but the replay child invoker passes the raw child req instead of childScope?.req ?? req; in open-device-contention-wait.ts:187 the naming closure shadows holder() and repeats heldSessionNaming, and the doctor nameableToRequest wrapper is a one-line alias; the PR body places mayNameSession in reply-session-visibility.ts, which does not exist at head, and cites ec02fca instead of bdc238c.

For a follow-up issue, not for this PR: sessions.md:196 says another workspace's session keeps its named address 'everywhere', but the shutdown refusal hides it; route shutdown through mayNameSession, or say 'to local callers on open, doctor and devices'.

Could the shape stay as it is (one predicate plus one response-level claim filter) with the rule fixed? That would be mayNameSession(req, s) = visible(req, s) || (resolveSessionScope(req).kind !== 'tenant' && !s.lease && s.sessionScope?.kind !== 'tenant'), with the claimOwnerVisible other-daemon branch using the same requester-scope test and session-shutdown.ts going through mayNameSession. That leaves one rule and one gate and no new concept. A smaller design than predicate plus router filter was not found, since the claim-conflict error is built in resources/ without request context.

Not verified here: tests and typecheck were not run, and CI status comes from the checks report. A tenant open was not traced through device-inventory filtering to prove a locally held device is selectable by a proxy client. The reach of the other-daemon case assumes a second daemon on the host, since claim records are host-global. Whether replay and batch child requests always carry the parent's tenant meta was not traced.

@thymikee

Copy link
Copy Markdown
Member Author

Addressed the review of bdc238c in 2289035:

  • mayNameSession and claimOwnerVisible apply the Sessions are keyed by cwd and bound to one device, so driving iOS and Android from one checkout needs hand-named --session on every command #2580, other-daemon and transient-claim exceptions only when resolveSessionScope(req).kind !== "tenant". A tenant-scoped request learns only holders it may list. The two unit expectations are flipped, each with a local-request case beside it. New proxy-route test: a local session holds the device, and the peer client's open gets DEVICE_IN_USE without its name. It fails without the fix.
  • cli-help: the proxy sentence now says that a holder the caller cannot list is not named. One clause says that behind a shared proxy token, a row claimed by such a holder is not marked in devices, and open on it answers DEVICE_IN_USE.
  • Optional items taken: shutdown names through mayNameSession, the nested invoke path passes childScope?.req ?? req, the wait-progress helper is inlined, and the PR body references are fixed.

@apex-sentinel-staging

This comment has been minimized.

@thymikee

Copy link
Copy Markdown
Member Author

This follow-up on the earlier review (#4953 (comment)) covers 2289035. The tenant-scoped case is now fixed, but the shared-token proxy case still leaks a holder name, so the code needs one more change. Not verified here: tests and typecheck were not run.

In the supported clientToken proxy setup without a daemon auth hook, a remote open with valid lease metadata can still reach contention without tenant isolation. The daemon marks it publicNetworkOnly, but resolveSessionScope still classifies an explicitly named request as named-local (session-routing.ts:378). The listing predicate then accepts the unleased named-local holder before mayNameSession reaches its tenant guard, and the claim gate at line 397 also treats the request as local. The proxy then returns a local operator's session address in the busy-device message, details and recovery hint. This breaks the privacy rule the new CLI help promises. The rule to satisfy: when the daemon has admitted a request as publicNetworkOnly, no holder name may appear in an unscoped reply. Apply that check before the local listing predicate and before the claim exceptions, so it covers every site that calls mayNameSession, claimOwnerVisible and dropInvisibleClaimOwner. A regression case through the shared-token proxy that leaves isolation unset, while keeping the peer's valid lease metadata, should prove it.

The PR claim that the round-two fix stops busy-device replies from naming local operators' sessions to shared-token proxy clients did not hold in that setup. The production CLI proxy uses clientToken (src/cli/commands/proxy.ts:57-62), and it stamps tenant isolation only when an authenticate callback returns a tenant (daemon-proxy.ts:244-252). Without such a hook, HTTP intake keeps the caller's isolation metadata (http-server.ts:678-687). The new test at http-server-proxy-reply-visibility.test.ts:270-294 inserts tenant isolation in its helper at line 159, so it covers the tenant route only. Please either fix the gap above or narrow the claim to the tenant-scoped case. This is a source trace; the new test was not observed failing against bdc238c.

Could session-routing own holder-name disclosure using both the admitted public request context and the tenant and lease visibility rule, so local recovery permissions depend on the daemon's admission decision and not on a caller-selected session namespace?

The open inline thread on the unmarked claimed row at inventory.ts:210 (#4953 (comment)) still applies, but needs no further work here: the author deferred the wire marker and cli-help.ts:331 now documents the behavior. The thread on session-routing.ts:402 (#4953 (comment)) no longer applies, because the transient-claim handling was fixed at bdc238c and is unchanged, so it can be resolved.

The only check that did not pass is Body rules, which was cancelled and not failed. It validates the PR description and the diff touches no related tooling, so a rerun should settle it. Not verified here: the shutdown widening for local callers has no dedicated test, and the other-daemon claim branch for a tenant request is covered only by a unit test. There are no conflicts. After the fix above, rerun Body rules and resolve the transient-claim thread.

@thymikee

Copy link
Copy Markdown
Member Author

Addressed the review of 2289035 in b1ee621:

  • mayNameSession and claimOwnerVisible treat any request admitted as publicNetworkOnly as remote, before the listing predicate and the claim exceptions. A remote or tenant-scoped caller is told only holders it may list that are leased or tenant-scoped. The Sessions are keyed by cwd and bound to one device, so driving iOS and Android from one checkout needs hand-named --session on every command #2580, other-daemon and transient-claim exceptions apply only to a local caller.
  • New proxy regression test: a shared-token client with lease metadata and no sessionIsolation gets DEVICE_IN_USE without the local holder's name. It fails on the previous head.
  • The PR body claim now covers proxy clients with and without tenant isolation.

@apex-sentinel-staging

This comment has been minimized.

@thymikee

Copy link
Copy Markdown
Member Author

Reviewed b1ee621 against the earlier findings (#4953 (comment)). The remote-caller and transient-owner cases from that review are now fixed, but one shutdown regression remains.

On a daemon shared by two local workspaces, an implicit shutdown from workspace B with an explicit device selector reaches the handler even if B has no session (session-shutdown.ts:66). If an unleased cwd-scoped session in workspace A holds the device, the handler finds it before binding. On db59d00, createSessionVisibilityPredicate returned false for the different cwd scope, so shutdown left the address out. At b1ee621, mayNameSession returns true through its local unleased-holder exception, while the listing predicate still returns false. The DEVICE_IN_USE reply now puts the address in details.session and in the close hint, although the caller cannot list the holder. That breaks the shutdown visibility rule #4923 describes as already enforced. Shutdown naming must require the listing predicate and keep the public-network suppression. The local cross-workspace exception should stay only at the recovery sites that used it before.

Not blocking, and these can be taken or left: for a remote non-tenant caller, session-routing.ts:379 is now stricter than the listing predicate, so the reply withholds a holder that session_list still returns to a publicNetworkOnly request (sessionMatchesInventoryScope at inventory.ts:117). Would it be simpler to put public-network admission into createSessionVisibilityPredicate, so a publicNetworkOnly non-tenant request matches only sessions leased to its lease id and a tenant request keeps the tenant match? Then mayNameSession becomes listed || (local && unleased && non-tenant), claimOwnerVisible keeps only the local exceptions, and one predicate governs both listing and naming. It changes session_list for remote non-tenant callers, who would stop seeing unleased local sessions, so that belongs in a follow-up issue.

For a follow-up issue, not for this PR: the paragraph at sessions.md:196 says a session of another local workspace keeps its named address everywhere, but a proxy client never learns an unleased non-tenant holder (session-routing.ts:379, asserted by http-server-proxy-reply-visibility.test.ts:296), so the exception should be scoped to local callers and the hidden-holder list completed.

The open inline thread on the unmarked invisible claim owner (#4953 (comment)) still applies and is not blocking, since the deferral is documented in cli-help.ts. The thread on transient claim labels (#4953 (comment)) no longer applies, because session-routing.ts:409 was fixed at bdc238c and tightened at b1ee621, so it can be resolved.

Only the Body rules check is not passing. It was cancelled, not failed, and it validates the PR description, which this diff does not touch, so a rerun should settle it. The other 16 checks pass, including the daemon unit tests that run the new proxy test. There are no conflicts. Before merge, the shutdown naming fix needs to land.

Not verified here: tests were not run, the claim that the new proxy test fails at 2289035 rests on a source trace and not an observed red run, and the session_list behavior above was inferred from the code and not run through the proxy.

@thymikee

Copy link
Copy Markdown
Member Author

Addressed the shutdown finding in 3fb31b9e39. Shutdown now names only a listable holder and retains the public-network suppression. Open contention and claim recovery retain the local exception. The sessions guide now states that scope.

The real daemon HTTP regression fails on b1ee6216c9 because workspace B receives workspace A’s address in both the session field and close hint. At the new head, B receives an anonymous DEVICE_IN_USE refusal and A still receives its own address and hint. The targeted tests, eager-closure budgets, typecheck, lint, Fallow audit, and affected gate passed. The PR body also passed the local checker.

Filed #4960 to share the public-network rule between listing and reply naming. Resolved the transient-claim thread.

@apex-sentinel-staging

This comment has been minimized.

@thymikee

Copy link
Copy Markdown
Member Author

At 3fb31b9 the shutdown naming is fixed and the transient claim label no longer leaks to proxy clients, but two items from the earlier review (#4953 (comment)) remain: one defect and one unsupported claim.

A local authenticated implicit open can publish a cwd-scoped session backed by an admitted providerless logical lease (request-admission.ts lines 108-109 and 197-206 allow it, and session-open-state.ts lines 66 and 73 store the scope and the lease independently). When an implicit open from a different workspace selects that device, isImplicitSessionScopeConflict compares only the two cwd scope ids, and open-device-contention-wait.ts:157 then calls the workspace-specific builder before mayNameSession can reject the leased holder. The second workspace gets the leased holder address in the DEVICE_IN_USE message, details.session and the close hint, though it cannot list that holder. The rule: a refusal may name a holder only when mayNameSession allows it with device-recovery, and the workspace-specific builder runs only in that case. Please evaluate mayNameSession first and use the existing anonymous refusal when naming is denied. Live validation: from a second workspace, open the device held by a leased cwd session and show that the reply carries no holder address in the message, details or hint.

The PR states that every open-contention refusal checks whether the caller may learn the holder address, and that the only exception is local recovery of an unleased local holder. That does not hold at head. The device-recovery check at session-routing.ts:388 gets its three production callers at open-device-contention-wait.ts:170 and :196 and session-routing.ts:416, while buildForeignWorkspaceSessionConflict has a single call at open-device-contention-wait.ts:158 that returns before the refusal at :164 reaches that check. Please fix the path above, then either state the claim so it matches the code or show the enumeration that supports it.

Could session-routing.ts own the decision whether a reply can name a holder, with both contention refusal builders taking that decision, and could resources/device/device-claim-conflict.ts apply the same policy to its typed owner before it constructs an error? That would guard the workspace-specific refusal and avoid decoding the claim builder serialized details in session routing.

The inline thread on inventory listing a claimed row without claimedBy still stands, but it is deferred and not required here (#4953 (comment)). The thread on an unresolved claim label returning localRequest is fixed at head and can be resolved (#4953 (comment)).

Not verified here: the tests were not run. That the new HTTP regression fails at b1ee621 and passes at head comes from a source trace of mayNameSession at both commits, not from a red/green run. The doctor change for local cwd callers was checked by reading the code only, and no test drives doctor through a cwd-scoped request, since the doctor tests use a named-local request. The Body rules failure was attributed from the job purpose and its cancelled state, and its log was not read.

Only Body rules is not passing, and it was cancelled rather than failed. It checks the PR description, and no daemon, test or docs code in the diff is on its route. The other 16 checks pass, including the daemon unit tests that run the new proxy and session-routing tests. Rerunning the cancelled check should settle it. No conflicts. Before merge, the leased-holder refusal needs the fix above and the cancelled check needs a rerun.

@thymikee

Copy link
Copy Markdown
Member Author

Fixed the leased-holder finding in 8b7857ebd9. findSessionDeviceConflict now checks mayNameSession in device-recovery mode before choosing a refusal. The foreign-workspace builder runs only if naming is allowed and the cwd scopes conflict. If naming is denied, the standard DEVICE_IN_USE reply is anonymous. Wait progress uses the same naming check.

The real daemon HTTP test allocates a providerless lease, opens a cwd-scoped session, and attempts an implicit open from a second workspace. On 3fb31b9, the reply exposes the holder address in the message, details.session, and close hint. At the new head, none of those fields carries the address. The existing unleased-holder recovery test still passes.

Updated the PR body to match. The body checker, 50 targeted tests, 950 eager-closure tests, Fallow audit, and all runnable checks in the exact-commit affected gate passed.

@apex-sentinel-staging

This comment has been minimized.

@thymikee

Copy link
Copy Markdown
Member Author

The earlier findings from 3fb31b9 are now fixed at 8b7857e, with one docs gap left. The unresolved claim label no longer falls back to naming the holder, and the real daemon HTTP test now covers the route the last review asked about.

The remaining problem is in the docs. An unleased local install in a second workspace can hit a device whose live claim belongs to a cwd-scoped holder with a providerless lease. On the base, deviceClaimConflictError names that owner. At 8b7857e, dropInvisibleClaimOwner removes the name and owner details because the requester cannot see the holder. The sessions guide still says a readable claim means the error names its owner. The help text still says the error supplies the owner state directory. Callers are sent to an address the refusal now withholds. Please make the guide and help state that owner and state-directory disclosure depend on owner visibility, and point callers with an anonymous error to the recovery hint.

Could resources/device/device-claim-conflict.ts apply the request owner-visibility decision to the typed claim inside deviceClaimConflictError, with the policy kept in session-routing.ts? The constructor already serves open, renewal, transient admission and bounded steps. Both router paths could then drop the code that decodes its error details, and diagnostics would carry the same message as the reply.

Of the open threads, the one on inventory.ts:207-209 does not apply here: listing a claimed row without claimedBy matches the documented help, and the maintainer deferred it (#4953 (comment)). The one on session-routing.ts:415-416 is fixed at 8b7857e, so it can be resolved (#4953 (comment)).

The only check not passing is Body rules, and it was cancelled, not failed. It validates the PR description, and this change touches neither of its routes, so it is likely unrelated. Rerunning it should settle that. No conflicts are known. Not verified here: the tests were not run, the red-on-3fb31b9 and green-at-head result for the leased workspace case comes from reading the code, and the Body rules log was not read. No device run is needed because only daemon reply text changed. After the docs fix, the cancelled Body rules check must be rerun before merge.

@thymikee

Copy link
Copy Markdown
Member Author

Addressed the docs finding in 7876b90221. The sessions guide and CLI help now say that a claim error shows the owner and its state directory only if the caller can see the owner. If the error omits the owner, follow its recovery hint. All 135 CLI help tests and lint passed.

@apex-sentinel-staging

Copy link
Copy Markdown

Apex Sentinel · ✅ Approve · review of 7876b90

Since the review of 8b7857e: 0 new · 0 still open · 0 no longer raised

No open findings.

1 finding below minor hidden (user_settings.min_severity).

1 new finding away from what changed since 8b7857e not shown. Comment @apex-sentinel-staging review for a full review.

Reviewed with this repository's own Sentinel configuration (caa232e6ca2e).

💬 Talking to Sentinel

In a finding's thread, reply with:

Command What it does
@apex-sentinel-staging note <context> Adds context; Sentinel re-checks the cited code
@apex-sentinel-staging pivot <why> Says the finding is wrong; Sentinel re-checks the cited code
@apex-sentinel-staging like Marks the finding as useful
@apex-sentinel-staging dislike <why> Marks it as not useful, so it is not raised again

On this conversation, comment @apex-sentinel-staging review to run a full review once again.

@thymikee

Copy link
Copy Markdown
Member Author

The docs and CLI help now say the owner and its state directory appear only when the caller can see the owner, and point everyone else to the recovery hint. This addresses the last finding; nothing else blocks 7876b90.

@thymikee thymikee added the ready-for-human Valid work that needs human implementation, judgment, or maintainer merge label Nov 22, 2026
…'s session

On a proxy shared under one token every client is one tenant, so a
leased session belongs to another client, and busy-device answers that
carried its address confirmed the session and handed out a handle. A
reply may name a holder unless it is another client's: a leased session,
or a tenant-scoped session the request does not already see. The open
contention refusal, its wait progress, the doctor same-device list, the
claimed-device projection, the reboot-takeover warning, and claim-
conflict refusals answer generically for that holder; a claim is
verified through its state dir. A local session of another workspace
keeps its named address: #2580's recovery stands.

Closes #4923
@thymikee
thymikee force-pushed the fix/0.22-reply-session-visibility branch from 7876b90 to f4550d9 Compare November 22, 2026 16:23
@thymikee
thymikee merged commit bdf5096 into 0.22 Nov 22, 2026
15 of 16 checks passed
@thymikee
thymikee deleted the fix/0.22-reply-session-visibility branch November 22, 2026 16:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-for-human Valid work that needs human implementation, judgment, or maintainer merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant