feat: deliver Lavish board feedback via a re-armed watcher check#2
Merged
Conversation
lavish-axi poll is a single-shot long-poll that returns and exits on the first wake event, and browser-generated layout_warnings share that wake with real user sends. So a warnings event can return an armed poll with empty prompts, and a human send that then lands with no poll armed waits in the queue until the next arm - the "send doesn't work" symptom. Model the poll as a per-board watcher check (bin/fm-lavish-check.sh): the watcher re-arms it every sweep (reap-proof), drain-on-arm delivers any queued prompts, and warnings-only returns stay silent so they never masquerade as feedback. Document the two operational rules (never treat an empty-prompts return as feedback; never arm two polls on one board) in the bearings skill, which owns Lavish board usage.
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
Fixes the intermittent failure where Lavish board feedback sent from the browser never reaches firstmate through the armed
lavish-axi polllistener.Root cause (reproduced end-to-end):
lavish-axi pollis a single-shot long-poll that returns and exits on the first wake event, and browser-generatedlayout_warningsshare that wake channel with real user sends. So a warnings event returns an armed poll with empty prompts, and a human send that then lands with no poll armed waits in the queue until the next arm.Fix
Model the poll as a per-board watcher check instead of a fragile long-lived poll process:
bin/fm-lavish-check.shgenerates and registers (viafm-check-register.sh) astate/<task-id>.check.shthat, each watcher sweep, runs a short-timeoutlavish-axi poll(drain-on-arm delivers any queued prompts) and prints a wake line only when real user prompts arrived. Warnings-only, waiting, and ended-without-prompts returns stay silent, and the watcher re-arming every sweep makes delivery reap-proof.bearingsskill, which owns Lavish board usage: never treat an empty-promptsreturn as feedback, and never arm two polls on one board file.tests/fm-lavish-check.test.sh.The classifier parses
lavish-axi poll's human-readable text digest (the CLI has no--jsonflag in 0.1.42): a non-empty send renders aprompts[N]{...}:header while an empty one rendersprompts: [], and the header match is line-anchored.Validation
Validated locally by captain decision. The no-mistakes pipeline was intentionally bypassed to avoid reconfiguring the shared firstmate gate while the upstream k2 (kunchenguid#672) and herdr (kunchenguid#648) lanes had live runs on it.
tests/fm-lavish-check.test.sh).bin/fm-lint.sh).Out of scope
A separate whole-file lost-update race inside the third-party lavish-axi state store was found during the investigation; an upstream bug report is drafted but not filed.