Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
11fd28e
test: require Browser Session lifecycle authority boundary
seonghobae Sep 10, 2026
8ceac2c
feat: add Browser Session domain crate
seonghobae Sep 10, 2026
a8443bc
feat: model disposable Browser Session authority
seonghobae Sep 10, 2026
0396ffb
build: register Browser Session workspace crate
seonghobae Sep 10, 2026
4bb254e
test: register Browser Session bounded context
seonghobae Sep 10, 2026
abece5b
build: lock Browser Session workspace package
seonghobae Sep 10, 2026
7bf7aff
fix: preserve locked dependency checksum
seonghobae Sep 10, 2026
1dec4bb
fix: restore registry checksums in lockfile
seonghobae Sep 10, 2026
962d741
docs: define disposable Browser Session authority
seonghobae Sep 10, 2026
8a0f2cc
docs: trace Browser Session lifecycle authority
seonghobae Sep 10, 2026
c5764ee
docs: diagram Browser Session authority lifecycle
seonghobae Sep 10, 2026
735dbcc
test: enforce Browser Session authority boundaries
seonghobae Sep 10, 2026
e7d34b9
docs: index Browser Session lifecycle ADR
seonghobae Sep 10, 2026
08852df
refactor: make lifecycle branches causally reachable
seonghobae Sep 10, 2026
9146d62
fix: close Browser Session authority edge paths
seonghobae Sep 10, 2026
797157a
docs: make Browser Session boundary code-current
seonghobae Sep 10, 2026
0589120
docs: index Browser Session ADR 0114
seonghobae Sep 10, 2026
0c6605e
fix(browser-session): bind authority to disposable isolation
seonghobae Sep 10, 2026
be3568a
fix(docs): preserve TLS design links while indexing ADR
seonghobae Sep 10, 2026
a98219a
test(browser-session): lock cross-aggregate isolation authority
seonghobae Sep 10, 2026
e4f1065
docs(adr): carry disposable isolation through destruction
seonghobae Sep 10, 2026
e638111
docs(trace): bind cleanup evidence to isolation identity
seonghobae Sep 10, 2026
91c0b82
docs(uml): show non-aliasing disposable boundary
seonghobae Sep 10, 2026
6486e91
docs(architecture): bind Browser Session authority to isolation identity
seonghobae Sep 10, 2026
197d79d
fix(browser-session): quarantine uncertain lifecycle outcomes
seonghobae Sep 10, 2026
e71df6a
test(browser-session): lock recovery-required lifecycle contract
seonghobae Sep 10, 2026
0d4592d
docs(adr): distinguish clean and uncertain browser creation
seonghobae Sep 10, 2026
98117fb
docs(traceability): record recovery-required causal evidence
seonghobae Sep 10, 2026
889d196
docs(uml): model browser lifecycle recovery-required state
seonghobae Sep 10, 2026
09a733a
style: apply canonical rustfmt to Browser Session recovery repair
seonghobae Sep 10, 2026
6da6015
test: require session recovery after uncertain destroy
seonghobae Sep 10, 2026
ac8b8bb
fix: quarantine Browser Session after uncertain destroy
seonghobae Sep 10, 2026
29e6c0f
docs: quarantine unproven Browser Session destruction
seonghobae Sep 10, 2026
3a7a4c6
docs: trace destroy-failure recovery invariant
seonghobae Sep 10, 2026
1579be8
docs: require recovery after unproven Browser Session cleanup
seonghobae Sep 10, 2026
376e85c
test: bind uncertain cleanup recovery to repository contracts
seonghobae Sep 10, 2026
f5780fb
test: satisfy strict recovery clippy contract
seonghobae Sep 10, 2026
0893414
docs: document Browser Session private invariants
seonghobae Sep 10, 2026
ab84a54
test: require phase-specific browser lifecycle errors
seonghobae Sep 10, 2026
cd5e2b5
fix: type browser lifecycle phase failures
seonghobae Sep 10, 2026
843cb40
test: use phase-specific lifecycle failures
seonghobae Sep 10, 2026
d9ec4aa
docs: make lifecycle failure phases explicit
seonghobae Sep 10, 2026
8431008
docs: trace phase-specific lifecycle failures
seonghobae Sep 10, 2026
98a28db
docs: show phase-specific lifecycle failures
seonghobae Sep 10, 2026
ab04f95
test: align Browser Session lifecycle contract
seonghobae Sep 10, 2026
ec14596
test: expose sequential Browser Session authority reuse
seonghobae Sep 10, 2026
e37a35a
fix: bind Browser Session recovery to incarnation evidence
seonghobae Sep 10, 2026
2bd4734
test: preserve recovery evidence across transport loss
seonghobae Sep 10, 2026
fa048fb
test: require port-scoped session incarnation
seonghobae Sep 10, 2026
0e2e754
test: bind lifecycle contracts to recovery and incarnation evidence
seonghobae Sep 10, 2026
518d6c8
docs: define Browser Session incarnation and recovery evidence
seonghobae Sep 10, 2026
f2295bc
docs: trace Browser Session recovery and ABA repair
seonghobae Sep 10, 2026
09a1de9
docs: model incarnation and orthogonal recovery state
seonghobae Sep 10, 2026
ad9530a
style: apply canonical Browser Session rustfmt
seonghobae Sep 10, 2026
110eb33
fix: reject unknown epoch advance without mutation
seonghobae Sep 10, 2026
6eacfe4
test: close Browser Session coverage edges
seonghobae Sep 10, 2026
3aa113b
style: apply canonical Rust formatting
seonghobae Sep 10, 2026
0c6ed89
test: cover incarnation exhaustion without macro branch
seonghobae Sep 10, 2026
bab489a
Merge pull request #315 from ContextualWisdomLab/fix/browser-session-…
seonghobae Sep 10, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion ARCHITECTURE.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,10 +149,17 @@ surfaces do not silently fall back to ambient host values.

Owns the narrow WebDriver BiDi adapter contract that is expressible by one explicit specification revision. The active slice pins the W3C WebDriver BiDi Working Draft published on 3 September 2026 at `https://www.w3.org/TR/2026/WD-webdriver-bidi-20260903/` and delegates complete-profile admission back to `originweave-fingerprint`. Standard BiDi covers viewport, device-pixel-ratio, timezone, and reduced-motion surfaces. Its width/height screen command cannot prove the kernel's complete screen-and-color-depth surface, and its single locale cannot prove ordered language preferences; hardware concurrency and the complete Chromium platform/User-Agent Client Hints surface also remain outside the standard set. The adapter therefore fails first on `Screen` rather than inheriting ambient Chromium values. It can plan two typed reusable-context commands—viewport/DPR and timezone—for one bounded opaque browsing-context identifier. Reduced motion remains an expressible protocol capability, but the reusable plan does not install it because `features: null` removes the target's complete media-feature override configuration rather than restoring prior state. Generic cleanup therefore resets only viewport/DPR and timezone. No caller-mintable exclusive-reset type is exposed; a Browser Session owner must instead prove a disposable context lifecycle or restore the complete prior media configuration. Planning sends nothing and proves neither acknowledgement, cleanup, ownership, nor page-visible state. Transport, post-condition observation, and reusable-context media restoration require the pinned Chromium/BiDi path and, for Chromium-only surfaces, a separate versioned `originweave-cdp` adapter.

### `originweave-browser-session` (active PR)

Owns the Browser Session aggregate boundary for disposable context lifecycle and presentation-mutation authority. Raw `BrowserSessionId` and `BrowsingContextId` values are transport addressability only. A context enters the owned set only after the narrow `DisposableContextPort` reports a fresh disposable isolation boundary together with its browsing-context address. The aggregate stores that exact handle and issues a non-caller-constructible `PresentationMutationAuthority` bound to browser-session identity, disposable-isolation identity, browsing context, and monotonic context epoch.

The isolation identity prevents distinct aggregate incarnations from aliasing authority when external session/context identifiers and local epoch values are reused. Destruction validates the full authority before adapter I/O and passes the stored isolation handle back to the port; cleanup authority is never reconstructed from `(BrowserSessionId, BrowsingContextId)`. For a WebDriver BiDi adapter, the port contract requires a one-to-one mapping from the domain's `DisposableIsolationId` to the specification-defined unique user-context id created for that live boundary. The protocol identifier is lifecycle addressability, not OriginWeave policy authority. Stale, foreign-session, foreign-isolation, unknown, destroyed, or uncertain authority fails closed; failed destruction makes the context uncertain; browser transport loss invalidates active authority; and normal session end is rejected until every owned boundary has proven destruction.

This active slice deliberately stops before browser transport. WebDriver BiDi/CDP remain adapters and do not mint policy authority. The current proposal does not yet bridge domain authority into `originweave-bidi`'s private presentation/screen-area witnesses, implement the real `browser.createUserContext`/`browsingContext.create`/`browser.removeUserContext` adapter, prove exact-boundary cleanup post-conditions in Chromium, or establish protected-main behavior. ADR 0114, the Browser Session traceability dossier, and the lifecycle UML record those remaining boundaries.

## 6. Planned modules

```text
originweave-session isolated browser contexts and checkpoints
originweave-proxy separately approved proxy and final-target routing
originweave-http request, response, redirect, and elapsed-time budgets
originweave-observation AX + DOM + layout + network semantic snapshots
Expand Down Expand Up @@ -285,6 +292,7 @@ WARC stores source exchanges and resources; relational storage holds sessions, p
- Proxy and PAC routing cannot be inherited ambiently by the direct-only or TLS kernels.
- Redirects cannot inherit ambient origin or network authority.
- TCP peer equality does not substitute for TLS server identity, and TLS identity does not substitute for HTTP safety.
- Disposable Browser Session mutation and destruction authority is bound to the exact owned isolation identity as well as session, context, and epoch; raw driver identifiers alone cannot cross that boundary.
- Arbitrary script evaluation is absent from the standard action interface.
- Crawler policy is not treated as access authorization.
- High-risk actions fail closed when context, canonical intent, or approval evidence is incomplete.
Expand Down
7 changes: 7 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ members = [
"crates/originweave-tls",
"crates/originweave-fingerprint",
"crates/originweave-bidi",
"crates/originweave-browser-session",
]
resolver = "3"

Expand Down
17 changes: 17 additions & 0 deletions crates/originweave-browser-session/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
[package]
name = "originweave-browser-session"
description = "OriginWeave Browser Session lifecycle and mutation-authority contracts."
version.workspace = true
edition.workspace = true
rust-version.workspace = true
license.workspace = true
authors.workspace = true
repository.workspace = true
homepage.workspace = true
publish = false

[dependencies]
originweave-core = { path = "../originweave-core" }

[lints]
workspace = true
Loading
Loading