V46 Canonical Promotion: Protocol Comprehension #19
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: V42 Canon Promotion | |
| on: | |
| pull_request: | |
| branches: | |
| - main | |
| types: | |
| - opened | |
| - synchronize | |
| - reopened | |
| - ready_for_review | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: write | |
| pull-requests: read | |
| jobs: | |
| promote-v42: | |
| name: V42 Promotion Validation | |
| if: >- | |
| ${{ | |
| github.event_name == 'workflow_dispatch' || | |
| ( | |
| github.event.pull_request.base.ref == 'main' && | |
| github.event.pull_request.head.ref == 'version/v42' && | |
| github.event.pull_request.head.repo.full_name == github.repository | |
| ) | |
| }} | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| steps: | |
| - name: Checkout version branch | |
| uses: actions/checkout@v4 | |
| with: | |
| ref: ${{ github.event.pull_request.head.ref || github.ref_name }} | |
| token: ${{ github.token }} | |
| fetch-depth: 0 | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v4 | |
| - name: Setup Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "24" | |
| cache: pnpm | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Validate V42 promotion readiness | |
| run: | | |
| POINTER="$(cat BITCODE_SPEC.txt)" | |
| if [ "$POINTER" = "V41" ]; then | |
| node scripts/check-bitcode-spec-family.mjs --version V42 --mode draft --current-target V41 | |
| node scripts/check-bitcode-canon-posture-drift.mjs --active-canon V41 --draft-target V42 | |
| node scripts/check-bitcode-canonical-inputs.mjs --current-target V41 | |
| node scripts/check-v42-gate1-mvp-experience-roadmap-opening.mjs --skip-branch-check | |
| node scripts/check-v42-gate2-depositing-shortest-path.mjs --skip-branch-check --skip-package-tests | |
| node scripts/check-v42-gate3-reading-shortest-path-state-machine.mjs --skip-branch-check --skip-uapi-tests | |
| node scripts/check-v42-gate4-readneed-review-resynthesis-product-closure.mjs --skip-branch-check --skip-package-tests --skip-uapi-tests | |
| node scripts/check-v42-gate5-readfitsfinding-preview-quote.mjs --skip-branch-check --skip-package-tests --skip-uapi-tests | |
| node scripts/check-v42-gate6-settlement-rights-delivery.mjs --skip-branch-check --skip-package-tests --skip-uapi-tests | |
| node scripts/check-v42-gate7-ai-reading-demonstration.mjs --skip-branch-check --skip-package-tests --skip-demonstration-tests | |
| node scripts/check-v42-gate8-local-staging-mvp-rehearsal.mjs --skip-branch-check --skip-package-tests --skip-uapi-tests | |
| node scripts/check-v42-gate9-promotion-readiness.mjs --promotion-mode --skip-branch-check --skip-package-tests | |
| node scripts/promote-bitcode-canon.mjs --version V42 --commit HEAD --dry-run | |
| elif [ "$POINTER" = "V42" ]; then | |
| node scripts/check-bitcode-spec-family.mjs --version V42 --mode promoted --current-target V42 | |
| node scripts/check-bitcode-canonical-inputs.mjs --current-target V42 | |
| node scripts/check-bitcode-canon-posture-drift.mjs --active-canon V42 --draft-target V43 | |
| node scripts/check-v42-gate9-promotion-readiness.mjs --promotion-mode --skip-branch-check --skip-package-tests | |
| else | |
| echo "Unexpected BITCODE_SPEC.txt pointer: $POINTER" >&2 | |
| exit 1 | |
| fi | |
| pnpm --filter @bitcode/protocol typecheck | |
| pnpm --filter @bitcode/protocol test | |
| pnpm --filter @bitcode/btd typecheck | |
| pnpm --filter @bitcode/btd test | |
| npm --prefix protocol-demonstration test | |
| npm --prefix protocol-demonstration run test:v28-mvp-qa | |
| pnpm --filter @bitcode/pipeline-asset-pack typecheck | |
| pnpm --filter @bitcode/pipeline-hosts typecheck | |
| pnpm --filter @bitcode/pipeline-asset-pack exec jest --config jest.config.cjs --passWithNoTests --forceExit | |
| pnpm --filter @bitcode/pipeline-hosts exec jest --config jest.config.cjs --passWithNoTests --forceExit | |
| git diff --check | |
| - name: Promote V42 canon files | |
| if: >- | |
| ${{ | |
| github.event_name == 'pull_request' && | |
| github.event.pull_request.head.ref == 'version/v42' | |
| }} | |
| env: | |
| HEAD_BRANCH: ${{ github.event.pull_request.head.ref }} | |
| run: | | |
| if [ "$(cat BITCODE_SPEC.txt)" = "V42" ]; then | |
| echo "BITCODE_SPEC.txt already points to V42." | |
| exit 0 | |
| fi | |
| PROOF_SOURCE_COMMIT="$(git rev-parse HEAD)" | |
| node scripts/prepare-bitcode-spec-family-promotion.mjs --version V42 --commit "$PROOF_SOURCE_COMMIT" | |
| node scripts/prepare-bitcode-runtime-canon-promotion.mjs --version V42 --next-draft V43 | |
| printf "V42\n" > BITCODE_SPEC.txt | |
| node scripts/generate-bitcode-proven.mjs --version V42 --commit "$PROOF_SOURCE_COMMIT" --worktree-state clean --output BITCODE_SPEC_V42_PROVEN.md --allow-dirty | |
| node scripts/generate-bitcode-proven.mjs --version V42 --commit "$PROOF_SOURCE_COMMIT" --worktree-state clean --output BITCODE_SPEC_V42_PROVEN.md --check --allow-dirty | |
| node scripts/check-bitcode-canonical-inputs.mjs --current-target V42 | |
| node scripts/check-bitcode-spec-family.mjs --version V42 --mode promoted --current-target V42 | |
| node scripts/check-bitcode-canon-posture-drift.mjs --active-canon V42 --draft-target V43 | |
| git diff --check | |
| git config user.name "github-actions[bot]" | |
| git config user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
| git add \ | |
| BITCODE_SPEC.txt \ | |
| BITCODE_SPEC_V42.md \ | |
| BITCODE_SPEC_V42_DELTA.md \ | |
| BITCODE_SPEC_V42_NOTES.md \ | |
| BITCODE_SPEC_V42_PARITY_MATRIX.md \ | |
| BITCODE_SPEC_V42_PROVEN.md \ | |
| protocol-demonstration/src/canon-posture.js \ | |
| protocol-demonstration/README.md \ | |
| packages/protocol/src/canon-posture.js \ | |
| packages/protocol/data/state.json \ | |
| packages/protocol/README.md \ | |
| .bitcode | |
| git commit -m "Promote Bitcode canon to V42" | |
| git push origin "HEAD:$HEAD_BRANCH" |