Repository navigation
fix(bin): restore Bash 3.2 parsing of ship brief scaffolding - #1074
Closed
willronchetti wants to merge 2 commits into
Closed
willronchetti wants to merge 2 commits into
willronchetti wants to merge 2 commits into
Conversation
Owner
|
thanks for digging into this. i merged #1093, which fixes the same bash 3.2 parse failure structurally - it takes the heredocs out of the command substitutions entirely, so the "firstmate's" apostrophe is harmless again and stays as-is. closing this one as superseded. really appreciate the help here. |
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
Restore macOS Bash 3.2 compatibility in Firstmate ship brief scaffolding so the captain-approved Artemis follow-on work can be dispatched. The no-mistakes Definition-of-done heredoc is built inside command substitution, and an apostrophe in its prose prevents Bash 3.2 from finding the closing parenthesis. Rephrase that sentence without changing the brief's authority semantics, add version-independent regression coverage that forbids apostrophes in all ship Definition-of-done heredoc bodies, and preserve every generated brief safety contract. The focused fm-brief tests and repository lint already pass locally.
What Changed
--yeswarning line in the no-mistakes Definition-of-done heredoc inbin/fm-brief.shto drop the apostrophe (firstmate's→performed by firstmate), which had prevented macOS Bash 3.2 from finding the closing parenthesis of the enclosing command substitution — the authority semantics of the generated brief are unchanged.test_ship_dod_heredocs_have_no_apostrophestotests/fm-brief.test.shthat scans every ship Definition-of-done heredoc body for apostrophes via awk, so the Bash 3.2 breakage is caught regardless of the Bash version running the suite.Verified via
/bin/bash -nunder Bash 3.2.57 (now parses OK) and the fulltests/fm-brief.test.shsuite (16/16 pass, including the new detector, which flags the pre-fix apostrophe and is clean on the fix).Risk Assessment
✅ Low: A minimal, well-bounded fix that rephrases one sentence to drop a Bash 3.2-breaking apostrophe while preserving authority semantics, plus a correct version-independent regression test covering all DOD heredoc bodies.
Testing
On the exact target platform (macOS Bash 3.2.57), I confirmed the pre-fix script fails
bash -non the apostrophe and the fixed script parses cleanly; ran the full fm-brief suite (16/16 pass including the new regression test); proved the new pure-awk apostrophe detector flags the old line and clears on the fix (version-independent); and generated a real brief showing the reworded authority sentence and every safety-contract line preserved. This is a CLI/text-generation change with no rendered UI surface, so the reviewer-visible artifact is the generated brief markdown and CLI transcripts rather than a screenshot. Everything passes with no findings.Evidence: Generated ship brief (real fm-brief.sh output) showing reworded authority line + preserved safety contract
Evidence: Baseline vs fix parse under Bash 3.2.57
Evidence: Regression detector: flags old apostrophe, empty on fix
Evidence: fm-brief.test.sh under Bash 3.2 (16/16 ok)
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.
/bin/bash -n bin/fm-brief.shunder Bash 3.2.57 → PARSE OK (fixed)/bin/bash -non HEAD~1 fm-brief.sh → fails withunexpected EOF while looking for matching )(baseline bug confirmed)/bin/bash tests/fm-brief.test.sh→ 16/16 pass, incl. newtest_ship_dod_heredocs_have_no_apostrophesRan the new test's awk detector against pre-fix vs fixed script: flags old apostrophe line 328, empty on fix (proves the test has teeth and is Bash-version-independent)Generated a real brief viaFM_HOME=... bin/fm-brief.sh brief-demo-1 artemis-projand confirmed reworded authority line + escalation/authority-contract/no-mistakes axi respond/--yessafety lines all render intact✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.