Thanks to visit codestin.com
Credit goes to github.com

Skip to content

refactor(move): settle a device claim in its own module - #2574

Open
thymikee wants to merge 1 commit into
mainfrom
t3code/2538-claim-settlement-move
Open

refactor(move): settle a device claim in its own module#2574
thymikee wants to merge 1 commit into
mainfrom
t3code/2538-claim-settlement-move

Conversation

@thymikee

@thymikee thymikee commented Sep 13, 2026

Copy link
Copy Markdown
Member

Summary

Moves claim settlement out of src/daemon/device-claims.ts into src/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 a held arm so the settlement module stops naming the public acquire result, and claimHeldDevice maps it back to acquired. DeviceClaimSessionOwnership and ownershipFromClaim move to device-claim-record.ts, the record they read.

Tests move with the code they cover, which also leaves device-claims.test.ts at 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:layering passes, including the committed enumeration of the new module. pnpm check:fallow --base origin/main reports no issues in the changed files. Typecheck and lint pass. vitest related across all six changed files: 254 files, 1,629 tests passed. No device-facing behavior changes, so no simulator or device run applies.

@github-actions

Copy link
Copy Markdown

Size Report

Metric Base Current Diff
Installed (including dependencies) 4.52 MB 4.52 MB +78 B
Package (unpacked) 4.52 MB 4.52 MB +78 B
Package (download) 1.33 MB 1.33 MB +50 B

Startup median (7 runs, lower is better):

Scenario Base Current Diff
CLI --version 29.6 ms 29.0 ms -0.7 ms
CLI --help 78.0 ms 78.4 ms +0.4 ms

@thymikee

Copy link
Copy Markdown
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.

@thymikee thymikee added the ready-for-human Valid work that needs human implementation, judgment, or maintainer merge label Sep 13, 2026
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