Skip to content

fix: match Pi stock supervision tool headers - #75

Merged
Ivory2024 merged 4 commits into
mainfrom
fm/fix-pi-0-99-stock-render-compatibility-s-c1
Sep 30, 2026
Merged

Ivory2024 merged 4 commits into
mainfrom
fm/fix-pi-0-99-stock-render-compatibility-s-c1

Conversation

@Ivory2024

Copy link
Copy Markdown
Owner

Intent

A: pin Pi in ci.yml to 0.87.1 on main and land the header fix separately, unblocking both PRs. The header fix is the Pi supervision-branch extension's tool-call header: the branch supervision tools draw their own tool-call header instead of using Pi's stock one, and that header must render exactly as Pi's own stock renderer renders it, on both Pi 0.87.1 and Pi 0.99.1.

What Changed

  • Rendered fm_branch_outcomes and fm_branch_processed call headers through Pi’s stock ToolExecutionComponent, preserving Pi’s argument display in collapsed and expanded views while retaining a title fallback if rendering fails.
  • Added compatibility coverage comparing both tools with Pi’s stock header on versions 0.87.1 and 0.99.1, and documented the check.

Risk Assessment

✅ Low: The change is limited to deriving both supervision tool headers from Pi’s stock renderer and checking that output against both pinned releases; no source-backed defect was identified.

Testing

Ran the targeted branch-extension test file. Its installed Pi 0.84.1 was below the renderer comparison floor; the test separately installed and exercised Pi 0.87.1 and 0.99.1. Both branch supervision tools matched stock output in collapsed and expanded states on both releases. Captured the run log as evidence.

  • Live validation: ✅ go - 4 of 4 scenarios driven live against the product
Scenario Result Live Evidence
Branch supervision tools render the same collapsed tool-call headers as stock Pi 0.87.1 ✅ pass live Pi branch extension targeted run
Branch supervision tools render the same expanded tool-call headers as stock Pi 0.87.1 ✅ pass live Pi branch extension targeted run
Branch supervision tools render the same collapsed tool-call headers as stock Pi 0.99.1 ✅ pass live Pi branch extension targeted run
Branch supervision tools render the same expanded tool-call headers as stock Pi 0.99.1 ✅ pass live Pi branch extension targeted run
Evidence: Pi branch extension targeted run

Source: Pi branch extension targeted run

skip: installed Pi 0.84.1 predates the stock renderer contract 0.84.4 this case compares against
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 - 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 - 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
ok - both branch supervision tools match Pi 0.87.1 stock call header, collapsed and expanded
ok - both branch supervision tools match Pi 0.99.1 stock call header, collapsed and expanded

Pipeline

Updates from git push no-mistakes

✅ **intent** - passed

✅ No issues found.

✅ **Rebase** - passed

✅ No issues found.

🔧 **Review** - 1 issue found → auto-fixed ✅
  • ⚠️ tests/fm-pi-branch-extension.test.sh:4751 - If Node is present but npm is absent, this test returns successfully before checking whether the installed Pi package matches either pinned release. The suite can therefore report success without checking the required 0.87.1 and 0.99.1 compatibility matrix. Check any matching installed release before deciding what can be verified, and fail or explicitly mark the matrix unverified when neither pin can be exercised.

🔧 Fix applied.
✅ Re-checked - no issues remain.

✅ **Test** - passed

✅ No issues found.

  • Live validation: ✅ go - 4 of 4 scenarios driven live against the product
Scenario Result Live Evidence
Branch supervision tools render the same collapsed tool-call headers as stock Pi 0.87.1 ✅ pass live Pi branch extension targeted run
Branch supervision tools render the same expanded tool-call headers as stock Pi 0.87.1 ✅ pass live Pi branch extension targeted run
Branch supervision tools render the same collapsed tool-call headers as stock Pi 0.99.1 ✅ pass live Pi branch extension targeted run
Branch supervision tools render the same expanded tool-call headers as stock Pi 0.99.1 ✅ pass live Pi branch extension targeted run
  • bash tests/fm-pi-branch-extension.test.sh
✅ **Document** - passed

✅ No issues found.

🔧 **Lint** - 1 issue found → auto-fixed ✅
  • ⚠️ linter found issues (exit code 1)

🔧 Fix applied.
✅ Re-checked - no issues remain.

✅ **Push** - passed

✅ No issues found.

Pi 0.99.0 changed the header it draws for a tool that supplies no call
renderer: the title now carries the call's arguments, as `key=value`
pairs when collapsed and one `key: value` line per argument when
expanded. The two branch supervision tools draw their own header, so a
title-only literal matched stock on 0.87.1 and silently diverged on
0.99.1. Because CI pins 0.87.1, the pinned lane stayed green the whole
time and the divergence only surfaced on a newer release.

Pi ships the formatter as an internal `formatToolCallWithArgs` that its
exports map does not publish, so restating the format here would just
move the drift to the next release. Ask a stock `ToolExecutionComponent`
for the header it builds instead, over the public
constructor/updateArgs/setExpanded/render surface only, and fall back to
the bare title if that ever throws. The probe definition takes
`renderShell: "self"` and no `renderCall`, so the header lands in a plain
container with no box framing or background and comes back verbatim.

The new case installs both pinned releases side by side and requires
byte-exact stock parity for both tools, collapsed and expanded, on each.
The previous case could only prove parity against whichever release
happened to be installed, which is why 0.87.1 alone never caught this.
Verified to fail on 0.99.1 with the fix reverted and pass with it, and
each case asserts a real stock header was produced so the comparison
cannot pass vacuously.
@Ivory2024
Ivory2024 merged commit 7a7f754 into main Sep 30, 2026
19 checks passed
Ivory2024 added a commit that referenced this pull request Oct 7, 2026
* fix(pi): read the stock call header from Pi instead of restating it

Pi 0.99.0 changed the header it draws for a tool that supplies no call
renderer: the title now carries the call's arguments, as `key=value`
pairs when collapsed and one `key: value` line per argument when
expanded. The two branch supervision tools draw their own header, so a
title-only literal matched stock on 0.87.1 and silently diverged on
0.99.1. Because CI pins 0.87.1, the pinned lane stayed green the whole
time and the divergence only surfaced on a newer release.

Pi ships the formatter as an internal `formatToolCallWithArgs` that its
exports map does not publish, so restating the format here would just
move the drift to the next release. Ask a stock `ToolExecutionComponent`
for the header it builds instead, over the public
constructor/updateArgs/setExpanded/render surface only, and fall back to
the bare title if that ever throws. The probe definition takes
`renderShell: "self"` and no `renderCall`, so the header lands in a plain
container with no box framing or background and comes back verbatim.

The new case installs both pinned releases side by side and requires
byte-exact stock parity for both tools, collapsed and expanded, on each.
The previous case could only prove parity against whichever release
happened to be installed, which is why 0.87.1 alone never caught this.
Verified to fail on 0.99.1 with the fix reverted and pass with it, and
each case asserts a real stock header was produced so the comparison
cannot pass vacuously.

* no-mistakes(review): Check installed Pi pins before requiring npm

* no-mistakes(document): Document Pi stock header compatibility

* no-mistakes(lint): Fix ambiguous empty assignment in Pi compatibility test
Ivory2024 added a commit that referenced this pull request Oct 7, 2026
* fix(pi): read the stock call header from Pi instead of restating it

Pi 0.99.0 changed the header it draws for a tool that supplies no call
renderer: the title now carries the call's arguments, as `key=value`
pairs when collapsed and one `key: value` line per argument when
expanded. The two branch supervision tools draw their own header, so a
title-only literal matched stock on 0.87.1 and silently diverged on
0.99.1. Because CI pins 0.87.1, the pinned lane stayed green the whole
time and the divergence only surfaced on a newer release.

Pi ships the formatter as an internal `formatToolCallWithArgs` that its
exports map does not publish, so restating the format here would just
move the drift to the next release. Ask a stock `ToolExecutionComponent`
for the header it builds instead, over the public
constructor/updateArgs/setExpanded/render surface only, and fall back to
the bare title if that ever throws. The probe definition takes
`renderShell: "self"` and no `renderCall`, so the header lands in a plain
container with no box framing or background and comes back verbatim.

The new case installs both pinned releases side by side and requires
byte-exact stock parity for both tools, collapsed and expanded, on each.
The previous case could only prove parity against whichever release
happened to be installed, which is why 0.87.1 alone never caught this.
Verified to fail on 0.99.1 with the fix reverted and pass with it, and
each case asserts a real stock header was produced so the comparison
cannot pass vacuously.

* no-mistakes(review): Check installed Pi pins before requiring npm

* no-mistakes(document): Document Pi stock header compatibility

* no-mistakes(lint): Fix ambiguous empty assignment in Pi compatibility test
@Ivory2024
Ivory2024 deleted the fm/fix-pi-0-99-stock-render-compatibility-s-c1 branch October 10, 2026 12:36
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