Two independently visible interface instances can begin life with the same value that an application calls a “tab ID.” That is not necessarily a random-number failure, a storage race, or evidence that two pages are sharing one live Storage object. Under the platform’s opener-based top-level creation path, the new page’s initial session-storage state can be cloned from the opener, after which the two page sessions own separate maps. The WHATWG HTML creation algorithm invokes a storage-shed clone when a new top-level traversable is created with a non-null opener, and the Storage Standard defines that operation by creating new session shelves whose sessionStorage maps are copies.
That distinction is the entire operational problem. A get-or-create function can be perfectly correct at “reuse an existing token” while still violating the application’s intended page-identity contract because the child inherited the parent’s token before the function ran. MDN’s sessionStorage documentation describes the same boundary accessibly: opener-created sessionStorage starts as a copy, later changes are independent, and the page session persists through reloads.
This article defines a ten-case, disposable loopback laboratory that makes that failure reproducible without touching production state. Execution status: NO BROWSER LAB RUN. Every result below is EXPECTED / NOT EXECUTED. Browser build, operating system, Python version, Playwright version, and observed results remain unrecorded until execution. The objective is to leave a complete procedure and literal oracle so a later run can distinguish documented behavior, derived expectations, and actual evidence.
1. Define which identity the application actually needs
Before opening a second page, define the lifetime that the identifier is supposed to represent. Otherwise a green assertion can validate the wrong contract.
There are three relevant identities in this laboratory. First is an inherited session value: a string stored under rl.opener.<run>.tabToken. It may be copied at child creation and can then persist across reloads of that page session. Second is the top-level page session that owns its own session-storage shed. Two top-level pages may hold equal strings without owning the same underlying session map. Third is the current document instance, which ends when navigation or reload replaces that document even though session storage can survive. MDN’s description of sessionStorage explicitly combines per-top-level page-session partitioning, opener-time copying, later independence, and reload survival.
The acceptance rule must therefore be written before reading any token:
Intended contract | Accept when | Reject when |
Preserve inherited workflow value | Child is allowed to begin with parent token | Code treats equality as proof that P and C are one page |
Page-session identifier | Opening policy prevents unwanted inheritance, or application replaces the value under an explicit policy | Opener-created P and C retain the same supposedly page-unique token |
Current-document identity | Every document bootstrap receives a fresh document-scoped identity | Reload is expected to preserve the same document identity |
A variable named tabId does not establish any of those lifetimes. The contract does.
Separate a stored token from a document instance
The harness must never use the stored token to identify the page being observed. It assigns P to the parent and C to the child from the runner’s own page objects, then tracks document generations separately: P/doc1, C/doc1, and after a child reload, C/doc2.
That separation prevents circular evidence. In S02, P and C are distinct pages even though both are expected to read PARENT_TOKEN. In S09, a document operation can be routed with C/doc1 while the stored token remains PARENT_TOKEN; after reload, routing changes to C/doc2 while the session value can remain unchanged. The result only qualifies a document-lifetime identity strategy. It must not be marketed as a durable tab ID or as proof that a production generator is globally collision-free.
DOCUMENTED BEHAVIOR: session-storage page sessions can survive reload, and an opener can supply the initial copied state.
DERIVED EXPECTATION: a harness-owned document generation changes on reload while the stored session token need not.
OBSERVED RESULT: NOT EXECUTED.
2. Trace the copy at page creation
The normative chain matters because “sessionStorage is per tab” is too compressed to explain this failure.
In the HTML Standard’s document-sequence creation algorithm, creation of a top-level traversable contains a conditional branch: if its opener is non-null, the user agent legacy-clones the opener top-level traversable’s storage shed into the new traversable. The Storage Standard’s storage-shed algorithm then describes that clone concretely: for each relevant storage key it creates a new session shelf and sets the new shelf’s sessionStorage map to a clone of the source map.
Those two steps explain why S02 can legitimately begin with:
P.marker = P0
P.tabToken = PARENT_TOKEN
C.marker = P0
C.tabToken = PARENT_TOKENwhile S03 and S04 can later demonstrate independent mutations.
This creation-time question is different from cross-tab invalidation and reconciliation, which concerns how already-running pages converge on changing application state. The present laboratory does not design a notification bus, logout protocol, revision scheme, or reconciliation transport. It asks what state the child owns at creation. The adjacent article is useful precisely because these are separate lifecycle boundaries.
Distinguish initial copying from later sharing
Equal strings at time zero do not imply a continuing shared storage area. The clone algorithm creates a destination shelf and copies the sessionStorage map into it; it does not define a synchronization channel that keeps the two top-level page sessions aligned. MDN states the same consequence directly: opener-created storage begins as a copy, but later changes in one page do not affect the other.
That produces the expected S03/S04 pattern:
after parent marker := P1
P.marker == P1
C.marker == P0
after child marker := C1
P.marker == P0
C.marker == C1Storage events do not provide a substitute oracle here. The HTML Web Storage specification restricts session-storage broadcast recipients to same-origin Storage objects in the same traversable, and MDN summarizes that as same-origin documents within the same top-level browsing context rather than other tabs. Do not wait for a cross-tab storage event and declare “isolated” when none arrives. Explicit readback from P and C is the evidence.
DOCUMENTED BEHAVIOR: opener-time cloning and later ownership separation.
DERIVED EXPECTATION: S03 and S04 diverge after their respective mutations.
OBSERVED RESULT: NOT EXECUTED.
3. Build a controlled parent-and-child fixture
The fixture should do less than the application being diagnosed. Serve two ordinary top-level pages from one disposable loopback HTTP origin such as address 127.0.0.1 on port 8765. Keep scheme, host, and port constant throughout a case. Create one fresh browser context for every case, then keep P and C inside that same context. Playwright’s Pages documentation explains that a BrowserContext can contain multiple Page objects, each representing a tab or popup, which is exactly the ownership structure required here.
The parent seeds only:
rl.opener.<run>.marker = P0
rl.opener.<run>.tabToken = PARENT_TOKENNo sessionStorage.clear() is permitted. Every other key is outside the experiment.
A minimal server can be completely static:
# server.py
from http.server import ThreadingHTTPServer, SimpleHTTPRequestHandler
from pathlib import Path
import os
ROOT = Path(__file__).parent / "site"
os.chdir(ROOT)
server = ThreadingHTTPServer(("127.0.0.1", 8765), SimpleHTTPRequestHandler)
print("fixture=http://127.0.0.1:8765")
server.serve_forever()The shared client bootstrap is passive. It reads; it does not mint, replace, or delete the token:
// fixture.js
(() => {
const q = new URLSearchParams(location.search);
const run = q.get("run");
const markerKey = rl.opener.${run}.marker;
const tokenKey = rl.opener.${run}.tabToken;
window.__rl = {
ready: false,
markerKey,
tokenKey,
read() {
return {
marker: sessionStorage.getItem(markerKey),
token: sessionStorage.getItem(tokenKey),
openerPresent: window.opener !== null,
url: location.href
};
}
};
window.__rl.ready = true;
})();The parent’s controlled button invokes window.open() directly:
openChild.addEventListener("click", () => {
const features = new URLSearchParams(location.search).get("features") || "";
const childURL = /child.html?run=${encodeURIComponent(run)};
const returned = window.open(childURL, "_blank", features);
window.__rlOpenReturnIsNull = returned === null;
});This direct scripted blank path is intentional. MDN notes that ordinary HTML target="blank" links currently imply noopener; such a link would therefore be a poor positive witness for the opener-preserving comparison.
Concrete launch and cleanup remain local:
python3 -m venv .venv
. .venv/bin/activate
python -m pip install playwright
python -m playwright install
python server.pyIn another shell:
. .venv/bin/activate
python run_cases.py --origin http://127.0.0.1:8765 \
--evidence evidence/EXPECTED-ONLY.jsonlAfter the run, terminate only the owned server process and delete the disposable browser data/context artifacts created by the test runner. Do not clear unrelated user browser state.
Observe the child without relying on a returned handle
The runner must arm page creation before the click. Playwright’s official Pages documentation shows context.expect_page() wrapping the action that creates the new page.
with context.expect_page(timeout=5_000) as new_page_info:
parent.get_by_role("button", name="Open child").click()
child = new_page_info.value
child.wait_for_function("window.__rl && window.__rl.ready === true", timeout=5_000)Then independently record:
child_read = child.evaluate("window.__rl.read()")
parent_return_null = parent.evaluate("window.__rlOpenReturnIsNull")
page_count = len(context.pages)The evidence record also needs the runner-owned P/C label and document generation. A finite timeout means HOLD. It does not mean the child had empty storage. Likewise, an unexpected opener value is not repaired by guessing what window.open() returned.
Record execution provenance at the start of a real run:
{
"run": "UNSET",
"fixtureRevision": "UNSET",
"browserBuild": "UNSET",
"operatingSystem": "UNSET",
"pythonVersion": "UNSET",
"playwrightVersion": "UNSET",
"origin": "http://127.0.0.1:8765",
"executionStatus": "NOT EXECUTED"
}Those UNSET fields remain UNSET because no laboratory was run.
4. Compare an independent page with an opener-created child
S01 establishes the negative comparison without creating a second browser profile. Use one fresh context; create P, seed the two owned keys, then create C with context.new_page() and navigate it to the same origin. The child has no opener because it was not created through P.
S01: EXPECTED / NOT EXECUTED
context = browser.new_context()
parent = context.new_page()
parent.goto(f"{origin}/parent.html?run={run}")
seed_parent(parent)
child = context.new_page()
child.goto(f"{origin}/child.html?run={run}")
await_ready(child)Expected literal readback:
Page | opener | marker | token |
P | n/a | P0 | PARENT_TOKEN |
C | null | null | null |
The child’s existence must be proven through the actual Page object, page count, URL, and readiness. “No opener” must not be confused with “no page.”
S02 changes only the creation path. Recreate a new context and parent seed, then click the real button whose handler executes window.open(childURL, "_blank"). The HTML creation algorithm’s non-null-opener branch is the documented basis for expecting the storage clone.
S02: EXPECTED / NOT EXECUTED
with context.expect_page(timeout=5_000) as info:
parent.get_by_role("button", name="Open child").click()
child = info.value
await_ready(child)Expected:
pageCount = 2
P.label = P
C.label = C
C.openerPresent = true
C.marker = P0
C.tabToken = PARENT_TOKEN
P.marker = P0
P.tabToken = PARENT_TOKENThe crucial assertion is not merely equality. It is distinct harness pages plus equal initial owned values.
MDN’s sessionStorage documentation expressly describes this initial opener copy, but the normative basis remains the HTML creation branch plus Storage Standard clone operation.
5. Change each copy and read both pages
S03 and S04 must each start from a fresh S02 arrangement. Do not continue from one case into the next, because doing so would make case identity dependent on previous mutations.
S03: EXPECTED / NOT EXECUTED. Create a new context, reproduce S02, wait until C’s passive bootstrap reports ready, then mutate only P:
parent.evaluate(
"""k => sessionStorage.setItem(k, "P1")""",
marker_key
)
p = parent.evaluate("window.__rl.read()")
c = child.evaluate("window.__rl.read()")Expected:
P.marker = P1
C.marker = P0
P.token = PARENT_TOKEN
C.token = PARENT_TOKENThis is the most direct demonstration that sessionStorage copied from opener is not a continuing shared marker. The Storage Standard created a distinct destination shelf and copied the map; it did not establish subsequent mirroring.
S04: EXPECTED / NOT EXECUTED. Recreate S02 again, then mutate C:
child.evaluate(
"""k => sessionStorage.setItem(k, "C1")""",
marker_key
)
p = parent.evaluate("window.__rl.read()")
c = child.evaluate("window.__rl.read()")Expected:
P.marker = P0
C.marker = C1
P.token = PARENT_TOKEN
C.token = PARENT_TOKENThe runner should await only declared fixture state: page creation, ready flags, and completion of the synchronous mutation/evaluation. No arbitrary sleep(1) is needed.
Also avoid the reverse reasoning error: equal values do not prove shared storage, and lack of a cross-tab event does not prove isolation. The Web Storage algorithm limits session-storage event recipients to the same traversable, so explicit values from both pages are the correct oracle for this arrangement.
A real run that returns an unexpected value is not “fixed” by retrying until green. Preserve the record, mark the case HOLD or mismatch, record the implementation provenance, and investigate the actual opening path.
6. Remove one parent key without inventing child cleanup
S05 examines deletion ownership without broadening the operation.
Recreate S02 from a fresh context. Once P and C have both produced their initial readbacks, remove only the parent marker:
parent.evaluate(
"""k => sessionStorage.removeItem(k)""",
marker_key
)
p = parent.evaluate("window.__rl.read()")
c = child.evaluate("window.__rl.read()")S05: EXPECTED / NOT EXECUTED
Value | Parent | Child |
marker | null | P0 |
tabToken | PARENT_TOKEN | PARENT_TOKEN |
The expected child value follows from the same independence demonstrated by S03/S04: after the initial clone, mutating the source page’s map does not retrospectively edit the child’s distinct copied map.
This is deliberately narrower than same-name cookie cleanup by path. That adjacent test concerns deletion of cookie tuples with path scope; it is not authority for session-storage ownership and should not import cookie semantics into this case.
Do not replace the operation with:
sessionStorage.clear();That would destroy every key in P’s current session-storage map, erase unrelated fixture or application state, and make the evidence less diagnostic. The experiment owns exactly two namespaced keys, and S05 intentionally removes exactly one.
This narrowness matters operationally. If the real application discovers a bad per-tab identifier policy, a repair should not silently purge unrelated session data merely because both happen to live in sessionStorage. State lifetime and identity lifetime can differ.
A timeout waiting for child readiness is HOLD. A missing C page is HOLD. An observed child marker of null when the expected independent copy is P0 is a mismatch requiring provenance and investigation; it is not silently rewritten into a passing result.
7. Reload the child and inspect what persisted
S06 tests a different boundary: document replacement inside the already-created child page session.
Recreate S02 in a fresh context. After the initial child evidence is captured, write C1 in C:
child.evaluate(
"""k => sessionStorage.setItem(k, "C1")""",
marker_key
)Record C/doc1, then reload the same child URL:
child.reload()
child.wait_for_function("window.__rl && window.__rl.ready === true",
timeout=5_000)The driver increments its owned generation label to C/doc2 and reads both pages again.
S06: EXPECTED / NOT EXECUTED
P generation = P/doc1
C generation before reload = C/doc1
C generation after reload = C/doc2
P.marker = P0
C.marker = C1
P.token = PARENT_TOKEN
C.token = PARENT_TOKENMDN documents that the page session survives reload, which supports expecting the child-local marker and copied token to remain available after the new document loads. The reload is not expected to re-copy current parent state; the child is continuing its own page session rather than being recreated as a fresh opener-created top-level page.
The nearby IndexedDB upgrade and draft recovery addresses a different persistence problem: preserving work around a database schema transition. It does not establish session-storage creation behavior and is not reproduced here.
This laboratory deliberately excludes browser-menu tab duplication, restoring closed tabs, and restoration semantics. The only qualified transition is reloading the observed C page in the controlled fixture.
8. Reproduce the false per-tab identifier assumption
S07 exposes the application bug without requiring the storage API itself to malfunction.
A common policy is logically equivalent to:
function getOrCreateToken(key, mint) {
const existing = sessionStorage.getItem(key);
if (existing !== null) return existing;
const value = mint();
sessionStorage.setItem(key, value);
return value;
}As storage-management code, that function is reasonable. Its failure appears only when the caller assumes “if this value already exists in this page, it must have been minted for this page.”
Recreate S02. Before invoking policy code, capture the passive child readback and verify:
C.marker = P0
C.token = PARENT_TOKEN
C.openerPresent = trueThen install an injected deterministic mint factory:
function deterministicMintFactory(sequence) {
let calls = 0;
return {
mint() {
const value = sequence[calls];
calls += 1;
return value;
},
count() {
return calls;
}
};
}For S07, inject ["CHILD_TOKEN"], call getOrCreateToken(tokenKey, factory.mint), and read the mint count independently.
S07: EXPECTED / NOT EXECUTED
returned token = PARENT_TOKEN
stored token = PARENT_TOKEN
mint call count = 0
P and C remain distinct harness pagesThat is a correctly functioning get-or-create operation and an incorrect per-page uniqueness assumption. It is the concrete sessionStorage tab ID collision this article is designed to diagnose.
Count the mint calls rather than assuming a new value
The mint counter is necessary because observing PARENT_TOKEN alone cannot tell you whether the policy reused a copied value or minted the same literal by accident. The deterministic factory makes the branch inspectable: an inherited existing value means the mint branch should never execute.
The fixture literal CHILD_TOKEN is a deterministic test input, not a claim about production randomness, entropy, or collision resistance. This laboratory does not prove any production generator globally unique.
A useful adjacent analogy is DOM clone identity and event bindings: copied surface state and application identity are different questions. That article tests a DOM-specific boundary; it does not supply authority for session storage and none of its listener experiments need to be reproduced here.
The repair should therefore target the intended lifetime. If inherited workflow state is desirable, preserve it. If the token is supposed to identify the newly created page session, control the opening path or explicitly replace that particular identifier according to application policy. Do not regenerate every stored key indiscriminately.
9. Test a no-opener creation policy explicitly
S08 tests a controlled creation policy rather than trying to clean up the opener afterward.
Create a fresh context, seed P, and configure its button to execute:
window.open(childURL, "_blank", "noopener");The HTML navigation API algorithm parses the noopener feature while choosing the target and specifies that a new no-opener result causes window.open() to return null. MDN’s window.open() documentation likewise explains that noopener removes access through Window.opener and produces a null return.
Pre-arm context.expect_page() exactly as in S02. Then wait for the observed child’s passive ready state.
S08: EXPECTED / NOT EXECUTED
new child observed by context = true
open-return-is-null = true
C.openerPresent = false
C.marker = null
C.token = nullOnly after that initial evidence should the child policy run. With the deterministic factory containing CHILD_TOKEN:
getOrCreateToken() returns CHILD_TOKEN
C.token = CHILD_TOKEN
mint count = 1This qualifies the controlled window.open(..., "_blank", "noopener") path used by the fixture. It does not establish how every browser UI command, extension, framework abstraction, duplicated tab, or unrelated navigation path behaves.
A null return can accompany a real new tab
This is the key S08 observability rule. In the normative algorithm, creation/navigation can occur and the algorithm can then return null for a no-opener destination. Therefore:
window.open(...) === nullis not sufficient evidence that a popup was blocked or that no child exists.
The pass condition requires both sides of the observation:
parent open-return-is-null == true
AND
context observed a new Page
AND
child reached fixture readiness
AND
child readback shows opener == null
AND
owned initial keys == nullA missing expect_page() event or timeout is HOLD, never “PASS because storage was absent.” That rule prevents the test from confusing failure to observe a child with successful no-copy creation.
10. Sever the opener after creation and inspect the retained copy
S10 answers a subtle but important policy question: does clearing the opener reference after creation erase storage that was copied because an opener existed during creation?
Start with a fresh S02. Capture the initial child readback first:
C.openerPresent = true
C.marker = P0
C.token = PARENT_TOKENOnly then execute:
window.opener = null;The HTML opener setter says that assigning null clears the browsing context’s opener reference. Its algorithm does not specify a session-storage reset, deletion, or re-clone operation. That is different from S08, where opener policy participates in how the new destination is created.
S10: DERIVED EXPECTATION / NOT EXECUTED
before setter:
opener = present
marker = P0
token = PARENT_TOKEN
after window.opener = null:
opener = null
marker = P0
token = PARENT_TOKENThis case must be described precisely. The retained storage is a derived expectation from two separate algorithms: creation with non-null opener triggers the clone, while the later setter clears the opener reference and says nothing about resetting storage. It is not a quoted platform guarantee that “setting opener to null preserves storage,” and no observed browser result is provided here.
The operational lesson is still strong: creation policy and later reference removal are not equivalent evidence. If the application’s requirement is “the child must not inherit the parent’s supposedly page-specific token,” preventing opener-based inheritance on the controlled creation path is conceptually earlier and easier to verify than severing the relationship after the initial state has already been assigned.
A real execution that diverges from the derived oracle should be preserved with browser provenance rather than rewritten to fit the article.
11. Use document-lifetime identity only when that lifetime fits
S09 deliberately separates two identifiers that applications often collapse: persistent page-session state and current-document ownership.
Create a fresh opener-positive S02 pair. Keep the copied stored token untouched:
P.token = PARENT_TOKEN
C.token = PARENT_TOKENNow let the runner assign document-scoped fixture identities from a separate deterministic factory:
function documentIdentityFactory(label) {
let generation = 0;
return () => ${label}/doc${++generation};
}The harness uses separate factories/counters for P and C. For the first ready documents, record:
P document identity = P/doc1
C document identity = C/doc1Use that identity only for operations whose lifetime is intentionally the current document. The design resembles the ownership question in request ownership before UI writes: before mutating an interface, determine which currently valid owner is allowed to perform the write. That article concerns asynchronous request races, not session storage, and those races are outside this laboratory.
Reload C, wait for the new document’s passive ready state, and allocate the next document identity:
C document identity = C/doc2
C stored token = PARENT_TOKEN
P stored token = PARENT_TOKENS09: EXPECTED / NOT EXECUTED
Property | Before reload | After C reload |
P document identity | P/doc1 | P/doc1 |
C document identity | C/doc1 | C/doc2 |
P token | PARENT_TOKEN | PARENT_TOKEN |
C token | PARENT_TOKEN | PARENT_TOKEN |
The document identity disappears with the document by design; the session token can survive because it belongs to a different lifetime. MDN documents session-storage survival across reloads, supporting that latter expectation.
This strategy is appropriate only when the operation you are protecting is document-scoped, for example, “only the currently bootstrapped document may commit this in-memory UI transition.” It is not a durable tab identity. The deterministic factory validates routing and lifecycle handling; it does not prove production uniqueness.
12. Reconcile all ten cases into a reviewable evidence ledger
The final artifact should be raw enough for an engineer to inspect and strict enough for an independent verifier to reject incomplete evidence. Use JSON Lines or an equivalent append-only record per page/readback phase. Preserve observations even when they contradict the expected oracle.
The minimum record schema is:
{
"run": "UNSET",
"fixtureRevision": "UNSET",
"browserBuild": "UNSET",
"operatingSystem": "UNSET",
"pythonVersion": "UNSET",
"playwrightVersion": "UNSET",
"origin": "http://127.0.0.1:8765",
"case": "S02",
"pageLabel": "C",
"documentGeneration": "C/doc1",
"openingMode": "window.open blank opener-positive",
"returnIsNull": false,
"openerPresent": true,
"marker": "P0",
"token": "PARENTTOKEN",
"mintCount": 0,
"expected": true,
"actual": null,
"executionStatus": "NOT EXECUTED",
"verdict": "EXPECTED_ONLY"
}The ledger below is an oracle, not captured evidence:
run | fixture revision | browser build | case | page label | document generation | opening mode | return-is-null | opener presence | marker/token values | mint counts | expected/actual | verdict |
UNSET | UNSET | UNSET | S01 | P/C | doc1 | independent same-context page | n/a | C:false | P=P0/PARENT_TOKEN; C=null/null | 0 | EXPECTED / NOT EXECUTED | EXPECTED_ONLY |
UNSET | UNSET | UNSET | S02 | P/C | doc1 | opener-positive _blank | false expected | C:true | both=P0/PARENT_TOKEN | 0 | EXPECTED / NOT EXECUTED | EXPECTED_ONLY |
UNSET | UNSET | UNSET | S03 | P/C | doc1 | fresh S02 + P writes P1 | false expected | C:true | P=P1/PARENT_TOKEN; C=P0/PARENT_TOKEN | 0 | EXPECTED / NOT EXECUTED | EXPECTED_ONLY |
UNSET | UNSET | UNSET | S04 | P/C | doc1 | fresh S02 + C writes C1 | false expected | C:true | P=P0/PARENT_TOKEN; C=C1/PARENT_TOKEN | 0 | EXPECTED / NOT EXECUTED | EXPECTED_ONLY |
UNSET | UNSET | UNSET | S05 | P/C | doc1 | fresh S02 + P removes marker | false expected | C:true | P=null/PARENT_TOKEN; C=P0/PARENT_TOKEN | 0 | EXPECTED / NOT EXECUTED | EXPECTED_ONLY |
UNSET | UNSET | UNSET | S06 | P/C | P/doc1,C/doc1→doc2 | fresh S02 + C write/reload | false expected | C:true | P=P0/PARENT_TOKEN; C=C1/PARENT_TOKEN | 0 | EXPECTED / NOT EXECUTED | EXPECTED_ONLY |
UNSET | UNSET | UNSET | S07 | P/C | doc1 | fresh S02 + get-or-create | false expected | C:true | both token=PARENT_TOKEN | 0 | EXPECTED / NOT EXECUTED | POLICY_FAILURE_EXPECTED |
UNSET | UNSET | UNSET | S08 | P/C | doc1 | _blank,noopener | true expected | C:false | P seeded; C initially=null/null, then token=CHILD_TOKEN | 1 | EXPECTED / NOT EXECUTED | EXPECTED_ONLY |
UNSET | UNSET | UNSET | S09 | P/C | P/doc1,C/doc1→doc2 | opener-positive + document IDs | false expected | C:true | token remains PARENT_TOKEN | doc-ID counter separate | EXPECTED / NOT EXECUTED | EXPECTED_ONLY |
UNSET | UNSET | UNSET | S10 | P/C | doc1 | fresh S02 + opener=null | false expected | true→false | C remains=P0/PARENT_TOKEN | 0 | DERIVED / NOT EXECUTED | EXPECTED_ONLY |
Reject missing child evidence and false passing summaries
The verifier should be stricter than the prose report. It must require exactly one independent case identity for S01 through S10, reject duplicates, require every readback phase prescribed by that case, and treat timeout/missing page/missing generation as HOLD.
REQUIRED = {f"S{i:02d}" for i in range(1, 11)}
def verify(records):
cases = [r["case"] for r in records if r["recordType"] == "case-summary"]
if set(cases) != REQUIRED:
return "HOLD: missing or unexpected case"
if len(cases) != len(set(cases)):
return "HOLD: duplicate case"
baselines = {
(r["browserBuild"], r["operatingSystem"],
r["pythonVersion"], r["playwrightVersion"])
for r in records if r["executionStatus"] == "EXECUTED"
}
if len(baselines) > 1:
return "HOLD: mixed baseline"
for r in records:
if r.get("timeout") or r.get("missingChild"):
return "HOLD: incomplete child evidence"
if r.get("pageLabel") not in {"P", "C", None}:
return "HOLD: contradictory page identity"
return compare_every_required_readback_to_literal_oracle(records)The verifier must not transform S07’s reproduced collision into application acceptance. A case can pass the diagnostic oracle (“yes, two distinct pages inherited the same token”) while proving that the application’s claimed page-unique identity policy needs repair.
Expected-only records remain visibly NOT EXECUTED; no chart, summary, or CI badge should turn them into observed browser evidence.
13. Choose a repair, recovery action, and operational owner
The laboratory exists to support a design decision, not merely to demonstrate an interesting storage edge case.
Decision | Use when | Required action |
ACCEPT_BOUNDED | The opening path and chosen lifetime are explicitly qualified and the shared initial value is intentional or irrelevant | Document the boundary; keep regression evidence for that opening mode |
REPAIR_IDENTITY | A sessionStorage value is assumed to be unique per newly opened page but can arrive copied from an opener | Change the identity policy, controlled opening policy, or both; retest with a new run ID |
HOLD | Child is missing, timeout occurs, opener state is unexpected, provenance is incomplete, or actual values contradict the oracle | Preserve raw evidence; repair only the owned fixture or investigate implementation behavior |
PRESERVE_SESSION_DATA | The value deliberately identifies inherited work or page-session state rather than the current document | Keep the copied value; introduce a separate identity only for operations requiring another lifetime |
For a controlled page-opening path where inheritance is unwanted, S08 supplies the clearest policy test: create the destination with noopener, observe the new page at context level, verify window.opener === null, and inspect owned storage before the get-or-create function runs. The window-opening algorithm’s null return must be reconciled with page creation rather than treated as a standalone popup result.
Where inherited session state is meaningful, preserve it. Do not “fix tab identity” by deleting every session key. Instead introduce an identity with the lifetime actually needed. If that lifetime is the current document, S09’s document factory demonstrates the application contract, while remaining explicit that reload changes the identifier.
The frontend policy owner should own the lifetime definition, opening policy, and repair semantics. The QA evidence reviewer should own execution provenance, case completeness, raw-readback preservation, and oracle verification. Neither role should accept a missing child as evidence of empty child storage.
If an actual run diverges, retain the evidence file, runner output, fixture revision, and environment metadata. Rebuild or repair only the disposable fixture if needed; do not clear production or user state. Then execute the same case again under a new run ID so the repair cannot overwrite the original evidence.
14. Build the JavaScript foundations behind a defensible state policy
A defensible browser-state policy starts by naming ownership and lifetime before naming an API. This laboratory’s expected oracle separates opener-time session copying, later independent mutation, reload persistence, creation-time no-opener policy, and document-instance identity. The platform sources support those boundaries, but they do not establish a universal persistent “tab identity” primitive, and this unexecuted laboratory does not qualify any particular browser build.
The practical rule is narrower: preserve session data when inheritance is intentional; prevent opener-based inheritance on opening paths you control when a copied value would violate the identity contract; or assign a separate document-lifetime identity when operations belong only to the current document. Then test that contract with independently identified pages and explicit readbacks.
Refonte Learning’s FrontEnd Developer Program lists a four-month schedule at 10–12 hours per week, with basic programming knowledge expected and HTML/CSS familiarity described as a plus. Its published curriculum includes HTML5, CSS3, JavaScript, React, Redux, API/AJAX integration, Git, responsive design, accessibility, performance, and a capstone; its admission section also addresses learners working toward a bachelor’s or higher degree. Readers who want to strengthen those JavaScript and application-development foundations can review the program and ask Refonte directly whether specialized subjects such as opener-copy testing, sessionStorage identity design, or Playwright-based browser laboratories are included.
Final execution status: NO BROWSER LAB RUN. S01–S10 above are EXPECTED / NOT EXECUTED; browser build, OS, Python version, Playwright version, run ID, and fixture revision remain UNSET until a provenance-bearing execution occurs.
