Skip to content

feat(task-board): idempotent task creation via external_ref #1328

feat(task-board): idempotent task creation via external_ref

feat(task-board): idempotent task creation via external_ref #1328

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
ci:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v4
with:
node-version: 24
cache: npm
- name: Install dependencies
# TODO: Restore `npm ci` once lockfile is generated on Linux.
# jsdom's optional @emnapi/* native deps vary by platform — a macOS-generated
# lockfile omits Linux variants, causing npm ci to fail on Ubuntu runners.
# Fix: run `npm install` in a Linux container and commit that lockfile.
run: npm install --no-audit
- name: Build workspace packages
run: npx tsc -b packages/protocol packages/harness packages/client
- name: Lint
id: lint
run: npm run lint
- name: Format check
id: format
run: npm run format:check
- name: Type check (server)
id: typecheck-server
if: always()
run: npx tsc --noEmit
- name: Type check (frontend)
id: typecheck-frontend
if: always()
run: cd frontend && npx tsc -b
- name: Test
id: test
if: always()
run: npm test 2>&1 | tee test-output.txt
- name: Test count guard
id: test-count
if: always()
run: |
COUNT=$(grep 'Tests' test-output.txt | grep -oE '[0-9]+ passed' | grep -oE '[0-9]+')
echo "Test count: $COUNT"
if [ -z "$COUNT" ] || [ "$COUNT" -lt 250 ]; then
echo "::error::Test count dropped below 250 (got ${COUNT:-0}). Did you accidentally delete tests?"
exit 1
fi
- name: Audit
id: audit
if: always()
run: npm audit --audit-level=high
continue-on-error: true
- name: Secret scan
id: secret-scan
if: always()
uses: gitleaks/gitleaks-action@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Build MCP server
id: build-mcp
if: always()
run: cd mcp-server && npm ci && npm run build
- name: Build
id: build
if: always()
run: npm run build
- name: Bundle size
id: bundle-size
if: always()
run: |
JS_SIZE=$(wc -c < frontend/dist/assets/index-*.js 2>/dev/null || echo 0)
CSS_SIZE=$(wc -c < frontend/dist/assets/index-*.css 2>/dev/null || echo 0)
JS_KB=$((JS_SIZE / 1024))
CSS_KB=$((CSS_SIZE / 1024))
echo "JS: ${JS_KB}KB, CSS: ${CSS_KB}KB"
echo "### Bundle Size" >> $GITHUB_STEP_SUMMARY
echo "| Asset | Size |" >> $GITHUB_STEP_SUMMARY
echo "|-------|------|" >> $GITHUB_STEP_SUMMARY
echo "| JS | ${JS_KB}KB |" >> $GITHUB_STEP_SUMMARY
echo "| CSS | ${CSS_KB}KB |" >> $GITHUB_STEP_SUMMARY
if [ "$JS_KB" -gt 600 ]; then
echo "::warning::JS bundle exceeds 600KB (${JS_KB}KB)"
fi
- name: Summary
if: always()
run: |
if [ "${{ steps.lint.outcome }}" = "failure" ] || \
[ "${{ steps.format.outcome }}" = "failure" ] || \
[ "${{ steps.typecheck-server.outcome }}" = "failure" ] || \
[ "${{ steps.typecheck-frontend.outcome }}" = "failure" ] || \
[ "${{ steps.test.outcome }}" = "failure" ] || \
[ "${{ steps.test-count.outcome }}" = "failure" ] || \
[ "${{ steps.secret-scan.outcome }}" = "failure" ] || \
[ "${{ steps.build-mcp.outcome }}" = "failure" ] || \
[ "${{ steps.build.outcome }}" = "failure" ]; then
echo "One or more CI steps failed."
exit 1
fi