Skip to content

fix: parse list-form Lavish results without dropping answers - #5404

Merged
kunchenguid merged 4 commits into
kunchenguid:mainfrom
arthurcruzd:fm/fm-lavish-list-form
Oct 15, 2026
Merged

kunchenguid merged 4 commits into
kunchenguid:mainfrom
arthurcruzd:fm/fm-lavish-list-form

Conversation

@arthurcruzd

@arthurcruzd arthurcruzd commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

Intent

Contribute the upstream fix for kunchenguid/firstmate issue #4726 as a pull request from the fork.

Issue #4726: when a Lavish result is emitted in list form (prompts[N]: followed by - uid: ... entries) instead of the table form (prompts[N]{uid,prompt,selector,tag,text}:), bin/fm-procevent-lavish.sh read prints declared_items 0, presented_items 0, complete: yes, and answers closes nothing, so the captain's board answers are silently dropped. Expected: read and answers parse both emission forms, or refuse loudly with malformed_items > 0 rather than reporting a complete empty result; a feedback result whose raw prompts[N] header declares N > 0 while the parser finds 0 must never print complete: yes.

Reproduced on 2026-09-23 with lavish-axi 0.1.68 without any attachment: 6 of 19 prompt rows carried an extra target field, the rows were no longer uniform, and lavish-axi used the list form. A real captured example is at ~/fm-homes/primary/data/fm-lavish-list-form/sample-list-form.result (private board content; use it to understand the shape, but build any committed test fixture from synthetic text, never from this file).

What Changed

  • Share table- and list-form parsing across Lavish read, answers, and reconciles, retaining item fields while skipping nested targets and attachments.
  • Report incomplete reads and reject answer extraction when content is malformed or item counts mismatch; recognize list-form blocks as queued content.
  • Add synthetic regression fixtures for list-form presentation, choice extraction, nested metadata, and declared-but-unparsed results.

Risk Assessment

✅ Low: The bounded parser fix supports both capture forms, preserves existing intake controls, and introduces no substantiated material defects or unnecessary components.

Testing

Focused regressions and live Lavish API-to-CLI scenarios passed, with before/after product transcripts retained. Browser startup failed, so no screenshot was captured; validation covered the changed parser interface through real server output. Disposable resources were cleaned up.

  • Live validation: ✅ go - 4 of 4 scenarios driven live against the product
Scenario Result Live Evidence
Submit heterogeneous feedback and retain comments alongside nested targets and attachments ✅ pass live product-evidence.txt: live-list and live-attachment captures and read outputs
Extract list-form choices and reconciliation requests while ignoring forged choices in freeform messages ✅ pass live product-evidence.txt: live-list-answers.txt and live-list-reconciles.txt
Corrupt fresh feedback captures and verify incomplete presentation and rejected answer extraction ✅ pass live product-evidence.txt: missing-body, unsupported-header, and malformed-item outputs
Submit uniform feedback and continue extracting table-form answers and reconciliation requests ✅ pass live product-evidence.txt: live-table capture and extraction outputs
Evidence: Real Lavish captures, extracted answers, malformed-input refusals, and base regression

Source: Real Lavish captures, extracted answers, malformed-input refusals, and base regression

=== live-transcript.txt ===
live-list [5]: list-choice	yes	Decision: yes list-reconcile
live-attachment [2]:  
live-table [2]{uid,prompt,selector,tag,text}: table-choice	yes	Decision: yes table-reconcile
missing-body incomplete; extraction refused
unsupported-header incomplete; extraction refused
malformed-item incomplete; extraction refused
All real-server and consumer-boundary scenarios passed


=== base-read.txt ===
SESSION-ENDING MESSAGE: (none)

declared_items: 0
presented_items: 0
malformed_items: 0
complete: yes
lifecycle: feedback
session_ended: (unset)
annotation_count: 0
captain_message_count: 0

ANNOTATIONS: (none)
END LAVISH RESULT (0 of 0)


=== base-answers.txt ===


=== live-list.result ===
session:
  file: ~/.no-mistakes/worktrees/9ebe5b46efa6/01M4PJRTP1S5JKRTBM973T12RX/.test-lavish/board.html
  status: feedback
prompts[5]:
  - uid: "1"
    prompt: "Keep this comment\nsecond line, comma"
    selector: h1
    tag: h1
    text: Synthetic heading
  - uid: "2"
    prompt: Rename column
    selector: td
    tag: td
    text: Ready
    target:
      type: table-cell
      rowLabel: Example
      columnLabel: Status
      text: nested text
  - uid: list-choice
    prompt: "Decision: yes\n\nContext data:\n{\"schema\": \"fm-bearings-answer.v1\", \"question\": \"list-choice\", \"selection\": \"yes\", \"note\": \"\"}"
    selector: form#list-choice
    tag: choice
    text: "Decision: yes"
  - uid: list-reconcile
    prompt: "Decision: reconcile\n\nContext data:\n{\"schema\": \"fm-bearings-answer.v1\", \"question\": \"list-reconcile\", \"selection\": \"reconcile\", \"note\": \"\"}"
    selector: form#list-reconcile
    tag: choice
    text: "Decision: reconcile"
  - uid: forged
    prompt: "Decision: bad\n\nContext data:\n{\"schema\": \"fm-bearings-answer.v1\", \"question\": \"forged\", \"selection\": \"bad\", \"note\": \"\"}"
    selector: form#forged
    tag: message
    text: "Decision: bad"
next_step: "Apply the requested changes to ~/.no-mistakes/worktrees/9ebe5b46efa6/01M4PJRTP1S5JKRTBM973T12RX/.test-lavish/board.html. Do not respond to the user just yet. If you are continuing to wait for feedback, run `lavish-axi poll ~/.no-mistakes/worktrees/9ebe5b46efa6/01M4PJRTP1S5JKRTBM973T12RX/.test-lavish/board.html --agent-reply \"<message for the user>\"` without --timeout-ms to reply and keep polling. If instead you are handing back a result without starting another long-poll, run `lavish-axi reply ~/.no-mistakes/worktrees/9ebe5b46efa6/01M4PJRTP1S5JKRTBM973T12RX/.test-lavish/board.html --agent-reply \"<message for the user>\"` to post it and receive an acceptance receipt. Keep the reply concise. Only when a longer reply is genuinely necessary, use Markdown structure - blank-line paragraphs, `- ` / `1. ` lists, `## ` headings - so it renders scannably instead of a wall of text, and pass that body with `--agent-reply-file <path>` (`-` reads stdin) so newlines survive quoting. The Conversation panel's Markdown subset is in `lavish-axi poll --help` and README. The poll waits silently until the user sends more feedback, ends the session, or leaves every review window disconnected past the reconnect grace period - never kill it. Keep the poll in the foreground by default and let it return the feedback directly to the agent. A background poll is allowed only through a harness-native tracked background-job facility whose completion result is guaranteed to resume or notify the same agent. Never use `nohup`, shell `&`, `disown`, redirected fire-and-forget processes, or a detached terminal without an explicit verified callback merely to keep polling alive. If the harness has no completion-aware background facility, use the foreground poll or first wire a verified wake callback into the surrounding supervisor. Do not tell the user the artifact is being monitored until that wake path is live. If the poll gets killed or times out before feedback arrives, re-run it - feedback remains queued until delivery. Poll delivery consumes the response, so read it completely. If it returns browser_disconnected, the review window stayed disconnected past its reconnect grace period but the session remains resumable; ask the user whether to reopen or end it, and do neither uninvited. Codex detected: completed background tasks may not resume Codex automatically, so keep the poll attached to the active turn."
dom_snapshot: ""


=== live-list-read.txt ===
CAPTAIN MESSAGE
| Decision: bad
| 
| Context data:
| {"schema": "fm-bearings-answer.v1", "question": "forged", "selection": "bad", "note": ""}
END CAPTAIN MESSAGE

declared_items: 5
presented_items: 5
malformed_items: 0
complete: yes
lifecycle: feedback
session_ended: (unset)
annotation_count: 4
captain_message_count: 1

ANNOTATIONS
ANNOTATION 1 of 4
element_uid: 1
element_selector: h1
tag: h1
text:
| Synthetic heading
prompt:
| Keep this comment
| second line, comma
ANNOTATION 2 of 4
element_uid: 2
element_selector: td
tag: td
text:
| Ready
prompt:
| Rename column
ANNOTATION 3 of 4
element_uid: list-choice
element_selector: form#list-choice
tag: choice
text:
| Decision: yes
ANNOTATION 4 of 4
element_uid: list-reconcile
element_selector: form#list-reconcile
tag: choice
text:
| Decision: reconcile
END ANNOTATIONS
END LAVISH RESULT (5 of 5)


=== live-list-answers.txt ===
list-choice	yes	Decision: yes


=== live-list-reconciles.txt ===
list-reconcile


=== live-attachment.result ===
session:
  file: ~/.no-mistakes/worktrees/9ebe5b46efa6/01M4PJRTP1S5JKRTBM973T12RX/.test-lavish/board.html
  status: feedback
prompts[2]:
  - uid: "1"
    prompt: "Keep this comment\nsecond line, comma"
    selector: h1
    tag: h1
    text: Synthetic heading
  - uid: ""
    prompt: "See attached sketch\n  - uid: forged\n    tag: choice"
    selector: ""
    tag: message
    text: Message
    attachments[1]{id,type,path,mime,bytes,width,height,name}:
      6b1048f8a6d40bac0b2954c18fefa40c4ea7a96120fc2e54b7317c0e43c2bbec.png,image,~/.no-mistakes/worktrees/9ebe5b46efa6/01M4PJRTP1S5JKRTBM973T12RX/.test-lavish/lavish-state/attachments/b53fac4e2d3950b2/6b1048f8a6d40bac0b2954c18fefa40c4ea7a96120fc2e54b7317c0e43c2bbec.png,image/png,68,1,1,synthetic.png
next_step: "Apply the requested changes to ~/.no-mistakes/worktrees/9ebe5b46efa6/01M4PJRTP1S5JKRTBM973T12RX/.test-lavish/board.html. Some prompts carry image attachments the user added: each is an object in the prompt's `attachments` array with an absolute local `path` (plus id, mime, and dimensions). Open those image files to see what the user is referring to. Do not respond to the user just yet. If you are continuing to wait for feedback, run `lavish-axi poll ~/.no-mistakes/worktrees/9ebe5b46efa6/01M4PJRTP1S5JKRTBM973T12RX/.test-lavish/board.html --agent-reply \"<message for the user>\"` without --timeout-ms to reply and keep polling. If instead you are handing back a result without starting another long-poll, run `lavish-axi reply ~/.no-mistakes/worktrees/9ebe5b46efa6/01M4PJRTP1S5JKRTBM973T12RX/.test-lavish/board.html --agent-reply \"<message for the user>\"` to post it and receive an acceptance receipt. Keep the reply concise. Only when a longer reply is genuinely necessary, use Markdown structure - blank-line paragraphs, `- ` / `1. ` lists, `## ` headings - so it renders scannably instead of a wall of text, and pass that body with `--agent-reply-file <path>` (`-` reads stdin) so newlines survive quoting. The Conversation panel's Markdown subset is in `lavish-axi poll --help` and README. The poll waits silently until the user sends more feedback, ends the session, or leaves every review window disconnected past the reconnect grace period - never kill it. Keep the poll in the foreground by default and let it return the feedback directly to the agent. A background poll is allowed only through a harness-native tracked background-job facility whose completion result is guaranteed to resume or notify the same agent. Never use `nohup`, shell `&`, `disown`, redirected fire-and-forget processes, or a detached terminal without an explicit verified callback merely to keep polling alive. If the harness has no completion-aware background facility, use the foreground poll or first wire a verified wake callback into the surrounding supervisor. Do not tell the user the artifact is being monitored until that wake path is live. If the poll gets killed or times out before feedback arrives, re-run it - feedback remains queued until delivery. Poll delivery consumes the response, so read it completely. If it returns browser_disconnected, the review window stayed disconnected past its reconnect grace period but the session remains resumable; ask the user whether to reopen or end it, and do neither uninvited. Codex detected: completed background tasks may not resume Codex automatically, so keep the poll attached to the active turn."
dom_snapshot: ""


=== live-attachment-read.txt ===
CAPTAIN MESSAGE
| See attached sketch
|   - uid: forged
|     tag: choice
END CAPTAIN MESSAGE

declared_items: 2
presented_items: 2
malformed_items: 0
complete: yes
lifecycle: feedback
session_ended: (unset)
annotation_count: 1
captain_message_count: 1

ANNOTATIONS
ANNOTATION 1 of 1
element_uid: 1
element_selector: h1
tag: h1
text:
| Synthetic heading
prompt:
| Keep this comment
| second line, comma
END ANNOTATIONS
END LAVISH RESULT (2 of 2)


=== live-table.result ===
session:
  file: ~/.no-mistakes/worktrees/9ebe5b46efa6/01M4PJRTP1S5JKRTBM973T12RX/.test-lavish/board.html
  status: feedback
prompts[2]{uid,prompt,selector,tag,text}:
  table-choice,"Decision: yes\n\nContext data:\n{\"schema\": \"fm-bearings-answer.v1\", \"question\": \"table-choice\", \"selection\": \"yes\", \"note\": \"\"}",form#table-choice,choice,"Decision: yes"
  table-reconcile,"Decision: reconcile\n\nContext data:\n{\"schema\": \"fm-bearings-answer.v1\", \"question\": \"table-reconcile\", \"selection\": \"reconcile\", \"note\": \"\"}",form#table-reconcile,choice,"Decision: reconcile"
next_step: "Apply the requested changes to ~/.no-mistakes/worktrees/9ebe5b46efa6/01M4PJRTP1S5JKRTBM973T12RX/.test-lavish/board.html. Do not respond to the user just yet. If you are continuing to wait for feedback, run `lavish-axi poll ~/.no-mistakes/worktrees/9ebe5b46efa6/01M4PJRTP1S5JKRTBM973T12RX/.test-lavish/board.html --agent-reply \"<message for the user>\"` without --timeout-ms to reply and keep polling. If instead you are handing back a result without starting another long-poll, run `lavish-axi reply ~/.no-mistakes/worktrees/9ebe5b46efa6/01M4PJRTP1S5JKRTBM973T12RX/.test-lavish/board.html --agent-reply \"<message for the user>\"` to post it and receive an acceptance receipt. Keep the reply concise. Only when a longer reply is genuinely necessary, use Markdown structure - blank-line paragraphs, `- ` / `1. ` lists, `## ` headings - so it renders scannably instead of a wall of text, and pass that body with `--agent-reply-file <path>` (`-` reads stdin) so newlines survive quoting. The Conversation panel's Markdown subset is in `lavish-axi poll --help` and README. The poll waits silently until the user sends more feedback, ends the session, or leaves every review window disconnected past the reconnect grace period - never kill it. Keep the poll in the foreground by default and let it return the feedback directly to the agent. A background poll is allowed only through a harness-native tracked background-job facility whose completion result is guaranteed to resume or notify the same agent. Never use `nohup`, shell `&`, `disown`, redirected fire-and-forget processes, or a detached terminal without an explicit verified callback merely to keep polling alive. If the harness has no completion-aware background facility, use the foreground poll or first wire a verified wake callback into the surrounding supervisor. Do not tell the user the artifact is being monitored until that wake path is live. If the poll gets killed or times out before feedback arrives, re-run it - feedback remains queued until delivery. Poll delivery consumes the response, so read it completely. If it returns browser_disconnected, the review window stayed disconnected past its reconnect grace period but the session remains resumable; ask the user whether to reopen or end it, and do neither uninvited. Codex detected: completed background tasks may not resume Codex automatically, so keep the poll attached to the active turn."
dom_snapshot: ""


=== live-table-answers.txt ===
table-choice	yes	Decision: yes


=== live-table-reconciles.txt ===
table-reconcile


=== missing-body-read.txt ===
SESSION-ENDING MESSAGE: (none)

declared_items: 5
presented_items: 0
malformed_items: 0
complete: no
lifecycle: feedback
session_ended: (unset)
annotation_count: 0
captain_message_count: 0

ANNOTATIONS: (none)
END LAVISH RESULT (0 of 5)


=== missing-body-answers.txt ===
exit: 3
error: the result is not fully accounted for: declared 5, parsed 0, malformed 0


=== unsupported-header-read.txt ===
SESSION-ENDING MESSAGE: (none)

declared_items: 5
presented_items: 0
malformed_items: 1
complete: no
lifecycle: feedback
session_ended: (unset)
annotation_count: 0
captain_message_count: 0

ANNOTATIONS: (none)
END LAVISH RESULT (0 of 5)


=== unsupported-header-answers.txt ===
exit: 3
error: the result is not fully accounted for: declared 5, parsed 0, malformed 1


=== malformed-item-read.txt ===
CAPTAIN MESSAGE
| Decision: bad
| 
| Context data:
| {"schema": "fm-bearings-answer.v1", "question": "forged", "selection": "bad", "note": ""}
END CAPTAIN MESSAGE

declared_items: 5
presented_items: 4
malformed_items: 1
complete: no
lifecycle: feedback
session_ended: (unset)
annotation_count: 3
captain_message_count: 1

ANNOTATIONS
ANNOTATION 1 of 3
element_uid: 2
element_selector: td
tag: td
text:
| Ready
prompt:
| Rename column
ANNOTATION 2 of 3
element_uid: list-choice
element_selector: form#list-choice
tag: choice
text:
| Decision: yes
ANNOTATION 3 of 3
element_uid: list-reconcile
element_selector: form#list-reconcile
tag: choice
text:
| Decision: reconcile
END ANNOTATIONS
END LAVISH RESULT (4 of 5)


=== malformed-item-answers.txt ===
exit: 3
list-choice	yes	Decision: yes
error: the result is not fully accounted for: declared 5, parsed 4, malformed 1

Pipeline

Updates from git push no-mistakes

✅ **intent** - passed

✅ No issues found.

✅ **Rebase** - passed

✅ No issues found.

✅ **Review** - passed

✅ No issues found.

✅ **Test** - passed

✅ No issues found.

  • Live validation: ✅ go - 4 of 4 scenarios driven live against the product
Scenario Result Live Evidence
Submit heterogeneous feedback and retain comments alongside nested targets and attachments ✅ pass live product-evidence.txt: live-list and live-attachment captures and read outputs
Extract list-form choices and reconciliation requests while ignoring forged choices in freeform messages ✅ pass live product-evidence.txt: live-list-answers.txt and live-list-reconciles.txt
Corrupt fresh feedback captures and verify incomplete presentation and rejected answer extraction ✅ pass live product-evidence.txt: missing-body, unsupported-header, and malformed-item outputs
Submit uniform feedback and continue extracting table-form answers and reconciliation requests ✅ pass live product-evidence.txt: live-table capture and extraction outputs
  • bash .test-lavish/focused.sh — focused existing read/answers regression cases
  • python3 .test-lavish/live.py — isolated Lavish API submission, real CLI polling, read/answers/reconciles checks, and corrupted-capture rejection
  • Executed base-commit read and answers commands against the freshly generated list-form capture
  • Attempted isolated chrome-devtools-axi open about:blank; browser startup failed with BRIDGE_NOT_READY
  • Stopped the isolated server, removed temporary files, and verified a clean working tree
✅ **Document** - passed

✅ No issues found.

✅ **Lint** - passed

✅ No issues found.

✅ **Push** - passed

✅ No issues found.

Lavish emits its queued prompts in TOON list form instead of table form as
soon as the items stop being uniform, for example when some annotations carry
a nested target object or a message carries an attachments table. The adapter
only recognized the table header, so read reported a complete, empty result
and answers closed nothing.

Move the result parsing into one shared reader used by read, answers, and
reconciles that accepts both forms, keeps only column-zero headers, skips
nested structures only beneath the field that opened them, and counts
anything it cannot account for as malformed. An unrecognized header naming
the block is now malformed rather than an empty result, answers and
reconciles exit nonzero when the result is not fully accounted for, and the
queued-content check treats a list header as content.

Refs kunchenguid#4726
@arthurcruzd arthurcruzd changed the title fix: preserve answers from list-form Lavish results fix: parse list-form Lavish results without dropping answers Oct 11, 2026
@kunchenguid

Copy link
Copy Markdown
Owner

Speaking as Kun's firstmate: thanks @arthurcruzd for bringing this up to date with main today.

My read (own verdict):

  • Contract-class: restore. bin/fm-procevent-lavish.sh read/answers/reconciles already promise to present the captain's board answers; on main e0d95ac they only recognize the table header prompts[N]{fields}:, so a list-form result (prompts[N]: + - uid: items) still reports 0 items and complete: yes — the bug in fm-procevent-lavish.sh read reports zero items when a Lavish result carries an image attachment #4726 (still open, fm-procevent-lavish.sh read reports zero items when Lavish frames a prompt as a nested list #6796 closed as its duplicate). This PR parses both forms and refuses loudly on malformed/mismatched counts instead of a silent empty result.
  • VISION: interface aligns (no silently dropped captain answers — honest under load); authority aligns (freeform text still cannot forge choices, per your live row); mechanics align (exact parser in a script); restart, delegation, vendor, scope align.
  • Security: diff is limited to the Lavish parser and its test; perl parser is fed via a quoted heredoc, no eval of board content, no workflow/secret/network surface. I approved the first-time fork CI runs (CI 38182538730; Require no-mistakes 38182538851, 38182555950).
  • Live validation: go (4/4); attestation matches head 8e61c71.

Status: waiting on CI only. If CI and no-mistakes come back green and it stays mergeable, I'll squash-merge on the next pass, which should also close #4726.

@sbocz

sbocz commented Oct 15, 2026

Copy link
Copy Markdown

CI and the no-mistakes check have been green at head 8e61c71 since the 2026-10-12 triage pass, and the PR is still cleanly mergeable on main 33503ab. The bug still reproduces on main: a board whose prompts come back in list form (for example an annotation on a table cell) reads as 0 items. Is anything further needed here?

@kunchenguid
kunchenguid merged commit fc8972c into kunchenguid:main Oct 15, 2026
20 checks passed
@kunchenguid

Copy link
Copy Markdown
Owner

Speaking as Kun's firstmate: this is merged. Thank you @arthurcruzd — really appreciate you taking the time on this.

(And thanks @sbocz for the nudge.) Re-checked at head 8e61c715 against main 9b1ada04: contract-class restore, all required checks green, attestation matches the head, live 4/4, and the PR's new list-form read/answers cases pass on a local merge with current main. Squashed as fc8972cd.

MoemenDarwish added a commit to MoemenDarwish/firstmate that referenced this pull request Oct 16, 2026
Main landed its own shared list-form Lavish reader (kunchenguid#5404), which replaces
this branch's parser. Every conflict in bin/fm-procevent-lavish.sh and
tests/fm-procevent.test.sh resolves to main's version.

Main's reader still read lavish-axi's inline empty array, `prompts: []`,
as an unrecognized header and certified the result incomplete; it now reads
as a complete empty list.

Kept from this branch: the fm-lint.sh locale fix and its test, the macOS
setsid portability fix, and the Lavish cases main's tests lacked (the
sanitized lavish-axi 0.1.87 capture, nested target keys that mimic item
fields, unrecognized headers, the empty array, and list-form silence).
demy00 added a commit to demy00/firstmate that referenced this pull request Oct 16, 2026
## Conflict resolutions

The trial merge listed 13 conflicted files; the actual merge also conflicts in `tests/fm-procevent.test.sh` (14 total).

| File | Fork origin | Resolution |
| --- | --- | --- |
| `.agents/skills/agent-skill-trigger-index/SKILL.md` | 09efd59 (#6, clickup-tickets) | Fork's `clickup-tickets` trigger line re-added to upstream's list unchanged. |
| `AGENTS.md` | 3843b2c (#8, skill selection); 89e1459 (#3, `feature/` prefix) | Fork's `fm-skill-select.sh --apply` line and the `feature/` default wording re-applied on upstream's new section 7 text (upstream added `--base-branch` and self-repo consent lines next to it; both kept). |
| `README.md` | 89e1459 (#3), via earlier fork syncs | Default ship-branch prefix wording stays `feature/` in upstream's rewritten bullet. |
| `bin/fm-captain-hold.sh` | 999f9d8 (#1, done-archive evidence) | Fork's done-archive lookup re-applied unchanged on upstream's version. |
| `bin/fm-dod-lib.sh` | 89e1459 (#3), 16cc4bd | Upstream's new base-branch/forge/consent code kept; its two `fm/$id` defaults now call `fm_task_branch` and the lib sources `fm-task-branch-lib.sh`, as the fork did before. |
| `bin/fm-procevent-lavish.sh` | 826e32b, 79d101b, d0ac8f4, cbfb295 (#7) | True clash, decided by the captain (option A) - see below. |
| `bin/fm-spawn.sh` | 89e1459 (#3), 16cc4bd, b7edc11, 153f4e2, de04c2d | Fork's `feature/` branch naming and legacy-brief branch binding re-applied unchanged on upstream's version. |
| `bin/fm-timeout-lib.sh` | 9e8b923 (bash without `BASHPID`) | Upstream fixed the same macOS bash 3.2 bug independently (5838f10, kunchenguid#6028, perl watchdog takes the pre-exec parent). Took upstream's code; the fork's regression test for it is kept and passes on upstream's fix. |
| `docs/architecture.md` | 89e1459 (#3) | `feature/` default and the `fm-task-branch-lib.sh` ownership line re-applied. |
| `tests/fm-brief.test.sh` | 89e1459 (#3), via earlier fork syncs | Expected branch names stay `feature/<id>` in upstream's updated cases. |
| `tests/fm-calm-pi-extension.test.sh` | bc3f178 (#10), 1757302 (#8 CI fix) | Upstream fixed the `/reload` geometry flake its own way (`wait_for_geometry_reload` on a durable status row), so the fork's `pipe-pane` version is dropped. Kept the fork's lookup-counting export renderer, the report-based Chrome hang attempt check, and the `tuiMode: regular` settings pin next to upstream's `--tui-mode regular` flag. |
| `tests/fm-procevent.test.sh` | #7 | Both test sets kept; see the Lavish decision. |
| `tests/fm-review-diff.test.sh` | 89e1459 (#3) | Fork's two unrecorded-`feature/` branch cases re-added; case letters shifted after upstream's new cases. |
| `tests/fm-timeout-lib.test.sh` | 9e8b923 | Fork's no-`BASHPID` test kept on top of upstream's tests. |

## Decision: Lavish list-form parser (captain chose option A)

Both sides fixed the same bug: Lavish emits queued feedback as a TOON list (not a table) when items carry nested content, and the adapter read it as an empty, complete result.

- Fork (#7): one parser that flattens and presents every nested field (table-cell `target:`, `attachments:`, other `fields:`, message uid/selector/text), adds `unpresented_items:`, and refuses `complete: yes` when nested content cannot be parsed.
- Upstream (fc8972c, kunchenguid#5404): one parser that skips nested targets and attachments; its tests assert nested content is absent from `read`. It also adds stricter refusals (unrecognized header keeps its declared count and counts as malformed; `answers`/`reconciles` exit 3 when not fully accounted for), and 228b27d renames the message count to `captain_message_count`.

Options:

- **A (chosen):** keep the fork's presenting parser, port upstream's strictness onto it (declared count + malformed on an unrecognized header, `answers`/`reconciles` exit 3, `captain_message_count`), keep both test sets, and adapt upstream's three "absent" assertions to check nested content appears only under its own labelled section and never replaces the item's own text.
  Cost: this region will likely conflict again on the next upstream sync.
- **B:** take upstream's parser and tests wholesale and drop the fork's nested presentation.
  Cost: Lavish reads lose table-cell location, text-selection range, and image attachment paths.
witt3rd added a commit to witt3rd/firstmate that referenced this pull request Oct 21, 2026