Repository navigation
test: update Calm Pi host fixture for Pi 1.5.2 - #56
Merged
Merged
Conversation
The pending-message listing walks pendingBashComponents after clearing the pending area. Calm's queued-row adapter leaves an iterable collection in place and supplies an empty collection when the field is absent, so the redraw no longer throws on a host that never set it.
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
Captain 2026-11-11: upkeep and side jobs run on Grok and DeepSeek to save Claude usage.
Found 2026-11-11 on firstmate PR #55 (browser-helper cleanup), CI run https://github.com/peterOC26/firstmate/actions/runs/43049199611: tests/fm-calm-pi-extension.test.sh "Pi Calm queued operational rows" fails with
TypeError: this.pendingBashComponents is not iterableat Pi dist/modes/interactive/interactive-mode.js:4009. CI installs the newest Pi (@earendil-works/pi-coding-agent 1.5.2, published 2026-11-10); main last passed on Pi 1.5.0, which this server still runs. Every firstmate PR now fails that CI lane, and the Calm Pi extension will break here once Pi updates to 1.5.2.What Changed
pendingBashComponents.makeHostnow sets that field to an empty array so Pi 1.5.2's queued-row listing can walk it.Risk Assessment
✅ Low: The break was in the test stand-in, not in real Pi sessions. The production adapter is unchanged. The stand-in now initializes
pendingBashComponentsthe way Pi's constructor does.Testing
Before/after checks reproduced the Pi 1.5.2 fixture failure and verified the correction on both versions, with queue-output evidence captured. No live session or screenshot was produced because this change affects only a test stand-in.
Evidence: Pi 1.5.2 reproduces the original stand-in failure
Source: Pi 1.5.2 reproduces the original stand-in failure
Evidence: Pi 1.5.2 queue rendering, delivery, and fallback observations
Source: Pi 1.5.2 queue rendering, delivery, and fallback observations
Evidence: Pi 1.5.0 queue rendering, delivery, and fallback observations
Source: Pi 1.5.0 queue rendering, delivery, and fallback observations
Pipeline
Updates from git push no-mistakes
✅ **intent** - passed
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
.pi/extensions/lib/fm-calm-pending-operational-layout.ts:155- This patches a gap in the test fixture with production code that writes to Pi's internal state. Pi declarespendingBashComponents = [];as a class field (installed Pi 1.5.0, dist/modes/interactive/interactive-mode.js:312), andflushPendingBashComponentsonly ever sets it back to[](line 4073). So every real InteractiveMode instance already has an iterable there, and the newrecord.pendingBashComponents = []write can only run on a host built without Pi's constructor. The one such host is the test's stand-in frommakeHost, which usesObject.create(InteractiveMode.prototype)(tests/fm-calm-pi-extension.test.sh:585) and leaves the field out. The CI failurethis.pendingBashComponents is not iterablecomes from that stand-in, not from a real Pi 1.5.2 session. The intent's claim that the extension 'will break here once Pi updates to 1.5.2' does not hold for real instances. Smallest honest remedy: removecallPendingMessagesDisplay/pendingBashIterable, restore the two directoriginalUpdatePendingMessagesDisplay.call(this)calls (lines 218 and 226), and addpendingBashComponents: []tomakeHostin tests/fm-calm-pi-extension.test.sh so the stand-in matches what Pi's constructor initializes. That keeps the production adapter from writing to Pi-owned fields on every queued-row redraw. This is ask-user because it moves the fix out of the location the author chose and questions the stated premise..pi/extensions/lib/fm-calm-pending-operational-layout.ts:146- If the production shim is kept, thependingBashIterablecheck and its early-return branch are redundant. Both branches end in the sameoriginalUpdatePendingMessagesDisplay.call(host), and the only difference is the=== undefinedassignment, which an iterable value never triggers anyway. The helper reduces toif (record.pendingBashComponents === undefined) record.pendingBashComponents = []; originalUpdatePendingMessagesDisplay.call(host);. The long comment at lines 139-145 ('One listing… The other listing…') also never names which Pi versions it means; naming Pi ≥1.5.2 versus ≤1.5.0 would make it checkable. This does not apply if F1's remedy (removing the shim) is taken.🔧 Fix applied.
2 issues (1 warning, 1 info) still open:
.pi/extensions/lib/fm-calm-pending-operational-layout.ts:155- This patches a gap in the test fixture with production code that writes to Pi's internal state. Pi declarespendingBashComponents = [];as a class field (installed Pi 1.5.0, dist/modes/interactive/interactive-mode.js:312), andflushPendingBashComponentsonly ever sets it back to[](line 4073). So every real InteractiveMode instance already has an iterable there, and the newrecord.pendingBashComponents = []write can only run on a host built without Pi's constructor. The one such host is the test's stand-in frommakeHost, which usesObject.create(InteractiveMode.prototype)(tests/fm-calm-pi-extension.test.sh:585) and leaves the field out. The CI failurethis.pendingBashComponents is not iterablecomes from that stand-in, not from a real Pi 1.5.2 session. The intent's claim that the extension 'will break here once Pi updates to 1.5.2' does not hold for real instances. Smallest honest remedy: removecallPendingMessagesDisplay/pendingBashIterable, restore the two directoriginalUpdatePendingMessagesDisplay.call(this)calls (lines 218 and 226), and addpendingBashComponents: []tomakeHostin tests/fm-calm-pi-extension.test.sh so the stand-in matches what Pi's constructor initializes. That keeps the production adapter from writing to Pi-owned fields on every queued-row redraw. This is ask-user because it moves the fix out of the location the author chose and questions the stated premise..pi/extensions/lib/fm-calm-pending-operational-layout.ts:146- If the production shim is kept, thependingBashIterablecheck and its early-return branch are redundant. Both branches end in the sameoriginalUpdatePendingMessagesDisplay.call(host), and the only difference is the=== undefinedassignment, which an iterable value never triggers anyway. The helper reduces toif (record.pendingBashComponents === undefined) record.pendingBashComponents = []; originalUpdatePendingMessagesDisplay.call(host);. The long comment at lines 139-145 ('One listing… The other listing…') also never names which Pi versions it means; naming Pi ≥1.5.2 versus ≤1.5.0 would make it checkable. This does not apply if F1's remedy (removing the shim) is taken.Executed onlytest_queued_operational_rowsextracted from the base commit: passed on installed Pi 1.5.0; reproducedpendingBashComponents is not iterableon locally installed Pi 1.5.2.Executed onlytest_queued_operational_rowsfrom the target commit against Pi 1.5.0 and 1.5.2: both passed.Re-executed the focused test with observation capture for queue rendering, Escape delivery, unsupported-session fallback, and Calm-off behavior on both versions.Removed the temporary local Pi installation and test drivers;git status --shortwas clean.✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.