mirror of
https://github.com/dtzp555-max/olp.git
synced 2026-07-21 21:15:10 +00:00
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:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user