Skip to content

fix(bearings): separate freeform follow-ups from decisions - #4645

Open
Whamp wants to merge 11 commits into
kunchenguid:mainfrom
Whamp:fm/bearings-freeform-response
Open

Whamp wants to merge 11 commits into
kunchenguid:mainfrom
Whamp:fm/bearings-freeform-response

Conversation

@Whamp

@Whamp Whamp commented Sep 16, 2026

Copy link
Copy Markdown

Intent

Ship a narrow Bearings Lavish interaction fix. When a decision card offers multiple choices, always provide a first-class place to ask for more information, request clarification, or give a different instruction. A freeform response is not a final decision: it must not resolve the captain's call, release work, authorize a merge, or otherwise act like one of the explicit choices. The current annotation workaround is too awkward and constraining.

What Changed

  • Add a dedicated question and instruction field to multi-choice Captain's Call cards without marking the card answered or advancing the deck.
  • Queue freeform follow-ups as versioned prompts, separate from explicit choices, so they cannot close tasks, release work, reconcile calls, or authorize merges.
  • Reject empty-selection and schema-less choice rows from automatic answer handling, requiring old boards to be rebuilt before their choices carry authority.

Risk Assessment

✅ Low: The change is narrowly scoped, preserves explicit-choice authority, and keeps freeform submissions outside answer, reconcile, release, dispatch, and merge paths.

Testing

The final patch passed focused renderer and captain-hold lifecycle tests plus five live Lavish/Chromium scenarios, with screenshot and transcript evidence. The lifecycle test's unrelated Beads cases capability-skipped because the installed tasks-axi is markdown-only. An initial custom merge poll used the canonical board whose armed listener consumed the feedback; rerunning with an independent copied-board session passed. The worktree remained clean.

  • Live validation: ✅ go - 5 of 5 scenarios driven live against the product
Scenario Result Live Evidence
Captain queues a clarification on a multi-choice card and the card remains unanswered ✅ pass live bearings-freeform-message-queued.png shows the first-class clarification control, MESSAGE QUEUED, and card 1 of 1 without an answered count.
Captain queues a choice and follow-up in either order; both survive and only the choice becomes an answer ✅ pass live tests/fm-bearings-board-lavish-live-e2e.test.sh; see bearings-lavish-live-e2e.txt.
Captain asks about a merge instead of approving it; the message gains no merge or reconcile authority ✅ pass live bearings-merge-freeform-live.txt records the real Lavish capture with empty adapter answers and reconciles.
An old schema-less freeform row carrying close=release is rejected rather than releasing work ✅ pass live bearings-legacy-freeform-live.txt records the real Lavish capture and empty captain-answer output.
Automatic freeform scope excludes a single-option card while preserving explicit opt-in ✅ pass live bearings-freeform-scope-live.txt records navigation through both cards in real Chromium and Lavish.
Evidence: Real Lavish mixed-interaction guard in both queue orders

Source: Real Lavish mixed-interaction guard in both queue orders

# lavish-axi 0.1.67
# chrome-devtools-axi 0.1.34
ok - lavish-axi 0.1.67 reports a captain-ended session without reopening it and without failing
ok - the board build reopens a captain-ended session against real lavish-axi instead of arming a dead one
[lavish-axi] Long-polling for user feedback on /tmp/fm-bearings-lavish-live.PtHyOj/.lavish/bearings-board-choice-first.html. This stays silent until the user sends feedback, ends the session, or leaves every review window disconnected past the reconnect grace period - leave it running. Detected layout issues do NOT return this poll: they wait in the user's Layout issues inbox until the user queues them as ordinary feedback. If it gets killed or times out before feedback arrives, re-run `lavish-axi poll /tmp/fm-bearings-lavish-live.PtHyOj/.lavish/bearings-board-choice-first.html` - feedback remains queued until delivery. Poll delivery consumes the response, so read it completely.
[lavish-axi] Long-polling for user feedback on /tmp/fm-bearings-lavish-live.PtHyOj/.lavish/bearings-board-freeform-first.html. This stays silent until the user sends feedback, ends the session, or leaves every review window disconnected past the reconnect grace period - leave it running. Detected layout issues do NOT return this poll: they wait in the user's Layout issues inbox until the user queues them as ordinary feedback. If it gets killed or times out before feedback arrives, re-run `lavish-axi poll /tmp/fm-bearings-lavish-live.PtHyOj/.lavish/bearings-board-freeform-first.html` - feedback remains queued until delivery. Poll delivery consumes the response, so read it completely.
ok - real lavish-axi preserves explicit choices and freeform follow-ups in both queue orders
Evidence: Live single-option scope and explicit opt-in guard

Source: Live single-option scope and explicit opt-in guard

# lavish-axi 0.1.67
single default: no freeform
single explicit opt-in: freeform present
Evidence: Live schema-less legacy freeform authority rejection

Source: Live schema-less legacy freeform authority rejection

# lavish-axi 0.1.67
queued: schema-less choice-tagged freeform with close=release
adapter-presentation: contains "please explain first"
adapter-answers: <empty>
result: rejected as captain-answer authority
Evidence: Live merge-card freeform authority rejection

Source: Live merge-card freeform authority rejection

# lavish-axi 0.1.67
queued: merge-card freeform follow-up
adapter-presentation: contains "explain the merge risk first"
adapter-answers: <empty>
adapter-reconciles: <empty>
result: no merge or reconcile authority

Pipeline

Updates from git push no-mistakes

✅ **intent** - passed

✅ No issues found.

✅ **Rebase** - passed

✅ No issues found.

🔧 **Review** - 2 issues found → auto-fixed (3) ✅
  • 🚨 bin/fm-procevent-lavish.sh:482 - The intent says, "A freeform response is not a final decision: it must not resolve the captain's call [or] release work," but the new empty-selection guard covers only versioned rows. The adjacent legacy branch still accepts schema-less {question, answer} choices. A pre-cf7e2fa board emitted a bare freeform note in exactly that shape, including close:&#34;release&#34;; an already-armed old board can therefore send "please explain first" through fm-captain-hold.sh answers and close or release the held task. Removing this legacy acceptance is the narrow fail-closed remedy, but it also drops deliberately preserved legacy explicit choices, so that compatibility tradeoff needs authorization. Add a pre-schema bare-note regression with the chosen behavior.
  • ⚠️ tests/assets/board-render-harness.mjs:107 - The mixed-interaction regression hard-codes Lavish's queue-key default and replacement behavior in its fake queuePrompt, but the real-Lavish guard covers only session reopening. If the provider ignores or changes options.queueKey, a choice and follow-up can still replace one another while this test passes. The repository's harness-dependent-check standard requires a real-provider drift guard: extend the existing live Bearings guard to queue both controls in both orders, assert that both entries return, and refresh the verification record.

🔧 Fix applied.
1 warning still open:

  • ⚠️ .agents/skills/bearings/SKILL.md:132 - The wake-handling instructions still say schema-less legacy choices feed ordinary non-reconcile answers, but the changed adapter now rejects every row without schema: fm-bearings-answer.v1 and a non-empty selection. An old {question, answer:&#34;yes&#34;} capture therefore leaves its task held while Firstmate may acknowledge the wake believing the choice was applied. Replace this sentence with the rebuild/rejection rule already documented in docs/captain-hold-lifecycle.md:76-77.

🔧 Fix applied.
1 warning still open:

  • ⚠️ .agents/skills/bearings/SKILL.md:132 - Fresh-board dispatch.charted rows remain intentionally schema-less (board-template.html:791), and line 140 still requires routing them. This new blanket statement says schema-less captures remain unapplied until rebuild, so a captain's dispatch request can be mistaken for an obsolete Captain's Call response and ignored. Scope the rejection rule to schema-less Captain's Call choices entering the automatic answer/reconcile intake.

🔧 Fix applied.
✅ Re-checked - no issues remain.

✅ **Test** - passed

✅ No issues found.

  • Live validation: ✅ go - 5 of 5 scenarios driven live against the product
Scenario Result Live Evidence
Captain queues a clarification on a multi-choice card and the card remains unanswered ✅ pass live bearings-freeform-message-queued.png shows the first-class clarification control, MESSAGE QUEUED, and card 1 of 1 without an answered count.
Captain queues a choice and follow-up in either order; both survive and only the choice becomes an answer ✅ pass live tests/fm-bearings-board-lavish-live-e2e.test.sh; see bearings-lavish-live-e2e.txt.
Captain asks about a merge instead of approving it; the message gains no merge or reconcile authority ✅ pass live bearings-merge-freeform-live.txt records the real Lavish capture with empty adapter answers and reconciles.
An old schema-less freeform row carrying close=release is rejected rather than releasing work ✅ pass live bearings-legacy-freeform-live.txt records the real Lavish capture and empty captain-answer output.
Automatic freeform scope excludes a single-option card while preserving explicit opt-in ✅ pass live bearings-freeform-scope-live.txt records navigation through both cards in real Chromium and Lavish.
  • tests/fm-bearings-board-lavish-live-e2e.test.sh
  • tests/fm-bearings-board-render.test.sh
  • tests/fm-captain-hold-lifecycle.test.sh
  • Built an isolated Bearings board, queued a clarification through real Lavish 0.1.67 and Chromium, and captured the rendered queued state.
  • Queued explicit choices and freeform follow-ups in both orders through real Lavish, then checked adapter output.
  • Queued a merge-card freeform follow-up through an independent real Lavish session and checked fm-procevent-lavish.sh answers and reconciles.
  • Submitted a schema-less old-board freeform row carrying close=release through real Lavish and checked that answer extraction rejected it.
  • Navigated real single-option cards in Chromium and verified default exclusion plus explicit freeform opt-in.
  • git status --short after cleanup
✅ **Document** - passed

✅ No issues found.

⚠️ **Lint** - 1 warning
  • ⚠️ linter found issues (exit code 1)
✅ **Push** - passed

✅ No issues found.

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.

1 participant