fix(brief): restore fork main after PR #2 broad import - #3
Conversation
This reverts commit 283884b.
Adds the APOS interpolation infrastructure from upstream commit 648dd9c so future possessives inside $( )-nested heredocs can interpolate through ${APOS} instead of typing a bare apostrophe that bash 3.2 (stock on macOS) mis-scans. The current text at this branch tip does not contain a regression-triggering apostrophe, so this is a defensive addition rather than an active bug fix. Any future author who adds `firstmate's` (or similar) inside a $( )-nested DOD heredoc must use `firstmate${APOS}s` to keep macOS bash 3.2 parsing.
There was a problem hiding this comment.
💡 Codex Review
Line 281 in 6f45b60
Captain, on stock macOS Bash 3.2 this does not restore the parser fix: APOS is declared but never referenced, while the no-mistakes DOD=$(cat <<EOF ...) body still contains the bare apostrophe in the captain, not you, owns. Bash 3.2 mis-scans that apostrophe while locating the command-substitution terminator and rejects the script, so ship briefs cannot be scaffolded in the environment this change targets; interpolate that possessive through APOS (and exercise the regression with Bash 3.2 rather than the current Bash 5-only check).
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
Captain ruling: authorize one narrowly scoped exception worker to drive the required no-mistakes pipeline for this repair only. Scope and stop conditions:
This exception resolves the earlier freeze/pipeline contradiction. The freeze remains in force for every other Firstmate change until PR #3 is merged and verified. |
Repair of PR #2 broad import. History-preserving commits: revert then minimal targeted reapply.
What PR #2 actually did (corrected scope)
The cherry-pick of
648dd9cwas byte-identical and correct. The mistake was the merge-base assumption: the hotfix branch was based on local main (a5fe1bc) which was 60 commits behind the fork's authoritative main (b2bf95f, then283884bafter PR #2 merged). GitHub's diff for PR #2 included the full 60-commit divergence plus the cherry-pick. The squash commit283884babsorbed all of that into one commit spanning 214 files.Repair commits
a4618fbRevert283884b- restores fork main tob2bf95fcontent (pre-incident SHA from the captain's ruling).6f45b60fix(brief): reapply bash 3.2 parser-safe interpolation - adds theAPOSinterpolation infrastructure from upstream648dd9c(the comment block +APOS="'"definition) so future authors usefirstmate${APOS}sinstead of typing bare apostrophes in $( )-nested heredocs.Net diff from pre-incident SHA
b2bf95fSingle file. No additional files. The stop-condition requirement is satisfied.
Validation
bash -n bin/fm-brief.shparsesfm-brief.sh rhiz-validate-rhiz rhizprotocol) succeedstests/fm-brief.test.sh15/15 greenshellcheck -S error bin/fm-brief.shclean (shellcheck 0.11.0)Test discrepancy to surface
The captain's validation list included
tests/fm-ask-user-authority.test.sh. That file does not exist at the pre-incident SHAb2bf95f- it was removed somewhere in the(a5fe1bc, b2bf95f)window, before the broad import. It existed ata5fe1bc(local main) and at283884b(because the squash restored it from one of the 61 absorbed upstream commits), but the pre-incident fork mainb2bf95fdoes not have it. Including it in the repair would violate the 'only the parser repair' stop condition.If the test needs to be restored as part of the repair, that's a separate decision - say the word and I'll ship a follow-up PR.
Phased plan note
The repair does not include the doctrine PR (rules 6 + 7). Per the captain's ruling, that PR must be re-raised from this verified clean
mainvia a fresh ship worker + full no-mistakes path, not from this repair PR.