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.
56 lines
1.6 KiB
YAML
56 lines
1.6 KiB
YAML
version: '3'
|
|
|
|
tasks:
|
|
build:
|
|
desc: Build the binary
|
|
cmds: [go build -o bin/gitea-mcp ./cmd/gitea-mcp]
|
|
run:
|
|
desc: Run the binary
|
|
deps: [build]
|
|
cmds: [./bin/gitea-mcp]
|
|
test:
|
|
desc: Run all tests
|
|
cmds: [go test ./... -race -count=1]
|
|
lint:
|
|
desc: Run golangci-lint
|
|
cmds: [golangci-lint run ./...]
|
|
vet:
|
|
cmds:
|
|
- go vet ./...
|
|
- govulncheck ./... || true
|
|
|
|
check:
|
|
desc: Run all checks (context freshness + lint + test + vet)
|
|
cmds:
|
|
- 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)
|
|
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
|
|
- task: lint
|
|
- task: test
|
|
- task: vet
|
|
|
|
context:sync:
|
|
desc: Regenerate all harness-specific context files
|
|
cmds:
|
|
- bash scripts/context-sync.sh
|
|
|
|
context:sync:claude:
|
|
cmds: [bash scripts/context-sync.sh claude]
|
|
context:sync:agents:
|
|
cmds: [bash scripts/context-sync.sh agents]
|
|
context:sync:cursor:
|
|
cmds: [bash scripts/context-sync.sh cursor]
|