fix(ci): replace heredoc with echo statements in alignment.yml

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 <noreply@anthropic.com>
This commit is contained in:
2026-05-23 15:49:09 +10:00
co-authored by Claude Opus 4.7
parent 0041fb1017
commit 26b928ec13
+26 -28
View File
@@ -96,34 +96,32 @@ jobs:
done done
if [ "$FAIL" -ne 0 ]; then if [ "$FAIL" -ne 0 ]; then
cat <<'EOF' echo ""
echo "============================================================"
============================================================ echo "ALIGNMENT GUARDRAIL FAILURE"
ALIGNMENT GUARDRAIL FAILURE echo "============================================================"
============================================================ echo "OLP source contains a token on the alignment blacklist or"
OLP source contains a token on the alignment blacklist or echo "references a permanently excluded provider."
references a permanently excluded provider. echo ""
echo "Blacklist tokens were introduced by LLM hallucinations and"
Blacklist tokens were introduced by LLM hallucinations and echo "do not appear in the relevant authority (provider CLI,"
do not appear in the relevant authority (provider CLI, echo "OpenAI spec, or ADR). See ALIGNMENT.md and (where the"
OpenAI spec, or ADR). See ALIGNMENT.md and (where the echo "token is inherited from OCP) the OCP 2026-04-11 drift"
token is inherited from OCP) the OCP 2026-04-11 drift echo "record at https://github.com/dtzp555-max/ocp."
record at https://github.com/dtzp555-max/ocp. echo ""
echo "Excluded providers are listed in ALIGNMENT.md \xc2\xa7 Risk Tier"
Excluded providers are listed in ALIGNMENT.md § Risk Tier echo "Framework and ADR 0006. Permanent exclusion means not"
Framework and ADR 0006. Permanent exclusion means not echo "bundled, not pluggable, not added via opt-in."
bundled, not pluggable, not added via opt-in. echo ""
echo "Required action:"
Required action: echo " 1. Remove the token from source."
1. Remove the token from source. echo " 2. Cite the real authority (provider CLI doc / OpenAI"
2. Cite the real authority (provider CLI doc / OpenAI echo " spec section / ADR) for the operation you intended."
spec section / ADR) for the operation you intended. echo " 3. See ALIGNMENT.md Rules 1, 2, and 5."
3. See ALIGNMENT.md Rules 1, 2, and 5. echo ""
echo "Do not add allowlist entries to this workflow without an"
Do not add allowlist entries to this workflow without an echo "amendment PR to ALIGNMENT.md (see Amendment Procedure)."
amendment PR to ALIGNMENT.md (see Amendment Procedure). echo "============================================================"
============================================================
EOF
exit 1 exit 1
fi fi