Skip to content

fix(brief): restore fork main after PR #2 broad import - #3

Open
ICGNU3 wants to merge 2 commits into
mainfrom
repair/pr2-broad-import
Open

fix(brief): restore fork main after PR #2 broad import#3
ICGNU3 wants to merge 2 commits into
mainfrom
repair/pr2-broad-import

Conversation

@ICGNU3

@ICGNU3 ICGNU3 commented Jul 29, 2026

Copy link
Copy Markdown
Owner

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 648dd9c was 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, then 283884b after PR #2 merged). GitHub's diff for PR #2 included the full 60-commit divergence plus the cherry-pick. The squash commit 283884b absorbed all of that into one commit spanning 214 files.

Repair commits

  1. a4618fb Revert 283884b - restores fork main to b2bf95f content (pre-incident SHA from the captain's ruling).
  2. 6f45b60 fix(brief): reapply bash 3.2 parser-safe interpolation - adds the APOS interpolation infrastructure from upstream 648dd9c (the comment block + APOS="'" definition) so future authors use firstmate${APOS}s instead of typing bare apostrophes in $( )-nested heredocs.

Net diff from pre-incident SHA b2bf95f

 bin/fm-brief.sh | 8 ++++++++
 1 file changed, 8 insertions(+)

Single file. No additional files. The stop-condition requirement is satisfied.

Validation

  • bash -n bin/fm-brief.sh parses
  • Real ship-brief scaffold (fm-brief.sh rhiz-validate-rhiz rhizprotocol) succeeds
  • tests/fm-brief.test.sh 15/15 green
  • shellcheck -S error bin/fm-brief.sh clean (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 SHA b2bf95f - it was removed somewhere in the (a5fe1bc, b2bf95f) window, before the broad import. It existed at a5fe1bc (local main) and at 283884b (because the squash restored it from one of the 61 absorbed upstream commits), but the pre-incident fork main b2bf95f does 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 main via a fresh ship worker + full no-mistakes path, not from this repair PR.

ICGNU3 added 2 commits July 29, 2026 04:13
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.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

APOS="'"

P1 Badge Use APOS in the nested heredoc

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".

ICGNU3 commented Jul 29, 2026

Copy link
Copy Markdown
Owner Author

Captain ruling: authorize one narrowly scoped exception worker to drive the required no-mistakes pipeline for this repair only.

Scope and stop conditions:

  • Worker target is existing branch repair/pr2-broad-import / PR fix(brief): restore fork main after PR #2 broad import #3.
  • The worker may run validation and apply only pipeline-required corrections that preserve the verified net state against pre-incident b2bf95fa9e1eac5ff23eb0ea7f6c5241bfdf82eb: bin/fm-brief.sh only, with the intended Bash 3.2 parser repair.
  • Any proposed code or documentation change outside bin/fm-brief.sh is a stop-and-escalate condition. Do not accept broad autofixes.
  • Do not restore tests/fm-ask-user-authority.test.sh in this repair. Its absence predates the incident and must be evaluated separately after the fork is clean.
  • Existing three Rhiz Phase A workers remain undisturbed. No Phase B dispatch and no additional Firstmate workers are authorized.
  • Merge PR fix(brief): restore fork main after PR #2 broad import #3 only after required no-mistakes and CI checks are green and the final comparison to the pre-incident SHA still shows only the intended parser repair.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant