Files
museion/docs/devlog/20261103-issue151-gateless-launch-async-engine-check-rail-pill-auto-fire_log.md
T
AlexKucera 55eff3a754
CI / ci (push) Canceled after 0s
feat(launch): flip to the gateless launch (#151)
Wayfinder map #148's terminal slice (decisions #150 architecture,
#149 UX variant A): every launch now opens straight into the
workspace. The engine check (hermes acp --check) runs async from
ContentView.task via AppGateState.startLaunchCheck — provisioning
(x3 profiles) and the daily backup auto-fire the moment it passes
(the gate era's exact onEnginePass chain, moved verbatim; once per
app-launch, first window only, no-op under hosted tests). Nothing
blocks: the blocking gate sheet, the placeholder logo screen,
gateRaised/gateDismissed, EngineGateView, and the
ProvisioningFailureCard sheet are deleted (net -350 lines with the
additions).

Engine state stays visible instead of interrupting: a 44x44 rail
pill above Archive (8pt pulsing accent dot while checking, warning
glyph on an accent-12% wash when failed, nothing at all once
healthy — the slot collapses and the rail spacing closes) and
mono-10 mentor-pane header states (checking... / engine missing /
setup failed / hermes <base> once ready — the BASE version, never
the gate's derived string; session chip renders only once ready).
Failure auto-expands an anchored floating card (340pt, accent
border — floats, never blocks): engine-missing carries #40's
install steps with the gateless correction plus Copy, guide link,
Re-check (disabled-while-checking), stderr + probed path;
provisioning failure rides the same card (failing profile named,
Retry inline). Focus mode recesses the card with the rail. Panes
spawn the engine the moment the check lands (.task(id: binaryPath)
on the nil->value arrival; a nil binary never calls openSession —
that path lands the crash card). state.json semantics unchanged
(About still reads it); #38's no-silent-degradation AC survives,
carried by the pill.

New GatelessLaunchTests pin the seam (hosted-test no-op, chain
armed, pill + mentor-header visibility mappings — flip-verified);
EngineGateTests byte-untouched and green; the dead deferFailure
(#48's Not-Now) deleted with its test. PRD G1 amended; gateless
DOX pass (Museion/AGENTS.md engine section rewritten); CHANGELOG;
devlog. The #149 prototype ships lint-clean.

Verified: full-scheme test 582 passed / 0 failed / 0 skipped
(xcresult executed count, unit + UI), swiftformat lint clean,
swiftlint 0 errors on touched files, finish-audit fanout clean
(ponytail/security/general; 5 fixes applied, header-mapping pins
flip-discriminated and restored).

Closes #151
Closes #139
2026-11-03 16:50:55 +01:00

8.5 KiB
Raw Blame History

Gateless launch S1: async engine check, rail pill, auto-fire — the full flip (#151)

Date: 2026-11-03 Type: issue Reference: #151 (map #148; decisions #150 architecture, #149 UX variant A; supersedes #38's blocking-sheet half; closes #139)

Goal

One interlocking slice: every launch opens straight into the workspace. The engine check (hermes acp --check) runs async at app start; provisioning (×3 profiles) and the daily backup auto-fire the moment it passes. Engine state stays visible without ever interrupting — a rail-bottom pill (only while checking or failed) plus mentor-pane header states. The blocking gate sheet, the placeholder logo screen, and the ProvisioningFailureCard sheet die.

What Was Done

  • AppGateState.startLaunchCheck() (MuseionApp.swift) — arms the auto-fire chain (wireAutoFire, the gate era's exact onEnginePass body moved verbatim: provisioning → backup) then awaits beginAutomaticCheck(); hosted-test no-op via XCTestConfigurationFilePath; hasStarted preserves #41's once-per-launch rule. gateRaised/gateDismissed deleted.
  • ContentView — renders WorkspaceView unconditionally (now 25 lines); .task { await gate.startLaunchCheck() }. Posts scan starts at first frame via the pane's existing .task(id: home) — nothing library-side waits on the gate.
  • EngineStatusView.swift (new) — EngineStatusSurface.visibility (pure mapping: idle/pass+healthy → hidden, checking → pulse, fail AND pass+provisioning-failed → failed), EngineStatusPill (44×44 rail slot above Archive: 8pt pulsing accent dot / warning glyph on accent-12% wash / nothing when healthy), EngineStatusCard (340pt anchored fail card at railWidth+12/bottom 14, surface + accent-0.5 border + r12 + shadow, floats never blocks; engine-fail = #40 copy with the gateless subtitle + install steps + Re-check; provisioning failure rides the same card with Retry inline), MentorEngineStatus (the header's mono-10 states, pure state(phase:provisioningFailed:) mapping inside).
  • WorkspaceView — status slot in the rail's bottom group (collapses when hidden, animated), card overlay with auto-expand .onChange(of: statusVisibility) (chevron collapses, slot re-opens, focus mode recesses the card with the rail while the expanded state survives).
  • MentorPaneView — gate param; MentorEngineStatus beside "Mentor Session" (checking… + mini spinner / engine missing / setup failed / hermes <base> — BASE version, handshake answer first, gate's derived string +-stripped; drift note kept; session chip only once ready; status wins layoutPriority); .task(id: binaryPath) re-seeds on nil→value; honest missing-engine body branch instead of an eternal "Starting…" spinner.
  • SessionsPaneView — .task(id: binaryPath) (nil binary never calls openSession — that path lands the crash card); same honest missing-engine branch in the detail column.
  • EngineGateView.swift deleted (EngineGateModel + probe untouched — empty diff); ProvisioningFailureCard deleted with it.
  • Tests: GatelessLaunchTests.swift (new, 9 pins — hosted no-op, chain armed, 4 pill-mapping states, 3 header-mapping states incl. the outrank rule); EngineGateTests byte-untouched and green; the dead deferFailure + its Not-Now test deleted.
  • Records: PRD G1 amended to #150's wording; Museion/AGENTS.md engine section rewritten for the gateless posture (plus provisioning/backup/Workspace/Mentor cross-references); MuseionTests/AGENTS.md; CHANGELOG. The #149 prototype (prototypes/GatelessStatusPrototype.swift) lint-fixed to 0 serious (case/token renames, still compiles standalone).

Decisions & Rationale

Decision Rationale
One slice, no shims #150's owner resolution: the interlocking deletions (gateDismissed feeds the failure card; the placeholder gates the workspace) resist mid-states — every split needed a throwaway failure-visibility shim
onPass semantics preserved, chain moved verbatim #150: onPass fires per passing check (Re-check included); provisioning + backup idempotent so re-fires are no-ops; the exact closure body is pinned by the ticket text
Test seam: armed/mapping pins, chain never fired under hosted tests A fired chain writes the REAL profile roots (~/.hermes/profiles) and Application Support — untestable in a hosted run; the model facts (fires-per-passing-check, once-per-model) stay pinned in the untouched EngineGateTests
Engine failure outranks lingering provisioning failure No engine → Retry can't run anyway; the actionable card wins in pill, header, and card content alike
openSession skipped when binaryPath is nil startEngine with a nil binary lands .crashed ("no engine binary path available") — the gateless first frame would show a fake crash card; the honest states own the interim
Focus mode recesses the fail card Chrome recedes for deep work; the pill stays hover-reachable and the expanded state survives exit-focus (finish-audit finding)
Not-Now defer dies with the sheet Collapse is view-state; the orange pill stays until a pass succeeds — #38's no-silent-degradation carried by the pill; deferFailure deleted with its test after a code+tests+docs grep

Gotchas & Fixes

Problem Root Cause Fix
First-frame crash card in the panes openSession → startEngine(nil) sets .crashed; pre-gateless this was unreachable (panes only mounted post-pass) if binaryPath != nil guards in both panes' tasks; honest missing-engine branches where the spinner would lie
Pulse animation never starts repeatForever + constant animation(value:) — no change ever fires the animation State flip on onAppear drives it
startLaunchCheck untestable under hosted tests The guard that makes it safe also makes it unreachable; firing the real chain in a test writes real roots Split wireAutoFire() (arm-only, pinned) from the guarded entry; model facts stay in EngineGateTests
UI-test failure "Timed out while enabling automation mode" Documented infra flake (MuseionTests/AGENTS.md), not the diff Re-ran the UI target alone — green
Reviewer "suite count 580 vs 579" discrepancy Prior logs' "574" counted unit+UI; unit-only runs show N−1 Reconciled from xcresult executed counts (0 skipped): unit 579→581, +1 UI = 582 total
Fuzzy patch duplicated a state block / left a stray brace Context-aware matching on a stale boundary Re-read the region, cleaned both; build verified

Files Changed

File Change Summary
Museion/MuseionApp.swift startLaunchCheck/wireAutoFire; gateRaised/gateDismissed deleted
Museion/ContentView.swift unconditional WorkspaceView + launch task; placeholder/sheets dead
Museion/EngineGateView.swift deleted (fail content reborn in the pill card)
Museion/EngineStatusView.swift new — pill, anchored card, mentor header states, visibility mappings
Museion/WorkspaceView.swift rail slot + card overlay + auto-expand + focus recess; Sessions pane gate param
Museion/MentorPaneView.swift header states, .task(id: binaryPath), honest missing-engine branch
Museion/SessionsPaneView.swift .task(id: binaryPath), honest missing-engine branch, gate param
Museion/PostsPaneView.swift threads gate to the mentor column
Museion/ProfileProvisioner.swift deferFailure deleted
MuseionTests/GatelessLaunchTests.swift new — 9 pins
MuseionTests/ProfileProvisionerFailureTests.swift dead Not-Now test deleted
PRD.md, CHANGELOG.md, Museion/AGENTS.md, MuseionTests/AGENTS.md G1 amendment, changelog, gateless DOX pass
prototypes/GatelessStatusPrototype.swift lint-fixed to 0 serious (this session's contract artifact)

Open Items & Next Steps

  • Owner triggers: commit, push (Closes #151, Closes #139) — done by finish-up
  • Live dogfood of the no-engine path on a real machine (rename-the-binary drill from the session report)
  • Transitional copy: "Starting the mentor engine…" during the seconds-long check (deferred — header disambiguates)

Log written by write-log skill

Verification cited: full-scheme test on the settled tree — xcresult 582 passed / 0 failed / 0 skipped (unit + UI), swiftformat lint exit 0, swiftlint 0 errors on touched files; flip-check discriminated the header-mapping pins (2 failed on their exact weakened guards, restored, re-verified green). finish-audit fanout: ponytail/security/general — 5 accepted fixes, 1 rejected with reasoning, 1 reconciled, 1 deferred.