V45 Canonical Promotion: Knowledge Commoditization Protocol Precision #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: V45 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-v45: | |
| name: V45 Promotion Validation | |
| if: >- | |
| ${{ | |
| github.event_name == 'workflow_dispatch' || | |
| ( | |
| github.event.pull_request.base.ref == 'main' && | |
| github.event.pull_request.head.ref == 'version/v45' && | |
| 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 V45 promotion readiness | |
| run: | | |
| set -euo pipefail | |
| run_checked() { | |
| echo "::group::$*" | |
| "$@" | |
| echo "::endgroup::" | |
| } | |
| run_bounded() { | |
| local limit="$1" | |
| shift | |
| echo "::group::$*" | |
| timeout --kill-after=30s "$limit" "$@" | |
| echo "::endgroup::" | |
| } | |
| POINTER="$(cat BITCODE_SPEC.txt)" | |
| if [ "$POINTER" = "V44" ]; then | |
| run_checked node scripts/check-bitcode-spec-family.mjs --version V45 --mode draft --current-target V44 | |
| run_checked node scripts/check-bitcode-canon-posture-drift.mjs --active-canon V44 --draft-target V45 | |
| run_checked node scripts/check-bitcode-canonical-inputs.mjs --current-target V44 | |
| run_checked node scripts/check-v45-gate2-knowledge-commoditization-law.mjs --skip-branch-check | |
| run_checked node scripts/check-v45-gate3-assetpack-lifecycle-state-machine.mjs --skip-branch-check | |
| run_checked node scripts/check-v45-gate4-btd-scalar-volume-state-machine.mjs --skip-branch-check | |
| run_checked node scripts/check-v45-gate5-btc-settlement-state-machine.mjs --skip-branch-check | |
| run_checked node scripts/check-v45-gate6-spec-consolidation-sequencing.mjs --skip-branch-check | |
| run_checked node scripts/check-v45-gate7-interface-authority-disclosure-boundaries.mjs --skip-branch-check | |
| run_checked node scripts/check-v45-gate8-proof-readback-operational-boundaries.mjs --skip-branch-check | |
| run_checked node scripts/check-v45-gate9-gate-taxonomy-formal-spec-readiness.mjs --skip-branch-check | |
| run_checked node scripts/check-v45-gate10-formal-spec-consolidation.mjs --skip-branch-check | |
| run_checked node scripts/check-v45-gate11-implementation-parity-audit.mjs --skip-branch-check | |
| run_checked node scripts/check-v45-gate12-state-vocabulary-commodity-model.mjs --skip-branch-check | |
| run_checked node scripts/check-v45-gate13-btd-scalar-volume-quote-conservation.mjs --skip-branch-check | |
| run_checked node scripts/check-v45-gate14-btc-settlement-rights-delivery-readback.mjs --skip-branch-check | |
| run_checked node scripts/check-v45-gate15-interface-disclosure-route-vocabulary-docs.mjs --skip-branch-check | |
| run_checked node scripts/check-v45-gate16-proof-families-generated-artifacts.mjs --skip-branch-check --skip-package-tests | |
| run_checked node scripts/check-v45-gate17-source-safe-e2e-rehearsal.mjs --skip-branch-check --skip-package-tests --skip-operator-dry-run | |
| run_checked node scripts/check-v45-gate18-promotion-readiness.mjs --promotion-mode --skip-branch-check --skip-package-tests | |
| run_checked node scripts/promote-bitcode-canon.mjs --version V45 --commit HEAD --dry-run | |
| elif [ "$POINTER" = "V45" ]; then | |
| run_checked node scripts/check-bitcode-spec-family.mjs --version V45 --mode promoted --current-target V45 | |
| run_checked node scripts/check-bitcode-canonical-inputs.mjs --current-target V45 | |
| run_checked node scripts/check-bitcode-canon-posture-drift.mjs --active-canon V45 --draft-target V46 | |
| run_checked node scripts/check-v45-gate18-promotion-readiness.mjs --promotion-mode --skip-branch-check --skip-package-tests | |
| else | |
| echo "Unexpected BITCODE_SPEC.txt pointer: $POINTER" >&2 | |
| exit 1 | |
| fi | |
| run_bounded 5m pnpm --filter @bitcode/protocol typecheck | |
| run_bounded 5m pnpm --filter @bitcode/protocol test | |
| run_bounded 5m pnpm --filter @bitcode/btd typecheck | |
| run_bounded 5m pnpm --filter @bitcode/btd exec jest --config jest.config.cjs --runInBand --forceExit | |
| run_bounded 15m npm --prefix protocol-demonstration test | |
| run_bounded 5m npm --prefix protocol-demonstration run test:v28-mvp-qa | |
| run_bounded 5m pnpm --filter @bitcode/pipeline-asset-pack typecheck | |
| run_bounded 5m pnpm --filter @bitcode/pipeline-hosts typecheck | |
| run_bounded 5m pnpm --filter @bitcode/pipeline-asset-pack exec jest --config jest.config.cjs --passWithNoTests --forceExit | |
| run_bounded 5m pnpm --filter @bitcode/pipeline-hosts exec jest --config jest.config.cjs --passWithNoTests --forceExit | |
| run_checked git diff --check | |
| - name: Promote V45 canon files | |
| if: >- | |
| ${{ | |
| github.event_name == 'pull_request' && | |
| github.event.pull_request.head.ref == 'version/v45' | |
| }} | |
| env: | |
| HEAD_BRANCH: ${{ github.event.pull_request.head.ref }} | |
| run: | | |
| if [ "$(cat BITCODE_SPEC.txt)" = "V45" ]; then | |
| echo "BITCODE_SPEC.txt already points to V45." | |
| exit 0 | |
| fi | |
| PROOF_SOURCE_COMMIT="$(git rev-parse HEAD)" | |
| node scripts/prepare-bitcode-spec-family-promotion.mjs --version V45 --commit "$PROOF_SOURCE_COMMIT" | |
| node scripts/prepare-bitcode-runtime-canon-promotion.mjs --version V45 --next-draft V46 | |
| printf "V45\n" > BITCODE_SPEC.txt | |
| node scripts/generate-bitcode-proven.mjs --version V45 --commit "$PROOF_SOURCE_COMMIT" --worktree-state clean --output BITCODE_SPEC_V45_PROVEN.md --allow-dirty | |
| node scripts/generate-bitcode-proven.mjs --version V45 --commit "$PROOF_SOURCE_COMMIT" --worktree-state clean --output BITCODE_SPEC_V45_PROVEN.md --check --allow-dirty | |
| node scripts/check-bitcode-canonical-inputs.mjs --current-target V45 | |
| node scripts/check-bitcode-spec-family.mjs --version V45 --mode promoted --current-target V45 | |
| node scripts/check-bitcode-canon-posture-drift.mjs --active-canon V45 --draft-target V46 | |
| 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_V45.md \ | |
| BITCODE_SPEC_V45_DELTA.md \ | |
| BITCODE_SPEC_V45_NOTES.md \ | |
| BITCODE_SPEC_V45_PARITY_MATRIX.md \ | |
| BITCODE_SPEC_V45_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 V45" | |
| git push origin "HEAD:$HEAD_BRANCH" |