Skip to content

feat(devices): answer when a device's current boot began - #2575

Merged
thymikee merged 1 commit into
t3code/2538-claim-settlement-movefrom
t3code/2538-device-boot-observation
Sep 14, 2026
Merged

thymikee merged 1 commit into
t3code/2538-claim-settlement-movefrom
t3code/2538-device-boot-observation

Conversation

@thymikee

Copy link
Copy Markdown
Member

Summary

Adds one question to the platform boundary — when did this device's current boot begin — as @agent-device/contracts/device-boot. An answered probe returns host-clock bootedAtMs; a device family with no honest answer returns unsupported-device rather than a guess.

An Apple Simulator reports the start time of the launchd_sim process naming that device, rejecting a stamp that lies in the future. Android converts /proc/uptime on the host clock, bounded by the instant the probe began so response latency cannot move the answer forward, and a guest clock that disagrees with the host cannot move it at all. src/platform-runtime-device-boot.ts is the root hub that dispatches by family; nothing consumes it yet.

Part 2 of 3 for #2538, on top of #2574. 489 gross lines.

Validation

Tested at 6fae37be00. pnpm check:layering passes, which enumerates the two new package subpaths and the contracts export. pnpm check:fallow --base origin/main reports no issues. Typecheck and lint pass. pnpm check:package imports all 13 published entry points from a clean install and runs the published CLI.

The probes are host-process reads on the same commands the platform packages already use for boot state, so no new device behavior is exercised here; #2570 drives them against a live simulator and emulator reboot.

@github-actions

Copy link
Copy Markdown

Size Report

Metric Base Current Diff
Installed (including dependencies) 4.52 MB 4.52 MB 0 B
Package (unpacked) 4.52 MB 4.52 MB 0 B
Package (download) 1.33 MB 1.33 MB -1 B

Startup median (7 runs, lower is better):

Scenario Base Current Diff
CLI --version 29.1 ms 29.1 ms -0.0 ms
CLI --help 80.1 ms 79.2 ms -0.9 ms

@thymikee

Copy link
Copy Markdown
Member Author

No findings at 6fae37b. The Android probe now uses a conservative pre-request timestamp, so response latency cannot falsely invalidate a newer claim. Checks are green; ready for human review after #2574. The consuming takeover behavior remains in #2570.

@thymikee thymikee added the ready-for-human Valid work that needs human implementation, judgment, or maintainer merge label Sep 13, 2026
@thymikee
thymikee merged commit 15644b6 into main Sep 14, 2026
18 checks passed
@thymikee
thymikee deleted the t3code/2538-device-boot-observation branch September 14, 2026 09:30
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