Skip to content

sminos: the desk's snapshot goes at once (desk open-fast M1-M5, 1.2.7) - #301

Merged
SSFSKIM merged 29 commits into
mainfrom
desk-open-fast-m5fix
Oct 20, 2026
Merged

SSFSKIM merged 29 commits into
mainfrom
desk-open-fast-m5fix

Conversation

@SSFSKIM

@SSFSKIM SSFSKIM commented Oct 20, 2026

Copy link
Copy Markdown
Owner

Milestones M1–M5 of the desk open-fast spec (docs/doperpowers/specs/2026-10-20-desk-open-fast-design.md), with the legacy-bridge fix. M6–M9 continue on desk-open-fast.

  • M1: the open line in daemon.log is stamped at the subscribe's arrival. The DX4 reference consumer (sminos/tests/dx4_consumer.py) and its fixture name six kinds of loss.
  • M2: the instruments (bench_open.py, bench_rig.py, pause_proxy.py, bench_scale.py opens). A run without its evidence reports complete: false and exits 3.
  • M5: the snapshot goes at once, and a notice's row is due at its step's end. A named block stays in the bridge's snapshot state, carrying its uuid, until its row lands.
  • Legacy bridges: the plane serves the no-wait snapshot only to a bridge whose snapshot line declares namedBlocks: true, which takes a new child and a new mod. Any other bridge keeps the pre-M5 cut wait. Bridges started before the roll keep running in live sessions until they reload, and in --bg jobs until those end.

Open times measured through the local hub at load 6–8:

open before after
mid-message 2–2.6 s 16–23 ms
right after a prompt 0.28–0.53 s 21–24 ms
long answer, opened at +1 s and +7 s the subscription died at about 5 s snapshot in 13–21 ms; it survives a 13–17 s message

The merge waits on two conditions. The desk web that keeps a carried block across a reconnect (MAWS #86) is deployed, as of 10:54Z. The owner has to confirm that every open desk client (each browser tab and each PWA window) is refreshed onto it. A client left on the old web loses a carried block on reconnect once this is live.

sminos 1.2.7.

Sminos-Session: smns-erb-71#b4948247 (doperpowers on macbook)

The living spec for the machine side of the desk's open path: the snapshot
served without waiting for the cut's row (named blocks ride in streaming
until their rows land), the uplink's two sender lanes with persistent
connections so the pump never waits on a POST, the build saved across
daemon restarts and warmed for live sessions with the look off the open
path, the open line stamped at the frame's arrival, the child's first
respawn without delay, and a resync kept under the engine's 4 MB. Six
milestones with their proofs and instruments; no hub change (the hub
holds a POST for the machine's own replies, not the browser's); the
15-minute re-hello 503 flagged for the owner.

Sminos-Session: smns-erb-71#b4948247 (doperpowers on macbook)
The hub's reply chain is shared across connections and carries the
browser's subscribe, so the sender lanes alone isolate nothing there: a
hub milestone decouples it (a POST waits for its own replies, two chains
per stream, a bounded write; no storage change). A notice's row is due at
its step's end, not its notice, so a long answer no longer ends a
subscription. The warmer is bounded (a background queue behind foreground
jobs, one job per transcript, two at a time, no look warming). The web
keeps a block the fresh snapshot carries across a reconnect (a web
milestone, with a parity fixture shared with a new reference consumer and
inventory). Acceptance is end to end through the real uplink and the
local hub, N kept as a diagnostic; the stand-in speaks HTTP/1.1 and the
sender logs its connections so reuse is proven; a pause proxy reproduces
a blocked chain through the real pair. Nine milestones, two in MAWS.

Sminos-Session: smns-erb-71#b4948247 (doperpowers on macbook)
The hub counts an owed reply only when it resolves written: an offline
stops the POST as failed without counting the frame, so a timed-out hello
never moves the uplink's marks (D1). The child's resync merge keeps a
uuid-bearing block (D2). Rollout: open desk clients keep their loaded
streaming layer, so the owner refreshes or relaunches them onto the M3 web
before M5 rolls, and a web rollback under a live M5 brings the block loss
back (D3). The pair proof's steps are ordered and observed, one 4 s pause
under the local hub's silence bound (X1). Extending the live launcher
(headless, thinking, model) is part of M2, and a thinking scenario counts
an open only inside the thinking-to-text window the probe saw (X2).

Sminos-Session: smns-erb-71#b4948247 (doperpowers on macbook)
Sminos-Session: smns-erb-71#b4948247 (doperpowers on macbook)
…hes, the 503 diagnosis)

Sminos-Session: smns-erb-71#b4948247 (doperpowers on macbook)
…t the 503)

Sminos-Session: smns-erb-71#b4948247 (doperpowers on macbook)
…he reference DX4 consumer, the fixtures

The plane's open line now reads from the subscribe frame's arrival at the
uplink's reader (Link.received through Plane.subscribe) and says where the
time went: when the bridge's snapshot reached its reader and when the open
took it, how the build came (cold or warm), its CPU on the worker and rows,
whether the cut's row was on disk, how many builds waited. OPEN_WAIT still
counts from the subscribe call; nothing else of the open changes.

The instruments every later proof reads:
- dx4_consumer.py: the web's streaming layer and row holding, with §9's
  carried-block rule, recording gaps, duplicates, watermark breaches, text
  that differs from its row, vanished blocks, messages after end; and the
  inventory (holes, partial, vanished, dups) from the transcript and the
  DX5 events. It replaces the plane suite's Browser.
- dx4-stream.json (written by dx4-stream.gen.py, every drawing by hand): nine
  named sequences, §9's list and planted errors, with the store-side keys a
  replay of the web's layer alone needs; M3 copies it to the web.
- hub_standin.py on HTTP/1.1: `conn` on each POST record, `at` on each
  session message.
- pause_proxy.py: pauses the hub's stream to the uplink on its first
  `events` frame (or now) for a stated time, other connections passing.

Sminos-Session: smns-erb-71#b4948247 (doperpowers on macbook)
Sminos-Session: smns-erb-71#b4948247 (doperpowers on macbook)
Sminos-Session: smns-erb-71#b4948247 (doperpowers on macbook)
…ks, page dups, truncated tool tails, a waiting open's builds

- The inventory accounts from the source to the drawing: an own-loop block
  that streamed, whose row arrived live, never drawn before it, is
  `undrawn` when the view followed its request and `residual` (§2's
  accepted hole: the snapshot between a step's end and its rows' flush)
  when it never did. Planted in dx4-stream.json.
- A page holding a row twice is held once and recorded as a dup; a page's
  marks apply to the rows it newly holds, as desk-transcript's `older` does.
- A truncated tool block is compared as the tail of its row's input
  serializations, not parsed as JSON; a fixture sequence settles truncated
  text and tool blocks.
- An open that ends waiting for its cut says its builds: each "waiting"
  answer carries how, cpu_ms and rows; the line gives the first's kind,
  their CPU together, the last's rows. Pinned.
- The inventory raises on a transcript it cannot read; one not written yet
  is empty.

Sminos-Session: smns-erb-71#b4948247 (doperpowers on macbook)
…e's evidence, tool tails checked against what streamed

A block whose row came live undrawn is residual only when the source shows
its request's step ended before the subscription's snapshot; otherwise
undrawn (a whole request left out of DX4 is planted). A truncated tool
call's tail is checked by the inventory as a suffix of the input as it
streamed, formatted JSON included; the consumer no longer guesses
serializations. The residual plant's chunk typo fixed.

Sminos-Session: smns-erb-71#b4948247 (doperpowers on macbook)
…ence keyed to its subscription

A DX5 snapshot event names the DX4 sub it served; residual holds only when
that subscription's own snapshot falls after the request's step end, and no
association reads undrawn. The ordinal match is gone. Both reconnect cases
planted: a loss before a reconnect (undrawn) and a residual after an
attempt that ended before its snapshot (residual).

Sminos-Session: smns-erb-71#b4948247 (doperpowers on macbook)
Sminos-Session: smns-erb-71#b4948247 (doperpowers on macbook)
…h 1.2.4)

Sminos-Session: smns-erb-71#b4948247 (doperpowers on macbook)
…wn text)

Sminos-Session: smns-erb-71#b4948247 (doperpowers on macbook)
Sminos-Session: smns-erb-71#b4948247 (doperpowers on macbook)
…nch_scale.py opens

bench_open.py measures an open end to end (E: a browser client's subscribe
to its receipt of the snapshot) through this checkout's uplink and the hub's
own code on a local runtime (--hub local --maws), or the stand-in; the
session fake_session's scripted one, an isolated headless live one (--live,
--thinking), or a synthetic transcript; scenarios idle, after-prompt,
mid-message and long-answer (counted only inside the thinking-to-end
window), kill, restart and held (the pause proxy between the uplink and the
hub). Each open runs through the reference consumer and the inventory, the
bridge's snapshot line for each subscription placed among the session's
events from a tee in the uplink's bootstrap. --micro times one
Subscription's phases in-process (N_micro). bench_scale.py opens measures E
at scale across a restart.

Live.start_session gains headless, thinking and model; ws_client stamps each
frame's arrival; the pause proxy reads the stream's body through chunked
framing (the local hub's runtime cuts a frame's JSON across chunks, so the
proxy never paused there).

sminos 1.2.5.

Sminos-Session: smns-erb-71#b4948247 (doperpowers on macbook)
…member; the kill's re-subscribes said

A `claude -p` run is no member of its project unless the host that spawned
it marks it (SMNS_MEMBER, as MAWS marks its sessions): Live.start_session's
headless branch writes the mark, this process's pid, into the env file, so
the uplink serves the session at all. bench_open's `kill` line carries each
re-subscribe the kill took, when it went, its snapshot and its outcome.

Sminos-Session: smns-erb-71#b4948247 (doperpowers on macbook)
…ch_rig.py, apart

bench_open.py had grown to the hubs, their browser clients, the sessions,
the machine and its uplink's bootstrap beside the opens and their figures.
The rig moves to bench_rig.py (its own `_uplink` entry, the tee and its
reader beside it); bench_open.py keeps what it reads and decides, the
opens, the scenarios and the micro-benchmark; bench_scale.py opens takes
the stand-in's browser and the transcript shape from the rig. No change in
what either measures.

Sminos-Session: smns-erb-71#b4948247 (doperpowers on macbook)
Sminos-Session: smns-erb-71#b4948247 (doperpowers on macbook)
Sminos-Session: smns-erb-71#b4948247 (doperpowers on macbook)
Sminos-Session: smns-erb-71#b4948247 (doperpowers on macbook)
…they did not earn

A run that lacks the evidence a figure stands on now says so: the summary's
"complete": false with each reason, exit status 3.

- long-answer counts a trial only with a 12 s window (A2), and a run with
  fewer counted trials than asked is incomplete; --long-words sets the story.
- The re-subscribe drains the predecessor in order, unsubscribes, then hands
  the drawing on; only an unsolicited end is an end before the step's.
- The live probe records its subscriptions and failed attempts; probe_gaps
  says each reconnect whole or lost, and a counted open on a lost gap is
  `source: incomplete`. A snapshot is placed by its next event's key only:
  no timestamp placement, so no `residual` without ordering evidence.
- held: every step observed in order (snapshot, chunk, arm, uploads 200,
  `paused` seen, `resumed`), and a hello on the uplink's own generation sent
  straight to the hub proves a hub write blocked behind the pause (answered
  after the resume) or the run is incomplete. 4m does not block on the local
  hub, 16m does: the default is 16m.
- The pause proxy keeps a census of every passing request by its start, its
  generation and client, its answer or its connection closed unanswered;
  held grades the uplink's POSTs from it, each waited on to its outcome.
- The rig, bench_scale's stand-in and the Instruments fixture own each
  process from its spawn (addClassCleanup), proved by injected failures.
- The tee enqueues a key and the reader's own stamp after the plane's put,
  written by a thread of its own.
- bench_scale's +0.5 s moment is sampled only if the stream is ready then,
  else said missing; every sample carries its send offset.

Sminos-Session: smns-erb-71#b4948247 (doperpowers on macbook)
…ence (M2 review)

Sminos-Session: smns-erb-71#b4948247 (doperpowers on macbook)
… late probe or a census that missed a request

- probe_gaps: a latest stream closed with no successor's snapshot is an
  unfinished gap (`to` None), lost until one is read; a stream that ended
  before its snapshot counts as an attempt.
- held: the probe counts only if it was sent while the pause stood, seen
  still unanswered while it stood, and answered 200 only after the resume
  (probe_blocked); a probe that misses the window makes the run incomplete.
  Its `have` is the machine's whole vector, the upload counted in.
- pause_proxy: a request enters the census the moment its head is read,
  before the bytes that could complete it are forwarded, its frame kinds
  filled in as its body arrives — an outstanding POST on a stalled
  connection is in it, and no answer is matched ahead of its request.

Sminos-Session: smns-erb-71#b4948247 (doperpowers on macbook)
Sminos-Session: smns-erb-71#b4948247 (doperpowers on macbook)
… is due at its step's end

A block stays in the bridge's streaming after its block-row, carrying uuid
and namedAt, until its step ends: in the mod's state and resync, and in the
child's snapshot. The child's resync merge keeps a named copy, still drops a
stale unnamed copy of a settled block (D2).

The plane's build never answers "waiting": a cut not on disk makes every row
on disk history. The snapshot keeps a named block of its own loop whose row
is not on disk (dropping one whose row is in history), sends its block-row
right after the snapshot, and awaits its row as a notice of its step; another
loop's named block is kept and its block-row relayed. A noticed row is due
NOTICE_WAIT after the end of its loop's step open at the notice (step end or
turn complete), or after the notice with none open. The cut's own row, not
on disk at the snapshot, is awaited too (released as it lands) and forgotten
past its due.

The reference consumer keeps the drawn text of a carried block the old
subscription had named (spec §9 as M3 amended it), with a fixture sequence
that tells the two readings apart; the bridge_order consumer and the fake
endpoint take the same rules; the DX5 plan gets its dated amendment lines.

sminos 1.2.6.

Sminos-Session: smns-erb-71#b4948247 (doperpowers on macbook)
Sminos-Session: smns-erb-71#b4948247 (doperpowers on macbook)
… bridge that declares it keeps named blocks

Upgrading the uplink does not upgrade the bridges already running: the
autoreload waits for the main turn's end, and --bg sessions never reload.
A bridge from before M5 drops a block at its block-row, so its snapshot
can name an unflushed cut without carrying the block, and M5's no-wait
open served that hole: a fresh open lacked the finished blocks until the
message ended, and an empty-history reconnect dropped text it had drawn.

The mod's resync now says namedBlocks: true; the child takes it from each
resync and says it in its snapshot, so the field is true only when both
the child and the mod that last resynced it keep named blocks. The plane
takes the no-wait open only from such a snapshot. Every other bridge gets
the cut wait from before M5: "waiting" builds, asked again on each pump
(no wake, so no spin), up to NOTICE_WAIT after the bridge's snapshot,
then a discontinuity. The step-end deadline holds for both.

Tests: a scripted bridge from before M5 (FakeSession.legacy) against the
new plane and the reference consumer: a fresh open has no hole, an
empty-history reconnect drops nothing, a cut with no transcript yet
waits; the declaring path is pinned in the existing cut test. In
bridge_order.py: the snapshot says namedBlocks as the last resync
declared it, and the reference Consumer waits for the cut when it does
not. DX5 plan amended; sminos 1.2.7.

Sminos-Session: smns-erb-71#b4948247 (doperpowers on macbook)
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-20T14:17:28.245582Z ba3816d PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@SSFSKIM
SSFSKIM merged commit ff012ef into main Oct 20, 2026
10 checks passed
SSFSKIM added a commit that referenced this pull request Oct 20, 2026
…ady held, the branch stays 1.2.15

Sminos-Session: smns-erb-71#b4948247 (doperpowers on macbook)
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.

1 participant