Skip to content

Prestart: a new chat's engine starts at the first keystroke (#851) - #880

Merged
SSFSKIM merged 54 commits into
masterfrom
ux-wave/prestart-engine
Nov 24, 2026
Merged

SSFSKIM merged 54 commits into
masterfrom
ux-wave/prestart-engine

Conversation

@SSFSKIM

@SSFSKIM SSFSKIM commented Nov 24, 2026

Copy link
Copy Markdown
Owner

A new chat's engine now starts when the person types the first key in its composer, not when they press Send. The engine's boot, its SessionStart hooks and its initialize used to come after Send, about 2.2 s of a 4 to 5 s first reply. Now they run while the person types, and Send hands the prompt to an engine that has already initialized. With a stub engine whose initialize takes 2 s, Send to the first drawn row dropped from 2289 ms to 181 ms, the median of 5 paired runs on one Mac. On the pinned engine itself, with three 200 ms SessionStart hooks, it dropped from 813 ms to 288 ms. Nothing new appears before Send: no sidebar row, no Overview card, no channel entry, no desk listing, and no tokens spent.

  • Spine, src/services/sessions/prestart.ts:
    • session.intent.prestart runs Send's own guards (judgeIntent) and builds the spec and key with Send's own functions. It writes nothing.
    • Each request carries a token the window mints and an epoch that the spine fences. A discard or a Send holds a per-draft fence. Host calls run one at a time per draft, and a generation is scoped to the host link that issued it.
    • Any patch except the draft text asks again. Anything that differs at Send means a fresh launch (relaunch only; no control-protocol path).
    • Send passes adopt, and only to a host that lists the capability.
  • Engine host, src/engine-host/prestart-host.ts, prestart.ts: the prestart is an uncommitted, hidden row.
    • Nothing leaves the host before commit: no status, events, listing, surface or catalogue, and nothing on disk except the session host's roster mark. Journal rows are staged in memory, capped at 1 MiB.
    • At most one prestart runs per host. It ends on withdraw, discard, its owner's release, its connection's loss, a host restart, the idle release or the budget.
    • Commit happens inside session.launch: staged files are written, the native session host's acknowledged promote follows, then the reveal.
    • If the outcome of a promotion is unknown, the launch is retired: its holder is stopped and confirmed gone before anything is rolled back. That keeps every launch recoverable by a successor.
  • Native session host: launch takes a prestart mark. New promote and discard messages. A marked holder ends its child when its writer is lost, and a successor discards it and removes its staged files. Prebuilds are rebuilt with Go 1.25.3.
  • Endpoint: a sminos member whose engine is still hidden is held. It gets no handed-off mark, no audience, no project presence and no listing until it is committed; at ended it is dropped. The listing appears from Send on, both on the hub and on a direct desk read.
  • Renderer: the composer asks on the person's first edit, never on a load or a restore, and then at most every 10 s, only while the chat starts on this machine. Picking another machine withdraws the request.
  • Wire: WIRE_MINOR 64, adding the capability engine.prestart.
    • Commands: session.intent.prestart and its withdraw; session.prestart, its withdraw and its release; engine.prestarts; engine.relayHealth.cached.
    • session.launch gains adopt.
    • The event engine.prestart, main-only and the endpoint's alone.
  • Not included:
    • A spawn to another machine, a fork, a side thread, a new worktree, and a draft held at a trust card don't prestart.
    • The prewarmed spare pool (claim_session) stays deferred.
    • Only one prestart runs per machine.
    • The person's SessionStart hooks run at the first keystroke, and again at each relaunch.
    • A Send whose commit fails stops the hidden engine before it launches fresh: about 9 s at worst, inside the 10 s deadline. A sminos member first seen while the engine host is away is held closed for up to 10 s.
    • Known limits 1 to 13 of docs/doperpowers/plans/2026-11-24-prestart-engine.md list the rest. Among them: sminos keeps a member for an abandoned draft; settings the engine reads itself (hooks) aren't part of the adoption key; a late adoption after a host crash isn't listed on the desk until the endpoint restarts; MAWS_QUESTION_SHEET (Question sheet C5: sessions MAWS runs take the sheet, beside ask #870) must take the spec's session id once it lands.

Gates at 755c585 (master 5fc0bb8 merged in):

  • class 1a 45418791532, green (unit 1/4 rerun once: a catalog test the branch does not touch, src/main/catalog/index.test.ts, read two icon URLs out of order); desk-web 45418784858, green.
  • Mac: the lines below ran at c60c317, which differs from this head only by the plan's outcomes and a unit test's wait (transport.test.ts), which no Mac line runs.
    • prestart-latency (measured): flag off 2289 ms, flag on 181 ms (median of 5 pairs each), 2109 ms apart against a bound of at least 1500 ms; one engine start per Send.
    • prestart-engine (measured, no bound): the pinned engine 2.1.309 against a Messages stand-in, with three SessionStart hooks: flag off 813 ms, flag on 288 ms, all five flag-on Sends adopted.
    • e2e/prestart.spec.ts (default group): 5 passed.
    • e2e:remote -g "ticket 851": 1 passed.

Reviews:

  • Each milestone (M1 to M5) got a medium review followed by one fix wave: 8, 12, 10, 8 and 9 findings. All were fixed except two endpoint findings, which are logged as Known limits 10 and 11.
  • The xhigh panel over the whole branch found 28, with 4 P1s, all in the promotion and rollback path. 22 are fixed, test-first; 6 are logged in docs/tech-debt-tracker.md, one of them also as Known limit 13.
  • The Mac run of prestart-engine then caught a regression from the panel's fix wave: a cold relay cache was read as a relay that is down, so nothing on the gateway route prestarted. Fixed: a cold cache now judges nothing, and Send's probe judges the relay. The tests were rewritten to that rule and seen failing first.

Closes #851

Sminos-Session: ux-wave#10d85d03 (MAWS on macbook)

Sminos-Session: ux-wave#10d85d03 (MAWS on macbook)
…ssage; the plan takes the architect's answers

Against the scripted Messages API stand-in under a scratch config home: an idle new session
makes no Messages API request and writes no file; set_model and effortLevel sent before the
first message hold for the first turn, so the plan sets model and effort through the control
protocol at Send.

Sminos-Session: ux-wave#10d85d03 (MAWS on macbook)
…review's eleven findings

One durable identity for a prestart; the record as the commit point; the owner reservation
held in the note until commit; one generation per intent registered before any await; every
difference relaunches (no control path); route equivalence on the host's spec; surfaces,
plugins and the desk gated; host-restart retirement; the spawn-target gate; a paired measure
and an acceptance group on the pinned engine.

Sminos-Session: ux-wave#10d85d03 (MAWS on macbook)
… and host-owned

The second review's P1s shared one cause: a durable, half-visible prestart across stores that
commit separately. Revision 3 moves it into the engine host as an uncommitted row: owned by the
spine connection that asked, killed on its end or a host restart, nothing written, nothing
emitted or listed, no surface until commit; commit is session.launch with adopt, inside today's
launch path. Claude Desktop's and Codex's prewarms are cited; both rounds' nineteen findings are
accounted for.

Sminos-Session: ux-wave#10d85d03 (MAWS on macbook)
…e findings folded in

The owner chose to fold them in and build. R4-1..R4-9: the native holder's acknowledged promotion
as the durable commit point and its writer-loss end; the hosted sequence map staged with the
journal; public and internal views of the host's rows with a snapshot at commit; a spine epoch
before admission; Send's reply off the surface attach; the endpoint holding a hidden pin's member;
owner refs per spine root; a stage ceiling; a claimable allow-list. The native holder is M1. The
spare route is recorded as the strongest alternative.

Sminos-Session: ux-wave#10d85d03 (MAWS on macbook)
… its acknowledged promotion

`launch` takes `prestart: true`; the roster entry carries `prestart: true` from the write that first names the session
(the commit writes it before the fork in any case). A new writer-only `promote` rewrites the entry without the mark and
answers `promoted {ok: true}` only once that write succeeded; a failed write answers `ok: false` with its reason and
keeps the mark. A promote on an unmarked or already promoted launch answers ok again; one with no running child (none
yet, or exited) or on a host already exiting is refused. A marked host whose writer is lost (its connection ends with
no pending writer) ends its child through the host's own stop path, then exits; an unmarked host keeps today's
behaviour. Tests through the roster write seam for the failed promotion, the writer's loss, a superseded writer, the
unmarked linger, promote twice, promote after the exit and before the spawn.

Prebuilds rebuilt with Go 1.25.3 (go.version); scripts/check-session-host.sh: 3 of 3 match.

Sminos-Session: ux-wave#10d85d03 (MAWS on macbook)
…'s promote and the successor's rule

The protocol mirror gains `launch`'s `prestart` mark, `promote` and the `promoted` answer's schema; the roster entry's
schema reads an optional `prestart`. The hosted transport takes `prestart` as a launch option (the launch line, and
a reconnect's resent launch, carry it) and exposes `promote()`, which resolves with the host's answer, a refusal when
its connection closes first, or a refusal at its bound (the host start's, 5 s by default); it never rejects, and an
answer that comes after its bound is skipped as owed rather than taken for a later promotion's.

The successor never adopts an entry marked `prestart`: the start records it unattached (so a launch, a forget or a
stop all of its session stops it first), ends its host through its own shutdown (stopHeldHost) and then removes that
launch's journal and host map files, base and rotations, and nothing else; a dead marked host's staged files go with
its other files.

Sminos-Session: ux-wave#10d85d03 (MAWS on macbook)
…and the plan's progress and decisions

The handover and adopter suites call adoptAll with its new `end` (they hold no prestart) and expect the outcome's
`ended`. A promotion refused because the transport's session is over says it may have been handed over as well as
exited. The plan's Progress marks M1 as built, and Decision Log 8 records the points R4-1 left open.

Sminos-Session: ux-wave#10d85d03 (MAWS on macbook)
…estart's entry, decides a discard atomically

From M1's review (findings 1, 2, 3, 4, 5):
- A marked host that exits keeps its roster entry, exited and marked: it alone names the launch's staged files, which
  the successor removes before the entry (1).
- A new writer-only `discard`, answered under the host's lock: still marked, it answers `discarded {marked: true}`,
  closes promotion and admission and ends the child; not marked, `marked: false` and nothing done. A successor attaches
  at the next fence first, so a predecessor's promote still in its socket is refused as fenced (2).
- A writer's loss closes promotion and admission under the lock that sees it (3).
- A prestart's end (writer lost, or discarded) takes the ladder to SIGKILL of the group past the grace; the host's own
  signal keeps today's ladder (4).
- `promote` asks the kernel whether the child was reaped, so a reap not yet recorded is refused (5).
- At its exit the host writes each connection's queued control lines before closing it (bounded at one second), so a
  `discarded` answer is never lost to the exit it causes.

Prebuilds rebuilt with Go 1.25.3 (go.version); scripts/check-session-host.sh: 3 of 3 match.

Sminos-Session: ux-wave#10d85d03 (MAWS on macbook)
…ugh the host, files before the entry

From M1's review (findings 1, 2, 6, 7, 8), the TypeScript side:
- `discardHost` takes a marked host as writer at the next fence and asks `discard`: `discarded` once the host exited,
  `discarding` while it still lives, `promoted` for one whose promotion reached disk (2).
- The successor's end of a marked entry: discard, then the launch's staged files, then the entry once the host is gone;
  one found promoted is adopted as any host; a discard that fails is a counted failure, guarded (1, 2).
- A marked entry naming a session is held at the start, a `ready` one with a commit in flight too; a failed one with no
  child is guarded unattached (6).
- A dead host's cleanup never throws: a marked one's entry goes only after its staged files did, else it stays for the
  next start (1, 7).
- `promote`'s `withinMs` only shortens the host start's bound (8).
The plan's M1 Progress line is updated and Decision Log 9 records the fix wave's decisions.

Sminos-Session: ux-wave#10d85d03 (MAWS on macbook)
…he stage and adopt

The engine host admits a prestart (session.prestart, its withdraw and its owner's
release) and launches it hidden: the process table's public view leaves the row
out of every emitter, listing and count, its journal, host map and state-file
writes are staged in memory under a 1 MiB ceiling, its surface is not attached
and the engine's surface asks are answered at once. session.launch's adopt takes
the row when it is claimable and the same launch: the stage written whole, the
session host's promotion acknowledged, then the row revealed, its snapshot
published once and the answer given before the surface attaches. Anything else
ends the prestart (the ladder, the row dropped, its staged files then its entry)
and launches fresh. The internal event engine.prestart, the query
engine.prestarts, the welcome's capability engine.prestart; WIRE_MINOR 62.

Sminos-Session: ux-wave#10d85d03 (MAWS on macbook)
…s, test-first

The state file is durable before the promotion; a discarded staged commit
restores the earlier state from a per-launch backup (also on a successor's
discard); disk fallbacks answer unknown for a hidden id; the stage's writes
loop and fail the adopt when short; an adopt cancels an admission in its
probes; a launch fences its id's prestarts; a committing row keeps the slot;
a handover during a promotion never reveals the row; the stage's ceiling holds
until the reveal; browser work meets a row only at its reveal; the journal
marks the hidden period so a rebuild drops its toasts and surface asks; a
stop-all counts no prestart.

Sminos-Session: ux-wave#10d85d03 (MAWS on macbook)
…pt at Send and the owner per root

session.intent.prestart asks the engine host to prestart an unstarted New chat's
engine under the spine root's owner: the intent's shape (D8), then the start
guards Send runs (judgeIntent, shared with guardIntentStart, reading the relay's
cached health), the launch gate, the served set, the trust mapping (no
bootstrap), and the spec Send builds (intentSpecOf, ownerChannelLaunch with
reserve: false, hostLaunchOf), with the key beside it (the machine route's
resolved base URL and gateway keys); nothing written. The request's epoch is set
before the first await and checked before the dispatch; a discard, a Send, a
withdraw by token or a newer request ends it, and a launch-relevant patch asks
again after it has answered (or withdraws). Send passes adopt with the key when
the intent's request reached the host, and writes an adopted engine's id to
progress at once. mawsd's seam names a fresh owner per root and sends
session.prestart.release as it disposes of it. The switches: under MAWS_E2E=1
only with MAWS_E2E_PRESTART=1, never in launch mode scenario or under replay.

Sminos-Session: ux-wave#10d85d03 (MAWS on macbook)
An unstarted New chat's composer asks session.intent.prestart on the leading
edge of the first edit that leaves its box non-empty (the editor's new onEdit,
told for the edits the draft's save follows and never for a load, a restore or
a clear), then at most once every 10 s while it stays non-empty, only while the
tab starts on this machine. A pick of another machine withdraws by the token it
was given (an answer that crosses the move is withdrawn when it lands) and
leaves the draft alone; back on this machine the next edit asks at once. An
older spine's refusal reads as skipped, with nothing shown.

Sminos-Session: ux-wave#10d85d03 (MAWS on macbook)
Sminos-Session: ux-wave#10d85d03 (MAWS on macbook)
… answered, adopted and today's

Sminos-Session: ux-wave#10d85d03 (MAWS on macbook)
…sion Log 12's count of removals

Sminos-Session: ux-wave#10d85d03 (MAWS on macbook)
…host calls and link-scoped generations; the window's token

M3's medium review, findings 1 to 9, each with a test written first and seen failing:
- the prestart names the cua socket by a pure path lookup; only the launch registers it (1);
- the spine's six races close under one structure in PrestartRequests: a per-intent fence held by a discard and a Send
  from entry to end, the intent's host calls run one at a time in order, the known generation kept with the engine
  host connection that gave it, nothing sent while the link is not ready, and the root's stop ending every line
  (2, 4, 5, 8, 9);
- a Send that launches nothing withdraws what the spine knew (8);
- the machine route's key carries a sha256 of the gateway keys' effective values (3);
- the window mints each request's token before it asks and withdraws the last one at a move (6, 7);
  WIRE_MINOR stays 62, the manifest rewritten at 62.

Sminos-Session: ux-wave#10d85d03 (MAWS on macbook)
…placement tells one, whole

M3's medium review, finding 10: a document replacement's two transactions (the content, then the attachments) told
the edit signal in between, so clearing a draft with an attachment could prestart. The replacement's transactions tell
nothing; a fill, a prefill or a suggestion taken tells one edit with the whole new document; a clear tells none.

Sminos-Session: ux-wave#10d85d03 (MAWS on macbook)
…and M3's progress

Sminos-Session: ux-wave#10d85d03 (MAWS on macbook)
…and starts file

MAWS_LATENCY_STUB_INIT_MS holds the stub's initialize answer (the engine's boot
and SessionStart hooks run inside initialize, W1), the controls read meanwhile
answered after it in order; MAWS_LATENCY_STUB_STARTS_FILE gets one line per
process start (pid, clock, session id, arguments), none for a --version probe,
so the prestart measure counts engine starts outside the journal. Both are
written into the wrapper, since the engine host passes no MAWS_* variable to an
engine. Test-first in latency-engine-stub.test.ts.

Sminos-Session: ux-wave#10d85d03 (MAWS on macbook)
…mber; the re-join at a record's change

R4-6: a lane B member whose engine session the engine host holds hidden is held apart
(no handed-off mark, no audience in the policy cache, no project presence, no listing),
processed as just arrived at `committed`, in turn with sminos's frames, and dropped with
no trace at `ended`. A member processed before its `hidden` was heard is pulled back; the
hidden set is read whole at each link to the engine host. D11: the spine's word that a
record changed joins the unjoined lane B member it names by its engine session.

Sminos-Session: ux-wave#10d85d03 (MAWS on macbook)
…es a tombstone

The window withdraws by the token it minted; nothing orders that withdraw behind the
request carrying the token. A withdraw that ends no line leaves a tombstone (at most four
per intent, cleared at a discard and at a Send that launched), and a request under a
tombstoned token is answered skipped, dispatching nothing.

Sminos-Session: ux-wave#10d85d03 (MAWS on macbook)
…progress

Sminos-Session: ux-wave#10d85d03 (MAWS on macbook)
- test/support/prestart-latency.ts (test-first): the arms' ABBA order, runs
  outside 3 s ± 100 ms of typing reported and not counted, the validity
  reasons (a missing paint, a flag-on run not adopted or not one start, a
  flag-off run adopted, under 3 counted runs), the medians, the 1.5 s bound
  and the log line.
- e2e/support/prestart-measure.ts: paired runs, one fresh launch each, the
  page's stamps (first keydown, the Send press, the first assistant row's
  frame), the record in test-results/<group>.json.
- e2e/prestart-latency.spec.ts (measured, MAWS_PRESTART_LATENCY_PERF): the
  latency stub with initialize held 2 s, the bound and one start per Send.
- e2e/prestart-engine.spec.ts (measured, MAWS_PRESTART_ENGINE_PERF): the
  pinned engine, three 200 ms SessionStart hooks, the Messages stand-in on
  the gateway route; both medians reported.
- e2e/prestart.spec.ts (default): typing starts one engine and Send takes
  it; a model pick relaunches; a blank chat closed ends its engine with no
  file; a restored draft starts nothing until edited; the held Tools pick
  with the prestart on.
- e2e/remote.spec.ts: choosing B in the machine menu ends A's prestart.
- Registration: package scripts (foreground), MEASURED_E2E, the engine's
  provisioning for prestart-engine, tsconfig.e2e.json, default's own specs.

Sminos-Session: ux-wave#10d85d03 (MAWS on macbook)
A start the stub writes for a run of the binary off the stream-json wire (a
CLI read the app may make) is no session engine: the scenes and the measure
count the processes launched with --input-format alone.

Sminos-Session: ux-wave#10d85d03 (MAWS on macbook)
…dings 6, 7)

A discard clears the window's tombstones only once the draft is gone; a
removal that failed keeps them. A spine with the prestart switched off keeps
no tombstone for a withdraw.

Sminos-Session: ux-wave#10d85d03 (MAWS on macbook)
…replay, traces and re-join (findings 1, 3, 4, 5, 8)

1. A pin the engine host's whole set leaves out is settled only once the
   host's start-up adoptions have ended (holder.adopting false in its
   status, read at the link or heard as host.supervisorStatus) and on rows
   it answered; a read it cannot answer decides nothing.
3. A committed pin's held frame is taken in the replay's own turn, so a
   departure heard before it still drops the frame.
4. A member processed unjoined and gone before its pin's word loses its
   engine session's mark and RL10's audience history at that word; a
   joined one (its engine mark dropped at placement) keeps everything.
5. D11's re-join joins only the member the record names, under the
   record's app session, when a live row pairs them.
8. The endpoint fixture loads a projects source: the abandoned member's
   test reads the signed record in projects.json, with a positive control.

Sminos-Session: ux-wave#10d85d03 (MAWS on macbook)
… Known limit 10 and M4's progress; the tracker's row

Sminos-Session: ux-wave#10d85d03 (MAWS on macbook)
Sminos-Session: ux-wave#10d85d03 (MAWS on macbook)
…5, 8, 9)

- the acceptance's runs create their profile before launching over it (1)
- a run's teardown is the run's: a failed cleanup fails it, and scratch
  processes that cannot be cleared stop the series (2)
- the paint is the transcript's assistant row carrying the marker, in view,
  still there a frame later; each run's premise is the window in front (3)
- the stub's starts split at the Send instant on the wall clock: flag-off
  none before and one after, flag-on one before and none after (4)
- the three SessionStart hooks each write a marker once their sleep ended,
  and every run requires all three (5)
- a failure's text names the scratch, the checkout and the home by role and
  passes the shared redactor before it is logged, asserted or written (8)
- an invalid measure evaluates no bound (9)

The judge's rules are unit-tested first (test/support/prestart-latency.test.ts).

Sminos-Session: ux-wave#10d85d03 (MAWS on macbook)
…nted in the scenes (findings 6, 7)

The composer's session.intent.prestart and its withdraw are counted where
main receives them (ipcMain's invoke handlers wrapped, as the plugins read
tracker does), no product hook added.

- a restored draft: no request on the relaunch's restore, armed as the app
  launches, nor after a reload with the tap certainly armed; one on the edit (6)
- the machine pick: an edit while B is chosen asks A for nothing and starts
  nothing; back on This Mac the next edit asks at once and starts A's engine,
  retried then skipped when the round is too slow to show the pace's reset (7)

Sminos-Session: ux-wave#10d85d03 (MAWS on macbook)
… and 17 and M5's progress

Sminos-Session: ux-wave#10d85d03 (MAWS on macbook)
…k lists) and 12 (ticket 870's variable); the tracker's row

Sminos-Session: ux-wave#10d85d03 (MAWS on macbook)
Master brought the direct subagent tell (WIRE_MINOR 62) and the question
sheet's spec work. Both sides' commands, schema blocks, tracker rows and
probe tests are kept. The branch's wire moves from its stand-in 62 to 64
(63 is kept for the tail-first load); the manifest and fingerprint were
written by pnpm wire:manifest over a 63 stand-in base, since its rule takes
one past the committed minor.

Sminos-Session: ux-wave#10d85d03 (MAWS on macbook)
…ed, engine.prestart placed off the link

The whole suite found two guards the branch's milestones had not run:
test/lane-b/renderer-guards.test.ts wants sessions/prestart.ts declared with
the guard it relies on (the composer asks only for a create intent with no
spawn target), and link-surface.test.ts wants engine.prestart on one side of
the partition (the client side, as host.browserIdle: mawsd's own, heard by no
app and no link; LINK_EVENTS is unchanged).

Sminos-Session: ux-wave#10d85d03 (MAWS on macbook)
Both sides' tracker rows are kept.

Sminos-Session: ux-wave#10d85d03 (MAWS on macbook)
… (ticket 851): WIRE_MINOR 64

Both capabilities are kept: the engine host's welcome lists
engine.provisionalWindow and then engine.prestart, in socket-protocol.ts, the
wire's capability union and the tests that pin them. The branch's wire is now
one past tail-first's 63; pnpm wire:manifest wrote the manifest and the
fingerprint over master's.

Sminos-Session: ux-wave#10d85d03 (MAWS on macbook)
…ess, Decision Log 18)

Sminos-Session: ux-wave#10d85d03 (MAWS on macbook)
Sminos-Session: ux-wave#10d85d03 (MAWS on macbook)
…n the tracker; Known limit 13 (engine-read settings outside the key)

Sminos-Session: ux-wave#10d85d03 (MAWS on macbook)
…hes the endpoint alone

The front posts it to no machine.sock client, the legacy relay delivers it to no
app, and it is a main-only event, so no window hears it by any path.

Sminos-Session: ux-wave#10d85d03 (MAWS on macbook)
…fences and guards

- sweep 4: Send offers `adopt` only to a host whose welcome lists engine.prestart now.
- scalpel-2 4: the spine names each session.prestart (`request`) and withdraws by that name,
  so an admission whose reply timed out is still withdrawn; a `running` answer moves the
  name to the newer request on the host.
- scalpel-2 5: a request does not dispatch while another draft's newer request holds the
  host's one slot on this connection (D1's latest typing across intents).
- scalpel-3 3: the trust card's rule applied to the trust read the spec is built from.
- scalpel-3 4: the machine route's guards applied to the resolution the spec is built from.
- scalpel-3 5: engine.relayHealth.cached, the relay's last check while fresh and never a
  probe; the prestart's guards and a hidden gateway launch read it, a miss skipping.
- scalpel-3 6: a move withdraws every token sent since the last move that no later
  request's answer has superseded, oldest first.

The wire manifest rewritten at WIRE_MINOR 64 from master's 63 (additive).

Sminos-Session: ux-wave#10d85d03 (MAWS on macbook)
…back

A launch whose outcome is unknown stays recoverable by its successor. One
rollback (prestart-host.ts rollBack) restores the state a commit wrote and
removes its staged files and its marked entry, and runs only once the engine
has exited and its session host is gone. A commit that is not revealed (a
refusal, a lost answer, an acknowledgement followed by a handover or a full
stage) is retired: its row stays hidden and holds its id while its engine
stops and the rollback runs, then the spec launches fresh if Send still
waits. Stop and forget wait for a commit's outcome.

Also: the start finishes a marked host's rollback once a host it could not
ask has exited (scalpel-1#2); an adoption closes a hidden period its
predecessor left open (1#5); the backup is dropped after the reveal and a
failed removal only logged (1#6); the backup marker is published whole and a
cut-short backup cleaned (1#8); the stage keeps nothing past its ceiling or
once closed (2#7); a replaced prestart's engine exits before the next spawns
(2#8); a failed commit's journal never reaches observed facts (4#3).

Sminos-Session: ux-wave#10d85d03 (MAWS on macbook)
…t engine (ticket 851)

Sminos-Session: ux-wave#10d85d03 (MAWS on macbook)
…prestart engine (ticket 851)

Sminos-Session: ux-wave#10d85d03 (MAWS on macbook)

# Conflicts:
#	src/engine-host/prestart-host.ts
…nt's hold

- scalpel-4#6: a first lane B member not yet known as public is held early,
  only its sight marked (P5 O12 M11), while the engine host is asked: a live
  row makes it public, the hidden set a hidden pin's (its mark taken back), a
  set without it an ordinary member. A host that cannot answer keeps it held
  until a word, the next whole-set read begun after it, or EARLY_HOLD_MS
  (10 s). No record, audience, project presence or listing meanwhile.
- scalpel-5#1: a pin's settlement is its host link's: a link made
  (restatePrestarts) or lost (hostLinkLost) since its status ends it.
- scalpel-5#2: a committed member replayed at a link is joined on the live
  row that settled it, with no second read.
- The coordinator's item: a test of #recordMoved's guard, resolveOwners held
  through a module mock.
- The engine.prestart type in events.test.ts branded.

Sminos-Session: ux-wave#10d85d03 (MAWS on macbook)
… path quoted for /bin/sh

The acceptance's SessionStart hook command is markerHookCommand, which spells the
marker's path as one single-quoted word, its own single quotes escaped.

Sminos-Session: ux-wave#10d85d03 (MAWS on macbook)
…ngine (ticket 851)

Sminos-Session: ux-wave#10d85d03 (MAWS on macbook)
…(Decision Log 19, Progress), group A's residue in the tracker, WIRE_MINOR 64's comment

Sminos-Session: ux-wave#10d85d03 (MAWS on macbook)
…s fix wave

Sminos-Session: ux-wave#10d85d03 (MAWS on macbook)

# Conflicts:
#	docs/tech-debt-tracker.md
… typing; the prestart starts unprobed, Send's probe judges

The xhigh panel's scalpel-3 5 fix read a cache miss as a relay down, so a gateway draft with a cold cache (the app's
first, or past the 5 s) never prestarted: the Mac's prestart-engine run at dd302de adopted none. A miss now judges
nothing, in the spine's guards and the hidden launcher alike; a check known down still skips, and typing still never
probes. Tests: the spine's two cold-cache cases and the host's cache-only case, rewritten to the rule, seen failing first.

Sminos-Session: ux-wave#10d85d03 (MAWS on macbook)
…ntil the host reports stopped

SIGSTOP is delivered asynchronously; on a loaded runner the host answered a promote written right after kill() returned
(class 1a run 45411212874, unit 1/4: 'a promotion under way when the connection closes resolves refused' got ok: true).
The three SIGSTOP cases now poll ps until state T before writing.

Sminos-Session: ux-wave#10d85d03 (MAWS on macbook)
Sminos-Session: ux-wave#10d85d03 (MAWS on macbook)
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 24, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-24T15:20:59.078057Z 755c585 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 5cbff7a into master Nov 24, 2026
@SSFSKIM
SSFSKIM deleted the ux-wave/prestart-engine branch November 24, 2026 15:17
@SSFSKIM

SSFSKIM commented Nov 24, 2026

Copy link
Copy Markdown
Owner Author

Landed master-first as 5cbff7a (parents 5fc0bb8, 755c585; tree b79d7f7f = the gated head's). Branch and worktree removed.

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

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 755c5853ab

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +312 to +314
const rolledBack = await this.rollBack(h.id, session, status);
this.letGo(h, session, why);
return rolledBack;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Keep the session reserved when retirement cannot roll back

If adoption fails and rollBack() returns false because the session host cannot be confirmed gone, this unconditional letGo() still removes the hidden row and clears current. Although the pending Send is refused, a retry can now launch the same app session while the old launch's committed state, backup and marked roster entry remain. At the next engine-host startup, adoptAtStart() processes that entry through clearDeadHost() or endPrestart(), restoring the old backup over the replacement session's newer state. Keep the id reserved (or guarded as unattached) until rollback succeeds, rather than allowing retries to bypass the failed retirement.

Useful? React with 👍 / 👎.

SSFSKIM added a commit that referenced this pull request Nov 24, 2026
Prestart took WIRE_MINOR 64; the sheet's namespace moves to 65, the pinned
manifest and fingerprint regenerated over master's, and sheet.changed joins
prestart's engine.prestart in the link surface's client rules.

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.

Start a new chat's engine on the composer's first keystroke (hides ~2.2 s of the first reply)

1 participant