Skip to content

fix: restore portable CI across Pi 0.99 rendering and remote provisioning - #23

Merged
zakna merged 1 commit into
mainfrom
fm/fm-ci-pi-099-o1
Oct 2, 2026
Merged

zakna merged 1 commit into
mainfrom
fm/fm-ci-pi-099-o1

Conversation

@zakna

@zakna zakna commented Oct 1, 2026

Copy link
Copy Markdown
Owner

Intent

Fix the red CI on this repository's main branch so pull requests can pass their checks again.

Context: since Pi 0.99.0 and 0.99.1 were released on 2026-09-29, CI installs Pi unpinned and two portable serial shards fail on main and on every branch: tests/fm-calm-pi-extension.test.sh ("rendered export DOM violated the Calm conversation boundary") and tests/fm-pi-branch-extension.test.sh ("Calm-off ToolExecutionComponent rendering differs from Pi stock"). The last green main run used Pi 0.87.1. Upstream kunchenguid/firstmate fixed this in commit e2668de, "fix: restore portable CI behavior across Pi rendering and remote provisioning (kunchenguid#6162)", 2026-09-29, which this fork does not have. Five pull requests from today's retro changes are waiting on green checks.

What Changed

  • fm_branch_outcomes and fm_branch_processed now build their Calm-off call header to match the installed Pi's stock header. Before Pi 0.99, the header is the bold title alone. From Pi 0.99, a collapsed call shows key=json arguments cut to 100 characters, and an expanded call shows muted key: value lines. Tests check both headers against pre-0.99 and 0.99+ rendering. The Calm export DOM check now accepts legacy synthetic rows that are either left out or hidden by default, and still fails if they are visible.
  • bin/fm-remote-home-provision.sh now clones with --no-local, which avoids an intermittent "failed to copy file" error on Git 2.55. bin/fm-dispatch-resolve.sh now names every profile missing a provider: instead of stopping at the first one. bin/fm-brief-heading-lib.sh now passes the task body through a here-string instead of a pipe.
  • docs/calm.md and docs/calm-mode-feasibility.md now cover the call-argument header, fm_branch_processed hiding, how legacy rows appear in exports on each Pi version, and the case where Pi drains queued Firstmate inputs itself.

Risk Assessment

✅ Low: This change ports the upstream fix e2668de. Production code changes are small: a header renderer gated on the Pi version (VERSION is exported by the installed Pi), --no-local clones, here-strings that avoid SIGPIPE under pipefail, and an aggregated provider diagnostic. The test updates target the two failing shards and assert behavior through real Pi components.

Testing

I installed Pi 0.99.1 and 0.99.2 in temporary prefixes and ran the two failing shards against the base and fix commits. These shards drive real Pi in tmux, a stock-render comparison, and a Chrome-rendered HTML export. With the fix, both shards pass on 0.87.1, 0.99.1 and 0.99.2. On the base commit, the branch-extension shard fails with the exact CI error, so that regression is reproduced and fixed. The base Calm shard passes on macOS with 0.99.x; its export-DOM failure only shows up on CI's Ubuntu runner, which I couldn't run here. The touched dispatch-resolve and supervision-host tests also pass. All logs are in the evidence directory.

  • Live validation: ✅ go - 5 of 6 scenarios driven live against the product
Scenario Result Live Evidence
With Pi 0.99.1, the Calm-off ToolExecutionComponent rendering matches Pi stock (fm-pi-branch-extension shard passes) ✅ pass live fix-pi0.99.1-fm-pi-branch-extension.log; base-pi0.99.1-fm-pi-branch-extension.log fails with 'Calm-off ToolExecutionComponent rendering differs from Pi stock'
With Pi 0.99.2 (the version CI installs today), the branch-extension shard passes ✅ pass live fix-pi0.99.2-fm-pi-branch-extension.log
With Pi 0.99.x, the Calm export's visible conversation column shows no synthetic Firstmate rows (fm-calm-pi-extension shard passes on macOS) ✅ pass live fix-pi0.99.1-fm-calm-pi-extension.log, fix-pi0.99.2-fm-calm-pi-extension.log
The Calm export-DOM failure seen on CI's Ubuntu runner is reproduced on the base commit and fixed by this change ⏸️ untested no The failure is specific to the Linux Chrome/Ubuntu runner. This macOS host has no running container runtime (colima is installed but stopped, and starting it would change system state), so the Linux p…
The older Pi 0.87.1 still passes both shards after the fix ✅ pass live fix-pi0.87.1-fm-calm-pi-extension.log, fix-pi0.87.1-fm-pi-branch-extension.log
The other changes in the commit (dispatch-resolve, supervision-host, remote provisioning) leave their tests green ✅ pass live fix-fm-dispatch-resolve.log, fix-fm-supervision-host.log
Evidence: Base + Pi 0.99.1: branch-extension shard fails with the CI error

Source: Base + Pi 0.99.1: branch-extension shard fails with the CI error

not ok - Pi outcomes rendering consumers must preserve stock behavior: file:///private/var/folders/hk/lxr6ppq904ng8dxkxskjs5180000gn/T/fm-pi-branch-extension.xeYjna/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/hk/lxr6ppq904ng8dxkxskjs5180000gn/T/fm-pi-branch-extension.xeYjna/stock-render-consumers/[eval1]:71:9
    at process.processTicksAndRejections (node:internal/process/task_queues:104:5)

Node.js v26.8.2: expected exit 0, got 1
Evidence: Fix + Pi 0.99.1: branch-extension shard passes

Source: Fix + Pi 0.99.1: branch-extension shard passes

ok - fm_branch_outcomes and fm_branch_processed call headers match stock on Pi before and from 0.99
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 - second-mate signal rows route by their new span while crewmate and stale routing stay unchanged
ok - branch prompt_cache_key is stable per home across sessions and distinct between homes
ok - branch default-on eligibility (task-scoped, heartbeat, legacy flag ignored) binds and a broken branch rejects to watcher fallback
ok - under the away-posture record the wake carries the verbatim read-back tail, claims every row, opens no processing turn, cancels a pending request, and presents the accumulated rows after archive
ok - Pi branch: an unchanged held outcome reaches the captain once across cadences, and a later red check on the task still does
ok - an accepted away-only wake rejects after archive, while a drained task-local wake stays a quiet no-op
ok - a claimed heartbeat row on a non-heartbeat away wake lifts task scoping for the fleet report
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
Evidence: Fix + Pi 0.99.2: branch-extension shard passes

Source: Fix + Pi 0.99.2: branch-extension shard passes

ok - fm_branch_outcomes and fm_branch_processed call headers match stock on Pi before and from 0.99
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 - second-mate signal rows route by their new span while crewmate and stale routing stay unchanged
ok - branch prompt_cache_key is stable per home across sessions and distinct between homes
ok - branch default-on eligibility (task-scoped, heartbeat, legacy flag ignored) binds and a broken branch rejects to watcher fallback
ok - under the away-posture record the wake carries the verbatim read-back tail, claims every row, opens no processing turn, cancels a pending request, and presents the accumulated rows after archive
ok - Pi branch: an unchanged held outcome reaches the captain once across cadences, and a later red check on the task still does
ok - an accepted away-only wake rejects after archive, while a drained task-local wake stays a quiet no-op
ok - a claimed heartbeat row on a non-heartbeat away wake lifts task scoping for the fleet report
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
Evidence: Fix + Pi 0.99.1: Calm shard passes (incl. rendered export DOM)

Source: Fix + Pi 0.99.1: Calm shard passes (incl. rendered export DOM)

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 hides queued Firstmate rows only on a session that can keep them, keeps hidden ones out of the editor on Escape, delivers them once in order, and leaves unsupported sessions and Calm off stock
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 0.99.1 with Calm on hides and retains queued Firstmate input through Escape, delivers it once, and leaves Calm off stock
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: Fix + Pi 0.99.2: Calm shard passes

Source: Fix + Pi 0.99.2: Calm shard passes

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 hides queued Firstmate rows only on a session that can keep them, keeps hidden ones out of the editor on Escape, delivers them once in order, and leaves unsupported sessions and Calm off stock
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 0.99.2 with Calm on hides and retains queued Firstmate input through Escape, delivers it once, and leaves Calm off stock
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: Fix + Pi 0.87.1: Calm shard still passes

Source: Fix + Pi 0.87.1: Calm shard still passes

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 hides queued Firstmate rows only on a session that can keep them, keeps hidden ones out of the editor on Escape, delivers them once in order, and leaves unsupported sessions and Calm off stock
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 0.87.1 with Calm on hides and retains queued Firstmate input through Escape, delivers it once, and leaves Calm off stock
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: Fix + Pi 0.87.1: branch-extension shard still passes

Source: Fix + Pi 0.87.1: branch-extension shard still passes

ok - fm_branch_outcomes and fm_branch_processed call headers match stock on Pi before and from 0.99
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 - second-mate signal rows route by their new span while crewmate and stale routing stay unchanged
ok - branch prompt_cache_key is stable per home across sessions and distinct between homes
ok - branch default-on eligibility (task-scoped, heartbeat, legacy flag ignored) binds and a broken branch rejects to watcher fallback
ok - under the away-posture record the wake carries the verbatim read-back tail, claims every row, opens no processing turn, cancels a pending request, and presents the accumulated rows after archive
ok - Pi branch: an unchanged held outcome reaches the captain once across cadences, and a later red check on the task still does
ok - an accepted away-only wake rejects after archive, while a drained task-local wake stays a quiet no-op
ok - a claimed heartbeat row on a non-heartbeat away wake lifts task scoping for the fleet report
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
Evidence: Base + Pi 0.99.2: Calm shard passes on macOS (CI failure not reproduced locally)

Source: Base + Pi 0.99.2: Calm shard passes on macOS (CI failure not reproduced locally)

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 hides queued Firstmate rows only on a session that can keep them, keeps hidden ones out of the editor on Escape, delivers them once in order, and leaves unsupported sessions and Calm off stock
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 0.99.2 with Calm on keeps a queued Firstmate notification unlisted, out of the editor on Escape, and delivers it once in a new announced turn, while Calm off stays stock
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: Fix: dispatch-resolve test

Source: Fix: dispatch-resolve test

ok - absent key is off: one stderr line, exit 0, no network call
ok - TYPESAFE_API_KEY= in .env activates the tool; environment and config overrides work
ok - clear: one rule Choice request, key on the fd header only, spendPriority argmax over every candidate
ok - never-send list withholds the request on a match or a bad list, and never prints the value
ok - provider lookup reads its whole table, so an ignored SIGPIPE adds no diagnostic line
ok - rules snapshots and shell quoting preserve the profile protocol
ok - no-rule fallback, Agy, Gemini, and documented configurations resolve
ok - ambiguous: confidence below the fixed floor hands the decision back
ok - per-rule confidence floors fall to the most probable runner-up that clears its own floor
ok - only the brief's task sections and scout tag reach the model, with a whole-brief fallback
ok - escalate: a rule declared approval: captain never yields a profile
ok - rule floor: known shortfall falls through while unavailable evidence escalates
ok - declared provider and profile floor evidence are applied in code
ok - nonnumeric spendPriority evidence is never ranked
ok - partial and missing quota evidence remain eligible but unranked
ok - provider-wide and exact quota rows combine into one limiting candidate
ok - default: no rule matched resolves among the default profiles
ok - tie: equal spendPriority never breaks by array order
ok - no rankable candidate: the tool escalates instead of guessing
ok - native Codex binds to codex-home before default, independently of Pi accounts and row order
ok - Pi native adapters bind to codex-home with existing fallbacks and schema 5 compatibility
ok - schema 6: each candidate binds to its account row; schema 5 is unchanged
ok - quota evidence comes from one quota-axi --json read, and its failure is an error outcome
ok - API, transport, and response failures are error outcomes with exit 0
ok - configuration errors exit 2 before any network call
# all fm-dispatch-resolve tests passed

Pipeline

Updates from git push no-mistakes

✅ **intent** - passed

✅ No issues found.

✅ **Rebase** - passed

✅ No issues found.

⚠️ **Review** - 2 infos
  • ℹ️ .pi/extensions/fm-branch-supervision.ts:2156 - stockToolCallHeader reimplements Pi's private formatToolCallWithArgs (100-char collapsed cut, expanded key: value lines) and gates on VERSION minor >= 99. Any later Pi change to that header format breaks Calm-off parity again. tests/fm-pi-branch-extension.test.sh compares fm_branch_processed against the real installed ToolExecutionComponent, so CI catches drift, but only after Pi releases. This port matches upstream e2668de and needs no action.
  • ℹ️ tests/fm-calm-pi-extension.test.sh:2647 - The comment says 'Pi before 0.87 drains the retained queue', but the version gate requires >= 0.87.1 before it asserts the 'continues in a new turn' status. On Pi 0.87.0 the announcement is never checked. The comment and the threshold disagree by one patch version. The behavior is harmless for CI, which runs either 0.87.1 or 0.99+.
✅ **Test** - passed

✅ No issues found.

  • Live validation: ✅ go - 5 of 6 scenarios driven live against the product
Scenario Result Live Evidence
With Pi 0.99.1, the Calm-off ToolExecutionComponent rendering matches Pi stock (fm-pi-branch-extension shard passes) ✅ pass live fix-pi0.99.1-fm-pi-branch-extension.log; base-pi0.99.1-fm-pi-branch-extension.log fails with 'Calm-off ToolExecutionComponent rendering differs from Pi stock'
With Pi 0.99.2 (the version CI installs today), the branch-extension shard passes ✅ pass live fix-pi0.99.2-fm-pi-branch-extension.log
With Pi 0.99.x, the Calm export's visible conversation column shows no synthetic Firstmate rows (fm-calm-pi-extension shard passes on macOS) ✅ pass live fix-pi0.99.1-fm-calm-pi-extension.log, fix-pi0.99.2-fm-calm-pi-extension.log
The Calm export-DOM failure seen on CI's Ubuntu runner is reproduced on the base commit and fixed by this change ⏸️ untested no The failure is specific to the Linux Chrome/Ubuntu runner. This macOS host has no running container runtime (colima is installed but stopped, and starting it would change system state), so the Linux p…
The older Pi 0.87.1 still passes both shards after the fix ✅ pass live fix-pi0.87.1-fm-calm-pi-extension.log, fix-pi0.87.1-fm-pi-branch-extension.log
The other changes in the commit (dispatch-resolve, supervision-host, remote provisioning) leave their tests green ✅ pass live fix-fm-dispatch-resolve.log, fix-fm-supervision-host.log
  • npm install -g --prefix <tmp>/<v> @earendil-works/pi-coding-agent@<v> for v=0.99.1 and v=0.99.2 (temp prefixes, removed afterwards)
  • FM_PI_PACKAGE_DIR=<pi pkg> PATH=<pi bin>:$PATH bash tests/fm-calm-pi-extension.test.sh on the fix with Pi 0.87.1, 0.99.1, 0.99.2
  • FM_PI_PACKAGE_DIR=<pi pkg> PATH=<pi bin>:$PATH bash tests/fm-pi-branch-extension.test.sh on the fix with Pi 0.87.1, 0.99.1, 0.99.2
  • Same two shards on the base commit 51187ae (git archive into tmp) with Pi 0.99.1, plus the Calm shard with 0.99.2
  • bash tests/fm-dispatch-resolve.test.sh and bash tests/fm-supervision-host.test.sh on the fix
  • gh run view 36860229331 --log-failed to confirm the CI failure signatures and that CI installs Pi 0.99.2 on Ubuntu 24.04
✅ **Document** - passed

✅ No issues found.

✅ **Lint** - passed

✅ No issues found.

✅ **Push** - passed

✅ No issues found.

…isioning (kunchenguid#6162)

* fix: survive Pi 0.99 rendering and Git 2.55 local-clone races

Pi 0.99 puts arguments on the stock tool header and leaves hidden custom messages in the export conversation column. Match that header, and keep Calm's boundary on the visible column. Clone a remote home with --no-local so a prune during Git's loose-object copy cannot fail the seed.

* no-mistakes(review): Stop SIGPIPE write errors; cover older Pi export and project clones

* no-mistakes(document): Clarify Calm export visibility and tool rendering

* no-mistakes(ci): Fixed the dispatch diagnostic to list every provider-less use/default profile in one line and added a multi-profile behavior test. Shortened supervision fixtures using the existing engine-grace and park-clock knobs; removed stray scratch files. Dispatch tests, syntax checks, and three targeted supervision cases passed. CI’s prior supervision duration was 751s; the single permitted local full-suite run timed out at 1200s, so an after-duration is not established. The cancelled serial check had no failure verdict. The outer executor should record the measured before/after duration in the PR body when available

* no-mistakes(review): Gate Pi 0.99 call headers by version; drop hidden-row assertion

* no-mistakes(review): Test stock call headers under Pi 0.87 and 0.99 stubs

* no-mistakes(test): Fix older-Pi queued-row test and verify park-boundary behavior

* no-mistakes(document): Clarify Pi Calm export and queued-turn documentation

* no-mistakes(ci): Fixed the stock macOS Bash 3.2 parse failure in tests/fm-calm-pi-extension.test.sh; its parse check passes. The watcher CI failure is in unchanged code: the isolated five-minute/66-minute case passes locally, but the CI log omits the drain error needed to establish its cause. No speculative watcher fix was made. The full local watcher suite timed out after 500 seconds

(cherry picked from commit e2668de)
Copilot AI balanced review requested due to automatic review settings October 1, 2026 14:22
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

The brief-parser SIGPIPE fix lacks a regression test reproducing the large-body failure.

Review effort: Balanced
Findings: None

What changed in this PR

Captain, this PR ports the upstream compatibility fix restoring portable CI across Pi versions and remote provisioning.

Changes:

  • Matches Pi 0.99+ rendering while preserving older behavior.
  • Hardens cloning, brief parsing, and dispatch diagnostics.
  • Expands regression coverage and Calm documentation.
File Description
.pi/​extensions/​fm-branch-supervision.ts Matches version-specific Pi call headers.
bin/​fm-brief-heading-lib.sh Avoids pipefail/SIGPIPE parsing failures.
bin/​fm-dispatch-resolve.sh Aggregates missing-provider diagnostics.
bin/​fm-remote-home-provision.sh Forces transport-based local clones.
docs/​calm-mode-feasibility.md Updates rendering audit and coverage.
docs/​calm.md Documents current queue and export behavior.
tests/​fm-calm-pi-extension.test.sh Covers Pi queue and export differences.
tests/​fm-dispatch-resolve.test.sh Tests aggregated diagnostics.
tests/​fm-pi-branch-extension.test.sh Tests headers across Pi versions.
tests/​fm-supervision-host.test.sh Makes boundary testing deterministic.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@zakna
zakna merged commit e4267cc into main Oct 2, 2026
20 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.

3 participants