fix(hugo-content-workspace): never commit .agent-output/ runner scratch — was creating junk content commits + spurious CI rebuilds on every AI task

This commit is contained in:
Paul O'Reilly
2026-07-07 16:56:24 +12:00
parent ae4c8c29f8
commit 681f0ce4fa

View File

@@ -30,6 +30,13 @@ commit_repo() {
# Stage all changes
git add -A
# Never commit the agentic runner's scratch: `.agent-output/` (task-complete.json,
# logs) is written into the CWD, which is the content repo checkout. Committing it
# produced a junk "AI content update" commit on every AI task — including read-only
# flows (draft, section-edit) where cms-proxy applies the real change via PATCH — and
# each junk commit to the content branch triggered a spurious content-CI site rebuild.
git reset -q -- .agent-output >/dev/null 2>&1 || true
# Double-check — after staging, is there anything to commit?
if git diff --cached --quiet; then
echo "${label}: nothing staged after add -A"