Repository navigation
fix: restore portable CI across Pi 0.99 rendering and remote provisioning - #23
Merged
Merged
Conversation
…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)
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
There was a problem hiding this comment.
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.
This was referenced Oct 2, 2026
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
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_outcomesandfm_branch_processednow 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 showskey=jsonarguments cut to 100 characters, and an expanded call shows mutedkey: valuelines. 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.shnow clones with--no-local, which avoids an intermittent "failed to copy file" error on Git 2.55.bin/fm-dispatch-resolve.shnow names every profile missing aprovider:instead of stopping at the first one.bin/fm-brief-heading-lib.shnow passes the task body through a here-string instead of a pipe.docs/calm.mdanddocs/calm-mode-feasibility.mdnow cover the call-argument header,fm_branch_processedhiding, 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.
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
Evidence: Fix + Pi 0.99.1: branch-extension shard passes
Source: Fix + Pi 0.99.1: branch-extension shard passes
Evidence: Fix + Pi 0.99.2: branch-extension shard passes
Source: Fix + Pi 0.99.2: branch-extension shard passes
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)
Evidence: Fix + Pi 0.99.2: Calm shard passes
Source: Fix + Pi 0.99.2: Calm shard passes
Evidence: Fix + Pi 0.87.1: Calm shard still passes
Source: Fix + Pi 0.87.1: Calm shard still passes
Evidence: Fix + Pi 0.87.1: branch-extension shard still passes
Source: Fix + Pi 0.87.1: branch-extension shard still passes
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)
Evidence: Fix: dispatch-resolve test
Source: Fix: dispatch-resolve test
Pipeline
Updates from git push no-mistakes
✅ **intent** - passed
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
.pi/extensions/fm-branch-supervision.ts:2156- stockToolCallHeader reimplements Pi's private formatToolCallWithArgs (100-char collapsed cut, expandedkey: valuelines) 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.
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.shon the fix with Pi 0.87.1, 0.99.1, 0.99.2FM_PI_PACKAGE_DIR=<pi pkg> PATH=<pi bin>:$PATH bash tests/fm-pi-branch-extension.test.shon the fix with Pi 0.87.1, 0.99.1, 0.99.2Same two shards on the base commit 51187ae (git archive into tmp) with Pi 0.99.1, plus the Calm shard with 0.99.2bash tests/fm-dispatch-resolve.test.shandbash tests/fm-supervision-host.test.shon the fixgh run view 36860229331 --log-failedto 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.