Merge pull request #169 from mex-memory/fix/108-broken-link-html-comm… #380
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - integration/human-team-memory-v1 | |
| pull_request: | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: ci-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| checkpoint-policy: | |
| if: github.event_name == 'pull_request' && github.base_ref == 'integration/human-team-memory-v1' | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 5 | |
| steps: | |
| - uses: actions/checkout@v5 | |
| with: | |
| fetch-depth: 0 | |
| - uses: actions/setup-node@v5 | |
| with: | |
| node-version: 22.22.0 | |
| - name: Enforce integration checkpoint boundary | |
| env: | |
| MEX_POLICY_BASE_SHA: ${{ github.event.pull_request.base.sha }} | |
| run: node scripts/check-integration-pr-policy.mjs | |
| check: | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 45 | |
| strategy: | |
| matrix: | |
| node-version: ['22.22.0', '24'] | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: actions/setup-node@v5 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| cache: npm | |
| - run: npm ci | |
| - run: npm run typecheck | |
| - run: npm run test | |
| - name: Run evaluator tests | |
| if: matrix.node-version == '22.22.0' | |
| run: npm run eval:test | |
| - run: npm run build | |
| - name: Smoke test packed Project Hub | |
| if: matrix.node-version == '22.22.0' | |
| run: npm run test:hub:package | |
| - name: Smoke test packed graph CLI | |
| if: matrix.node-version == '22.22.0' | |
| shell: bash | |
| run: | | |
| TARBALL="$(npm pack --silent | tail -n 1)" | |
| FIXTURE="$(mktemp -d)" | |
| mkdir -p "$FIXTURE/project/src" | |
| cd "$FIXTURE/project" | |
| npm init -y >/dev/null | |
| npm install "$GITHUB_WORKSPACE/$TARBALL" --ignore-scripts >/dev/null | |
| printf 'export function greet(name: string): string { return `hello ${name}`; }\n' > src/sample.ts | |
| printf 'class Vehicle:\n def drive(self):\n return True\n' > src/sample.py | |
| printf 'pub struct User { pub name: String }\npub fn create_user() -> User { User { name: String::new() } }\n' > src/sample.rs | |
| MEX_TELEMETRY=0 ./node_modules/.bin/mex graph --json | grep '"nodesCreated"' | |
| MEX_TELEMETRY=0 ./node_modules/.bin/mex graph query where-defined greet | grep '"type":"result"' | |
| MEX_TELEMETRY=0 ./node_modules/.bin/mex graph query where-defined Vehicle | grep '"type":"result"' | |
| MEX_TELEMETRY=0 ./node_modules/.bin/mex graph query where-defined User | grep '"type":"result"' | |
| storage-portability: | |
| # Filesystem containment, SQLite migration/locking, and packed-install | |
| # behavior must remain portable whenever local Team state changes. | |
| runs-on: ${{ matrix.os }} | |
| timeout-minutes: 45 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [macos-14, windows-2022] | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: actions/setup-node@v5 | |
| with: | |
| node-version: 22.22.0 | |
| cache: npm | |
| - run: npm ci | |
| - name: Run focused storage and containment tests | |
| run: >- | |
| npx vitest run | |
| src/team/local-state/__tests__/team-local-state.test.ts | |
| src/team/artifacts/__tests__/filesystem.test.ts | |
| src/team/artifacts/__tests__/filesystem-publish-failure.test.ts | |
| - run: npm run build | |
| - name: Smoke test the packed install | |
| run: npm run test:hub:package | |
| hub-browser: | |
| # Visual baselines are exact for this runner image; do not float with ubuntu-latest. | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 30 | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: actions/setup-node@v5 | |
| with: | |
| node-version: 22.22.0 | |
| cache: npm | |
| - run: npm ci | |
| - run: npx playwright install --with-deps chromium | |
| - run: npm run test:hub:web | |
| - run: npm run test:hub:e2e | |
| - name: Upload browser failure artifacts | |
| if: failure() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: hub-browser-failure-${{ github.run_attempt }} | |
| path: | | |
| playwright-report/ | |
| test-results/ | |
| test/hub-e2e/__screenshots__/linux/ | |
| if-no-files-found: ignore | |
| retention-days: 7 | |
| release_performance_attempt_1: | |
| name: release-performance-attempt-1 | |
| # Runtime budgets are characterized only on this exact image and Node patch. | |
| # A potentially material crossing is confirmed by a separately allocated job. | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 60 | |
| outputs: | |
| requires_confirmation: ${{ steps.decision.outputs.requires_confirmation }} | |
| artifact_name: ${{ steps.decision.outputs.artifact_name }} | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: actions/setup-node@v5 | |
| with: | |
| node-version: 22.22.0 | |
| cache: npm | |
| - run: npm ci | |
| - run: npx playwright install --with-deps chromium | |
| - run: npm run build | |
| - name: Measure the first release-performance attempt | |
| env: | |
| MEX_ENFORCE_RELEASE_BUDGETS: "1" | |
| run: >- | |
| node scripts/release-benchmark/ci-orchestrator.mjs attempt | |
| --report test-results/release-benchmark/attempt-1/report.attempt-1.json | |
| --manifest test-results/release-benchmark/attempt-1/manifest.json | |
| - name: Publish the bounded confirmation decision | |
| id: decision | |
| shell: bash | |
| run: | | |
| REQUIRED="$(node scripts/release-benchmark/ci-orchestrator.mjs retry-required --manifest test-results/release-benchmark/attempt-1/manifest.json)" | |
| echo "requires_confirmation=$REQUIRED" >> "$GITHUB_OUTPUT" | |
| echo "artifact_name=release-performance-attempt-1-$GITHUB_RUN_ATTEMPT" >> "$GITHUB_OUTPUT" | |
| - name: Upload first release benchmark evidence | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ steps.decision.outputs.artifact_name }} | |
| path: test-results/release-benchmark/attempt-1/ | |
| if-no-files-found: ignore | |
| retention-days: 14 | |
| release_performance_attempt_2: | |
| name: release-performance-attempt-2 | |
| needs: release_performance_attempt_1 | |
| if: needs.release_performance_attempt_1.outputs.requires_confirmation == 'true' | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 60 | |
| outputs: | |
| artifact_name: ${{ steps.evidence.outputs.artifact_name }} | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: actions/setup-node@v5 | |
| with: | |
| node-version: 22.22.0 | |
| cache: npm | |
| - run: npm ci | |
| - run: npx playwright install --with-deps chromium | |
| - run: npm run build | |
| - name: Measure the fresh-runner confirmation attempt | |
| env: | |
| MEX_ENFORCE_RELEASE_BUDGETS: "1" | |
| run: >- | |
| node scripts/release-benchmark/ci-orchestrator.mjs attempt | |
| --report test-results/release-benchmark/attempt-2/report.attempt-2.json | |
| --manifest test-results/release-benchmark/attempt-2/manifest.json | |
| - name: Publish the bounded evidence identity | |
| id: evidence | |
| shell: bash | |
| run: echo "artifact_name=release-performance-attempt-2-$GITHUB_RUN_ATTEMPT" >> "$GITHUB_OUTPUT" | |
| - name: Upload second release benchmark evidence | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ steps.evidence.outputs.artifact_name }} | |
| path: test-results/release-benchmark/attempt-2/ | |
| if-no-files-found: ignore | |
| retention-days: 14 | |
| release-performance: | |
| # Preserve this final job name as the stable release gate. It always runs so | |
| # a skipped, cancelled, or malformed producer cannot silently bypass CI. | |
| needs: [release_performance_attempt_1, release_performance_attempt_2] | |
| if: always() | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 10 | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: actions/setup-node@v5 | |
| with: | |
| node-version: 22.22.0 | |
| - name: Download first release benchmark evidence | |
| continue-on-error: true | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: ${{ needs.release_performance_attempt_1.outputs.artifact_name }} | |
| path: test-results/release-benchmark/attempt-1/ | |
| - name: Download fresh-runner confirmation evidence | |
| if: needs.release_performance_attempt_1.outputs.requires_confirmation == 'true' | |
| continue-on-error: true | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: ${{ needs.release_performance_attempt_2.outputs.artifact_name }} | |
| path: test-results/release-benchmark/attempt-2/ | |
| - name: Finalize release performance without a confirmation | |
| if: needs.release_performance_attempt_1.outputs.requires_confirmation != 'true' | |
| run: >- | |
| node scripts/release-benchmark/ci-orchestrator.mjs finalize | |
| --first-report test-results/release-benchmark/attempt-1/report.attempt-1.json | |
| --first-manifest test-results/release-benchmark/attempt-1/manifest.json | |
| --output test-results/release-benchmark/report.json | |
| - name: Finalize release performance with fresh-runner confirmation | |
| if: needs.release_performance_attempt_1.outputs.requires_confirmation == 'true' | |
| run: >- | |
| node scripts/release-benchmark/ci-orchestrator.mjs finalize | |
| --first-report test-results/release-benchmark/attempt-1/report.attempt-1.json | |
| --first-manifest test-results/release-benchmark/attempt-1/manifest.json | |
| --second-report test-results/release-benchmark/attempt-2/report.attempt-2.json | |
| --second-manifest test-results/release-benchmark/attempt-2/manifest.json | |
| --output test-results/release-benchmark/report.json | |
| - name: Upload final release benchmark report | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: release-performance-${{ github.run_attempt }} | |
| path: test-results/release-benchmark/ | |
| if-no-files-found: ignore | |
| retention-days: 14 |