You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ADR 0040 step 4 — Settle an expired session lifetime once #4968
Register settleExpiredLifetime(lifetimeId) before its first asynchronous operation. Use a lease end record for its sessions, retained host, and provider release.
Check expiry under lock. When settlement is required, return a wait instruction, drop locks, await within the request budget, and replan.
If a step holds outer locks, refuse through the step contract and unwind. Never re-enter the held lock.
Allow only open with its own valid lease to replace an expired lifetime. Recheck the lease after the wait. Delete inline teardown, successor dispatch, and early successor renewal.
Clear a claim only when settlement proves safe reuse.
Verification
Use a fake clock and barriers for close versus sweep, two successors, wait with and without --wait, owner and successor cancellation, lease expiry during the wait, hold drain, and bounded step unwind. Verify one teardown and one report of a confirmed lease end.
Related work
Use the double teardown work in #4949. Keep the immediate progress and credential regression cases from #4944.
Depends on the lifetime admission boundary in step 1.
The issue specifies an implementation task from an ADR with required behavior, verification cases, and dependencies, requesting new/idempotent expiry settlement behavior rather than reporting a current observable defect. The text contains technical instructions for implementers but no attempt to steer the triage response.
When this step lands, amend the ADR that ADR 0040 (#4964) lists for it in its Amendments table, in the same PR. ADR 0040 does not edit those ADRs up front, because an ADR states the current truth and the code has not changed yet.
Activity
apex-sentinel-staging commentedon Nov 22, 2026
Apex Sentinel · Issue review
Suggested label:
featureThe issue specifies an implementation task from an ADR with required behavior, verification cases, and dependencies, requesting new/idempotent expiry settlement behavior rather than reporting a current observable defect. The text contains technical instructions for implementers but no attempt to steer the triage response.
Possible duplicates
thymikee commentedon Nov 22, 2026
When this step lands, amend the ADR that ADR 0040 (#4964) lists for it in its Amendments table, in the same PR. ADR 0040 does not edit those ADRs up front, because an ADR states the current truth and the code has not changed yet.