Skip to content

chore: publish Phase 2 validation output to temporary branch #4

chore: publish Phase 2 validation output to temporary branch

chore: publish Phase 2 validation output to temporary branch #4

name: Phase 2 bootstrap
on:
push:
branches: ['agent/token-efficient-semantic-index']
permissions:
contents: write
jobs:
apply:
if: ${{ github.actor != 'github-actions[bot]' }}
runs-on: ubuntu-latest
outputs:
commit_sha: ${{ steps.commit.outputs.sha }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v4
with:
node-version: 24
- name: Apply Phase 2 patch
shell: bash
run: |
set -euo pipefail
cat .github/phase2-parts/part-* | base64 -d | gzip -d > /tmp/phase2.patch
patch -p1 < /tmp/phase2.patch
rm -rf .github/phase2-parts .github/workflows/phase2-bootstrap.yml
git diff --check
- name: Validate implementation
shell: bash
run: |
set -euo pipefail
cd global-template/docgen
npm run check
DOCGEN_PROGRESS=0 npm test
cd ../..
node install.mjs --dry-run --no-link-cli
node - <<'NODE'
const fs = require('fs');
const path = require('path');
for (const name of fs.readdirSync('global-template/docgen/schemas')) {
if (name.endsWith('.json')) JSON.parse(fs.readFileSync(path.join('global-template/docgen/schemas', name), 'utf8'));
}
console.log('schemas ok');
NODE
- name: Commit final implementation
id: commit
shell: bash
run: |
set -euo pipefail
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add -A
git commit -m "feat: stabilize runtime and add stack-neutral quality gates"
git push origin "HEAD:${GITHUB_REF_NAME}"
echo "sha=$(git rev-parse HEAD)" >> "$GITHUB_OUTPUT"
validate:
needs: apply
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
node: 22
- os: ubuntu-latest
node: 24
- os: windows-latest
node: 24
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
with:
ref: ${{ needs.apply.outputs.commit_sha }}
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
- name: Syntax and full test suite
working-directory: global-template/docgen
run: |
npm run check
npm test
- name: Installer dry run
run: node install.mjs --dry-run --no-link-cli