fix(lavish): remove persistent browser automation anchor - #114
Open
ruby-dlee wants to merge 5 commits into
Open
Conversation
…andoff fail-closed
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.
Intent
Remove the Lavish board browser anchor entirely so opening and answering a board never leaves an npm chrome-devtools parent or dedicated Chrome process tree behind. Do not solve the leak with teardown, cleanup, kill, trap, server, poller, watcher, timer, long-poll, filesystem watcher, or resident listener logic; remove the persistent browser automation profile and armed submission check instead. Keep the board immediately usable through the operating system default browser, which the helper hands off to and then exits. Preserve the proven durable answer path end to end: the captain answers the self-contained board, its home-bound schema-version-2 JSON is downloaded with a manual payload backup, the captain tells firstmate directly, and one bounded lavish-axi intake scan recovers and validates the payload against the immutable request digest and ordered question/item set before committing answer.toon, the declared destination, and receipt.toon. Preserve the terminal lavish answer fallback. The PR description must explicitly state this safety property and manual handoff because it is the mechanism that has actually worked.
What Changed
chrome-devtoolsparent or dedicated Chrome process tree.answer.toon, the declared destination, andreceipt.toon.lavish answer ... --home ...terminal fallback.Risk Assessment
✅ Low: Captain, the change is well-bounded and the complete source path now preserves home-bound, collision-safe intake without reintroducing persistent browser automation or resident cleanup logic.
Testing
Completed 1 recorded test check.
Pipeline
Updates from git push no-mistakes
✅ **intent** - passed
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
🔧 **Review** - 2 issues found → auto-fixed (3) ✅
tools/lavish/src/board.mjs:457- The required “one bounded lavish-axi intake scan recovers” path fails when a pending decision already has an earlier downloaded answer. A second download can produce the already-supported(1)filename;recoverLandingPayloadsthen treats differing valid payloads as a conflict and aborts before committing either. Resolve authorization at the shared intake candidate-selection boundary without restoring browser automation or submission checks.bin/fm-lavish-board.sh:193- The requirement that the helper “hands off to [the default browser] and then exits” is not guaranteed by the Linux fallback: the script synchronously waits forxdg-open, whose documented behavior may keep it running for the lifetime of the launched application (xdg-open manual). Use an opener contract with explicit no-wait handoff semantics or fail closed where that cannot be guaranteed.🔧 Fix: Make Lavish downloads collision-safe and Linux handoff fail-closed
1 error still open:
tools/lavish/src/cli.mjs:565- This contradicts the authorized requirement that colliding files “can never mix up, silently lose, or ambiguously select an answer.” Collision suffixes are only directory-local filenames, but intake ranks them globally across the effective state directory,LAVISH_DOWNLOADS_DIR, and~/Downloads; therefore a stale(1)answer in one directory silently outranks the captain’s new unsuffixed answer in another and can be committed. At the shared intake boundary, fail closed whenever validated candidates for the same home/request disagree, unless authority is established by payload-bound protocol data rather than a filename suffix.🔧 Fix: Bind Lavish collision authority to validated payload metadata
1 error still open:
tools/lavish/src/protocol.mjs:670- The required “home-bound schema-version-2 JSON” invariant is not enforced for the new authoritative landing payloads. Intake passesallowMissingHomeMarker: true, and landing validation is independent of that check, so a payload containinglandingbut nohome_markervalidates and can outrank a home-bound answer in another home sharing the same decision id/request digest. Requirehome_markerwheneverlandingis present; retain missing-marker compatibility only for legacy payloads without landing authority.🔧 Fix: Require home binding for Lavish landing authority
✅ Re-checked - no issues remain.
command -v tmux >/dev/null || { echo "tmux is required for e2e tests" >&2; exit 1; }; tmux -V; rc=0; base=$(mktemp -d); mdir="$base/manifests"; mkdir -p "$mdir"; pids=""; for s in 1 2 3 4 5 6 7 8; do ( TMPDIR="$base/$s/tmp"; TMUX_TMPDIR="$base/$s/tmux"; export TMPDIR TMUX_TMPDIR; mkdir -p "$TMPDIR" "$TMUX_TMPDIR"; bin/fm-behavior-shards.sh --run "$s" 8 "$mdir/executed-$s.tsv" >"$base/shard-$s.log" 2>&1 ) & pids="$pids $!"; done; for p in $pids; do wait "$p" || rc=1; done; for s in 1 2 3 4 5 6 7 8; do echo "== behavior shard $s/8 =="; cat "$base/shard-$s.log"; done; bin/fm-behavior-shards.sh --verify 8 "$mdir" || rc=1; rm -rf "$base"; uv run --directory tools/agent-fleet --locked pytest || rc=1; uv run --directory tools/agent-fleet --locked python -m compileall -q src || rc=1; exit "$rc"🔧 Fix: No code fix; Lavish failures were host-load timeouts
1 error still open:
command -v tmux >/dev/null || { echo "tmux is required for e2e tests" >&2; exit 1; }; tmux -V; rc=0; base=$(mktemp -d); mdir="$base/manifests"; mkdir -p "$mdir"; pids=""; for s in 1 2 3 4 5 6 7 8; do ( TMPDIR="$base/$s/tmp"; TMUX_TMPDIR="$base/$s/tmux"; export TMPDIR TMUX_TMPDIR; mkdir -p "$TMPDIR" "$TMUX_TMPDIR"; bin/fm-behavior-shards.sh --run "$s" 8 "$mdir/executed-$s.tsv" >"$base/shard-$s.log" 2>&1 ) & pids="$pids $!"; done; for p in $pids; do wait "$p" || rc=1; done; for s in 1 2 3 4 5 6 7 8; do echo "== behavior shard $s/8 =="; cat "$base/shard-$s.log"; done; bin/fm-behavior-shards.sh --verify 8 "$mdir" || rc=1; rm -rf "$base"; uv run --directory tools/agent-fleet --locked pytest || rc=1; uv run --directory tools/agent-fleet --locked python -m compileall -q src || rc=1; exit "$rc"✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.