Repository navigation
refactor(daemon): bind find actions to the admitted session lifetime - #5072
Conversation
Size Report
Startup median (7 runs, lower is better):
|
This comment has been minimized.
This comment has been minimized.
|
The change at 9be4a46 has one regression: a find action can now go unrecorded when its request is canceled after the device effect. AuthorizedMutation.recordAction returns early when Not blocking, and these can be taken or left: the dispatcher now has a third per-command branch in Could Lint, Typecheck & Package, Numeric Ranges and Coverage fail on the |
This comment has been minimized.
This comment has been minimized.
|
The changes at 41baa06 look good, and the findings from the earlier review (#5072 (comment)) are fixed. No new code problems were found in the delta, and nothing from that review remains open. The cancellation test now asserts the case the old Lint, Typecheck & Package, Numeric Ranges and Coverage are red with TS2305 on |
The find route resolved its session from the store at the top of the handler and again in every mutating branch, so a lifetime that ended mid-request made those reads answer for whichever session owned the address next. The dispatcher now hands find the effects of the one lifetime it admitted: the target-context read, the ADR 0014 ref-frame expiry at the side-effect seam, and the recorded action. Each operation re-checks its own lifetime and never resolves the address again, so a revoked authority can neither observe nor mutate a successor session. The action branches hold no store. The read-only selector-runtime leg and find's own capture observation write keep the store adapter, recorded as remaining debt. Refs: #5064
41baa06 to
30d6e5d
Compare
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.
|
The code at 30d6e5d is unchanged in substance from the version reviewed earlier (#5072 (comment)), and it still looks correct. The earlier TS2305 failures came from base files this PR does not touch and are fixed in the rebased base. CI is still pending, and the only check not passing is Body rules, which was cancelled because a newer run replaced it. Before merge, the Body rules re-run must pass. Not verified here: tests were not run locally, and the conclusion that the patch is identical rests on a range-diff and diff comparison. |
…5072) * refactor(daemon): bind find actions to the admitted session lifetime The find route resolved its session from the store at the top of the handler and again in every mutating branch, so a lifetime that ended mid-request made those reads answer for whichever session owned the address next. The dispatcher now hands find the effects of the one lifetime it admitted: the target-context read, the ADR 0014 ref-frame expiry at the side-effect seam, and the recorded action. Each operation re-checks its own lifetime and never resolves the address again, so a revoked authority can neither observe nor mutate a successor session. The action branches hold no store. The read-only selector-runtime leg and find's own capture observation write keep the store adapter, recorded as remaining debt. Refs: #5064 * fix(daemon): record completed find actions after cancellation
Summary
Bind mutating
findactions to the admitted session lifetime. The dispatcher passes narrow operations for reading the target, expiring its ref frame, and recording a completed action. A completed action still records after cancellation if the original lifetime is current. A stale capability cannot reach a replacement.The read-only selector runtime and capture observation write still use a store adapter. Snapshot binding and offscreen target probing now receive the facts they read.
Issue: #5064
Before / after
Behavior matches
0.22, including recording completed actions after cancellation and one runtime bind.Value
find.tsValidation
0.22@2062cbe182. Range-diff confirms both commits carried over without patch changes.30d6e5dbec, all 19 focused tests passed. Exact-head affected runrun-WZdaJgpassed all eight runnable checks, including 397 related and 22,920 unit tests. Hosted checks passed, including Android, iOS, macOS, and Linux smoke.9be4a46740, 4,557 daemon tests, daemon typecheck, and layering passed. The cancellation assertion failed there before the fix.