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.
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user