Skip to content

fix: match Pi 0.99 stock rendering for outcomes tool rows and hidden export messages - #46

Merged
TastyTom13 merged 2 commits into
mainfrom
fm/fm-calm-tests-pi-0-99
Sep 30, 2026
Merged

TastyTom13 merged 2 commits into
mainfrom
fm/fm-calm-tests-pi-0-99

Conversation

@TastyTom13

@TastyTom13 TastyTom13 commented Sep 29, 2026 •

Copy link
Copy Markdown
Owner

Intent

Said 2026-09-29: "Make sure to use the new opus 5.5 and sonnet 5.5 models and not the older 5.0 models." Standing ask from 2026-09-28: keep firstmate's quality and coding standards world-class and keep its CI green.

Context: firstmate CI installs the newest published Pi. Run https://github.com/TastyTom13/firstmate/actions/runs/36633482107 (PR 45, which changes only bin/fm-dod-lib.sh and tests/fm-brief.test.sh) fails two portable serial shards with not ok - rendered export DOM violated the Calm conversation boundary (tests/fm-calm-pi-extension.test.sh) and not ok - Pi outcomes rendering consumers must preserve stock behavior ... Calm-off ToolExecutionComponent rendering differs from Pi stock. That run used [email protected]. The last green main run used [email protected]. So Pi changed its stock rendering between those versions and the Calm extension or its tests no longer match. Every open firstmate PR and the next push to main will fail the same way until this is fixed.

What Changed

  • .pi/extensions/fm-branch-supervision.ts: fm_branch_outcomes and fm_branch_processed now render their call row with the tool's arguments when the installed Pi does that (collapsed key=value pairs, expanded key: value lines). A new probe renders a stock ToolExecutionComponent once to detect this, so Calm-off output matches both Pi 0.99 and older Pi.
  • tests/fm-calm-pi-extension.test.sh: the rendered-export check now accepts the synthetic-input text only inside a hook-message-hidden block, which Pi 0.99 emits for display:false custom messages and hides by default. Any visible hook-message block containing it still fails.
  • docs/calm-mode-feasibility.md: the tool-row table entries for both tools now describe the call-argument probe.

Risk Assessment

✅ Low: The change is small and confined to two Calm-off tool-call renderers and one export-DOM test check. The installed Pi here is 0.84.3, so I could not check the 0.99 format the code mirrors. The failing CI shards are the real check for that.

Testing

I installed the real Pi 0.99.1 (the version CI used) in a throwaway folder and built tmux locally so the full Pi end-to-end test could run. I ran both failing test files on the old commit and on the fix. The old commit failed with the same two errors as the CI run. The fix passes both. Pi 0.84.3 also passes. Temp folders are removed.

  • Live validation: ✅ go - 5 of 5 scenarios driven live against the product
Scenario Result Live Evidence
Calm-mode HTML export, rendered in headless Chrome from a real Pi 0.99.1 session, keeps synthetic input out of visible blocks ✅ pass live calm-e2e-target-pi-0.99.1-tmux.log
Adversarial: the same export test on the old commit against Pi 0.99.1 reproduces the CI failure ✅ pass live calm-e2e-base-pi-0.99.1-tmux.log
Calm-off outcomes tool rows render identically to Pi 0.99.1 stock, collapsed and expanded ✅ pass live branch-ext-target-pi-0.99.1.log
Adversarial: the same stock rendering test on the old commit against Pi 0.99.1 reproduces the CI failure ✅ pass live branch-ext-base-pi-0.99.1.log
Backward compatibility: older Pi 0.84.3 still passes both test files with the fix ✅ pass live fm-calm-pi-extension-target-pi-0.84.3.log and fm-pi-branch-extension-target-pi-0.84.3.log
Evidence: Export DOM test, fix, Pi 0.99.1 with tmux

Source: Export DOM test, fix, Pi 0.99.1 with tmux

ok - Pi calm resolves its persistent home independently of Pi's launch directory
ok - Pi calm compatibility evidence never rejects a Pi version for being newer than 0.82.0, and still fails closed on a missing or malformed version
ok - a missing collapsed-thinking presentation API degrades only that Calm adapter with a clear skip reason, while the rest of Calm still registers
ok - missing Pi presentation class exports reach the independent adapter degradation path
ok - Calm registers none of its 7 built-in tool wrappers at load while config/calm is off, and all 7 synchronously at load while config/calm is on
ok - Calm's first same-session /calm activation claims every uncontested built-in, leaves a foreign bash tool fully intact and callable, warns prominently and logs the contested name, and only rows constructed before that activation - the documented bound - fail to retroactively collapse
ok - Pi calm centralizes transcript visibility, preserves execution/export data, keeps Pi's stock working row visible while no run is active, and persists its choice across session starts
ok - Pi calm on collapses mid-turn assistant working notes to zero height while Calm off keeps them, leaves streaming, truncated-final, and genuine final replies untouched, never mutates the messages, ignores every /calm argument, and restores a legacy persisted max as ordinary Calm on
ok - Pi operational follow-up E2E processes exact user-role notifications once while Calm hides current and adjacent rows, Calm off and absent render them, and restart preserves semantics
ok - Pi Calm native /skill:ahoy geometry keeps every collapsed thinking and tool block at zero height while preserving expansion, history, restart, and Calm-off rendering
ok - Pi Calm working ship keeps its centered two-row asymmetric Unicode boat inside a deterministic long-wave trough, paints all water standard blue and the whole boat standard yellow with balanced resets, keeps ANSI-stripped width exact, reverses cleanly at both edges and every width, clamps visible and hidden resizes, falls back deterministically when narrow, freezes and resumes across settle/start without hidden-time jumps or duplicate timers, resets only on a fresh session, and leaves Calm-off visibility untouched
ok - the rendered-export-DOM guard renders in one pass, retries a bounded number of Chrome start-up failures, and reports the Chrome binary, Chrome version, Pi version, exit status, and Chrome diagnostic when every attempt fails
ok - Pi calm native E2E replaces the stock working row with a moving, resize-clamped working ship that freezes and resumes across two working periods in one Pi session, clears on abort, keeps captain turns visible, hides exact operational user rows without changing persistence, restores stock rendering Calm-off, survives restart, and preserves export plus Ctrl+O behavior
bash tests/fm-calm-pi-extension.test.sh  5.63s user 3.60s system 24% cpu 38.469 total
Evidence: Export DOM test, old commit, Pi 0.99.1 (fails)

Source: Export DOM test, old commit, Pi 0.99.1 (fails)

ok - Pi calm resolves its persistent home independently of Pi's launch directory
ok - Pi calm compatibility evidence never rejects a Pi version for being newer than 0.82.0, and still fails closed on a missing or malformed version
ok - a missing collapsed-thinking presentation API degrades only that Calm adapter with a clear skip reason, while the rest of Calm still registers
ok - missing Pi presentation class exports reach the independent adapter degradation path
ok - Calm registers none of its 7 built-in tool wrappers at load while config/calm is off, and all 7 synchronously at load while config/calm is on
ok - Calm's first same-session /calm activation claims every uncontested built-in, leaves a foreign bash tool fully intact and callable, warns prominently and logs the contested name, and only rows constructed before that activation - the documented bound - fail to retroactively collapse
ok - Pi calm centralizes transcript visibility, preserves execution/export data, keeps Pi's stock working row visible while no run is active, and persists its choice across session starts
ok - Pi calm on collapses mid-turn assistant working notes to zero height while Calm off keeps them, leaves streaming, truncated-final, and genuine final replies untouched, never mutates the messages, ignores every /calm argument, and restores a legacy persisted max as ordinary Calm on
ok - Pi operational follow-up E2E processes exact user-role notifications once while Calm hides current and adjacent rows, Calm off and absent render them, and restart preserves semantics
ok - Pi Calm native /skill:ahoy geometry keeps every collapsed thinking and tool block at zero height while preserving expansion, history, restart, and Calm-off rendering
ok - Pi Calm working ship keeps its centered two-row asymmetric Unicode boat inside a deterministic long-wave trough, paints all water standard blue and the whole boat standard yellow with balanced resets, keeps ANSI-stripped width exact, reverses cleanly at both edges and every width, clamps visible and hidden resizes, falls back deterministically when narrow, freezes and resumes across settle/start without hidden-time jumps or duplicate timers, resets only on a fresh session, and leaves Calm-off visibility untouched
ok - the rendered-export-DOM guard renders in one pass, retries a bounded number of Chrome start-up failures, and reports the Chrome binary, Chrome version, Pi version, exit status, and Chrome diagnostic when every attempt fails
not ok - rendered export DOM violated the Calm conversation boundary
Evidence: Stock rendering test, fix, Pi 0.99.1

Source: Stock rendering test, fix, Pi 0.99.1

ok - fm_branch_outcomes hides through ToolExecutionComponent while Calm-off and HTML export stay stock
ok - the installed Pi still bounds the picker's list and ranks its search
ok - branch owns accepted wakes with a stable prefix and deterministic verdict-driven delivery
ok - a captain outcome reaches main's model as one typed, sequence-keyed processing request while routine notes stay plain
ok - requested and unsolicited healthy outcomes keep distinct delivery and event ownership
ok - captain outcomes are exact and exactly once across crash, reload, busy main, compaction, and an unrelated assistant response
ok - a captain outcome opens one sequence-keyed processing turn, survives empty and unrelated answers, is re-presented at run end and session start, and closes only on its acknowledgement
ok - scopeForUnreadWake excludes every main-only class without vetoing eligible task-local rows, and writes the eligible snapshot
ok - branch prompt_cache_key is stable per home across sessions and distinct between homes
ok - branch default-on eligibility (task-scoped, heartbeat, afk) binds and a broken branch rejects to watcher fallback
ok - a heartbeat review survives a check row arriving before its drain
ok - fm_branch_report refuses a task the wake did not name, fleet included, while a heartbeat is unscoped
ok - pre-drain eligibility re-check excludes a newly main-owned row without deferring eligible work
ok - a co-present needs-decision row neither vetoes nor falsely settles routine branch delivery
ok - a settled branch turn without a durable outcome falls back and releases its grant for main replay
ok - provider-error latches cool down, re-probe once with backoff, and recover through a durable report
ok - selection changes preserve in-flight transcript ownership and reset provider-error streaks
ok - a stale main claim returns the durable wake to watcher delivery
ok - pre-drain eligibility re-check no-ops an already-drained wake
ok - dialog mirror filters tool and operational traffic, lands before wakes, and keeps a durable cursor
ok - the dialog mirror re-anchors for each session's new branch conversation and stays incremental within it
ok - every main session start begins a new branch conversation while one session keeps its own
ok - the current pin state binds every branch build, and clearing it returns the branch to main's model
ok - unpinned branches follow main model changes live while pinned branches stay fixed
ok - supervision-model command persists the captain's pick and rebinds the live branch
ok - supervision-model opens a bounded searchable list, follow main first, and pins the branch alone
ok - branch model picker keeps follow main first and filters the eligible catalog
ok - the effort pin binds every branch build, and clearing it returns the branch to main's effort
ok - unpinned branches follow main effort changes live while pinned branches stay fixed
ok - an extension-registered provider resolves in the isolated branch runtime
ok - supervision-model runs an effort picker after the model picker and persists both independently
ok - an unusable model pin rejects to watcher fallback and an unparseable one is treated as no pin
ok - replacement activation cleans old branch leases and retries failed cleanup
ok - branch activates on a cold start once the lock is acquired, never before
ok - queued wakes and mirrors stop mutating branch state after lock ownership is lost
ok - stale reports, shells, mirrors, cursors, leases, and prompts perform no side effects
ok - a Pi session that does not own the lock accepts nothing and mutates no branch state
ok - an extension rebind re-mirrors undelivered dialog instead of dropping it
ok - outcome delivery keeps the event loop running and interleaved reports stay ordered and exactly once
ok - a session replaced mid-delivery cancels cleanly and the stored outcome still arrives exactly once
ok - a failing store script surfaces to the branch and its outcome is neither lost nor delivered twice
ok - a failed cursor write re-delivers a routine note exactly once more while a captain outcome stays deduplicated
bash tests/fm-pi-branch-extension.test.sh  25.65s user 32.96s system 79% cpu 1:13.96 total
Evidence: Stock rendering test, old commit, Pi 0.99.1 (fails)

Source: Stock rendering test, old commit, Pi 0.99.1 (fails)

not ok - Pi outcomes rendering consumers must preserve stock behavior: file:///private/var/folders/08/gk0k1cz96snd794rnghc_98r0000gn/T/fm-pi-branch-extension.3cOShl/stock-render-consumers/[eval1]:71
  throw new Error("Calm-off ToolExecutionComponent rendering differs from Pi stock");
        ^

Error: Calm-off ToolExecutionComponent rendering differs from Pi stock
    at file:///private/var/folders/08/gk0k1cz96snd794rnghc_98r0000gn/T/fm-pi-branch-extension.3cOShl/stock-render-consumers/[eval1]:71:9
    at process.processTicksAndRejections (node:internal/process/task_queues:104:5)

Node.js v24.14.1: expected exit 0, got 1
Evidence: Calm test, fix, Pi 0.84.3

Source: Calm test, fix, Pi 0.84.3

ok - Pi calm resolves its persistent home independently of Pi's launch directory
ok - Pi calm compatibility evidence never rejects a Pi version for being newer than 0.82.0, and still fails closed on a missing or malformed version
ok - a missing collapsed-thinking presentation API degrades only that Calm adapter with a clear skip reason, while the rest of Calm still registers
ok - missing Pi presentation class exports reach the independent adapter degradation path
ok - Calm registers none of its 7 built-in tool wrappers at load while config/calm is off, and all 7 synchronously at load while config/calm is on
ok - Calm's first same-session /calm activation claims every uncontested built-in, leaves a foreign bash tool fully intact and callable, warns prominently and logs the contested name, and only rows constructed before that activation - the documented bound - fail to retroactively collapse
ok - Pi calm centralizes transcript visibility, preserves execution/export data, keeps Pi's stock working row visible while no run is active, and persists its choice across session starts
ok - Pi calm on collapses mid-turn assistant working notes to zero height while Calm off keeps them, leaves streaming, truncated-final, and genuine final replies untouched, never mutates the messages, ignores every /calm argument, and restores a legacy persisted max as ordinary Calm on
ok - Pi operational follow-up E2E processes exact user-role notifications once while Calm hides current and adjacent rows, Calm off and absent render them, and restart preserves semantics
ok - Pi Calm native /skill:ahoy geometry keeps every collapsed thinking and tool block at zero height while preserving expansion, history, restart, and Calm-off rendering
ok - Pi Calm working ship keeps its centered two-row asymmetric Unicode boat inside a deterministic long-wave trough, paints all water standard blue and the whole boat standard yellow with balanced resets, keeps ANSI-stripped width exact, reverses cleanly at both edges and every width, clamps visible and hidden resizes, falls back deterministically when narrow, freezes and resumes across settle/start without hidden-time jumps or duplicate timers, resets only on a fresh session, and leaves Calm-off visibility untouched
ok - the rendered-export-DOM guard renders in one pass, retries a bounded number of Chrome start-up failures, and reports the Chrome binary, Chrome version, Pi version, exit status, and Chrome diagnostic when every attempt fails
ok - Pi calm native E2E replaces the stock working row with a moving, resize-clamped working ship that freezes and resumes across two working periods in one Pi session, clears on abort, keeps captain turns visible, hides exact operational user rows without changing persistence, restores stock rendering Calm-off, survives restart, and preserves export plus Ctrl+O behavior
Evidence: Branch test, fix, Pi 0.84.3

Source: Branch test, fix, Pi 0.84.3

skip: installed Pi 0.84.3 predates the stock renderer contract 0.84.4 this case compares against
ok - the installed Pi still bounds the picker's list and ranks its search
ok - branch owns accepted wakes with a stable prefix and deterministic verdict-driven delivery
ok - a captain outcome reaches main's model as one typed, sequence-keyed processing request while routine notes stay plain
ok - requested and unsolicited healthy outcomes keep distinct delivery and event ownership
ok - captain outcomes are exact and exactly once across crash, reload, busy main, compaction, and an unrelated assistant response
ok - a captain outcome opens one sequence-keyed processing turn, survives empty and unrelated answers, is re-presented at run end and session start, and closes only on its acknowledgement
ok - scopeForUnreadWake excludes every main-only class without vetoing eligible task-local rows, and writes the eligible snapshot
ok - branch prompt_cache_key is stable per home across sessions and distinct between homes
ok - branch default-on eligibility (task-scoped, heartbeat, afk) binds and a broken branch rejects to watcher fallback
ok - a heartbeat review survives a check row arriving before its drain
ok - fm_branch_report refuses a task the wake did not name, fleet included, while a heartbeat is unscoped
ok - pre-drain eligibility re-check excludes a newly main-owned row without deferring eligible work
ok - a co-present needs-decision row neither vetoes nor falsely settles routine branch delivery
ok - a settled branch turn without a durable outcome falls back and releases its grant for main replay
ok - provider-error latches cool down, re-probe once with backoff, and recover through a durable report
ok - selection changes preserve in-flight transcript ownership and reset provider-error streaks
ok - a stale main claim returns the durable wake to watcher delivery
ok - pre-drain eligibility re-check no-ops an already-drained wake
ok - dialog mirror filters tool and operational traffic, lands before wakes, and keeps a durable cursor
ok - the dialog mirror re-anchors for each session's new branch conversation and stays incremental within it
ok - every main session start begins a new branch conversation while one session keeps its own
ok - the current pin state binds every branch build, and clearing it returns the branch to main's model
ok - unpinned branches follow main model changes live while pinned branches stay fixed
ok - supervision-model command persists the captain's pick and rebinds the live branch
ok - supervision-model opens a bounded searchable list, follow main first, and pins the branch alone
ok - branch model picker keeps follow main first and filters the eligible catalog
ok - the effort pin binds every branch build, and clearing it returns the branch to main's effort
ok - unpinned branches follow main effort changes live while pinned branches stay fixed
ok - an extension-registered provider resolves in the isolated branch runtime
ok - supervision-model runs an effort picker after the model picker and persists both independently
ok - an unusable model pin rejects to watcher fallback and an unparseable one is treated as no pin
ok - replacement activation cleans old branch leases and retries failed cleanup
ok - branch activates on a cold start once the lock is acquired, never before
ok - queued wakes and mirrors stop mutating branch state after lock ownership is lost
ok - stale reports, shells, mirrors, cursors, leases, and prompts perform no side effects
ok - a Pi session that does not own the lock accepts nothing and mutates no branch state
ok - an extension rebind re-mirrors undelivered dialog instead of dropping it
ok - outcome delivery keeps the event loop running and interleaved reports stay ordered and exactly once
ok - a session replaced mid-delivery cancels cleanly and the stored outcome still arrives exactly once
ok - a failing store script surfaces to the branch and its outcome is neither lost nor delivered twice
ok - a failed cursor write re-delivers a routine note exactly once more while a captain outcome stays deduplicated

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 - 5 of 5 scenarios driven live against the product
Scenario Result Live Evidence
Calm-mode HTML export, rendered in headless Chrome from a real Pi 0.99.1 session, keeps synthetic input out of visible blocks ✅ pass live calm-e2e-target-pi-0.99.1-tmux.log
Adversarial: the same export test on the old commit against Pi 0.99.1 reproduces the CI failure ✅ pass live calm-e2e-base-pi-0.99.1-tmux.log
Calm-off outcomes tool rows render identically to Pi 0.99.1 stock, collapsed and expanded ✅ pass live branch-ext-target-pi-0.99.1.log
Adversarial: the same stock rendering test on the old commit against Pi 0.99.1 reproduces the CI failure ✅ pass live branch-ext-base-pi-0.99.1.log
Backward compatibility: older Pi 0.84.3 still passes both test files with the fix ✅ pass live fm-calm-pi-extension-target-pi-0.84.3.log and fm-pi-branch-extension-target-pi-0.84.3.log
  • FM_PI_PACKAGE_DIR=<pi 0.99.1> bash tests/fm-calm-pi-extension.test.sh on fix (tmux + Chrome present): pass
  • same command on 98fa108: fails with 'rendered export DOM violated the Calm conversation boundary'
  • FM_PI_PACKAGE_DIR=<pi 0.99.1> bash tests/fm-pi-branch-extension.test.sh on fix: pass
  • same command on 98fa108: fails with 'Pi outcomes rendering consumers must preserve stock behavior'
  • both test files on fix against Pi 0.84.3: pass
✅ **Document** - passed

✅ No issues found.

✅ **Lint** - passed

✅ No issues found.

✅ **Push** - passed

✅ No issues found.

Built by: claude/sonnet at medium

@TastyTom13
TastyTom13 merged commit dbefedb into main Sep 30, 2026
16 checks passed
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