Skip to content

Question sheet C4a: the local page (M1 to M4), served only under its switch - #886

Merged
SSFSKIM merged 79 commits into
masterfrom
question-sheet-c4
Nov 28, 2026
Merged

SSFSKIM merged 79 commits into
masterfrom
question-sheet-c4

Conversation

@SSFSKIM

@SSFSKIM SSFSKIM commented Nov 27, 2026 •

Copy link
Copy Markdown
Owner

Part of #869 (the first of C4's two landings; C4b, M5, follows after this merges, so this does not close the ticket).

The question sheet's local page, landing C4a: milestones M1 to M4 of docs/doperpowers/plans/2026-11-24-question-sheet-c4-local-page.md, a child (C4) of docs/doperpowers/specs/2026-11-23-question-sheet-design.md. Nothing here is served unless MAWS_SHEET_PAGE=1. SHEET_PAGE_DEFAULT_ON is false, every test launcher forces the switch off, and a mawsd without the switch behaves as master's does. The page serves only sessions that have a record under the sminos home, and it changes no session's question tool.

  • M1, the page server: who is let in. src/mawsd/sheet-page/ is mawsd's own part, outside the spine.

    • Listening: Node HTTP servers on 127.0.0.1 and ::1, both or neither, with their deadlines, header-count and connection limits enforced.
    • The three checks: Host on everything, Origin on every write and on the live connection, the credential on everything that reads or changes a sheet. They run over rawHeaders in a fixed order.
    • Headers: every response carries the standing headers (rule 3, plus frame-ancestors 'none'), Node's own answers included.
    • Pairing: a typed code of 40 bits, 5 minutes, works once. Browser credentials are stored hashed with a proof key, revoked in two moments.
    • The server's proof (T28): the live connection opens with the tab's nonce and the server's MAC, before the tab sends its credential.
    • The wire: daemon.sheetPair, daemon.sheetBrowsers and daemon.sheetUnpair, graded internal, and mawsd sheet pair|browsers|unpair.
  • M2, the page's shell. apps/sheet-page is built with Vite into out/sheet-page/.

    • Shipping: the Mac archive and the Linux pack carry it. A pack refuses a tree without it unless given --no-page.
    • In the browser: the pairing screen, the frame, Unpair, and the live client's opening and proof. A tab sends its credential only to a server it has proven, and only the credential that connection proved.
    • The suite: a new gate group, e2e:sheet-page, on the Linux pool. It runs a real mawsd with a real Chromium, an impostor on the port, and a second origin.
  • M3, sheets through the page server, and the registration.

    • Data: C3's service is reached in process through the spine root. It has routes for read, put (every line by: 'page'), body (plain text or a raster type only, rule 4) and upload.
    • The live connection: a snapshot and then each change, with holds, and with a generation that a spine loss ends.
    • The registration (X4): <sminos home>/sheet/surfaces/<name>.json, rewritten every 10 s through the exclusive no-follow writer, removed at a clean stop, and never able to hold the stop.
    • The discovery wake: it now waits for the index's holders to be folded, through a second signal that only mawsd's wake awaits; tellApplied() and the app's path are untouched.
    • The merge: C3's first landing (Question sheet C3a: the pin, the model, the service and the components (board #868) #879) is merged under the branch; WIRE_MINOR 66.
  • M4, the overview and the sheet on the page.

    • The views: C3's SheetOverview and SessionSheet in the page's frame, and the outline (F9).
    • Freshness: the page reads the model again at every ready before Send can be pressed.
    • The memory (T19): one localStorage entry a thing. Reconcile is written only against a fresh model, compare-and-set per entry, so two tabs never undo each other.
    • Sends: a Send's identity is its press, and the 35-second rule goes through unavailable.
    • The chunk gate (T28): every lazy chunk loads only while the tab's connection is proven, and is self-contained, so no fetch follows it past the gate.
    • C3's code: the only change is two attributes on SessionSheet's full-density markup (data-sheet-scroll, data-sheet-foot), which the composite's writer records as X5 additions.
  • The branch review's fix wave (high rung, fifteen findings, sorted by the composite's writer): eleven fixed, four shipped with, and the relay stated as a limit.

    • The server:
      • S1: each static file's bytes are held once.
      • S2: a response its peer stops taking is ended after 10 s, which frees its slot.
      • S3: a write checks its pairing again just before its mutation.
      • S4: a remote daemon.status drops the page's address.
      • S5: the holders are refreshed every 30 s while a page is open.
      • S6: the proof's MAC covers the page's origin.
    • The page:
      • B1: reconcile's removals are judged against the raw stored memory as of the read's start.
      • B3: no write goes out on a model that is not fresh, and every end of the connection makes it so.
      • B4: Unpair acts on the pairing on screen, under one deadline.
      • B5: a proven connection's revocation resets the store.
      • B6: storage running out undoes nothing durable, and a Send is put only once it is stored.

Validation Evidence

  • The landing's gates on its head 94b4b7e10, which holds master 556aacb78, merged at 0af793d49; master's new commits change only the composite spec. Command: scripts/ci-gate.sh <worktree> --gates static,unit,probes,e2e:sheet-page,e2e:transcript,e2e:desk-web,e2e:supervisor-daemon,e2e:daemon-unit,e2e:lane-a, run 46109622459.
    • Every job passed (static, static-local, unit 1/4 to 4/4, probes, e2e:sheet-page, e2e:transcript, e2e:desk-web, e2e:supervisor-daemon, e2e:daemon-unit, e2e:lane-a, e2e:cross-build) except e2e:lane-a's mini copy.
    • On the mini copy, four cases timed out at e2e/lane-a.spec.ts:174 waiting for a session's holder (Received: "none").
    • The one rerun (run 46112252135) was red the same way: two cases, the same timeout.
    • That red is the base's. The control run of plain master d697dfaa0 fails e2e:lane-a with the same Received: "none" (run 46098389523). This branch changes nothing lane A drives.
    • Before rounds 5 and 6, the same set ran on e5fbeb6f6 (run 46095423341). It was green except lane-a's mini copy, which timed out waiting for a session's holder, as plain master does on the mini (run 46098389523); the one rerun was green (run 46103310167).
    • The same set was green on 9b37f1b5e (run 46092529981), and before the branch review on 9b8f10c21 (run 46074066415).
  • The fix wave's tests: each item has a test that failed before its fix and passes after (the item and its test, red run included, are in the plan's report). Its task review was clean after four rounds. A bounded high re-check of the whole wave then found five defects in its own fixes, which rounds 5 and 6 fixed. Static, unit, probes and e2e:sheet-page were green on every round's head (runs 46084125759, 46087517733, 46089416172, 46091346905, 46106672834, 46108541406).
    • S1: src/mawsd/sheet-page/static.test.ts, "holds each file's bytes once…"
    • S2: src/mawsd/sheet-page/serve.test.ts, "a response that makes no write progress (S2)"
    • S3: src/mawsd/sheet-page/sheets.test.ts, "a write whose body finishes after the browser was unpaired (S3)"
    • S4: src/shared/ipc/schema/daemon.test.ts, and src/mawsd/process-sheet-page.test.ts, "give a remote caller of daemon.status a listening page without its address"
    • S5: src/mawsd/sheet-page/sheets.test.ts, "the holders kept fresh while a page is open (S5)"
    • S6: src/mawsd/sheet-page/pairing.test.ts, apps/sheet-page/src/proof.test.ts and live.test.ts, the cases for the MAC of another origin
    • B1: apps/sheet-page/src/memory.test.ts, the removal judged against the read-start baseline (a late event, and a same-content rewrite), and store.test.ts
    • B3: apps/sheet-page/src/host.test.ts and page-live.test.ts, "holds a card action kept from before a lost connection, after the new socket's proof and before its paired"
    • B4: apps/sheet-page/src/proven-fetch.test.ts, "Unpair acts on the pairing the screen shows…", and api.test.ts, "keeps its deadline while a refusal's body is read"
    • B5: apps/sheet-page/src/page-live.test.ts, "lets go of the store when the proven server unpairs the browser…", and live.test.ts
    • The re-check's five, round 5:
      • A refused write after eviction: memory.test.ts, the press refused after eviction, where the other session's draft survives.
      • An Unpair heard late: unpair.test.ts, pairingStored, where the removal event clears the held memory even after another tab paired again.
      • A held failure: memory.test.ts, where a held failure goes once its stored press is gone or replaced.
      • Large JSON: src/mawsd/sheet-page/serve.test.ts, where a slow reader of a 12 MiB model gets all of it.
      • A joined refresh: src/mawsd/sheet-page/sheets.test.ts, where an explicit list that joins a quiet refresh is answered ready.
    • Round 6: memory.test.ts. Another tab's rewrite of an evicted draft stands through the rollback, and one restore that throws does not skip the rest.
    • B6: apps/sheet-page/src/memory.test.ts, which holds an edit past ENTRY_KEPT_MAX with no store call, lets a later durable write win, and stores a valid Send past the cap durably, plus apps/sheet-page/src/views/no-room.test.tsx: a press storage refuses sends nothing, and the draft stands
  • Each milestone's gates, on its reviewed head:
    • M1: class 1a green on 015aedc45 (run 45393061801); e2e:supervisor-daemon, e2e:daemon-unit and e2e:lane-a green there (run 45395661843).
    • M2: static, unit, probes and e2e:sheet-page green on 62fb12100 (run 45416302873). Every M1 and M2 gate was green together on 8833313df (run 45420269641).
    • M3: static, unit, probes and e2e:sheet-page green on 386eff67e (run 45464842931); e2e:lane-a and e2e:supervisor-daemon green on 9bfdf1980 (run 45457079959).
    • M4: static, unit, probes and e2e:sheet-page green on 8f3cc9091 (run 46071441809); e2e:transcript and e2e:desk-web green on 75dafdc22 (run 46044016943).
  • Every task review is clean, after 3, 2, 2 and 4 fix rounds. Each fix carries a test that failed on the code before it. The reports' evidence is summarized in docs/doperpowers/plans/2026-11-24-question-sheet-c4-local-page.report.md.
  • Refusals are requests that were sent and seen refused. Each refusal the four rules name is a request actually sent:
    • by Node clients that write any header (src/mawsd/process-sheet-page*.test.ts, src/mawsd/sheet-page/*.test.ts);
    • and by a real browser from a second origin, judged from the wire status CDP reports and from the record's files (apps/sheet-page/e2e/strangers.spec.ts, markdown.spec.ts).
  • An impostor on the port gets nothing (apps/sheet-page/e2e/impostor.spec.ts, chunks.spec.ts). In each of its five plays it hears hellos only: no credential, no Authorization header, and no chunk request. A marker script it serves never runs.
  • M1's Concrete Steps by hand, on a scratch profile and a private port: every line answered as the document's transcript says (task-1 report).
  • Flakes not of this branch:
    • run 46044016943 failed two unit shards, each on one test in a file this branch does not touch (engine-host prestart cleanup, an org-recovery timing bound). The unit rerun of the same commit was green (run 46048377325);
    • run 45411518792 failed static on the Go session-host test TestExitIsTerminalForOutput, on a commit that touches no Go file. Its rerun was green (run 45414473116).
  • Not checked here: the live terminal session, Safari and Firefox, and the owner's eye on the built look are M5's (C4b). Pictures of the built page are with the composite's writer, outside the repository.

Unresolved Review Findings

Shipped with from the branch review, by the composite's writer's sort; each is a row in docs/tech-debt-tracker.md:

  • apps/sheet-page/src/memory.ts (updateMemory): before a tab has heard of another tab's Send, it can start a fresh Send of the same draft. The tool refuses the second as already answered, so the person sees a note at worst.
  • apps/sheet-page/src/chunk-gate.ts (load): a chunk that loaded only on a retry (?again=1) is asked for again by its original URL by its next importer. A new language's highlighting then waits for another reconnect, and the code stays readable as plain text.
  • src/services/index/source.ts, the fold of the registry's holders: it reports success even when its index transaction failed. What is shown is then at most 30 s stale.
  • src/mawsd/sheet-page/registration.ts (writeRegistration): the heartbeat replaces the registration synchronously, with an fsync, every 10 s. That matters only with the sminos home on a slow volume.

A stated limit, by the owner's ruling (ship with it; board ticket 887): the relay. The proof shows that the paired mawsd answered the tab's nonce, not that it holds the tab's connection. So a program of another account that took the port while mawsd was not listening can relay the hello to the real mawsd and receive the credential. S6 narrows this to a relay aimed at the same origin. Closing it needs a sealed channel or the port held by launchd (the plan's T28).

Dismissed in the fix wave's task review, with the reasons in the plan's §J and §P:

  • src/mawsd/sheet-page/respond.ts and serve.ts: progress is judged per 64 KiB slice, so a peer that takes less than that in 10 s is ended, a rate no browser on loopback meets. The views copy nothing.
  • src/mawsd/sheet-page/handler.ts (S5): through the discovery wake's cache the effective period is up to about a minute, and a failed quiet refresh says nothing; the client's own list retry covers it (T15).
  • apps/sheet-page/src/host.ts (B3): an image upload is still allowed while the model is not fresh, since T17 lets a draft's image be written before a Send names it.

A stated limit, in the plan's §P: eviction's rollback is not a transaction across tabs, any more than writeReconciled is. An entry is restored only where nothing was written under its key since, so a tab that reads in between sees it gone for that moment, and an entry another tab deliberately removed in that moment comes back.

Minor, left by the fix wave's last round:

  • apps/sheet-page/src/views/SheetView.tsx (the note slot, about L107): "no room" for a refused press takes the slot ahead of "too long to keep" for a draft held in the tab. When both apply, only the first shows. Both need a browser's storage to be full, and the press's note clears at the next stored press.

Deferred, dismissed or accepted by the milestones' task reviews, each with where it is and why it was left:

  • src/mawsd/sheet-page/serve.ts (the stop, about L407): the comment calls the 500 ms timer a bound on the registration's removal. It is a shared budget that the removal's synchronous work draws on; it cannot interrupt a stalled filesystem call. The comment overstates; the behavior is as intended.
  • src/mawsd/sheet-page/serve.test.ts (the FIFO case, about L409): if the blocking open came back, the test would hang its worker rather than fail fast. A subprocess with a parent-enforced timeout would make the regression fail promptly. The case passes today, and its red run was seen.
  • apps/sheet-page/src/memory.ts (writeReconciled): the per-entry compare-and-set is two localStorage calls, not one atomic step across browser processes. The review found no sequence a person can produce in that window. It is recorded as a limit in the plan's §P.
  • src/mawsd/sheet-page/static.ts (dismissed): the bundle table follows a linked bundle root and serves a file replaced after indexing. Only the same user can write that directory, which §8.2 does not defend against, and no link inside it is followed.
  • src/mawsd/sheet-page/serve.ts (accepted): an Expect header is answered 417 before the Host check. The body is a constant, so it tells a requester nothing.
  • src/mawsd/process-sheet-page-sheets.test.ts (dismissed): a change reaches the page within 5 s in the test, not M3's "within a second". The service's fallback poll is 2 s, and a sub-second bound flakes on CI.

Residue

  • C3's waiting map keeps a refused press's callback. When the page refuses a press for want of storage, the prepared callback stays in src/renderer/src/sheet/attempts.ts's map with the lines it captured, until that session's next launched Send or a reload. The fix belongs to C3: drop the entry when a host refuses the press. This child leaves C3's components as they landed.

  • The gate's coverage advisor follows imports, not build entries. scripts/ci-gate-e2e-specs.mjs advises e2e:sheet-page only for a change to a module the page's suite imports at run time (src/mawsd/sheet-page/headers.ts). A change to handler.ts, pairing.ts or checks.ts is not advised, because the suite runs the built mawsd. The Electron groups share the limit. Closing it means teaching the advisor to follow build entries.

  • Two flaky tests outside this branch reddened its gates once each (named under Validation Evidence): TestExitIsTerminalForOutput in the Go session host, and the engine-host prestart cleanup and org-recovery timing unit tests. Worth a ticket if they recur.

Sminos-Session: question-sheet-design#23738737 (MAWS on macbook)

The child's plan for mawsd's page server (the three checks, the pairing, the
registration), the page as a workspace app built the way desk-web is, the
browser suite as a gate group of its own, and five milestones in two landings:
M1 and M2 wait on no upstream, M3 and M4 on C3's first landing, M5 on C2.G2.
The page's own look is a proposal with eight questions for the owner. Entries
for the composite's writer, and for C2's and C3's authors, are its last section.

Sminos-Session: question-sheet-design#23738737 (MAWS on macbook)
…fused from the raw headers

Node's parsed headers keep one of a repeated Host and drop the rest, so the
checks read rawHeaders; the plan had the parser refusing it.

Sminos-Session: question-sheet-design#23738737 (MAWS on macbook)
Sminos-Session: question-sheet-design#23738737 (MAWS on macbook)
…lings and the upstream answers

The review of 2026-11-24 found twelve things; all are repaired.
1  A tab proves the server before it sends its credential (T28, the composite
   writer's ruling): the live connection opens with the tab's nonce, mawsd
   answers with a MAC keyed by a key both derived at the exchange, and no
   request carries the credential unless the tab's proven connection is open.
   What remains is stated in the ruling's terms. The opening moves to M1 and
   its client to M2; /api/whoami is gone.
2  Node's HTTP server owns the two listeners (T1), so its deadlines run; the
   chunk is deferred behind them.
3  More than 64 headers is a 431 before any check reads one.
4  A revocation is answered as done only once the browsers' file was replaced
   (T10); a failed replace is said, and tried again.
5  The memory is stored one entry a thing (T19): a draft a question, an entry
   a Send, written as differences.
6  The shown session is read again at every snapshot before Send.
7  Test launchers force the page off (T2).
8  A pack is strict by default, with --no-page for the two partial-build
   callers (T23).
9  A stranger's write in a browser is judged from the wire and the record's
   files; Node's own answers carry the headers.
10 The rig seeds the engine's store for running and stopped, and a snapshot
   waits for the daemon's discovery (T29).
11 M5's steps check the eight ids and the project log, refuse only after an
   answered request, and stop the daemon last.
12 routes.json is regenerated by its own test.
The look: five matters and three corrections settled by the composite's
writer (F1 to F8); four questions stay with the owner. C3 took the seven
requests and C2 the three; the composite's writer the thirteen entries.

Sminos-Session: question-sheet-design#23738737 (MAWS on macbook)
…nt stated

Sminos-Session: question-sheet-design#23738737 (MAWS on macbook)
…e server (M1 pre-flight)

Sminos-Session: question-sheet-design#23738737 (MAWS on macbook)
The sheet's local page server, the first entrance of mawsd a browser can
reach (docs/doperpowers/plans/2026-11-24-question-sheet-c4-local-page.md,
M1; §J to §M): two HTTP listeners on 127.0.0.1 and ::1 (both or neither),
served by the default daemon once turned on and by any other only under
MAWS_SHEET_PAGE=1, started after the daemon serves and never in its way.

- The three checks (checks.ts), pure and in §L's fixed order over the raw
  headers: the count, Host, the route, Origin, the credential.
- Pairing (pairing.ts): the one-time code, the credential, the browsers'
  file (hash and proof key, 0600), a revocation's two moments, and the
  server's proof on the live connection before any credential is sent.
- The bundle's table (static.ts), the standing headers on every answer
  (Node's own among them), Node's deadlines checked every second, the
  connection and live-connection bounds.
- daemon.sheetPair, daemon.sheetBrowsers, daemon.sheetUnpair (internal),
  daemon.status.sheetPage; mawsd sheet pair|browsers|unpair; the wire
  moves to minor 63 and its pinned files are regenerated.
- launchEnvironment forces the page off for every test launcher.

Sminos-Session: question-sheet-design#23738737 (MAWS on macbook)
…obal (lint)

Sminos-Session: question-sheet-design#23738737 (MAWS on macbook)
…utline (F9)

The two-pane layout is dropped; M2 and M4 no longer wait on the owner;
M5 sets the default on once its live checks pass.

Sminos-Session: question-sheet-design#23738737 (MAWS on macbook)
Sminos-Session: question-sheet-design#23738737 (MAWS on macbook)
…d revocations, live revocation, malformed codes

- No serving on the first listener while the second bind is pending; stop
  closes provisional listeners; the handler reads the port when it needs it.
- An aborted body is terminal: no state change, no response; clientError
  writes nothing once headers are sent.
- browsers and unpair read and change the browsers' file in every state but
  stopped; a revocation with nothing left to remove still tries the owed write.
- The 17th pairing closes the dropped browser's sockets (4403) once saved;
  an expired credential's live connection closes 4403 at the next ping.
- A malformed code is a wrong try (403, left decrements), not a 500.
- Origin compared exactly; a fixed log sentence for an unparsable file.
- Refusal evidence: foreign-Origin unpair, expired and evicted credentials
  over HTTP and live, the three daemon.sheet* commands refused to a remote
  caller, the six headers from literals on every response.
- remote-bench forces MAWS_SHEET_PAGE=0 and drops MAWS_SHEET_PORT.

Sminos-Session: question-sheet-design#23738737 (MAWS on macbook)
…ing, an unreadable browsers' file is surfaced

- pair, browsers and unpair read the state again once the chunk loaded: a
  stop that came meanwhile gets no code minted and no file written.
- Only ENOENT reads as no browsers. Any other read failure is its error's
  code: nobody is paired, nothing replaces the file, `sheet browsers` and
  `sheet unpair` exit 1 naming the code (never the path), and the file is
  read again at each command until it can be. daemon.sheetBrowsers gains
  `why` (an optional output field, within the branch's unreleased minor 63;
  the manifest regenerated from the base's 62).
- check and seen share one helper for expiry, the last-seen grain and its
  replace.
- The raw-socket helper's header assertions reject its promise instead of
  throwing uncaught.

Sminos-Session: question-sheet-design#23738737 (MAWS on macbook)
… hello heals an unreadable file, an unread unpair says so

- daemon.status's browser count reads no file: memory alone, null while the
  browsers' file could not be read (or before the handler loaded).
- A live hello's proof reads an unreadable file again, as a credential's
  check does, so a reconnecting tab pairs once the file reads again with no
  command in between.
- An unpair against an unreadable file answers `unread` (an optional field
  of daemon.sheetUnpair, within the branch's minor 63), and `sheet unpair`
  says nothing was unpaired instead of the failed-save sentence.

Sminos-Session: question-sheet-design#23738737 (MAWS on macbook)
Sminos-Session: question-sheet-design#23738737 (MAWS on macbook)
apps/sheet-page, a workspace app built with Vite into out/sheet-page: the
pairing screen and the frame (the bar, the column, the menu's Unpair, the
outline's button drawn and inert until M4). The live connection's client
proves the server before it sends its credential (T28), with a fresh nonce
per socket and @noble/hashes; api.ts makes no request that carries the
credential unless that connection is proven at the moment it is asked; a
refusal deletes nothing (T19). The rig starts the built mawsd as a process
over scratch directories on a port the system picks; the browser suite
proves the pairing, an impostor on the port in five parts, a stranger on a
second origin (judged from the browser's own network events) and a rebound
name. The page joins the build, the typecheck, the unit projects, the lint
rules, the tokens guard and the one-locale rule.

Sminos-Session: question-sheet-design#23738737 (MAWS on macbook)
The Linux pack builds and carries out/sheet-page and refuses a tree without
it unless --no-page (pack({ page: false })), which pack-chunks.test.ts and
the bench's head bundle pass: they pack what a main-only or an e2e build
made. A mawsd run from a pack without the page reads no-bundle. The gate
gains e2e:sheet-page on the Linux pool beside desk-web, with its
Playwright Chromium installed; the lists' pins follow.

Sminos-Session: question-sheet-design#23738737 (MAWS on macbook)
…, Unpair says what became of it

- live.ts: proven() answers the pairing the open socket proved, and only while storage still holds it; when storage
  holds another, the socket closes and the next one proves what is stored. api.ts sends that pairing's credential only,
  so an old proof never authorizes a new credential (T28). A storage listener in App follows another tab's change.
- Unpair keeps the local deletion and tells three outcomes apart on the pairing screen: confirmed, not saved
  (mawsd refuses it but could not save that), forgotten here only (T10). Two strings of this child's own in copy.ts.
- impostor.spec: recovery is proven by mawsd's own count of paired connections after the restart; a draft-shaped key
  survives every play beside the credential.
- rig.ts: the enforced env after options.env; a failed first start stops and removes its scratch.
- The coverage advisor reads an app e2e script with several leading build steps; the page's rig takes its origin from
  the page server's headers module, so a change there is advised to reach e2e:sheet-page.

Sminos-Session: question-sheet-design#23738737 (MAWS on macbook)
…s known; recovery waits on the fresh daemon alone

- copy.ts: not saved now says the old pairing may be accepted again on a restart before a save (this browser's own
  credential is gone); forgotten here says the browser forgot its pairing and MAWS did not confirm the removal, and
  points to mawsd sheet browsers, then mawsd sheet unpair <id>, without claiming MAWS still lists it.
- impostor.spec: no zero count right after the restart, which the tab's own retry can race; the positive wait stays.

Sminos-Session: question-sheet-design#23738737 (MAWS on macbook)
Sminos-Session: question-sheet-design#23738737 (MAWS on macbook)
Sminos-Session: question-sheet-design#23738737 (MAWS on macbook)
C3's sheet namespace takes WIRE_MINOR to 65 on master; this branch's daemon.sheetPair,
daemon.sheetBrowsers, daemon.sheetUnpair and daemon.status's sheetPage sit on top of it at 66
(a stand-in at 63 before this merge). The manifest and the fingerprint are regenerated by
pnpm wire:manifest, routes.json by routes.test.ts under MAWS_ROUTES_WRITE=1.

Sminos-Session: question-sheet-design#23738737 (MAWS on macbook)
The service answers its own refusals; upload and body speak base64 and
uploads/<name>; every memory change is an update applied to what is
stored now; drafts keep their identity across entries; the 35-second
rule goes through unavailable; T22 came built with C3; the foot is
SessionSheet's own and spans the column.

Sminos-Session: question-sheet-design#23738737 (MAWS on macbook)
… the 35-second sentence and the refused link

Sminos-Session: question-sheet-design#23738737 (MAWS on macbook)
…ation

The page server reaches C3's sheet service in process through the spine's root
(sheet-page/sheets.ts: SheetAccess, SheetsUnavailable, sheetsOf). The sheet's four
routes sit behind the three checks (checks.ts; sheet-routes.ts): a read and a body
need the credential and refuse only a foreign Origin, a put and an upload need the
page's Origin too. A put stamps by: 'page' on every line and adds no check of its
own; a body goes out as plain text or one of four raster types, gone as 404; an
upload is held to 5 MiB and handed to the service as base64. The service's own
refusals pass through as 200, and a spine that cannot be had is 503 with its reason.

A paired live connection holds the daemon (a standing hold), and each snapshot
takes the hold, the service, the discovery wake, the subscription to
sheet.changed, and only then the list, so a change during the list follows the
snapshot. A spine that leaves loaded is said as unavailable on a connection that
stays. A request for data holds the daemon while it is answered.

While listening, the page registers itself under the sminos home
(sheet-page/registration.ts), at once and every ten seconds from the page
server's own timer, by replace at 0600 in 0700 directories, refusing a linked
sheet/ or surfaces/ and making nothing where the home is absent; a stop removes
a file that still names this pid.

The node clients of the process suites move to test/support/sheet-page-client.ts.
The test of T29's first snapshot reading a held session live is skipped: the
index tells the discovery wake its pass is applied before it folds the
registry's holders (task 3's report).

Sminos-Session: question-sheet-design#23738737 (MAWS on macbook)
…(T29)

The index tells `applied` at the scan's answer, before the same sync's
registry read folds the holders, so a read the discovery wake answered
listed a session a terminal holds as stopped until the next change.
`applied` keeps its moment. The index source adds a second signal, the
holders folded, told once a generation at the end of the sync's registry
read (a failed read counts). Only mawsd's discovery wake awaits it, and
it waits for both within its own bound and give-up. The page's first
snapshot now reads the held session running. Nothing the app waits on
moves.

Sminos-Session: question-sheet-design#23738737 (MAWS on macbook)
…he registration's confinement, one generation

- A loss of the spine moves the connection's generation on: a snapshot
  begun before it sends neither its ready nor what it held, and no change
  goes out until a fresh ready.
- A request whose client left while the handler loaded is answered
  nothing and takes no hold; readBody answers 'aborted' at once for a
  request already gone, so no hold waits on events that came before it
  listened.
- The registration is written through the shared writer (exclusive,
  no-follow temporary, 0600, rename). Its removal keeps the write's
  confinement: it follows no link at sheet/ or surfaces/, makes nothing,
  and removes only a regular file naming this pid. A reader on another
  thread proves no partial file is ever seen.
- The discovery wake hears a pass only when both signals come in one
  generation of the index. A failed registry read ends the wait
  unheard: the reads answer, the park is asked, nothing is cached as
  fresh. `applied` and the app's path are untouched.
- A chunked upload past 5 MiB with no declared length is 413.

Sminos-Session: question-sheet-design#23738737 (MAWS on macbook)
…olds the stop

The removal at a stop is best effort: a home whose permissions changed
under mawsd is logged by its code, and the stop goes on. The file is
opened without blocking and without following a link, so a FIFO or a
directory at its name is left as it stands. STOP_MS now bounds the stop
with the removal inside it. The wake's comment and a test pin a failed
registry read before `applied`: it ends the wake only once `applied`
comes in that generation, and the bound and give-up govern otherwise.

Sminos-Session: question-sheet-design#23738737 (MAWS on macbook)
Sminos-Session: question-sheet-design#23738737 (MAWS on macbook)
The live connection's snapshots and changes feed a store that reads the model of the
session on screen again at every snapshot; the surface's memory is kept one entry a
thing in the page's storage; the page's SheetHost; the overview, a session's sheet
widened by its two new attributes, the band, the tab's count and the outline (F9).

Sminos-Session: question-sheet-design#23738737 (MAWS on macbook)
…he sheet

The rig seeds records of the pin, terminal sessions held and not, and names C3's
stand-in door; specs for the overview (A.b, A.g), the sheet (A.c, A.i, the page's
half of Acceptance 1 to 6), a sheet changed while away, two tabs, the page while
MAWS is not reachable, strangers at a sheet's data, an agent's text and bytes, the
sheet's width and the outline. The workspace's code is loaded again at the next
proven connection when mawsd went while it loaded, a Send cut off by the page's
own going settles nothing, and zod is told not to probe for eval.

Sminos-Session: question-sheet-design#23738737 (MAWS on macbook)
Sminos-Session: question-sheet-design#23738737 (MAWS on macbook)
The MAC a tab checks now covers the origin the daemon serves, and the tab
checks it against its own location.origin, so a proof made by a mawsd on
one port is worth nothing to a tab on another (plan §L).

Sminos-Session: question-sheet-design#23738737 (MAWS on macbook)
The local-only walker recursed only into a ZodObject, and sheetPage is an
optional object, so a remote caller of grade list got sheetPage.url. The
walker now unwraps optional and nullable wrappers; tested on the redacted
status of a listening daemon.

Sminos-Session: question-sheet-design#23738737 (MAWS on macbook)
…equest (S1)

Each admitted request started its own whole-file readFile, and pipelined
requests on one socket start many before a write applies backpressure, so
the connection cap did not bound the buffers. The bundle is immutable for
the daemon's life: each file is read once at its first use (single-flight)
and every response sends that one buffer.

Sminos-Session: question-sheet-design#23738737 (MAWS on macbook)
…on (S3)

A put or an upload was authorized at its headers and applied once its body
arrived. It now asks again, immediately before the service is handed the
lines or the image, whether the credential is still a paired browser's: a
body that finishes after mawsd sheet unpair is refused 401, and the door or
the upload does not run.

Sminos-Session: question-sheet-design#23738737 (MAWS on macbook)
…sh (S2, S5)

S2: Node's deadlines end when a request is complete, so a response a client
stopped reading held its slot. A connection with bytes queued that its peer
took none of for stallMs (10 s) is now ended; bodies are written in 64 KiB
views of the one buffer, so a peer that reads, however slowly, drains between
them.

S5: no sheet.changed is announced when a terminal session exits or resumes.
While a paired live connection is open, every refreshMs (30 s, the discovery
wake's freshness) each ready connection gets a quiet snapshot, discovery
brought up to date and the snapshot sent only when it differs from what that
connection was last told; nothing runs with no paired connection.

Sminos-Session: question-sheet-design#23738737 (MAWS on macbook)
…B4, B5, B6)

B1: the store hears the shown session's memory from its show on, so another
tab's write while the first read is out unsettles that read; the view's own
subscription goes.
B3: the page's host refuses every inbox write (Send, Dismiss, Take back)
while the model on screen is not fresh; editing a draft stays possible.
B4: Unpair starts the revocation, then forgets the pairing being removed at
once (only while it is the one stored); the answer, bounded at 10 s, only
says whether mawsd confirmed it.
B5: a pairing that ends or changes resets the store and drops its reads
still out; reconnects of one pairing keep it.
B6: an entry that cannot fit even with every evictable entry gone evicts
nothing (what was dropped to try is put back) and is held in the tab alone;
the sheet says once at its head that the answer is too long to keep if the
page reloads.

Sminos-Session: question-sheet-design#23738737 (MAWS on macbook)
Sminos-Session: question-sheet-design#23738737 (MAWS on macbook)
…, B3, B4, B5, B6)

B1: each read takes the stored memory before it leaves; reconcile's removals
are judged against that baseline, so another tab's write whose notification
comes after the answer is never pruned by the older model.
B3: unavailable holds the model unfresh until the read after the next
snapshot (store.stale), wired through page-live.ts.
B4: Unpair acts on the pairing the screen shows (unpairScreen); it revokes
only while the live proof is that pairing's, and one deadline covers the
whole answer, a refusal's body included.
B5: a 4401 or 4403 on a socket whose proof matched resets the store (live's
onRevoked); a disconnect or an unproven refusal keeps it.
B6: an entry past ENTRY_KEPT_MAX (256 Ki characters) is held in the tab
without any store call; below it eviction runs as before; the put-back is
gone, and a held entry never hides a later durable write.

Sminos-Session: question-sheet-design#23738737 (MAWS on macbook)
… Outcomes)

Sminos-Session: question-sheet-design#23738737 (MAWS on macbook)
B3: any end of the live connection (a loss, a refusal, unavailable, a tab
letting its connection go) holds the model unfresh, kept on screen, so a card
action kept from before cannot pass between a new socket's proof and its
paired.
B6: ENTRY_KEPT_MAX caps drafts only; a Send is never capped and is durable
before its put. A full store evicts only when the evictable entries' sizes,
with the entry being replaced, cover the new entry; otherwise nothing is
removed and the edit is held in the tab.
B1: a removal is judged against the raw stored entry as it was when the
read started (readBaseline), touchedAt included, so a draft rewritten with
the same content after it is never pruned.

Sminos-Session: question-sheet-design#23738737 (MAWS on macbook)
Sminos-Session: question-sheet-design#23738737 (MAWS on macbook)
…, round 4)

A press whose Send entry the browser's storage will not keep, after eviction or
because eviction is sure not to make room, is no longer held in the window: the
update is written nothing of (no act, no Send), the press is not owned, so C3's
sheet has no Send to launch and no put leaves. The draft stays as it was. The
sheet says SEND.noRoom in its note slot. Drafts keep their hold; a settle keeps
its hold too, its put having left with its keys already stored. A Send's
eviction spares its own session's entries, the drafts its press was made of
among them.

Sminos-Session: question-sheet-design#23738737 (MAWS on macbook)
Sminos-Session: question-sheet-design#23738737 (MAWS on macbook)
Sminos-Session: question-sheet-design#23738737 (MAWS on macbook)
Sminos-Session: question-sheet-design#23738737 (MAWS on macbook)
… held Sends retired, JSON sliced, joined refresh answered)

- memory.ts: what eviction gave up for a write the store still refuses is put
  back, so a refused press loses no other session's draft.
- unpair.ts/App.tsx: another tab's Unpair, heard as the credential key's removal,
  forgets this tab's held memory even when a newer pairing is stored by then
  (pairingStored); the tab still follows the pairing stored now.
- memory.ts: a Send held in this window stands only over its own stored press;
  with the entry gone or another press's, the hold goes.
- handler.ts: JSON answers are written in slices through sendBytes, so a large
  model read by a slow reader is never taken for a stalled connection.
- handler.ts: an explicit list that joins an in-flight quiet refresh is answered
  with ready whatever the refresh finds.

Sminos-Session: question-sheet-design#23738737 (MAWS on macbook)
Sminos-Session: question-sheet-design#23738737 (MAWS on macbook)
…te since, each on its own (B6, round 6)

An evicted entry is restored only while storage holds nothing under its key, so
another tab's newer write stands; each restore is tried on its own and a failed
one does not skip the rest.

Sminos-Session: question-sheet-design#23738737 (MAWS on macbook)
Sminos-Session: question-sheet-design#23738737 (MAWS on macbook)
Sminos-Session: question-sheet-design#23738737 (MAWS on macbook)
Sminos-Session: question-sheet-design#23738737 (MAWS on macbook)
…t holder)

Sminos-Session: question-sheet-design#23738737 (MAWS on macbook)
@SSFSKIM
SSFSKIM merged commit 6762ba8 into master Nov 28, 2026
@SSFSKIM

SSFSKIM commented Nov 28, 2026

Copy link
Copy Markdown
Owner Author

Landed master-first as 6762ba8 (parents 2f39f56, f5c92e4). Class 1a 46168517307 green on the merged tree (which adds master's transcript e2e change); the branch's run 46157729476 green on every primary job at the head. Mini copies not waited for while the mini's fseventsd is degraded (#891). Branch and worktree kept for C4b.

Sminos-Session: master-landing-architect#37052769 (MAWS on macbook)

SSFSKIM added a commit that referenced this pull request Nov 28, 2026
…ce (verified, ready)

Master's #886 builds a SheetService stand-in in src/mawsd/sheet-page/sheets.test.ts;
this branch adds two members to the interface (verified: the model last verified,
for the attention items; ready: the first scan's announcement). The merge of
master 6762ba8 (the landing architect's, 83ee4b0) therefore failed typecheck
on the merged tree. The page reads a model through read and list, which wait for
the first scan inside the service, so its stand-in answers null and a settled
promise.

Sminos-Session: question-sheet-design#23738737 (MAWS on macbook)
SSFSKIM added a commit that referenced this pull request Nov 28, 2026
…'s MAWS side dispatched

C3's second landing is master 1844b56 and C4's first is 6762ba8, both on
2026-11-28. C3's Status, C4's Status, Progress and the Tracking Map say so,
with each landing's reviews and what ships with it.

Taken from C3's execution document and its branch review's fix wave: X5 gains
the card root's focus outline (the writer's ruling of 2026-11-27, as built)
and SheetService's two new members, which a stand-in must carry (the two
landings met on exactly that in the merged tree); section 8.1 gains that a
held sheet keeps a read, stopped session's Overview card, that the daemon's
first scan makes no notice, and that an archived session's questions are no
items. C5's Status: M3 to M6 dispatched.

Sminos-Session: question-sheet-design#23738737 (MAWS 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