Skip to content

ADR 0040 step 1 — Bind session authority to one lifetime #4965

Open

Description

@thymikee

Make one lifetime the source of session authority from admission through publication. Convert script publication first so the first family exercises an output boundary.

ADR 0040

Required behavior

  • Make SessionCoordinator the only constructor of AuthorizedSession and AuthorizedOpenSlot.
  • Make a command publish through its own reserved slot when it creates a lifetime. Bind the admitted lease or explicit unleased state on every creator, including recording-only and snapshot-only paths.
  • If a live reopen crosses owners, refuse before launch. Delete in-place lease attachment.
  • Commit script revisions under the lifetime lock. Delete the late address reread. Use the authorized lifetime through replay attempt cleanup, recording, and capture.
  • Start the CI count of raw sessionStore reads outside owners. Report the count on every PR. Refuse an increase from the merge base. Use the ADR baseline to verify the initial counting rule.

Verification

Use barriers for close, reopen, delayed cleanup, and first-open script publication. Verify that same-owner capture followed by open retains the capture. Verify that a leased reopen of an unleased live lifetime refuses before launch. Add a failing fixture for an increase in raw reads.

Related work

Use #4949 for the existing replay attempt and script publication work. Keep the #4944 admission regressions.

Activity

  1. apex-sentinel-staging commented on Nov 22, 2026

    @apex-sentinel-staging

    Apex Sentinel · Issue review

    Suggested label: feature

    The issue is an implementation plan for ADR 0040 step 1, specifying required behavior, verification steps, and CI policy changes rather than reporting broken existing behavior.

  2. thymikee commented on Nov 22, 2026

    @thymikee
    MemberAuthor

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions