Skip to content

docs: scenarios the session designs must satisfy in a browser - #4282

Open
sea-snake wants to merge 25 commits into
docs/client-app-sessionsfrom
docs/session-test-scenarios
Open

docs: scenarios the session designs must satisfy in a browser#4282
sea-snake wants to merge 25 commits into
docs/client-app-sessionsfrom
docs/session-test-scenarios

Conversation

@sea-snake

@sea-snake sea-snake commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

The four session designs have specifications and unit tests. What none of them has is a written account of the behaviour a user or an app can actually observe, which is where every promise the designs make to a user lives: that access can be ended, that a second tab and a sibling subdomain do not ask again, and that a five-minute delegation being replaced underneath the app is invisible.

docs/ongoing/session-test-scenarios.md — 62 scenarios in nine groups, each stating the state it starts from, what is done, and what must then be true, written to be run by a person or by a machine.

Each cites the requirements it exercises, so the specs can be walked in either direction. Both directions are checked: every cited id resolves to a requirement in one of the four specs, and the requirements with no scenario against them are accounted for by name in a closing table — agent construction, channel and lock mechanics, the browser proof's cryptography, and canister-internal ordering — so an omission reads as a decision rather than an oversight.

Writing the reverse walk is what found the gaps: a first draft cited TAB-1 and nothing else from the twelve tab requirements, and missed that a live session does not exempt an account reference list from eviction. Ten scenarios came out of closing that.

🤖 Generated with Claude Code

https://claude.ai/code/session_01LVi99RYo2jyi2kCurgovNJ

@sea-snake
sea-snake requested a review from a team as a code owner August 25, 2026 19:13
@zeropath-ai

zeropath-ai Bot commented Aug 25, 2026

Copy link
Copy Markdown

No security or compliance issues detected. Reviewed everything up to c765beb.

Security Overview
Detected Code Changes
Change Type Relevant files
Other relevant category ► docs/ongoing/session-test-scenarios.md
    Add new session test scenarios documentation

@sea-snake
sea-snake force-pushed the docs/session-test-scenarios branch from 7e215f2 to a5b42f8 Compare August 25, 2026 19:21
Copilot AI lite review requested due to automatic review settings August 25, 2026 19:24

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new documentation artifact that enumerates browser-observable session behaviors across the four session designs, bridging the gap between spec/unit tests and real user/app outcomes.

Changes:

  • Introduces docs/ongoing/session-test-scenarios.md containing 62 scenarios grouped by topic (sign-in, delegation holding, tab/subdomain sharing, silent flows, revocation, limits, UI visibility, storage, recovery).
  • Cross-references each scenario to requirement IDs in the existing design specs, and includes a coverage/omissions section explaining what’s intentionally not tested via browser scenarios.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread docs/ongoing/session-test-scenarios.md Outdated
Covers USE-4, MINT-3, MINT-11.
2. **HOLD-2. An idle page does not replace anything.**
Sign in, then leave the page open and make no calls.
No delegation may be minted for a delegation nothing used.
@sea-snake
sea-snake changed the base branch from docs/shared-revocable-sessions to main August 25, 2026 19:28
@sea-snake
sea-snake force-pushed the docs/session-test-scenarios branch from 734db1d to 8238890 Compare August 25, 2026 19:28
@sea-snake
sea-snake changed the base branch from main to docs/client-app-sessions August 25, 2026 19:28
The four session designs are specified and unit-tested, and everything they
promise a user is about what happens in a browser: that access can be ended,
that a second tab and a sibling subdomain do not ask again, and that a
five-minute delegation being replaced is invisible.

Thirty-six scenarios, each reachable by doing what a user does and seeing what
a user sees, so none of them needs the app instrumented or a call made to fail
on purpose. Each states the state it starts from, what is done and what must
then be true, and cites the requirements it exercises so the specs can be
walked in either direction. The requirements a user cannot reach are named by
category at the end, with where each is tested instead.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
sea-snake and others added 14 commits August 31, 2026 15:00
The limit requirements gained one at the front, so every citation above it
shifted. Two scenarios cited a cap requirement for behaviour that is about
recording a use, and now cite that one.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LVi99RYo2jyi2kCurgovNJ
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LVi99RYo2jyi2kCurgovNJ
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LVi99RYo2jyi2kCurgovNJ
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants