Skip to content

Make website sessions traceable without status churn - #510

Merged
max-sixty merged 6 commits into
mainfrom
codex/session-observability
Sep 9, 2026
Merged

max-sixty merged 6 commits into
mainfrom
codex/session-observability

Conversation

@max-sixty

Copy link
Copy Markdown
Owner

Repeated Codex progress notifications could rewrite status.json without 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.

This was written by Codex on behalf of @max-sixty

@leaf-agent leaf-agent left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

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.

Comment thread skills/leaf/assets/runtime/banner.js Resolved

@leaf-agent leaf-agent left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

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.

@max-sixty
max-sixty merged commit 9f33796 into main Sep 9, 2026
7 checks passed
@max-sixty
max-sixty deleted the codex/session-observability branch September 9, 2026 16:03
leaf-agent added a commit that referenced this pull request Oct 27, 2026
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]>
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