Repository navigation
Make website sessions traceable without status churn - #510
Conversation
leaf-agent
left a comment
There was a problem hiding this comment.
blob6 gives leaf_website_events a durable per-reader join key, three lines under the sentence that says the data point omits session cookies. The reference is not the cookie and cannot authenticate one — but it is a deterministic function of it and stable for that cookie's whole lifetime, so every accepted event a reader makes, across every page and every day, now joins on a single value. That is a different property from the one the omits sentence is asserting, and this README is where the site's data handling is documented, so it reads as if the dataset still carries no per-reader linkage. Worth saying explicitly beside the list rather than leaving it to be inferred from the lookup query below it.
One inline comment on where the banner mounts the handle.
leaf-agent
left a comment
There was a problem hiding this comment.
AbortSignal.timeout bounds the whole read, but only fetch sits inside the guard that turns a lost request into the offline answer. Where the deadline lands after the response headers, the page reports a broken state and asks the reader to reload instead of reconnecting. Detail and a proposed shape inline.
Reset can interrupt a sample's `/api/state` body after fetch has received its headers but before the child departs. `readState` classified that transport failure as a broken reading because only its own timeout signal made body failures count as offline. It now reads the body inside the transport boundary and parses the completed text outside it: interrupted delivery retries as offline, while malformed JSON still reaches the error boundary. This extends #510's body-timeout handling without changing its read bounds or malformed-state diagnostics. The original media journey reproduced the reported teardown error on main; temporary instrumentation identified the failing body as the old sample allocation's `/api/state`, before its departure events. That journey passes with the fix and is unchanged. A deterministic stream-error regression fails before the fix and passes after it, alongside its malformed-JSON control. The existing timeout browser test now intercepts the text-reading boundary. Validation: the media journey and three startup response cases pass; all 674 runtime tests pass; the browser build passes. A served startup comparison against current main reached upgrade and initial state presentation with 35 requests in each arm and no console errors. JavaScript response bytes changed from 2,058,169 to 2,058,161; total recorded bytes changed from 2,604,907 to 2,605,078. Closes #4252 — automated triage --------- Co-authored-by: leaf-agent <[email protected]>
Repeated Codex progress notifications could rewrite
status.jsonwithout changing what the reader saw. Each write woke the browser, and the browser opened another state read even when a prior read was still pending. This change suppresses identical activity and reply snapshots, preserves the 200 ms cadence for new text, coalesces browser reads behind one active request, and bounds a stalled read at ten seconds.The website now gives each private reader session a public 12-digit support reference. It is hidden in the banner's existing overflow menu, copies on click, appears in Analytics Engine and the reply Workflow id, and cannot authenticate a session. The Worker documentation includes the lookup query and the read-only Cloudflare token scope for dispatched agents.
Tested with the 974-test Python suite, Worker typecheck and 59 Worker tests, the local website boundary, a responsive browser sweep, and a context-blind copy task.