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
Close the remaining session-touch paths after #4944: attempt lock, journal aliases, script publication, double teardown #4949
#4944 checks the session lease id before a request touches a leased session. Reviews of #4944 found four paths that the PR leaves open. Each one existed before #4944. The maintainer scoped #4944 to stop at its invariant.
Open paths
Replay test attempts. A test suite authorizes the attempt session, then calls cleanup, record and capture directly. open from another client can attach a lease to the same session lifetime while those calls await. Rule: hold the attempt session lock across the authorization and the operation (packages/daemon/src/sessions/handlers/session-replay-command.ts, session-replay-video-owner.ts). The handler chain has no session-lock seam today.
Journal path aliases. The guard that stops a request from writing or reading a leased session's journal compares addresses by string. On a case-insensitive volume, two addresses that differ only in case share one directory (packages/daemon/src/sessions/request-admission.ts, packages/daemon/src/core/session-store.ts). Rule: compare the resolved directory, or make journal paths injective per address.
Script publication. A successful doctor, or any request whose finalization runs after its locks release, can publish a recording that a concurrent owner changed. Rule: recheck the credential and the exact session lifetime immediately before publication, including the lifetime that the request's own open created (packages/daemon/src/core/session-script-publication-capability.ts, packages/daemon/src/server/request-router.ts).
Double teardown. When the lease holder's request ends its expired session inline, the lease-end owner also tears that session down in the same lock context.
The report identifies four concrete pre-existing concurrency, path-aliasing, publication, and teardown gaps left after PR #4944 and points to specific files/handlers, which describes incorrect or unsafe existing behavior rather than a new feature or support question.
Activity
apex-sentinel-staging commentedon Nov 22, 2026
Apex Sentinel · Issue review
Suggested label:
bugThe report identifies four concrete pre-existing concurrency, path-aliasing, publication, and teardown gaps left after PR #4944 and points to specific files/handlers, which describes incorrect or unsafe existing behavior rather than a new feature or support question.
Required sections
fix(daemon): reuse the daemon expiry teardown and keep the app-lease …
fix(daemon): reuse the daemon expiry teardown and keep the app-lease …
fix(daemon): reuse the daemon expiry teardown and keep the app-lease …