fix(ci): skip context sync drift check in CI environment
All checks were successful
CD / Lint / Test / Vet (push) Successful in 8s
CD / Build & Import (push) Successful in 13s
CD / Deploy via GitOps (push) Successful in 4s

Context-sync walks up the directory tree to find the root AGENT.md.
On koala's act_runner, checkout is under /var/lib/act_runner/, not
under ~/dev/, so ROOT_CONTEXT resolves to empty. Generated files
differ from committed files (which include root context), causing
the drift check to fail.

Skip context sync when CI=true; local checks still verify sync.
This commit is contained in:
Mathias Bergqvist
2026-05-12 12:09:24 +02:00
parent 0e53738d9f
commit 9987522f1a

View File

@@ -22,8 +22,11 @@ tasks:
check: check:
desc: Run all checks (context freshness + lint + test + vet) desc: Run all checks (context freshness + lint + test + vet)
cmds: cmds:
- task: context:sync
- cmd: | - cmd: |
if [ -n "${CI:-}" ]; then
echo "✓ context sync: skipped in CI"
else
bash scripts/context-sync.sh
drift=$(git status --porcelain -- AGENTS.md CLAUDE.md .cursorrules .aider.conventions.md .context/system-prompt.txt 2>/dev/null) drift=$(git status --porcelain -- AGENTS.md CLAUDE.md .cursorrules .aider.conventions.md .context/system-prompt.txt 2>/dev/null)
if [ -n "$drift" ]; then if [ -n "$drift" ]; then
echo "ERROR: derived adapters drifted from canonical context." >&2 echo "ERROR: derived adapters drifted from canonical context." >&2
@@ -34,6 +37,7 @@ tasks:
exit 1 exit 1
fi fi
echo "✓ context: canonical and adapters are in sync" echo "✓ context: canonical and adapters are in sync"
fi
- task: lint - task: lint
- task: test - task: test
- task: vet - task: vet