fix(bin): read Pi usage-limit banner as an empty composer via pinned adapter - #5709
mehulbhagwani wants to merge 8 commits into
Conversation
|
Author note Implements #5000. Relationship: Pi ends the turn on Codex’s usage-limit banner; composer read stayed Change: recognize that fixed banner + empty Pi composer as settled empty in Please kick Actions if needed; happy to fix review nits. |
ccb8479 to
839a41e
Compare
|
Speaking as Kun's firstmate: whole thread read (body + author note; linked #5000 + prior stamps; contrast with #4996 noted). Diff reviewed against main Verdict: Tip check: main has no VISION.md per-rule:
Workflow approvals (first-time fork, post-diff): CI |
bffb701 to
5b8bafc
Compare
|
Re-raised through the no-mistakes gate and attested on
Ready for maintainer workflow approval / merge. |
b7599d2 to
fd32aba
Compare
|
Speaking as Kun's firstmate: whole thread read (prior stamp waiting-ci 2026-09-25T22:21:09Z; author re-raise note; linked #5000). Diff re-reviewed against main tip Verdict: Tip check: Blocker (author): Require no-mistakes failed on run 36245509230 — PR body has no Workflow approvals this pass: CI 36245509258 · NM 36245509230 (approved; CI still in progress; NM already red on attestation). VISION.md per-rule:
Next: waiting on author for a no-mistakes re-raise (attestation). No Firstmate flag while NM is red (no-mistakes blocking; do not escalate). |
fd32aba to
6003550
Compare
2d4cec0 to
56f7cfc
Compare
|
Speaking as Kun's firstmate: whole thread read (body + author notes; prior stamps waiting-ci 2026-09-25T22:21:09Z / waiting-author 2026-09-26T14:15:38Z nm=fail; linked #5000 still OPEN). Diff re-reviewed against main tip Verdict: Tip vs main: Main still has no Blocker (author): Rebase onto current main so the PR contains only the composer/Codex-banner restore (and its tests/docs), clear CONFLICTING, and re-raise through no-mistakes if the head moves. Then fork CI can be approved and merge considered. VISION.md per-rule:
No workflow approvals this pass (dirty tip; no runs). No Firstmate flag while author must clear conflicts. |
|
Closing this PR; the branch had diverged from main. |
56f7cfc to
b8ff1d1
Compare
b8ff1d1 to
4b94f24
Compare
|
|
Re-raised on the same PR at head
The stray fork PR was closed; this PR is the only review target. |
6003550 to
4b94f24
Compare
|
Speaking as Kun's firstmate: whole thread read (body + author re-raise notes; prior stamps waiting-ci / waiting-author nm=fail / waiting-author conflicting; linked #5000 OPEN existing-pr). Diff re-reviewed against main tip Verdict: Tip vs main: Main Blocker (author): Attestation MISMATCH — body CI: 36437026190 still in_progress on head (15 jobs); NM already red on attestation — no-mistakes is blocking regardless of CI outcome. Greptile SUCCESS alone does not block. 14-day stale: created 2026-09-25; author commented 2026-09-27 (and re-raised) — not stale. VISION.md per-rule:
Next: waiting on author for no-mistakes re-raise (attestation MATCH). No merge. No Firstmate flag while NM red / MISMATCH. No new workflow approvals this pass (CI already running on head). |
61d9efd to
0e7851d
Compare
…nderings Rebase of kunchenguid#5709 onto current main. Admits Pi's fixed Codex usage-limit banner (and at most one vendor /bug hint row above the separator pair) as proof the turn ended so fm-control can reclaim the worker. Adds live guard and byte-fixture coverage. Closes kunchenguid#5000.
1df89d5 to
1dab6a6
Compare
…nderings Rebase of kunchenguid#5709 onto current main. Admits Pi's fixed Codex usage-limit banner (and at most one vendor /bug hint row above the separator pair) as proof the turn ended so fm-control can reclaim the worker. Adds live guard and byte-fixture coverage. Closes kunchenguid#5000.
1dab6a6 to
081b863
Compare
|
On the remaining Greptile 4/5: the composer classifier cannot tell |
…nderings Rebase of kunchenguid#5709 onto current main. Admits Pi's fixed Codex usage-limit banner (and at most one vendor /bug hint row above the separator pair) as proof the turn ended so fm-control can reclaim the worker. Adds live guard and byte-fixture coverage. Closes kunchenguid#5000.
Move Codex usage-limit banner recognition out of the shared classifier into bin/fm-composer-pi-adapter.sh, version-pinned to verified pi releases. Unpinned Pi renderings can no longer prove composer emptiness. Portable and live guards cover the pin gate.
Production callers never set FM_COMPOSER_PI_ADAPTER_VERSION, so the pinned banner adapter refused every real pane. The adapter now reads the installed pi --version once per process, with the variable kept as an override, and the pin set gains 0.99.2 and 1.0.0 after a live guard run on each. The adapter file now ships wherever fm-composer-lib.sh does: the backend sibling readability lists, the teardown source check, and the test fixtures that copy or link the library. Its source line moves out of the middle of the strip_ansi comment block. The live guard exercises that default path, and on an unpinned installed pi proves the adapter refuses instead of failing the build on every new Pi release. The control test pins the modelled 0.85.1 screen explicitly and adds the unpinned refusal case.
…dapter.sh. (ci-1) With no override, the adapter now reads the version from `pi --version`, or from `pi-signed --version` when no `pi` is on PATH. (ci-2) The resolver (renamed fm_composer_pi_adapter_resolve_version) assigns the global _FM_COMPOSER_PI_ADAPTER_VERSION_RESOLVED in the current shell instead of using a command substitution. The installed-version cache therefore persists and the executable runs at most once per process. Nothing else referenced the old resolver name. I extended test_matrix_pi_codex_banner_requires_pinned_adapter_version in tests/fm-composer-lib.test.sh with two cases: a fake pi-signed alone at a pinned version settles the banner to empty, and a fake pi with a call counter is invoked once across two classifications. tests/fm-composer-lib.test.sh passes with exit 0, including the existing pinned, unpinned and absent cases. shellcheck on the touched files reports only the info-level SC1091 about tests/lib.sh not being followed
…_PI_ADAPTER_VERSION unset, bin/fm-composer-pi-adapter.sh now reads --version of every Pi executable on PATH (pi and pi-signed), each at most once per process via globals with no subshell; the banner settles a stale status only when at least one is found and every one found is pinned (unpinned or unreadable keeps unknown). An override, if set, is checked alone. Documented in the adapter header and docs/configuration.md. ci-2: the version tests in tests/fm-composer-lib.test.sh now run with PATH set to a private dir holding only fake pi/pi-signed plus symlinked host tools, covering only-pi pinned, only-signed pinned, pi pinned+signed unpinned, pi unpinned+signed pinned, both pinned, neither installed, and once-per-process invocation across two classifications. tests/fm-composer-lib.test.sh passes; shellcheck reports only info-level SC1091. Nothing committed or pushed
… adapter The pane identity reports pi for both pi and pi-signed, so the adapter used to require every installed Pi executable to be pinned. That never accepted an unverified rendering, but it refused a verified worker whenever the other Pi executable on PATH was unpinned. fm-control, fm-send, and fm-crew-state now export FM_COMPOSER_PI_EXECUTABLE from the task's recorded harness, and the adapter then checks only that executable. Callers that do not know the task keep the all-pinned fallback. Tests cover the known-executable path (both mixed installs, a named executable that is not installed) and, through fm-control, a recorded pi-signed worker exiting over the banner beside an unpinned pi while a pi worker on the same install keeps the refusal.
a410698 to
c87c195
Compare
|
Follow-up on the earlier Greptile trade-off: it is now resolved in this PR. fm-control, fm-send, and fm-crew-state pass the task's recorded Pi executable ( |
Intent
Make every open mehulbhagwani PR on kunchenguid/firstmate clean for Kun to merge.
PRs: #5954 #5953 #5952 #5951 #5919 #5709 #4932
For each: checkout that PR head branch on origin/fork, rebase onto current upstream main, fix red CI (behavior portable serial jobs), ensure no-mistakes attestation head_sha MATCHES PR head, push to the PR branch (update existing PR in place — do NOT open new PRs), confirm CI green and mergeable CLEAN.
Priority: 5954 and 5952 already green—verify still clean; then 5953, 5951 red serial jobs; 5919 conflicts; 5709 attestation mismatch; 4932 two serial fails.
Do not merge on Kun's repo (no authority). Leave PRs ready. Report final status table.
Fix all 7 fast.
This run validates and updates existing PR #5709 in place (branch fm/fm-pr-5000-codex-banner on the mehulbhagwani fork), issue #5000: a Pi worker parked on Codex's usage-limit banner with a stale working or unknown status must read as an empty composer so lifecycle commands (exit) work. Per VISION.md the Pi rendered error-banner recognition lives in a named, version-pinned adapter (bin/fm-composer-pi-adapter.sh), not an unpinned shared classifier. Production callers never set FM_COMPOSER_PI_ADAPTER_VERSION, so the adapter reads the installed pi --version itself (cached per process; the variable stays an override); outside the pin set (now 0.85.1 0.87.1 0.99.2 1.0.0, each verified with the live guard) it refuses and the classifier stays unknown. The adapter file ships wherever fm-composer-lib.sh ships (backend sibling lists, teardown source check, remote and fixture copies). The live guard proves the pinned shape on a pinned install and, on an unpinned newer Pi, proves the refusal instead of failing every build after a Pi release. The branch was rebased onto main, so the push must update the existing PR branch (force with lease) and the PR body attestation must bind to the new head. Do not open a new PR.
Later direction (2026-10-02): "why greptile 4/5, need 5/5". Implement plumbing of the task's recorded harness: the pane identity reports pi for both pi and pi-signed, so fm-control, fm-send and fm-crew-state pass the task's recorded executable (pi or pi-signed, from task metadata) to the composer classification, the adapter checks only that executable's version, and it falls back to requiring every installed Pi executable to be pinned when the executable is unknown. Keep it minimal, with behavioral tests for both the known-harness path and the fallback, and get Greptile to 5/5.
What Changed
bin/fm-composer-pi-adapter.sh, a named, version-pinned adapter for the rendered Codex usage-limit banner shown by Pi.bin/fm-composer-lib.shnow uses it so a Pi worker parked on that banner with a stale working or unknown status classifies as an empty composer, letting lifecycle commands like exit proceed. The adapter reads the installedpi/pi-signed--versionitself (cached per process;FM_COMPOSER_PI_ADAPTER_VERSIONremains an override) and refuses outside the pin set (0.85.1, 0.87.1, 0.99.2, 1.0.0), leaving the classifier at unknown.bin/fm-control.sh,bin/fm-send.shandbin/fm-crew-state.shnow pass the task's recorded executable (piorpi-signed, from task metadata) to the classification, so only that executable's version is checked. When the executable is unknown, every installed Pi executable must be pinned. The adapter ships alongsidefm-composer-lib.sh(backend sibling lists, teardown source check, test runner and fixture copies).docs/configuration.md,docs/herdr-backend.mdanddocs/verification/runtime-backends.md.Risk Assessment
✅ Low: The change is a version-pinned adapter that fails safe to unknown, with the recorded executable plumbed through fm-control, fm-send and fm-crew-state; I found no concrete defect in the traced paths.
Testing
The live Pi banner e2e ran against the installed Pi (1.0.0) and passed. The composer library, fm-control and fm-crew-state suites also passed, but they use fixtures and do not count as live validation. I did not run a live fm-control /quit session in a lab, and fm-send tests were not run.
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.
bash tests/fm-composer-lib.test.shbash tests/fm-control.test.shbash tests/fm-crew-state.test.shbash tests/fm-composer-pi-codex-banner-live-e2e.test.sh✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.