Repository navigation
perf(daemon): judge host claim scan owners only when liveness decides - #5217
Conversation
The macOS and web host claim scan classified every listed claim and never read that classification: settlement re-read and judged each claim again. The scan now only decodes. Owners are judged for host-scoped claims this daemon did not abandon, in one snapshot per judged set, under the claim lock when settling. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Size Report
Startup median (7 runs, lower is better):
|
There was a problem hiding this comment.
All reported issues were addressed across 4 files
Reply with feedback, questions, or to request a fix.
View guided diff | Turn on auto-fix | Re-trigger cubic
This comment has been minimized.
This comment has been minimized.
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
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.
|
This PR is ready at f5779c9, and no code changes are required. Not blocking, take or leave: the new canonical-filename helper could also serve the inline checks in stale claim release and orphan reconciliation, and one shared selector (unreadable, or host-scoped and canonical) could feed both the preview and the locked settlement loop, because with a hand-copied or hand-renamed claim file the two may name a different blocking claim or disagree on whether to read the file. The canonical filename thread no longer applies and can be resolved: the preview now filters decoded claims to their canonical filename, with misnamed-file cases in the host scan tests, and only the hand-edited ordering difference noted above remains. All checks pass, including Coverage, Integration Tests and Smoke Tests (macos); Proof is skipped. Not verified here: tests and mutations were not run locally, so base-failure and mutation counts were judged by reading and the pass state comes from CI; the latency table measured at 3b3282f was not reproduced; no live macOS or web claim run was done, and this host-side claim bookkeeping is exercised through the production acquire and preview functions; the listing-order and case-insensitive volume scenarios come from reading the code. Nothing found here needs to change before merge. |
Summary
Follow-up to #5210. The macOS and web host claim scan classified every listed claim, then never read that classification, so reopening a held claim still ran
ps. The scan now only decodes. Owners are judged only for host-scoped claims this daemon did not abandon; the preview judges them in one snapshot.No ownership decision changed:
Before / after
Only snapshot count and latency differ. Measured at 3b3282f.
Validation
Tested f5779c9.
device-claims-host-scan.test.tsanddevice-claims-app.test.ts: 44 passed.🤖 Generated with Claude Code
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.