Skip to content

fix(pi): match Pi 0.99 stock tool titles and HTML exports - #19

Merged
JacyAnderson merged 1 commit into
mainfrom
pi-099-compat
Sep 29, 2026
Merged

JacyAnderson merged 1 commit into
mainfrom
pi-099-compat

Conversation

@JacyAnderson

@JacyAnderson JacyAnderson commented Sep 29, 2026 •

Copy link
Copy Markdown
Owner

CI on main started failing once the unpinned Pi install in .github/workflows/ci.yml picked up @earendil-works/pi-coding-agent 0.99.0, with 0.99.1 following an hour later.
The tree was identical to the last green run, which had installed 0.87.1.
This adapts Firstmate to Pi 0.99 instead of pinning the old version.

I ran each failing test against isolated installs of 0.87.1 and 0.99.0 to separate Pi changes from flakes:

  • Calm-off ToolExecutionComponent rendering differs from Pi stock (serial shard 4) is caused by Pi 0.99.0. It passes on 0.87.1 and fails on 0.99.0 every time. Pi's stock call fallback now puts a tool's arguments in its title (fm_branch_outcomes recent=2 collapsed, one key: value line per argument expanded), while the extension's self-rendered shell printed the bare tool name.
  • rendered export DOM violated the Calm conversation boundary (serial shard 2) is caused by Pi 0.99.0. It passes on 0.87.1 and fails on 0.99.0 every time. The HTML export now writes display: false custom messages into the conversation as hook-message-hidden rows that its stylesheet hides until the reader presses H, where 0.87.1 left them out of the markup. The synthetic input is still hidden by default, but its marker is now in the DOM, which the old assertion rejected.
  • third reply generation was not captured (serial shard 5) is not caused by Pi. Neither the test nor the relay code it drives touches Pi, and it failed at the test's 40 second capture wait. It passed 3 of 3 runs on each Pi version locally.
  • remote seed did not provision the route under test (serial shard 5) is not caused by Pi. The clone of the freshly committed fixture repository lost a loose object, because Git 2.54 repacks in a detached background process right after that commit and can prune objects the clone is still copying. It also failed on 0.87.1 earlier the same day, and it passed 3 of 3 runs on each Pi version locally. It is left for separate follow-up.

The changes:

  • fm_branch_outcomes and fm_branch_processed mirror Pi's call title. The one-time probe that already measures Pi's stock preview line count also records whether the installed stock title lists arguments, and both renderers follow it, so Pi 0.87.1 keeps the bare title and 0.99.x shows the arguments. Pi does not export formatToolCallWithArgs, so its format is mirrored rather than imported.
  • The Calm export-DOM assertion checks the guarantee rather than the old markup: every custom-message row in the conversation must be a hidden row, the synthetic marker may appear only inside hidden rows, and when hidden rows exist the export must hide them by default. It still passes on 0.87.1's markup.
  • The stock-render comparison also covers fm_branch_processed, collapsed and expanded.
  • docs/calm-mode-feasibility.md gets a dated Pi 0.99.0 and 0.99.1 verification record, and its tool table describes the probed title.

Verified on macOS arm64 with Node 24, tmux 3.7b, and Chrome 154:

  • tests/fm-pi-branch-extension.test.sh passes 50 of 50 on Pi 0.87.1, 0.99.0, and 0.99.1. On 0.99.0 it fails without the fix, and the new fm_branch_processed comparison fails on its own when only that title is reverted.
  • tests/fm-calm-pi-extension.test.sh with pi on PATH passes 15 of 15 with no skips on all three versions, and fails on 0.99.0 without the fix. The new DOM assertion passes on the real 0.99.0 export and fails on three altered copies: a hidden row made visible, the default-hide rule removed, and hidden messages toggled on.
  • tests/fm-pi-primary-types.test.sh passes against the 0.87.1, 0.99.0, and 0.99.1 type definitions.
  • FM_PI_BRANCH_LIVE_E2E=1 tests/fm-pi-branch-live-e2e.test.sh passes 6 of 6 on 0.99.0 and 0.99.1.
  • bin/fm-lint.sh with the pinned ShellCheck 0.11.0 and actionlint 1.7.12, and bin/fm-doc-audience-check.sh, pass.

Pi 0.99.0 and 0.99.1 are published by the same three maintainers through GitHub Actions trusted publishing with SLSA provenance, as 0.87.1 was.
The package has no install scripts, and the dependency tree's install hooks match 0.87.1's.
The new pi-mcp and pi-codemode dependencies come from the same repository and maintainers, and the version jump lines up with a large feature release in the changelog (codemode, MCP, a system theme).
Nothing points to a supply-chain problem.

Whether CI should pin the Pi version it installs is left for a separate decision.

This description was written with AI assistance.

Pipeline

Updates from git push no-mistakes

✅ **intent** - passed

✅ No issues found.

✅ **Rebase** - passed

✅ No issues found.

⚠️ **Review** - 1 info
  • ℹ️ docs/calm-mode-feasibility.md:674 - The intent lists four CI failures. This change fixes the two caused by Pi 0.99 (the stock rendering mismatch in shard 4 and the export-DOM boundary in shard 2). It does not touch the two shard-5 failures, 'third reply generation was not captured' (tests/fm-remote-reply.test.sh:232) and 'remote seed did not provision the route under test' (tests/fm-spawn-compact-adviser-disable-remote.test.sh:138), and the new docs record does not mention them. As far as I can see, neither test uses the Pi package, so they are probably unrelated flakes (the intent already suspects this for remote-seed). If they fail again after this lands, they need their own investigation. No change to this diff is needed.
✅ **Test** - passed

✅ No issues found.

  • Live validation: ✅ go - 4 of 4 scenarios driven live against the product
Scenario Result Live Evidence
On Pi 0.99.0 with Calm off, fm_branch_outcomes and fm_branch_processed tool rows render the same as Pi's stock rows, both collapsed and expanded ✅ pass live pi099-outcomes-stock-render-after.log (fails before the fix: pi099-outcomes-stock-render-BEFORE-fix.log)
On Pi 0.99.0, a live Calm session exported with /export shows no firstmate custom or synthetic message by default, while tool data and the tree provenance are kept ✅ pass live pi099-calm-interactive-export-after.log, pi099-calm-export.png, pi099-calm-export-dom.html (fails before: pi099-calm-interactive-export-BEFORE-fix.log)
Adversarial: on older Pi 0.87.1, the probe still gives a name-only tool title and the old export shape, so neither test regresses ✅ pass live pi087-outcomes-stock-render-after.log, pi087-calm-interactive-export-after.log
The shard-5 remote reply and remote-seed tests pass with Pi 0.99.0 installed ✅ pass live pi099-fm-remote-reply.log, pi099-fm-spawn-compact-adviser-disable-remote.log
  • Installed real @earendil-works/[email protected] and @0.87.1 into a disposable temp prefix (the same packages CI installs globally)
  • FM_PI_PACKAGE_DIR=<0.99.0> bash tests/fm-pi-branch-extension.test.sh limited to test_outcomes_tool_uses_stock_execution_and_export_consumers, run at base 6a23830 (before the fix) and at target 21a7b5d (after)
  • PATH=<0.99.0 bin>:$PATH bash tests/fm-calm-pi-extension.test.sh limited to test_interactive_terminal_e2e (real pi TUI in tmux, /export, headless-Chrome DOM render), run at base and at target
  • The same two cases on Pi 0.87.1 at the target commit (backward compatibility)
  • Headless Chrome screenshot of the HTML export produced by Pi 0.99.0
  • bash tests/fm-remote-reply.test.sh and bash tests/fm-spawn-compact-adviser-disable-remote.test.sh with Pi 0.99.0 on PATH
✅ **Document** - passed

✅ No issues found.

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

✅ No issues found.

Pi 0.99.0 titles renderer-less tool calls with their arguments and writes display:false messages into HTML exports as rows hidden by default. The outcome tools now mirror the probed stock title, and the Calm export check asserts that no custom message is visible by default rather than absent from the markup.
@coderabbitai

coderabbitai Bot commented Sep 29, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Essentials

Run ID: 09a4c481-9f83-4e7d-a725-ca0875cbb477

📥 Commits

Reviewing files that changed from the base of the PR and between 6a23830 and 21a7b5d.

📒 Files selected for processing (4)
  • .pi/extensions/fm-branch-supervision.ts
  • docs/calm-mode-feasibility.md
  • tests/fm-calm-pi-extension.test.sh
  • tests/fm-pi-branch-extension.test.sh

Included review availability: This review used your included allowance. 0 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 1 review per hour.


📝 Walkthrough

Walkthrough

The branch-tool renderers now follow Pi’s stock title, argument, and preview policies. The Calm export DOM test accounts for hidden hook-message rows, and the compatibility notes record verification across multiple Pi versions.

Changes

Pi compatibility

Layer / File(s) Summary
Branch-tool rendering and stock-output checks
.pi/extensions/fm-branch-supervision.ts, tests/fm-pi-branch-extension.test.sh, docs/calm-mode-feasibility.md
The renderers probe Pi’s preview-line and argument-display policies. They apply those policies to both branch tools, and the test compares fm_branch_processed output with stock rendering in collapsed and expanded states. The compatibility note records the renderer policy across the verified Pi versions.
Calm export DOM checks
tests/fm-calm-pi-extension.test.sh, docs/calm-mode-feasibility.md
The test checks that hidden hook-message rows remain hidden and excludes them when checking visible content. It also verifies that operational inputs remain visible. The compatibility record documents the corresponding export DOM assertions.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~12 minutes

Change: Bug fix

Suggested reviewers: kunchenguid

Merge Risk: ⚪ Minimal · up to 21a7b

The branch-tool rendering and Calm export checks have no identified issue requiring a fix before merge.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 3 files. (1 skipped: 1 … Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main compatibility changes: matching Pi 0.99 stock tool titles and HTML exports.
Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 3 files. (1 skipped: 1 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

Comment @coderabbitai help to get the list of available commands.

@JacyAnderson
JacyAnderson merged commit 9750bdc into main Sep 29, 2026
39 of 40 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