ci: stage exhaustive model bundle hardening validation #1
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: Validate model bundle hardening | |
| on: | |
| push: | |
| branches: | |
| - agent/phase2-validated-output | |
| paths: | |
| - '.github/model-bundle-hardening/**' | |
| - '.github/workflows/model-bundle-hardening.yml' | |
| permissions: | |
| contents: write | |
| jobs: | |
| validate-and-publish: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| ref: agent/phase2-validated-output | |
| fetch-depth: 0 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 24 | |
| cache: npm | |
| cache-dependency-path: global-template/docgen/package.json | |
| - name: Assemble validated pipeline source | |
| shell: bash | |
| run: | | |
| set -euo pipefail | |
| cat .github/model-bundle-hardening/pipeline.part-* > global-template/docgen/lib/pipeline.mjs | |
| rm -rf .github/model-bundle-hardening | |
| rm -f .github/workflows/model-bundle-hardening.yml | |
| git diff --check | |
| - name: Run complete validation gate | |
| 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 | |
| git diff --check | |
| - name: Publish clean validated source | |
| 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 'fix: eliminate repeated missing model object failures' | |
| git push origin HEAD:agent/phase2-validated-output |