From 9987522f1ae57fca3634be7e013cdcd1b1ded951 Mon Sep 17 00:00:00 2001 From: Mathias Bergqvist Date: Tue, 12 May 2026 12:09:24 +0200 Subject: [PATCH] fix(ci): skip context sync drift check in CI environment 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. --- Taskfile.yml | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/Taskfile.yml b/Taskfile.yml index 871edb2..c0fe26f 100644 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -22,18 +22,22 @@ tasks: check: desc: Run all checks (context freshness + lint + test + vet) cmds: - - task: context:sync - cmd: | - drift=$(git status --porcelain -- AGENTS.md CLAUDE.md .cursorrules .aider.conventions.md .context/system-prompt.txt 2>/dev/null) - if [ -n "$drift" ]; then - echo "ERROR: derived adapters drifted from canonical context." >&2 - echo "$drift" >&2 - echo "" >&2 - echo "Run: git add AGENTS.md CLAUDE.md .cursorrules .aider.conventions.md .context/system-prompt.txt" >&2 - echo " git commit -m 'chore: re-sync context adapters'" >&2 - exit 1 + 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) + if [ -n "$drift" ]; then + echo "ERROR: derived adapters drifted from canonical context." >&2 + echo "$drift" >&2 + echo "" >&2 + echo "Run: git add AGENTS.md CLAUDE.md .cursorrules .aider.conventions.md .context/system-prompt.txt" >&2 + echo " git commit -m 'chore: re-sync context adapters'" >&2 + exit 1 + fi + echo "✓ context: canonical and adapters are in sync" fi - echo "✓ context: canonical and adapters are in sync" - task: lint - task: test - task: vet