Skip to content

fix(pi): match Pi 1.0 stock tool headers and keep Calm e2e captures in scrollback - #30

Merged
Hozzy02 merged 1 commit into
mainfrom
fm/firstmate-ci-pi-shards-fix
Oct 2, 2026
Merged

Hozzy02 merged 1 commit into
mainfrom
fm/firstmate-ci-pi-shards-fix

Conversation

@Hozzy02

@Hozzy02 Hozzy02 commented Oct 2, 2026

Copy link
Copy Markdown
Owner

Intent

The fork's CI check 'Behavior portable serial 2' and 'Behavior portable serial 4' fail on every fork pull request (25, 26, 27), identically across reruns, so three finished fixes cannot merge green. The failures are in the Pi tests, not in what those pull requests change: serial 2 reports "calm mode was not off by default (missing: 'CALM_E2E_OUTPUT')" and serial 4 (tests/fm-pi-branch-extension.test.sh) reports "Calm-off ToolExecutionComponent rendering differs from Pi stock". Main passed CI four days ago and started failing after the upstream sync merge (fork PR 24); that merge's own run failed other shards (5 and 8).

What Changed

  • .pi/extensions/fm-branch-supervision.ts now builds the fm_branch_outcomes and fm_branch_processed call headers with a stockToolCallHeader helper that matches Pi's stock renderer. Before Pi 0.99 the header is the bold title alone. From Pi 0.99 on it adds key=json args (cut at 100 characters) when collapsed, and muted key: value lines when expanded. The helper reads Pi's VERSION to choose between the two.
  • tests/fm-pi-branch-extension.test.sh adds checks that compare both tools' call headers against Pi's stock rendering. tests/fm-calm-pi-extension.test.sh is reworked so the Calm e2e captures stay in scrollback. Its HTML export check now accepts either omission or default-hidden hook rows for legacy synthetic messages, and still rejects visible leakage.
  • docs/calm.md, docs/calm-mode-feasibility.md and the Pi harness adapter reference are updated to describe the call-header behavior, fm_branch_processed being hidden under Calm, Pi draining queued Firstmate inputs itself, and how legacy operational messages show in HTML exports. The matching pi.md change is a one-line removal.

Risk Assessment

✅ Low: The change is confined to the Pi extension's call-header rendering and its Pi tests; the Pi-version gate and header reconstruction trace correctly for pre-0.99, 0.99+ and 1.x, and the new tests compare against real Pi stock rendering or both version shapes.

Testing

I ran the two affected Pi test files. The branch-extension suite passed, but it uses stub Pi packages, so it does not exercise real Pi 1.0 rendering. The Calm suite skipped the real-Pi stock-render and e2e checks because pi and @earendil-works/pi-coding-agent are not installed. Installing them would be a global npm install, which the workspace rules forbid, and a local npm install attempt was abandoned and cleaned up. Neither reported CI failure (serial 2 and serial 4) could be reproduced or confirmed fixed here. No evidence artifacts were produced.

  • Live validation: ⚠️ inconclusive - 0 of 2 scenarios driven live against the product
Scenario Result Live Evidence
Serial 4: Calm-off ToolExecutionComponent rendering matches Pi 1.0 stock (tests/fm-pi-branch-extension.test.sh) ⏸️ untested no The real @earendil-works/pi-coding-agent 1.0 package is not installed. Provide it by running npm install @earendil-works/pi-coding-agent in the repo (the CI step does this globally) and re-run the t…
Serial 2: Calm mode is off by default and CALM_E2E_OUTPUT is captured in a Pi pane (tests/fm-calm-pi-extension.test.sh) ⏸️ untested no The pi binary is not on PATH, so the e2e launch with --tui-mode regular could not run. Install Pi 1.0 and re-run the test.
  • Outcome: ⚠️ 1 warning across 1 run (3m29s)

Pipeline

Updates from git push no-mistakes

✅ **intent** - passed

✅ No issues found.

✅ **Rebase** - passed

✅ No issues found.

✅ **Review** - passed

✅ No issues found.

⚠️ **Test** - 1 warning
  • ⚠️ live validation verdict: inconclusive (0 of 2 scenarios were driven live against the product); untested: Serial 4: Calm-off ToolExecutionComponent rendering matches Pi 1.0 stock (tests/fm-pi-branch-extension.test.sh), Serial 2: Calm mode is off by default and CALM_E2E_OUTPUT is captured in a Pi pane (tests/fm-calm-pi-extension.test.sh)
  • Live validation: ⚠️ inconclusive - 0 of 2 scenarios driven live against the product
Scenario Result Live Evidence
Serial 4: Calm-off ToolExecutionComponent rendering matches Pi 1.0 stock (tests/fm-pi-branch-extension.test.sh) ⏸️ untested no The real @earendil-works/pi-coding-agent 1.0 package is not installed. Provide it by running npm install @earendil-works/pi-coding-agent in the repo (the CI step does this globally) and re-run the t…
Serial 2: Calm mode is off by default and CALM_E2E_OUTPUT is captured in a Pi pane (tests/fm-calm-pi-extension.test.sh) ⏸️ untested no The pi binary is not on PATH, so the e2e launch with --tui-mode regular could not run. Install Pi 1.0 and re-run the test.
  • bash tests/fm-pi-branch-extension.test.sh (all checks ran and passed against its stub Pi packages)
  • bash tests/fm-calm-pi-extension.test.sh (Pi-dependent checks skipped: package and pi binary not found)
✅ **Document** - passed

✅ No issues found.

✅ **Lint** - passed

✅ No issues found.

✅ **Push** - passed

✅ No issues found.

…n scrollback

Pi 1.0.0 puts call arguments on the stock tool header and defaults to a fullscreen TUI, so the unpinned CI install broke the stock-render comparison and the Calm e2e pane captures.
Port the upstream fixes (kunchenguid/firstmate kunchenguid#6162 Pi parts, kunchenguid#6338): version-gated call headers for fm_branch_outcomes and fm_branch_processed, and --tui-mode regular for Calm e2e launches where the flag exists.
@Hozzy02
Hozzy02 merged commit d5ad0b7 into main Oct 2, 2026
19 checks passed
@Hozzy02
Hozzy02 deleted the fm/firstmate-ci-pi-shards-fix branch October 2, 2026 20:21
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