Repository navigation
fix(pi): match stock tool rendering across Pi versions - #9
Merged
Merged
Conversation
Ports the Pi rendering hunks of upstream kunchenguid/firstmate commits e2668de (kunchenguid#6162), 349e189 (kunchenguid#6338) and fede619 (kunchenguid#6530): regular TUI mode pin for captured scrollback, getToolRenderers lookup for Pi 1.0.1 HTML export, hidden hook-message tolerant export DOM check, and the branch-supervision renderer header match.
…reducing ShellCheck’s shell input. Both lint partitions passed once; 1of2 peaked near 5.8 GiB RSS, and 2of2 near 11.6 GiB. `git diff --check` passed. Changes remain uncommitted because committing would write to the gate repository outside the permitted worktree
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Intent
Continue resolving #8 (retry exact pending steering doorbells).
Context: PR 8's CI has two failing behavior shards that are unrelated to its change: "Behavior portable serial 2" fails in the Pi Calm renderer test with "grep disappeared from /export calm.html HTML while calm mode was on", and "Behavior portable serial 4" fails with "Calm-off ToolExecutionComponent rendering differs from Pi stock". CI installs the Pi package unpinned; the last green main run on 2026-09-28 installed @earendil-works/pi-coding-agent 0.87.1, while PR 8's run installed 1.0.2. Upstream kunchenguid/firstmate already fixed this breakage, in commits e2668de (kunchenguid#6162, portable CI behavior across Pi rendering), 349e189 (kunchenguid#6338, preserve Pi calm transcript captures with Pi 1.0) and fede619 (kunchenguid#6530, accept Pi 1.0.1's renamed HTML export renderer lookup). This fork is 164 commits behind upstream, so a full upstream sync is not part of this task.
What Changed
fm_branch_processedand Pi’s version-dependent rendering.Risk Assessment
Testing
The focused Calm E2E runs passed against isolated Pi 1.0.1 and 1.0.2, and live Pi TUI runs confirmed the supervision header behavior on 0.87.1 and 1.0.2. The Pi 1.0.2 call/result blocks matched stock rendering when collapsed and expanded. Early Chrome attempts hit a Unix socket path limit caused by the long worktree TMPDIR; a worktree-local wrapper set TMPDIR to
.and the completed reruns passed. Temporary test data was removed from the worktree.Evidence: Pi 1.0.2 exported HTML
Source: Pi 1.0.2 exported HTML
Evidence: Pi 1.0.2 Calm live run
Source: Pi 1.0.2 Calm live run
Evidence: Pi 1.0.1 Calm live run
Source: Pi 1.0.1 Calm live run
Evidence: Pi 1.0.2 live stock comparison, collapsed and expanded
Source: Pi 1.0.2 live stock comparison, collapsed and expanded
Evidence: Pi 1.0.2 branch tool TUI transcript
Source: Pi 1.0.2 branch tool TUI transcript
Evidence: Pi 0.87.1 branch tool TUI transcript
Source: Pi 0.87.1 branch tool TUI transcript
Evidence: Pi branch extension regression run
Source: Pi branch extension regression run
Pipeline
Updates from git push no-mistakes
✅ **intent** - passed
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
.pi/extensions/fm-branch-supervision.ts:2178- The primitive/array argument fallback is outside the stated compatibility need: both consumers useType.Objectschemas (.pi/extensions/fm-branch-supervision.ts:2202, :2264) and call this helper at :2210 and :2272; the new header test also supplies object arguments (tests/fm-pi-branch-extension.test.sh:4582). Remove this fallback to keep the helper scoped to its actual inputs; retaining generic invalid-argument behavior would need authorization.🔧 Fix applied.
1 warning still open:
tests/fm-calm-pi-extension.test.sh:3880- This newly added export guard infers default-hidden behavior from serialized markup and CSS text at :3876 and :3880, then strips rows by class at :3894–3920 without checking their rendered visibility. A row can therefore be visible if the matching CSS rule is overridden, yet be removed from the leak check. Check each row’s computed visibility in Chrome instead of relying on the CSS text.✅ **Test** - passed
✅ No issues found.
Installed disposable Pi 1.0.1 and 1.0.2 packages under the worktree and rantests/fm-calm-pi-extension.test.shagainst each with Chrome rendering the generated exports.Rantests/fm-pi-branch-extension.test.sh.Started Pi TUI sessions at 140×36 with saved supervision tool calls on Pi 0.87.1 and 1.0.2; captured collapsed and expanded output.Compared the same Pi 1.0.2 TUI call/result transcript with Firstmate renderers and with a temporary stock-renderer probe; both states matched.Rendered the Pi 1.0.2 export in headless Chrome and captured a screenshot.Removed temporary package installs, profiles, fixtures, and caches; the worktree is clean.✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.