Make Lavish captain boards permanent and durable - #66
Open
ruby-dlee wants to merge 2 commits into
Open
Conversation
ruby-dlee
force-pushed
the
fm/lavish-fork-captain-surface
branch
from
August 1, 2026 21:43
9768c83 to
6aa0f18
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Makes the Lavish captain surface a permanent property of the fork while preserving its bounded durable file protocol: no server, listener, resident process, shared browser profile, or shared port.
Captain requirements
lavish-axi collectpersists them as first-class schema-version-2 answer data.visuals/directory renders inline as self-contained data URLs.#007AFF, semantic aliases, and 16px cards.bin/fm-lavish-board.shopens a named headedchrome-devtools-axisession with a throwaway profile; the fork itself remains bounded and serverless.FM_HOMEor a stale global install.Durable-submission defect fixed
The first implementation persisted submission only in
window.__lavishPayloadplus theLAVISH-SUBMIT v2document-title marker. If the page closed before the polling check read that live JavaScript state, if the captain submitted in a different browser, or if polling had not run yet, the complete answer disappeared without a trace. That exact failure lost the captain a full board of answers tonight.The submit handler now serializes the complete structured payload, builds a JSON
Blob, creates an object URL, and clicks a synthetic download anchor namedlavish-answer-<decision-id>.jsonbefore emitting the live-page marker. The done screen also shows the formatted raw JSON in a read-only selectable textarea when downloads are blocked. NolocalStoragefallback was added becausefile://access can throwSecurityError.The one-shot checker searches fresh deterministic downloads first, atomically copies a matching payload into its declared durable state destination, and only falls back to the live-page marker when no download exists. It accepts browser collision suffixes while rejecting stale, malformed, and wrong-decision files.
Closed-page proof
A real self-contained
file://board was opened in an isolated headed Chrome session. I selected the durable-download option, entered a question note, an option comment, and an overall note, reviewed the batch, and submitted it. Chrome wrotelavish-answer-closed-page-proof.json. I then opened a blank tab, closed the actual board tab, confirmed onlyabout:blankremained, and ran the checker afterward. The checker recovered the downloaded JSON into the durable payload destination with the selected value and all three annotations intact.In other words: a submitted answer is recoverable after the page is closed. This directly covers the failure that lost the captain a full board of answers tonight; the proof did not read
window.__lavishPayloadfrom a live board.Other validation
bash tests/fm-lavish-board.test.shpassed, including a closed-page download-first test that makes live-page evaluation fail if attempted.ps ENOBUFStest-harness failure rather than a product assertion.bin/fm-lint.sh bin/fm-lavish-board.sh tests/fm-lavish-board.test.sh tests/lib.shpassed with pinned ShellCheck 0.11.0.node --check tools/lavish/src/board.mjsandgit diff --checkpassed.Deliberately not built
localStoragetransport.lavish-axi collectmanifest validation.This PR must not be merged without captain approval.