Repository navigation
test: support Pi 1.0.1 in the Calm renderer contract - #38
Merged
Merged
Conversation
Supply getToolRenderers alongside getToolDefinition in both Calm HTML-renderer fixtures, and record the Pi 1.0.1 verification evidence. Ported from upstream kunchenguid#6512 by @mremond. Both upstream commits are combined into one; applied unchanged.
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
firstmate-maint: b1.
That answer picks this option: copy upstream's calm-mode Pi test fix from kunchenguid#6512 ("test: support Pi 1.0.1 in the Calm renderer contract", by mremond) into this fork, credited to that PR in the commit and the PR, as a small PR. The problem it fixes: the CI test "Pi calm renderer and lifecycle contract" (tests/fm-calm-pi-extension.test.sh, in the "Behavior portable serial 6" job) fails since the CI runners moved to Pi 1.0.1 - Pi's HTML renderer now expects getToolRenderers while the test fixture supplies getToolDefinition, so the test reports "grep disappeared from /export calm.html HTML while calm mode was on". Keep the change to that test/renderer compatibility, matching upstream PR 6512. No check waivers.
Substance of upstream PR 6512: update both Calm HTML-renderer fixtures in tests/fm-calm-pi-extension.test.sh to supply getToolRenderers (Pi 1.0.1) alongside the older getToolDefinition hook through one shared registered-tool lookup, preserving existing assertions; and document the Pi 1.0.1 and 1.0.0 verification evidence and refresh command in docs/calm-mode-feasibility.md with a cross-link from docs/verification/runtime-backends.md.
What Changed
getToolRenderersalongside the oldergetToolDefinitionhook through one shared registered-tool lookup, preserving existing assertions.docs/calm-mode-feasibility.md, with a cross-link fromdocs/verification/runtime-backends.md.Risk Assessment
✅ Low: The change is narrowly scoped to test-fixture compatibility and verification documentation, supports both renderer APIs through one lookup, and leaves production behavior unchanged.
Testing
The targeted contract reproduced the exact pre-fix Pi 1.0.1 failure and passed after the fix on both Pi versions, including its /share renderer-trigger assertion. Real isolated CLI exports and remapped-submit checks passed on both versions; Chromium verified the rendered outputs and captured screenshots. Setup issues were resolved locally, all fixtures were removed, and no full suite or linters were run.
Evidence: Validation methods, results, setup recovery, and scope
Source: Validation methods, results, setup recovery, and scope
Evidence: Pre-fix Pi 1.0.1 reproduction: grep disappeared from export HTML
Source: Pre-fix Pi 1.0.1 reproduction: grep disappeared from export HTML
Evidence: HTML generated by the real Pi 1.0.1 CLI
Source: HTML generated by the real Pi 1.0.1 CLI
Evidence: Pi 1.0.1 live CLI actions, terminal dimensions, and session hashes
Source: Pi 1.0.1 live CLI actions, terminal dimensions, and session hashes
Evidence: Pi 1.0.0 live CLI actions, terminal dimensions, and session hashes
Source: Pi 1.0.0 live CLI actions, terminal dimensions, and session hashes
Evidence: Browser-observed custom call and result output for both versions
Source: Browser-observed custom call and result output for both versions
Pipeline
Updates from git push no-mistakes
✅ **intent** - passed
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
✅ **Review** - passed
✅ No issues found.
✅ **Test** - passed
✅ No issues found.
Inspectedgit diff 93d82355e4c37dbe4b91aba8d4e16f2789e7938e 104b70f1309fed605e42120963503528bd9d70be.Installed Pi 1.0.1 and 1.0.0 into disposable, worktree-local npm prefixes without changing the machine installation.Executed onlytest_rendering_and_session_lifecyclefrom the baseline and target revisions using temporary selectorstests/.calm-validation-{baseline,current}.sh, with isolatedHOME,TMPDIR, and explicitFM_PI_PACKAGE_DIR.Ranpython3 .test-calm-validation/live.py 101andpython3 .test-calm-validation/live.py 100against real Pi CLIs in sized 160×44 pseudo-terminals.Drove/calmoff/on, attempted/exportwith unmatched Enter, submitted with Alt+s, and verified export confirmation, persisted Calm state, and unchanged session bytes after startup.Rannode .test-calm-validation/render.mjsusing workspace-local Chromium and libraries; verified custom call/result HTML and visible grep, find, and watcher outputs, then captured screenshots.Removed disposable installations, homes, copied extensions, browser dependencies, and selector scripts; confirmed a clean worktree and no remaining fixture processes.✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.