Convert gitgram/ and aitimemachine/ from embedded git repos (which showed as opaque submodule gitlinks on GitHub) into fully-tracked first-party content. AITM now merges its 7 vendored repos as first-party engines: - memory: beads (Go task DAG) + context7 (docs SDK), unified into saved_contexts - git: vendored C git (bundled binary) + gitnexus (in-process code intelligence) - agentic: a2a (@a2a-js/sdk) + pal (AITM-managed Python subprocess) Includes the full session's product build: Gitgram web/mobile/backend features, AITM website/CLI/MCP, the unified memory layer, engine build tooling (scripts/build-engines.sh, Dockerfile, CI), docs (README, ENGINES.md, ARCHITECTURE.md), and extensive test suites. Build artifacts, node_modules, external/, and gemini-cli are gitignored. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
268 lines
8.0 KiB
YAML
268 lines
8.0 KiB
YAML
# =============================================================================
|
|
# AITimeMachine PR Check - Fast feedback for pull requests
|
|
# =============================================================================
|
|
# Lightweight checks that run on every PR. The full CI pipeline (ci.yml) also
|
|
# runs on PRs, but this workflow provides quicker initial feedback on each
|
|
# component independently.
|
|
# =============================================================================
|
|
name: PR Check
|
|
|
|
on:
|
|
pull_request:
|
|
branches: [main, master]
|
|
|
|
concurrency:
|
|
group: aitm-pr-${{ github.head_ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
# ---------------------------------------------------------------------------
|
|
# Core package quick checks
|
|
# ---------------------------------------------------------------------------
|
|
core-check:
|
|
name: "Core: Build, Test & Quality Gates"
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup Node.js 20
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 20
|
|
cache: npm
|
|
|
|
- name: Install dependencies
|
|
run: npm ci
|
|
|
|
- name: ESLint
|
|
run: npm run lint
|
|
|
|
- name: TypeScript type-check
|
|
run: npx tsc --noEmit
|
|
|
|
- name: Build
|
|
run: npm run build
|
|
|
|
- name: Run tests
|
|
run: npm test
|
|
|
|
- name: Redaction quality gate
|
|
env:
|
|
AITM_REDACTION_MIN_PRECISION: "0.80"
|
|
AITM_REDACTION_MIN_RECALL: "0.95"
|
|
AITM_REDACTION_MIN_F1: "0.88"
|
|
run: npm run test:redaction-gate
|
|
|
|
- name: Search relevance gate
|
|
env:
|
|
AITM_SEARCH_RELEVANCE_MIN_TOP1: "0.65"
|
|
AITM_SEARCH_RELEVANCE_MIN_MRR: "0.78"
|
|
AITM_SEARCH_RELEVANCE_MIN_RECALL_AT3: "0.95"
|
|
run: npm run test:search-relevance-gate
|
|
|
|
- name: Universal Search Eval (thresholded)
|
|
if: ${{ secrets.EVAL_API_KEY != '' && vars.EVAL_BASE_URL != '' }}
|
|
env:
|
|
EVAL_API_KEY: ${{ secrets.EVAL_API_KEY }}
|
|
EVAL_BASE_URL: ${{ vars.EVAL_BASE_URL }}
|
|
EVAL_K: 1,3,5,10
|
|
EVAL_MIN_MRR: 0.35
|
|
EVAL_MIN_RECALL: 0.6
|
|
EVAL_MIN_WEIGHTED_MRR: 0.4
|
|
EVAL_MIN_WEIGHTED_RECALL: 0.65
|
|
run: npm run eval:universal-search
|
|
|
|
# ---------------------------------------------------------------------------
|
|
# API Server quick checks
|
|
# ---------------------------------------------------------------------------
|
|
api-server-check:
|
|
name: "API Server: Build, Type Check & Tests"
|
|
runs-on: ubuntu-latest
|
|
defaults:
|
|
run:
|
|
working-directory: api-server
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup Node.js 20
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 20
|
|
cache: npm
|
|
cache-dependency-path: api-server/package-lock.json
|
|
|
|
- name: Install dependencies
|
|
run: npm ci
|
|
|
|
- name: TypeScript type-check
|
|
run: npx tsc --noEmit
|
|
|
|
- name: Build
|
|
run: npm run build
|
|
|
|
- name: Service tests (no external deps)
|
|
run: npx vitest run tests/services --passWithNoTests
|
|
env:
|
|
AITM_TEST_NO_LISTEN: "1"
|
|
NODE_ENV: test
|
|
|
|
- name: Integration-safe tests
|
|
run: npm run test:integration:safe
|
|
env:
|
|
NODE_ENV: test
|
|
|
|
# ---------------------------------------------------------------------------
|
|
# Drizzle migration check
|
|
# ---------------------------------------------------------------------------
|
|
migration-check:
|
|
name: "API Server: Migration Files Check"
|
|
runs-on: ubuntu-latest
|
|
defaults:
|
|
run:
|
|
working-directory: api-server
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup Node.js 20
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 20
|
|
cache: npm
|
|
cache-dependency-path: api-server/package-lock.json
|
|
|
|
- name: Install dependencies
|
|
run: npm ci
|
|
|
|
- name: Validate drizzle migration files
|
|
run: |
|
|
echo "Checking drizzle migration files..."
|
|
|
|
DRIZZLE_DIR="drizzle"
|
|
if [ -d "$DRIZZLE_DIR" ]; then
|
|
MIGRATION_COUNT=$(find "$DRIZZLE_DIR" -name "*.sql" -not -path "*/meta/*" | wc -l)
|
|
echo "Found $MIGRATION_COUNT migration file(s)."
|
|
|
|
for f in $(find "$DRIZZLE_DIR" -name "*.sql" -not -path "*/meta/*"); do
|
|
echo "Validating: $f"
|
|
if grep -qi "DROP TABLE" "$f"; then
|
|
echo "WARNING: DROP TABLE detected in $f - review carefully"
|
|
fi
|
|
done
|
|
else
|
|
echo "No drizzle migration directory found."
|
|
fi
|
|
|
|
- name: Drizzle schema check
|
|
run: npx drizzle-kit check 2>&1 || echo "drizzle-kit check completed."
|
|
|
|
# ---------------------------------------------------------------------------
|
|
# VS Code Extension check
|
|
# ---------------------------------------------------------------------------
|
|
extension-check:
|
|
name: "Extension: Type Check"
|
|
runs-on: ubuntu-latest
|
|
defaults:
|
|
run:
|
|
working-directory: extensions/vscode
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Check if extension directory exists
|
|
id: check-ext
|
|
run: |
|
|
if [ -f extensions/vscode/package.json ]; then
|
|
echo "exists=true" >> "$GITHUB_OUTPUT"
|
|
else
|
|
echo "exists=false" >> "$GITHUB_OUTPUT"
|
|
fi
|
|
working-directory: .
|
|
|
|
- name: Setup Node.js 20
|
|
if: steps.check-ext.outputs.exists == 'true'
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 20
|
|
cache: npm
|
|
cache-dependency-path: extensions/vscode/package-lock.json
|
|
|
|
- name: Install dependencies
|
|
if: steps.check-ext.outputs.exists == 'true'
|
|
run: npm ci
|
|
|
|
- name: TypeScript type-check
|
|
if: steps.check-ext.outputs.exists == 'true'
|
|
run: npx tsc --noEmit
|
|
|
|
# ---------------------------------------------------------------------------
|
|
# Website check
|
|
# ---------------------------------------------------------------------------
|
|
website-check:
|
|
name: "Website: Build Check"
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Check if website directory exists
|
|
id: check-website
|
|
run: |
|
|
if [ -f website/package.json ]; then
|
|
echo "exists=true" >> "$GITHUB_OUTPUT"
|
|
else
|
|
echo "exists=false" >> "$GITHUB_OUTPUT"
|
|
fi
|
|
|
|
- name: Setup Node.js 20
|
|
if: steps.check-website.outputs.exists == 'true'
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 20
|
|
cache: npm
|
|
cache-dependency-path: website/package-lock.json
|
|
|
|
- name: Install dependencies
|
|
if: steps.check-website.outputs.exists == 'true'
|
|
working-directory: website
|
|
run: npm ci
|
|
|
|
- name: Build website
|
|
if: steps.check-website.outputs.exists == 'true'
|
|
working-directory: website
|
|
run: npm run build
|
|
|
|
# ---------------------------------------------------------------------------
|
|
# OpenAPI validation
|
|
# ---------------------------------------------------------------------------
|
|
openapi-check:
|
|
name: "Quality: OpenAPI Coverage"
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup Node.js 20
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 20
|
|
cache: npm
|
|
cache-dependency-path: api-server/package-lock.json
|
|
|
|
- name: Install API server dependencies
|
|
working-directory: api-server
|
|
run: npm ci
|
|
|
|
- name: Install root dependencies (for script)
|
|
run: |
|
|
if [ -f package.json ]; then
|
|
npm ci --ignore-scripts 2>/dev/null || true
|
|
fi
|
|
working-directory: .
|
|
|
|
- name: Validate OpenAPI route coverage
|
|
run: npx tsx scripts/validate-openapi-routes.ts
|
|
working-directory: .
|