Repository navigation
Conversation
Size Report
Startup median (7 runs, lower is better):
|
b77b6eb to
29fd24a
Compare
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Apex Sentinel: 2 new findings on 29fd24a. The verdict and the full list are in the summary comment.
|
Reviewed 29fd24a. Six problems remain, and the first one breaks the stated invariant that each remote session owns its saved-connection file. All 22 code checks pass, and the only non-passing check is the cancelled 'Body rules' run, which is likely unrelated because the diff changes no workflow or body-rule input. There are no conflicts. The first problem must be fixed before merge. remote-connection-state.ts:541: After an upgrade on macOS or Windows, a legacy A second independent pass found remote-connection-state.ts:533 has the same shape on a case-sensitive filesystem. At base, A second independent pass found remote-connection-state.ts:268 can let a stale legacy write or removal destroy another session's record. On a case-insensitive filesystem, start with legacy A second independent pass found remote-connection-state.ts:571 can lose a lease record at the legacy pointer filename. The base writer commits a full record before it updates the pointer (d6767e0:packages/remote/src/remote-connection-state.ts:260-262). If it is interrupted between those writes for session A second independent pass found remote-connection-state.ts:558 lets distinct config session names share one canonical digest. Two explicit JSON CLI configs can supply session strings containing a lone U+D800 or U+D801 code unit (parsed at packages/command-surface/src/schema/cli-config.ts:90-106). Node's UTF-8 hash input encodes both as U+FFFD. After the first session connects, the second reaches the same file and cannot connect because of the owner check. If both pass the check while the file is absent, their replacing publishes can overwrite each other. The rule: canonical filenames hash a lossless encoding of the exact JavaScript string, such as UTF-16LE, while the eight-character suffix for legacy lookup keeps the old UTF-8 digest. A second independent pass found remote-connection-state.ts:244 deletes an identifiable record that belongs to another session. On a case-insensitive filesystem, take a legacy Simplicity question: would it be the same size or smaller to make the legacy branch a one-time migration that renames a matching legacy file to its canonical path, instead of a permanent second live location? The mismatch refusal would then guard only true conflicts, and the lockout above and the missing recovery hint would go away without new error surface. No smaller design was found for the plain/hashed split itself, since hashing every name would move every existing lowercase record for no gain. The open inline threads still apply: the legacy path resolving to the same file is raised to the invariant in the first problem above, and the unhelpful mismatch error still holds. Disconnecting the owning session recovers, but nothing tells the caller that. Not blocking, and each can be taken or left: Not verified here: the tests were not run, and the base-failure and lockout claims come from reading base Before merge, the legacy sanitized-name records need a one-time migration to their canonical path, with an upgrade-route test that covers a legacy 'Demo' record next to a new 'demo' session. |
This comment has been minimized.
This comment has been minimized.
|
Sentinel findings addressed in 1b11290. Path resolution now answers with contents rather than with a file name: when the plain |
|
At 1b11290, the upgrade-route lockout from the earlier review is fixed, but a session's saved-connection file can still change under it or be overwritten by another session. Checks are green (22 reported, none failing) and there are no conflicts. The first item below must be fixed before merge. A plain-name session's path still depends on another session's file (remote-connection-state.ts#L556). Take an upgrade on macOS or Windows with a legacy A hashed-name session whose legacy record names it still publishes to the shared legacy pathname (#L568). This was in the earlier review and is unchanged. The publish at Two session names that differ only in a lone surrogate still share one hashed file (#L598). This was in the earlier review and is unchanged. A second independent pass found that an upgraded legacy record stays at the shared filename (#L568). Reads for the legacy owner leave A second independent pass found that deleting the legacy owner strands the other session's hashed record (#L557). Connect A second independent pass found that a stale legacy write or unlink can destroy a newly connected session (#L275). Pause a A second independent pass found that an interrupted legacy writer can leave the only lease record at the pointer path (#L611). At base, a writer interrupted after the record publish and before the pointer publish leaves a complete, readable and disconnectable record at A second independent pass found that an unreadable legacy record is treated as available and deleted (#L585). On a case-insensitive volume, take a valid Could this be simpler? Resolve by name only: plain-category names to Not blocking, and these can be taken or left: the new hint at #L257 says to run For a follow-up issue, not for this PR: the pointer exclusion at remote-connection-state.ts#L611 compares only the exact The mismatch-hint thread still applies, as the non-blocking note above. The upgrade-route lockout thread no longer applies, because the plain branch at lines 555-559 no longer reaches the throw, and the remaining guard at 253-257 now carries Not verified here: no tests were run, and the first, second and fourth items are traced from the head code and the CLI handlers, not reproduced on a case-insensitive volume. The race in the second item needs three concurrent processes. No cross-process lock was found in Before merge, fix the path flip in the first item, which leaves a live lease unreachable after the other session disconnects. Then fix the rest and push. |
1b11290 to
bdf7f43
Compare
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Apex Sentinel: 1 new finding on bdf7f43. The verdict and the full list are in the summary comment.
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Apex Sentinel: 1 new finding on 55c33d2. The verdict and the full list are in the summary comment.
|
Follow-up to the earlier review (#4925 (comment)). The hashed-first lookup now keeps a session on its hashed record after its legacy file is removed, and the aliased-name lockout on the upgrade route is gone. Several ways to overwrite or delete another session's record remain at 55c33d2. The code is not ready to merge. The 21 reported checks pass, and there are no conflicts. Before merge, the legacy-record paths below must stop sharing a pathname with another session. A hashed-category session whose legacy record names it still resolves to the legacy pathname (https://github.com/callstack/agent-device/blob/55c33d2/packages/remote/src/remote-connection-state.ts#L576). Examples are Demo with Demo.json, or a/b with a_b-c14cddc0.json. Updates still publish there with a replacing rename (https://github.com/callstack/agent-device/blob/55c33d2/packages/remote/src/remote-connection-state.ts#L277), and removal unlinks there (https://github.com/callstack/agent-device/blob/55c33d2/packages/remote/src/remote-connection-state.ts#L301). The same pathname is the plain path of the case-variant or collision-named session. Process A resolves Demo.json. Process B disconnects Demo. Process C connects demo and claims the now-empty plain path. A then publishes over C's record, or a paused disconnect unlinks it. demo's lease is then orphaned. The rule: no write or unlink may target a pathname that another session can also derive. Migrate once inside remoteConnectionStatePath. When the legacy path holds a record naming this session, hard-link it to the canonical hashed path if that is absent, then unlink the legacy name. If the target is occupied, refuse with connection_session_mismatch. Every later read, write and remove then uses the canonical path. A second independent pass found the same root on the route where a matching legacy record never moves to its owner's path (https://github.com/callstack/agent-device/blob/55c33d2/packages/remote/src/remote-connection-state.ts#L576). A valid Demo.json naming Demo stays the live record, and it accepts reconnect, lease updates and disconnect (lines 274–279 and 301). The migration above covers it. It must run before the record is returned, and it must retire the legacy entry under the same ownership check. A second independent pass found that an in-flight legacy publish or unlink can destroy the next owner's file (https://github.com/callstack/agent-device/blob/55c33d2/packages/remote/src/remote-connection-state.ts#L277). Pause a Demo update after line 275 or a second disconnect after line 301. Meanwhile Demo disconnects and demo claims the emptied path. Resuming replaces or unlinks demo's record. The rule: normal publishes and removals use disjoint canonical destinations. Owner verification, retirement and claims of any legacy pathname are serialized while it can still alias a session's destination. A second independent pass found that the hashed path can be abandoned while its record exists (https://github.com/callstack/agent-device/blob/55c33d2/packages/remote/src/remote-connection-state.ts#L565). Make demo's hashed record unreadable to its user, then disconnect Demo. The probe treats the present record as missing and takes the plain path. Status then reports no connection, disconnect skips the lease, and reconnect can create a second record. The rule: an existing hashed path stays authoritative when its contents cannot be read. Tell absence apart from unreadable or unparseable content, and refuse to create through another path until ownership is known. A second independent pass found that a read can delete an unreadable legacy record owned by another session (https://github.com/callstack/agent-device/blob/55c33d2/packages/remote/src/remote-connection-state.ts#L567). Leave a valid Demo.json with a mode that denies reads but a directory that permits unlink. A second independent pass found that distinct session strings can resolve to one canonical filename (https://github.com/callstack/agent-device/blob/55c33d2/packages/remote/src/remote-connection-state.ts#L606). The config reader admits nonempty strings, so configs can name sessions with the lone code units U+D800 and U+D801. UTF-8 hashing encodes both as U+FFFD, so both get the same filename (line 580). The second session is refused even with --force, and if both publish while the path is absent, the later rename overwrites the other. Hash a lossless encoding of the exact string, such as UTF-16LE, for canonical names. Keep the UTF-8 eight-character digest only to find existing sanitized files. A second independent pass found that validation can delete a foreign record whose session is intact (https://github.com/callstack/agent-device/blob/55c33d2/packages/remote/src/remote-connection-state.ts#L244). After a U+D800 session saves a hashed record, make updatedAt null and leave session and leaseId intact. A U+D801 status call reaches the same file (lines 570–571 and 605–606), rejects the shape before checking the owner, and unlinks the record. The rule: check the parsed session before handling shape errors. Delete only a record whose ownership was established and whose identity still matches under the mutation guard. A second independent pass found that the upgrade route lets a second session obtain and release the old owner's lease (https://github.com/callstack/agent-device/blob/55c33d2/packages/remote/src/remote-connection-state.ts#L454). On base, U+D800 materializes a live proxy lease from an explicit leased remote config with a pinned device key. After upgrade its record is still at the sanitized legacy path. U+D801 then connects through the same profile into a separate hashed file, because the legacy lookup skips the old owner (lines 570–576). Both derive identical run and client IDs. The second open gets the first session's lease ID back (src/cli/commands/connection-lease-transaction.ts:389, packages/daemon/src/resources/lease-registry.ts:203–219), persists it, and can release it on disconnect (src/cli/commands/connection-runtime.ts:170, src/cli/commands/connection.ts:359–370). Changing only the canonical filename leaves this open. Derive new leased-profile scopes from a lossless session identity. Preserve the stored scope when loading the exact owning session, and keep new sessions from deriving its old lossy scope. A second independent pass found that the active pointer can hide or overwrite a saved legacy lease record (https://github.com/callstack/agent-device/blob/55c33d2/packages/remote/src/remote-connection-state.ts#L619). An older process can stop after publishing the full record for .active-session but before the pointer write (base b03e32b, lines 255–262). Base status and disconnect still see that record (lines 225–242). Head skips it, so named lookup and the active fallback lose it. On a case-insensitive volume, .ACTIVE-SESSION leaves an alias at the same path. Head accepts it as legacy, but the next save writes the record there and the pointer overwrites it at once (lines 277–279). A save for any unrelated session also replaces either record when it writes the pointer. Treat all case aliases as one reserved pointer path. Migrate a legacy record found there to its verified owner's canonical path before lookup or pointer replacement, and keep the entry if ownership cannot be determined. Would a simpler shape close most of this at once? Resolve by name only: plain-category names to .json, all others to ~sha256(utf16le session).json. Before resolving, migrate once. If the session's legacy sanitized path, or its plain path when that holds a hashed-category record, contains a record naming session S, hard-link it to S's canonical path when that is absent, then unlink the source. Keep the source and refuse with connection_session_mismatch only when the target is occupied. That removes the :565 and :567 sniffing from the hot path. It also covers the first, second, third and fourth items above, and it leaves the owner check at :248 plus an owner-confirming cleanup as the only guards. Not blocking: when an own hashed record is unreadable or corrupt (sessionNamedBy returns undefined), https://github.com/callstack/agent-device/blob/55c33d2/packages/remote/src/remote-connection-state.ts#L565 treats it as absent. demo then resolves to a free plain path and writes a second record beside its stranded hashed file, where base cleaned the corrupt record up. The same canonical-path-by-name fix covers it. This note and the stale hint at https://github.com/callstack/agent-device/blob/55c33d2/packages/remote/src/remote-connection-state.ts#L257 ( For a follow-up issue, not for this PR: the lone-surrogate collision above also affects the lease scope hash at https://github.com/callstack/agent-device/blob/55c33d2/packages/remote/src/remote-connection-state.ts#L454; and Open threads: the thread on unreadable legacy records and cleanup (#4925 (comment)) still stands. The thread on the hashed-first return at :565 (#4925 (comment)) is fixed at this commit and can be resolved, as is the aliased-name thread at :567 (#4925 (comment)). One lower-priority thread still applies. Not verified here: tests were not run, and the new test failing before the fix was traced from code. The three-process race and the case-insensitive alias routes (APFS or NTFS) were traced, not reproduced. No cross-process lock was found in remote-connection-state.ts or the connection handlers, but host-level serialization was not searched exhaustively. The PR body still describes 1b11290, and its validation runs were not repeated. |
|
Addressed the review at 153b6d3 with the suggested simpler shape. Records now resolve by name only: a plain name maps to |
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Apex Sentinel: 1 new finding on 0a25080. The verdict and the full list are in the summary comment.
This comment has been minimized.
This comment has been minimized.
|
Code review at 47aedf2: the earlier findings from 55c33d2 (#4925 (comment)) are now fixed, but three problems remain. Unknown files now refuse before any unlink, path resolution returns only the canonical path, and the errors carry the refused file with a removal hint. A second independent pass found that an explicit empty session no longer finds its legacy record. The CLI accepts A second independent pass found that status now needs directory write access for a readable legacy record. Take a valid legacy A second independent pass found that the documented refusal does not match legacy lookup and migration conflicts. With only a malformed Not blocking, take or leave: the sentence at commands.md:2592 should say that agent-device refuses every command that uses that session's saved connection, since an unreadable The open inline thread at #4925 (comment) still applies only for the command list, which the first note above covers. These threads are fixed at 47aedf2 and can be resolved: #4925 (comment) (only ENOENT is absent, unknown files refuse before unlink), #4925 (comment) (the hashed-first return is gone), #4925 (comment) (errors carry the record path and a removal hint), #4925 (comment) (the hint names the refused file, not disconnect). CI is green: 21 checks, none failing at 47aedf2. Not verified here: tests were not run locally, the case-insensitive APFS and NTFS routes were traced and not reproduced, hard-link failure on filesystems without hard links was not evaluated, and the PR body's validation claims come from 153b6d3. Cross-process races are out of scope (#4946). No conflicts. Before merge, the three findings above must be fixed. |
|
Addressed #4925 (comment) in 9b5a468:
|
This comment has been minimized.
This comment has been minimized.
|
The three findings from the earlier review (#4925 (comment)) are fixed at 9b5a468, but a second independent pass found seven new defects in the delta. All 21 checks pass at this commit. The PR needs these fixes, then a green re-run, before merge. Tests were not run locally; regression validity was judged by reading the pre-delta code path. A second independent pass found that A second independent pass found that a failed migration can delete another session's canonical file. Take a readable A second independent pass found that unnamed callers lose the active connection for the empty session. An older A second independent pass found that A second independent pass found that pointer cleanup can delete a full record the write guard refuses to own. Keep a valid A second independent pass found that the command docs promise the wrong reason for one case. With a readable legacy A second independent pass found that a mismatch does not guarantee that no file was removed, which error-reasons.md:341 now claims. On a case-sensitive volume with legacy Not blocking, and these can be taken or left: Not verified here: legacy migration on a filesystem without hard links, where link may return ENOTSUP on some macOS volumes and All five earlier inline threads are fixed at this commit, so they can be resolved: the mismatch hint now names the refused file (#4925 (comment)), the mismatch error carries recordPath and a removal hint (#4925 (comment)), no hashed-first return remains (#4925 (comment)), only ENOENT counts as absent and unknown files refuse before any unlink (#4925 (comment)), and commands.md names the refusal and the manual removal, with the |
|
Addressed #4925 (comment) at 0b5f2ec:
This is the last round for this PR. Remaining hardening goes to #4946: other read sites using observation, ENOTSUP on volumes without hard links, and the raw errno when the directory is read-only and the session's own file is unreadable. |
This comment has been minimized.
This comment has been minimized.
|
The delta at 0b5f2ec fixes the earlier findings (#4925 (comment)) on the mismatch hint, the hashed-first early return, the unknown-file refusal and the docs, but one regression remains for remote commands that only read the saved connection, plus two related lookups. The delta removed the read fallback from A second independent pass found the same assumption elsewhere: connection-runtime.ts:72 loads existing state through the mutating reader for commands that can reuse a saved connection without rewriting it. With a valid base-written A second independent pass found one more lookup change: at remote-connection-state.ts:813 the shared active-session reader now rejects every full record. Interrupt Could the exported readers be observation-only instead? Not blocking, and these can be taken or left: no handler-level test pins None of the earlier inline threads still apply, so these can be resolved: the mismatch hint (#4925 (comment)), the mismatch error details (#4925 (comment)), the hashed-first early return (#4925 (comment)), the ENOENT-only absence check (#4925 (comment)) and the docs refusal text (#4925 (comment), with the No conflicts are known. Two 'Body rules' runs show as cancelled, which looks like superseded runs: they validate PR body text and the diff touches no workflow, script or template on their route, and the other 21 checks pass. Not verified here: tests were not run, and the regression was judged by reading the 9b5a468 code for each new test; the regression was traced through cli.ts:419, :793 and remote-connection-state.ts:494, :637-640, :728, not executed; the EROFS, ENOSPC and EPERM variants and the case-insensitive APFS and NTFS routes were traced, not reproduced. Before merge, remote commands must resolve defaults through the observation reader, with the mode-0500 test restored on that route. |
|
Addressed #4925 (comment) at 73cc3f1 with the suggested shape:
Please take any further hardening to #4946. |
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Apex Sentinel: 1 new finding on 05501e6. The verdict and the full list are in the summary comment.
|
The earlier findings are fixed at 05501e6: disconnect now has CLI-route and handler tests, and case-variant session names no longer share one file (earlier review: #4925 (comment)). Two new problems remain in disconnect, so the PR needs one more change before merge. The only check that did not pass is Body rules, which was cancelled. It lints the PR body and runs no code under A second independent pass found that an unnamed disconnect can lose the active selection (src/cli.ts:794). Take a valid unleased legacy record for session A second independent pass also found that pointer cleanup can unlink a separate valid legacy record (remote-connection-state.ts:416). On a case-sensitive volume, take a full valid legacy record naming Not blocking, and fine to take or leave: the disconnect pre-claim in The open thread about a corrupt Not verified here: any of this by running code. The new tests were judged to fail on the earlier head by reading the code. Case-insensitive aliasing ( |
This comment has been minimized.
This comment has been minimized.
|
The earlier findings from 05501e6 (#4925 (comment)) are fixed at a57843d, but a second independent pass found two defects in how a legacy A second independent pass found that a failed disconnect can strand the active connection (remote-connection-state.ts:794). Take a valid legacy record at A second independent pass also found that a failed save can discard the previous active selection (remote-connection-state.ts:384). Take a valid legacy Not blocking, and fine to take or leave: on the production route disconnect always arrives with The one open inline thread about a corrupt The code needs the two fixes above before it is ready. The Body rules check was cancelled, not failed. It only lints the PR body and runs no code under The PR has merge conflicts with main. Before merge, rebase onto main. The conflict is in Not verified here: no code was run, so both earlier fixes and the fail-without-fix claims were judged by reading 05501e6 against a57843d. Not verified here: the case-insensitive aliasing of |
A saved connection was stored under a file whose name sanitized the session, replacing every character a filename cannot hold. Two names that differ only in case produce the same name, so on a case-insensitive filesystem both sessions opened one file and one session read and overwrote another session's record. A session name that is a filename on its own keeps it. Any other name is stored under its SHA-256. A record at the old path is used only when its contents name that session, and a record that names another session is refused with the typed reason connection_session_mismatch instead of being read, overwritten, or removed. The active-session pointer is never a session record.
The child polls the gate file and reads it whole. A plain write left a window where the file existed with no contents yet, so the child reported an empty phase and the test lost a receipt. Publishing it means the child sees a phase name or no file at all.
…ort audit connectionSessionIdentity is the published name for the hash a session maps to in its saved-connection file name. Production derives it inside the module, and the package test reads it, which the production export audit cannot see.
On a case-insensitive filesystem, the record an older build wrote for `Demo` opens when `demo` asks for its own plain name, so every remote command for `demo` answered `connection_session_mismatch` and the only way out was deleting the file by hand. Path resolution trusted a name; contents decide ownership. A session now resolves to the next path its own name answers for when a record there proves it belongs to another session: the case-variant reads no state, writes its own hashed record, and the other session's file is left alone. `connection status` and `disconnect --session demo` answer that demo has no connection instead of failing. The contents check stays as the last guard for a record that still disagrees after resolution, and it now names the refused path and how to clear it.
… legacy records once A plain session name maps to <name>.json and every other name to the SHA-256 of its UTF-16 code units, so lone surrogates and case variants never share a file. Records older builds left under sanitized names, at a case alias, or on the active-session pointer path move once to their verified owner's path; an occupied target keeps the source and refuses. Only ENOENT means absent, and a file is removed as invalid only after its parsed session matches the caller.
…n identity export
…rds in a read-only directory
…n-pointer or an empty-session flag Status now uses an observation lookup that never migrates, links, or deletes: it reports a verified older record in place and an invalid record as no connection. Saves and removals always migrate first, so a refused hard link never lets invalid-record cleanup reach an unmigrated legacy path such as default.json. An empty-string pointer session resolves, --session= no longer follows the active pointer, and only a pointer-shaped file is used or removed as the pointer.
…igrate only on save or remove readRemoteConnectionState and readActiveConnectionState now change no file. Older records move, and invalid records are removed, only inside writeRemoteConnectionState and removeRemoteConnectionState. Remote command defaults and connection materialization no longer need a writable records directory. The active lookup accepts a full record at the pointer path only when that path is the older name of the session the record names.
Disconnect claims the record at its session's own path before it closes the session or releases the lease, so a record it cannot remove is refused first. A record that names its session but fails validation is removed.
…through to the active session claimRemoteConnectionState now removes an invalid owned record itself and returns only a valid state, so an unnamed disconnect continues to the active pointer. CLI disconnect setup settles the record before the observation-only defaults reader runs. The pointer-shape exclusion applies only at the active-session pointer path, so a legacy session file holding only its session moves and is removed by disconnect.
…ule already covers One claimSessionRecord replaces three claim helpers. Save and removal migrate only the older name of the session: a hashed path is never a name an older build wrote, and a case-insensitive volume already opens a case variant through that name, so the extra lower-case and canonical sources found nothing new. The pointer owner lookup replaces the second pointer reader, and disconnect is one handler again.
Case and surrogate pairs share one table. Tests that repeated another test's assertions, or passed for any read because reads never change files, are removed. The case-variant command test is covered by the store test that fails for the same mutants. The empty-session and invalid-record disconnect tests move into connection-disconnect.
It fixes a flake unrelated to saved-connection ownership.
…inter The CLI claims the disconnect record before it builds the client, and the handler now tears down that same record instead of resolving it again. An unnamed disconnect of an older .active-session record at the pointer path no longer reports no connection, and a leased one is still refused. Pointer cleanup removes .active-session.json only when it has pointer shape and names the session. A full record there leaves only through the checked move.
|
Rebased onto main and regenerated error-reasons.md. The two findings in #4925 (comment) concern a session literally named |
a57843d to
ac0b49d
Compare
Apex Sentinel · ✅ Approve · review of
|
| 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.
Summary
Each remote session owns its own saved-connection file. Base sanitized names, so
Demoanddemoshared one file on a case-insensitive filesystem, and one session read, overwrote or deleted the other's record.The name alone decides the path:
<name>.jsonfor/^[a-z0-9_-][a-z0-9._-]*$/, otherwise~<sha256(UTF-16LE)>.json.Exported readers (
connection status, remote command defaults) only observe. They report a record an older build wrote in place, and they report an invalid record as no connection.Only save and removal move an older record to its verified owner (hard link, then unlink) and delete an invalid record that names the session. An occupied target refuses with
connection_session_mismatch. An unreadable file refuses withconnection_record_owner_unknown.disconnectclaims the record before teardown. An unnamed claim removes an invaliddefaultrecord, then follows the active pointer. Follow-ups: #4946.Before / after
connection status --session demoafterDemosaved, case-insensitive volume: base reports Demo's run. Head reports no connection.disconnect --session Demowith an olderDemo.jsonbeside the hashed record: head refuses before any close or release, and keeps both files.disconnectwith an invaliddefault.jsonand a pointer toteam: head removes both files and disconnectsteam.Validation
At a57843d:
vitest run packages/remote src/cli/commands src/__tests__/cli-config.test.ts src/__tests__/cli-disconnect-invalid-default.test.ts505 passed.typecheck,lint,format,check:command-docsandcheck:fallowpass. The disconnect-claim and pointer-cleanup tests each fail with their fix reverted.