refactor(move): settle a device claim in its own module - #2574
Open
thymikee wants to merge 1 commit into
Open
Conversation
This was referenced Sep 13, 2026
thymikee
added this pull request to stack #2576
September 13, 2026 20:50
Size Report
Startup median (7 runs, lower is better):
|
Member
Author
|
No blocking findings at 5749359. Settlement behavior and the held-to-acquired mapping are preserved, and the moved tests and current CI are green. Ready for human review as the first part of the stack. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Moves claim settlement out of
src/daemon/device-claims.tsintosrc/daemon/device-claim-settlement.ts: what the claim file says before an acquisition writes its own record, how a foreign claim is settled, the ownership predicates, and the conflict and supersede diagnostics. The resolution gains aheldarm so the settlement module stops naming the public acquire result, andclaimHeldDevicemaps it back toacquired.DeviceClaimSessionOwnershipandownershipFromClaimmove todevice-claim-record.ts, the record they read.Tests move with the code they cover, which also leaves
device-claims.test.tsat 767 lines instead of 940. 772 gross lines, no behavior change: the 6 moved tests pass unchanged and the public surface keeps its existing re-exports.Part 1 of 3 for #2538; #2575 and #2570 build on it.
Validation
Tested at
5749359a00.pnpm check:layeringpasses, including the committed enumeration of the new module.pnpm check:fallow --base origin/mainreports no issues in the changed files. Typecheck and lint pass.vitest relatedacross all six changed files: 254 files, 1,629 tests passed. No device-facing behavior changes, so no simulator or device run applies.