Merge commit 'refs/b3/962' into integ/installer-batch3

This commit is contained in:
Michael Sitarzewski committed 2026-09-30 21:20:37 -05:00
commit ee241d4b70
3 files changed
+30

No files matched your search

+4
View File
@@ -104,3 +104,7 @@ jobs:
run: |
chmod +x scripts/lint-agents.sh
./scripts/lint-agents.sh
- name: Reject folded frontmatter fixtures
if: steps.rules.outputs.changed == 'true'
run: bash scripts/test-folded-frontmatter.sh
+9
View File
@@ -112,6 +112,15 @@ lint_file() {
return
fi
# The lightweight converters read plain or quoted scalar fields. A folded
# block otherwise passes presence checks but leaks its YAML indicator into
# the generated value.
if grep -qE '^[[:space:]]*[[:alnum:]_-]+:[[:space:]]*>([-+][1-9]?|[1-9][-+]?)?([[:space:]]+#.*)?[[:space:]]*$' <<<"$frontmatter"; then
echo "ERROR $file: folded YAML frontmatter is unsupported — use a single-line scalar"
errors=$((errors + 1))
return
fi
# 2. Check required frontmatter fields
for field in "${REQUIRED_FRONTMATTER[@]}"; do
if ! grep -qE -- "^${field}:" <<<"$frontmatter"; then
+17
View File
@@ -0,0 +1,17 @@
#!/usr/bin/env bash
set -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
scratch="$(mktemp -d)"
trap 'rm -rf "$scratch"' EXIT
for indicator in '>' '>-' '>+' '>2' '>2-' '>-2' '>+2' '>2+ # comment'; do
printf '%s\n' '---' 'name: Example Agent' "description: $indicator" ' First line' ' Second line' 'color: blue' '---' '## Identity' '## Core Mission' '## Critical Rules' > "$scratch/agent.md"
if bash "$SCRIPT_DIR/lint-agents.sh" "$scratch/agent.md" > "$scratch/result.log" 2>&1; then
echo "FAIL: linter accepted folded frontmatter $indicator" >&2; exit 1
fi
grep -q 'folded YAML frontmatter is unsupported' "$scratch/result.log"
done
for description in '"A > B"' "'A > B'" 'Ordinary description'; do
printf '%s\n' '---' 'name: Example Agent' "description: $description" 'color: blue' '---' '## Identity' '## Core Mission' '## Critical Rules' '> Body quotation' > "$scratch/agent.md"
bash "$SCRIPT_DIR/lint-agents.sh" "$scratch/agent.md" > "$scratch/result.log" 2>&1
done
echo 'PASS: folded frontmatter is rejected while quoted scalars and body quotations pass'