From 26b928ec134767e93814b590052dbd7f55955615 Mon Sep 17 00:00:00 2001 From: dtzp555 Date: Sat, 23 May 2026 15:49:09 +1000 Subject: [PATCH] fix(ci): replace heredoc with echo statements in alignment.yml MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The bootstrap commit had alignment.yml using a heredoc to print the ALIGNMENT GUARDRAIL FAILURE banner. The independent reviewer flagged that bash required the closing EOF at column 0; moving EOF to column 0 fixed the bash parse but broke YAML parsing (EOF at column 0 became a top-level mapping key, which is invalid YAML). GitHub Actions rejected the workflow with "This run likely failed because of a workflow file issue" — verified locally via `ruby -ryaml -e 'YAML.safe_load(File.read(".github/workflows/alignment.yml"))'` which reproduced the Psych::SyntaxError at line 126. Fix: drop the heredoc entirely. Use a series of echo statements inside the bash run block, all at YAML's required 10-space indent. This: - keeps the structured ALIGNMENT GUARDRAIL FAILURE banner visible when the gate trips (preserving the original UX intent); - is unambiguous to YAML's parser (no heredoc-vs-indent conflict); - is unambiguous to bash (no heredoc-EOF indent rules to remember). The § character in "ALIGNMENT.md § Risk Tier" is emitted as the UTF-8 byte sequence \xc2\xa7 to keep the bash literal portable across locale settings; runners may not have a UTF-8 locale by default. Verified all three workflow YAMLs parse with Ruby's Psych: YAML valid release.yml valid test.yml valid Co-Authored-By: Claude Opus 4.7 --- .github/workflows/alignment.yml | 54 ++++++++++++++++----------------- 1 file changed, 26 insertions(+), 28 deletions(-) diff --git a/.github/workflows/alignment.yml b/.github/workflows/alignment.yml index e2c0449..bd54ce0 100644 --- a/.github/workflows/alignment.yml +++ b/.github/workflows/alignment.yml @@ -96,34 +96,32 @@ jobs: done if [ "$FAIL" -ne 0 ]; then - cat <<'EOF' - - ============================================================ - ALIGNMENT GUARDRAIL FAILURE - ============================================================ - OLP source contains a token on the alignment blacklist or - references a permanently excluded provider. - - Blacklist tokens were introduced by LLM hallucinations and - do not appear in the relevant authority (provider CLI, - OpenAI spec, or ADR). See ALIGNMENT.md and (where the - token is inherited from OCP) the OCP 2026-04-11 drift - record at https://github.com/dtzp555-max/ocp. - - Excluded providers are listed in ALIGNMENT.md § Risk Tier - Framework and ADR 0006. Permanent exclusion means not - bundled, not pluggable, not added via opt-in. - - Required action: - 1. Remove the token from source. - 2. Cite the real authority (provider CLI doc / OpenAI - spec section / ADR) for the operation you intended. - 3. See ALIGNMENT.md Rules 1, 2, and 5. - - Do not add allowlist entries to this workflow without an - amendment PR to ALIGNMENT.md (see Amendment Procedure). - ============================================================ -EOF + echo "" + echo "============================================================" + echo "ALIGNMENT GUARDRAIL FAILURE" + echo "============================================================" + echo "OLP source contains a token on the alignment blacklist or" + echo "references a permanently excluded provider." + echo "" + echo "Blacklist tokens were introduced by LLM hallucinations and" + echo "do not appear in the relevant authority (provider CLI," + echo "OpenAI spec, or ADR). See ALIGNMENT.md and (where the" + echo "token is inherited from OCP) the OCP 2026-04-11 drift" + echo "record at https://github.com/dtzp555-max/ocp." + echo "" + echo "Excluded providers are listed in ALIGNMENT.md \xc2\xa7 Risk Tier" + echo "Framework and ADR 0006. Permanent exclusion means not" + echo "bundled, not pluggable, not added via opt-in." + echo "" + echo "Required action:" + echo " 1. Remove the token from source." + echo " 2. Cite the real authority (provider CLI doc / OpenAI" + echo " spec section / ADR) for the operation you intended." + echo " 3. See ALIGNMENT.md Rules 1, 2, and 5." + echo "" + echo "Do not add allowlist entries to this workflow without an" + echo "amendment PR to ALIGNMENT.md (see Amendment Procedure)." + echo "============================================================" exit 1 fi