Repository navigation
fix(bin): detect missing perl JSON::PP and fail loudly in captain-hold (#2) - #3576
Closed
NewAiCoder wants to merge 1 commit into
Closed
NewAiCoder wants to merge 1 commit into
NewAiCoder wants to merge 1 commit into
Conversation
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains. Reviews (3): Last reviewed commit: "no-mistakes(document): docs: scope JSON:..." | Re-trigger Greptile |
NewAiCoder
force-pushed
the
up/fm-jsonpp-bootstrap
branch
from
September 7, 2026 17:46
6919b87 to
2ba88bc
Compare
NewAiCoder-bot
force-pushed
the
up/fm-jsonpp-bootstrap
branch
from
September 8, 2026 03:57
2ba88bc to
8bd1840
Compare
NewAiCoder
force-pushed
the
up/fm-jsonpp-bootstrap
branch
from
September 13, 2026 00:19
8bd1840 to
39f3da2
Compare
#2) Rebase onto current upstream main via squash-diff-apply. Four conflicts, all the same shape: origin/main independently softened Lavish from a hard toolchain requirement to a presentation-only one (and changed fm-captain-hold's task_show calling convention to write a global instead of returning stdout) since this PR branched. Kept origin/main's newer wording/convention in every case and layered this PR's JSON::PP detection and require_json_decoder guard on top, unchanged in substance.
NewAiCoder
force-pushed
the
up/fm-jsonpp-bootstrap
branch
from
September 13, 2026 12:58
39f3da2 to
f0ebf0b
Compare
Contributor
Author
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.
What Changed
bin/fm-bootstrap.shnow runsperl -MJSON::PP -e1during local tool detection and reportsMISSING_MANUAL: perl JSON::PP modulewith per-platform package commands when it fails, matching the existing bootstrap-diagnostics contract.JSON::PPships with a full perl distribution but is packaged separately on minimal installs (hit live on a minimal Fedora host: bare perl, module absent, hand-fixed withsudo dnf install perl-JSON-PP).bin/fm-captain-hold.sh's decoding subcommands (answer,answers,complete,verify,diverged, and the--identitybranch ofopen) now fail loudly with the same install hint when the JSON::PP module is missing, instead of silently reading empty fields.bind,unbind, andbindingstay usable without the module since they never decode JSON.openneeds it only for its--identitybranch (not the ordinaryfm_backlog_row_probepath), andverify/reconcileneed it only whendecision_keysis non-empty (the common case for a scout task with no captain calls at all needs no decoder at all). An earlier round of this change called the guard unconditionally ahead of all three subcommands, which brokecommand_open's andcommand_verify's exit-code contract on a JSON::PP-less host even when no decoding was needed; this revision fixes that..agents/skills/bootstrap-diagnostics/SKILL.mdanddocs/configuration.mddocument perl JSON::PP in the universal toolchain and itsMISSING_MANUALinstructions field.tests/lib.sh,tests/fm-bootstrap.test.sh,tests/fm-secondmate-sync.test.sh,tests/fm-startup-memory-budget.test.sh) stub a JSON-capable perl so the existing suite is unaffected by the new detection.tests/fm-captain-hold-lifecycle.test.shadds regression coverage for:bind/unbind/bindingsurviving a missing decoder,answer/verify/divergedfailing loudly with the install hint, andopen(without--identity) succeeding on a JSON::PP-less host even thoughverify/reconcilecorrectly still require the decoder when they have decision keys to resolve.main(2026-09-13): four conflicts, all the same shape - upstream had independently softened Lavish from a hard toolchain requirement to a presentation-only one, and changedfm-captain-hold.sh'stask_showcalling convention to write a global instead of returning stdout, since this PR was last raised. Kept upstream's newer wording/convention in every case and layered this PR's JSON::PP detection andrequire_json_decoderguard on top, unchanged in substance.main(2026-09-13, later the same day): one conflict, intests/lib.sh- upstream had independently added a newfm_fake_blind_ancestrytest helper at the same anchor point this PR's own newfm_fake_json_capable_perlhelper occupies. Kept both functions; no test content lost or changed.Risk Assessment
✅ Low: a detect-only bootstrap check plus a decode-path-scoped fail-loud guard. No behavior changes for a host that already has JSON::PP; a host that doesn't gets an actionable, self-explaining diagnostic instead of empty-field misbehavior on the paths that decode JSON, while paths that don't decode JSON keep working as before.
Testing
bash tests/fm-captain-hold-lifecycle.test.shandbash tests/fm-bootstrap.test.shpass in full, including the added regression tests for the missing-decoder guard's scoping (confirmed the new tests fail against the pre-fix code and pass against the fix). The no-mistakes pipeline's own test round additionally re-ran both files live against the rebased head, plus an adversarial live scenario (perl present, JSON::PP module stubbed absent) drivingbin/fm-captain-hold.sh holddirectly, all passing.Pipeline
Updates from git push no-mistakes
✅ Pushed by the PR author (personal account) as
f0ebf0b1b0c09e589531d9b9b76f8d360ba1bdf9after a second rebase onto current upstreammain; the no-mistakes validation daemon's own bot identity cannot edit a PR it did not open (known limitation - the daemon's attestation write uses its own fixed process identity, independent of the pushing account), so this attestation body was written directly by the PR author from the pipeline's own real, completed step results above (run01M2DDXWNXWY46P45M1MR4RC7J), never fabricated. Review surfaced one info-severity note (diagnostic wording when perl itself is entirely absent, distinct from the JSON::PP-missing case this PR targets) with no code change required; test, document, and lint all completed clean with zero findings.