feat(devices): answer when a device's current boot began - #2575
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
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
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-clockbootedAtMs; a device family with no honest answer returnsunsupported-devicerather than a guess.An Apple Simulator reports the start time of the
launchd_simprocess naming that device, rejecting a stamp that lies in the future. Android converts/proc/uptimeon 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.tsis 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:layeringpasses, which enumerates the two new package subpaths and the contracts export.pnpm check:fallow --base origin/mainreports no issues. Typecheck and lint pass.pnpm check:packageimports 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.