Repository navigation
fix(pi): invoke Bash helpers correctly on native Windows - #3843
Conversation
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains; the previously missing changed-file mappings now select the native-Windows regression for both affected Pi extension paths. Reviews (4): Last reviewed commit: "no-mistakes(ci): Fixed PR-caused changed..." | Re-trigger Greptile |
| @@ -0,0 +1,82 @@ | |||
| #!/usr/bin/env bash | |||
There was a problem hiding this comment.
Windows regression is not selected
The new test is absent from the changed-file mappings used by fm-test-run.sh --changed, while non-Windows CI hosts skip its assertions. As a result, the configured validation path can pass without exercising this native-Windows regression coverage; register the test for the Pi extension paths it covers.
Knowledge Base Used: Operational tooling and verification
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
…s regression for both extension paths, make Windows mode emulation non-failing, and enforce LF shell checkouts. Mapping and coverage checks pass; CI/Require no-mistakes were approval-gated externally
a80f3d2 to
9c5a019
Compare
…g the malformed tracked evidence artifact and allowing deleted, unconsumed source paths to retire cleanly while preserving fail-closed behavior for live unmapped paths. Added regression coverage. Verified native-Windows Pi shell-seam test passes and --changed selects the Windows regression
|
Speaking as Kun's firstmate: Triage of HEAD Contract-class: restore — unconfigured Pi on native Windows already promised to run tracked Bash helpers; direct Attestation: MATCH ( VISION (brief): aligns — fleet survives Windows Node EFTYPE; scripts stay owners of helpers; authority unchanged; no new default consent. Align paragraph: restores a broken promised path. Will squash-merge when CI + NM are green on this HEAD. |
|
Speaking as Kun's firstmate: this is merged. Thank you @cr101 — really appreciate you taking the time on this. HEAD |
Intent
Implement upstream issue #3838 by fixing every affected Pi extension Bash invocation seam on native Windows while preserving macOS/Linux behavior and existing failure contracts, with native-Windows regression coverage at the actual extension seams. Reconcile PR #3843 with current main: preserve upstream #3865's removal of commands.test and its intent-targeted validation policy, remove this branch's now-obsolete no-mistakes command/documentation workaround, retain the Pi implementation and relevant Windows regression selection/line-ending support, submit the updated PR through no-mistakes, and do not merge it.
What Changed
bashon native Windows while retaining direct invocation elsewhere.bashon native Windows.Risk Assessment
✅ Low: Captain, the Windows-only Bash routing preserves non-Windows behavior and failure contracts, with focused behavioral coverage for every affected seam.
Testing
Under native Git Bash with Node reporting
win32, the end-to-end Pi test exercised every affected extension seam, including async branch-outcome encoding throughbash, and passed. The focused runner assertions confirmed changed-path coverage plus MINGW/MSYS-only mode accommodation; Git checkout evidence confirms the LF policy. The broader runner-contract script was stopped after these relevant assertions because unrelated portable-shard checks were exceptionally slow on this host.Evidence: Native Windows Pi seam validation
Source: Native Windows Pi seam validation
Evidence: Git LF checkout validation
Source: Git LF checkout validation
Pipeline
Updates from git push no-mistakes
✅ **intent** - passed
✅ No issues found.
🔧 **Rebase** - 1 issue found → auto-fixed ✅
.no-mistakes.yaml- merge conflict rebasing onto origin/main🔧 Fix applied.
✅ Re-checked - no issues remain.
🔧 **Review** - 1 issue found → auto-fixed (2) ✅
tests/fm-pi-windows-shell-invocation.test.sh:66- Intent requires “native-Windows regression coverage at the actual extension seams.” This test only invokes synchronousclassifyFirstmateOperationalText; it does not exercise the changed asyncencodeFirstmateOperationalInputWithpath used by branch-outcome delivery. Cover that async branch-outcome seam and assert its encoded result.🔧 Fix: Cover async Windows branch-outcome Bash invocation
2 warnings still open:
bin/fm-test-run.sh:2169- The new Windows exemption also disables 0700 worker-root verification forCYGWIN*. A Cygwin worker whose mode reads as755now succeeds, contradicting the accepted requirement to retain strict POSIX enforcement while accommodating Git Bash's non-POSIX reporting. Restrict the exemption toMINGW*|MSYS*.tests/fm-pi-windows-shell-invocation.test.sh:1- The added test enters the derived portable-serial lane without a timing hint, leaving the serial hint/count and shard-balance documentation stale despite the documented requirement to refresh when that lane gains scripts. Add measured timing evidence and update the hint and derived shard documentation.🔧 Fix: Preserve Cygwin checks and refresh Windows timing
✅ Re-checked - no issues remain.
🔧 **Test** - 1 issue found → auto-fixed ✅
.opencode/plugins/lib/fm-operational-input.js:16-tests/fm-operational-input.test.shfails on native Windows: the unchanged OpenCode adapter spawnsbin/fm-operational-input.shdirectly and Node reportsspawn EFTYPE. This is outside the Pi extension changes but prevents that existing cross-language protocol regression from passing on this host.C:\Program Files\Git\bin\bash.exe bin/fm-test-run.sh tests/fm-pi-windows-shell-invocation.test.shwith Git Bash first onPATH(passed).git check-attr text eol -- bin/fm-test-run.sh tests/fm-pi-windows-shell-invocation.test.sh(both resolve totextandeol=lf).C:\Program Files\Git\bin\bash.exe bin/fm-test-run.sh tests/fm-operational-input.test.sh(failed: unchanged OpenCode adapter direct-spawn behavior on native Windows).Startedtests/fm-test-run.test.shand the runner’s changed-selection/coverage checks; stopped them after they spent the focused-test window enumerating the repository’s broad families rather than executing the new Pi seam test.🔧 Fix: Invoke OpenCode operational-input owner through Bash on Windows
✅ Re-checked - no issues remain.
Baseline:bash --versionandnode -p "process.platform + ' ' + process.version"(host default was WSL Bash, so native Git Bash was used).C:\Program Files\Git\bin\bash.exe:bin/fm-test-run.sh --jobs 1 tests/fm-pi-windows-shell-invocation.test.sh tests/fm-operational-input.test.sh tests/fm-test-run.test.shin an LF-normalized temporary checkout; Pi seam and relevant runner assertions passed.Manual Git checkout probe withcore.autocrlf=trueand the repository.gitattributes, verifying a checked-out.shcontains no CRLF.✅ **Document** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.