Skip to content

Commit f973e82

Browse files
Merge pull request #30 from engineeredsoftware/version/v29
V29 Canonical Promotion: Terminal Transaction Depth
2 parents 7a7e1e1 + 6b20e25 commit f973e82

124 files changed

Lines changed: 14668 additions & 332 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/pull_request_template.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
## Title
2+
3+
Use the version and gate prefix for gate PRs: `V29 Gate N: Concise Topical Title`.
4+
Use the version and promotion prefix for version promotion PRs: `V29: Promote Canon`.
5+
6+
## Closure
7+
8+
- Gate:
9+
- Acceptance criteria closed:
10+
- Tests/checks run:
11+
- Accepted boundaries:

.github/workflows/bitcode-canon-quality.yml

Lines changed: 24 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,22 @@ jobs:
2020
- name: Checkout repository
2121
uses: actions/checkout@v4
2222

23-
- name: Validate active canon and V28 draft posture
23+
- name: Validate active canon and V29 posture
2424
run: |
25-
node scripts/check-bitcode-canonical-inputs.mjs --current-target V27
26-
node scripts/check-bitcode-canon-posture-drift.mjs --active-canon V27 --draft-target V28
27-
node scripts/check-bitcode-spec-family.mjs --version V28 --mode draft --current-target V27
25+
POINTER="$(cat BITCODE_SPEC.txt)"
26+
if [ "$POINTER" = "V28" ]; then
27+
node scripts/check-bitcode-canonical-inputs.mjs --current-target V28
28+
node scripts/check-bitcode-canon-posture-drift.mjs --active-canon V28 --draft-target V29
29+
node scripts/check-bitcode-spec-family.mjs --version V28 --mode promoted --current-target V28
30+
node scripts/check-bitcode-spec-family.mjs --version V29 --mode draft --current-target V28
31+
elif [ "$POINTER" = "V29" ]; then
32+
node scripts/check-bitcode-canonical-inputs.mjs --current-target V29
33+
node scripts/check-bitcode-canon-posture-drift.mjs --active-canon V29 --draft-target V30
34+
node scripts/check-bitcode-spec-family.mjs --version V29 --mode promoted --current-target V29
35+
else
36+
echo "Unexpected BITCODE_SPEC.txt pointer: $POINTER" >&2
37+
exit 1
38+
fi
2839
2940
bitcode-demonstration-mvp:
3041
name: Bitcode Demonstration MVP
@@ -53,13 +64,18 @@ jobs:
5364
- name: Checkout repository
5465
uses: actions/checkout@v4
5566

56-
- name: Run V28 strict draft conformance for spec-title changes
67+
- name: Run V29 strict conformance for spec-title changes
5768
run: |
5869
case "$SPEC_TITLE" in
59-
spec:\ V28*|spec:\ v28*)
60-
node scripts/check-bitcode-spec-family.mjs --version V28 --mode draft --current-target V27
70+
spec:\ V29*|spec:\ v29*)
71+
POINTER="$(cat BITCODE_SPEC.txt)"
72+
if [ "$POINTER" = "V29" ]; then
73+
node scripts/check-bitcode-spec-family.mjs --version V29 --mode promoted --current-target V29
74+
else
75+
node scripts/check-bitcode-spec-family.mjs --version V29 --mode draft --current-target V28
76+
fi
6177
;;
6278
*)
63-
echo "Skipping strict spec-title conformance; title is not a V28 spec change."
79+
echo "Skipping strict spec-title conformance; title is not a V29 spec change."
6480
;;
6581
esac

.github/workflows/bitcode-gate-quality.yml

Lines changed: 70 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -38,19 +38,50 @@ jobs:
3838
- name: Install dependencies
3939
run: pnpm install --frozen-lockfile
4040

41+
- name: Validate gate pull request title
42+
if: github.event_name == 'pull_request'
43+
env:
44+
PR_BASE_REF: ${{ github.base_ref }}
45+
PR_HEAD_REF: ${{ github.head_ref }}
46+
PR_TITLE: ${{ github.event.pull_request.title }}
47+
run: |
48+
if [[ "$PR_BASE_REF" == version/* && "$PR_HEAD_REF" =~ ^v([0-9]+)/gate-([0-9]+)- ]]; then
49+
expected_version="V${BASH_REMATCH[1]}"
50+
expected_gate="${BASH_REMATCH[2]}"
51+
if [[ ! "$PR_TITLE" =~ ^${expected_version}[[:space:]]+Gate[[:space:]]+${expected_gate}:[[:space:]].+ ]]; then
52+
echo "Gate pull request titles must begin with: ${expected_version} Gate ${expected_gate}:"
53+
echo "Observed: ${PR_TITLE}"
54+
exit 1
55+
fi
56+
fi
57+
4158
- name: Validate draft canon posture
4259
run: |
43-
test "$(cat BITCODE_SPEC.txt)" = "V27"
44-
node scripts/check-bitcode-spec-family.mjs --version V28 --mode draft --current-target V27
45-
node scripts/check-bitcode-canon-posture-drift.mjs --active-canon V27 --draft-target V28
46-
node scripts/check-bitcode-canonical-inputs.mjs --current-target V27
47-
node scripts/check-v28-metadevelopment-readiness.mjs --skip-branch-check
48-
node scripts/check-v28-gate9-depository-evidence.mjs
49-
node scripts/check-v28-gate10-read-need-comprehension.mjs
50-
node scripts/check-v28-gate11-read-fits-finding-preview.mjs
51-
node scripts/check-v28-gate12-settlement-rights-delivery.mjs
52-
node scripts/check-v28-gate13-product-closure-promotion-readiness.mjs
53-
node scripts/promote-bitcode-canon.mjs --version V28 --commit HEAD --dry-run
60+
POINTER="$(cat BITCODE_SPEC.txt)"
61+
if [ "$POINTER" = "V28" ]; then
62+
node scripts/check-bitcode-spec-family.mjs --version V28 --mode promoted --current-target V28
63+
node scripts/check-bitcode-spec-family.mjs --version V29 --mode draft --current-target V28
64+
node scripts/check-bitcode-canon-posture-drift.mjs --active-canon V28 --draft-target V29
65+
node scripts/check-bitcode-canonical-inputs.mjs --current-target V28
66+
node scripts/check-v29-gate1-objectives-and-gating.mjs --skip-branch-check
67+
node scripts/check-v29-gate2-terminal-transaction-read-models.mjs --skip-branch-check
68+
node scripts/check-v29-gate3-wallet-signer-btc-operations.mjs --skip-branch-check
69+
node scripts/check-v29-gate4-reading-pipeline-observability.mjs --skip-branch-check
70+
node scripts/check-v29-gate5-assetpack-disclosure-rights.mjs --skip-branch-check
71+
node scripts/check-v29-gate6-settlement-reconciliation-repair.mjs --skip-branch-check
72+
node scripts/check-v29-gate7-organization-permission-authority.mjs --skip-branch-check
73+
node scripts/check-v29-gate8-demonstration-origin-formalization.mjs --skip-branch-check
74+
node scripts/check-v29-gate9-terminal-ux-browser-proof.mjs --skip-branch-check
75+
node scripts/check-v29-gate10-local-staging-promotion-readiness.mjs --skip-branch-check
76+
elif [ "$POINTER" = "V29" ]; then
77+
node scripts/check-bitcode-spec-family.mjs --version V29 --mode promoted --current-target V29
78+
node scripts/check-bitcode-canonical-inputs.mjs --current-target V29
79+
node scripts/check-bitcode-canon-posture-drift.mjs --active-canon V29 --draft-target V30
80+
node scripts/check-v29-gate10-local-staging-promotion-readiness.mjs --promotion-mode --skip-branch-check
81+
else
82+
echo "Unexpected BITCODE_SPEC.txt pointer: $POINTER" >&2
83+
exit 1
84+
fi
5485
5586
- name: Validate source casing and imports
5687
run: |
@@ -60,14 +91,27 @@ jobs:
6091
- name: Type-check gate packages
6192
run: |
6293
pnpm --filter @bitcode/btd typecheck
94+
pnpm --filter @bitcode/api build
95+
pnpm --dir packages/executions-mcp/src/mcp-server run type-check
96+
pnpm --dir packages/chatgptapp exec tsc --noEmit --pretty false
6397
pnpm --filter @bitcode/pipeline-asset-pack typecheck
6498
pnpm --filter @bitcode/pipeline-hosts typecheck
99+
pnpm --filter @bitcode/protocol typecheck
65100
66101
- name: Test gate packages
67102
run: |
68103
pnpm --filter @bitcode/btd test
104+
pnpm --filter @bitcode/btd test -- --runTestsByPath __tests__/btc-fee-operation.test.ts
105+
pnpm --filter @bitcode/btd test -- --runTestsByPath __tests__/btd.test.ts
106+
pnpm --filter @bitcode/api exec jest --config jest.config.cjs --runTestsByPath src/routes/__tests__/btd-crypto.test.ts --runInBand
107+
pnpm --dir packages/executions-mcp/src/mcp-server run test:mcp -- --runTestsByPath src/__tests__/unit/auth.test.ts --runInBand
108+
pnpm --dir packages/chatgptapp exec jest --runTestsByPath src/__tests__/tools.test.ts --runInBand
109+
pnpm --filter @bitcode/pipeline-hosts exec jest --config jest.config.cjs --runTestsByPath src/__tests__/asset-pack-harness.test.ts --runInBand
69110
pnpm --filter @bitcode/pipeline-asset-pack exec jest --config jest.config.cjs --passWithNoTests --forceExit
111+
pnpm --filter @bitcode/pipeline-asset-pack exec jest --config jest.config.cjs --runTestsByPath src/__tests__/reading-pipeline-observability.test.ts src/__tests__/reading-pipeline-contract.test.ts --runInBand
112+
pnpm --filter @bitcode/pipeline-asset-pack exec jest --config jest.config.cjs --runTestsByPath src/__tests__/asset-pack-disclosure.test.ts src/__tests__/postprocess.test.ts src/__tests__/read-need.test.ts --runInBand
70113
pnpm --filter @bitcode/pipeline-hosts exec jest --config jest.config.cjs --passWithNoTests --forceExit
114+
pnpm --filter @bitcode/protocol test
71115
72116
- name: Test staged Reading route and Terminal harness contracts
73117
run: |
@@ -76,9 +120,24 @@ jobs:
76120
tests/api/pipelineHarnessRoute.test.ts \
77121
tests/terminalPipelineHarnessClient.test.ts \
78122
tests/terminalDepositReadWorkbench.test.ts \
123+
tests/terminalTransactionQuery.test.ts \
124+
tests/terminalTransactionReadModel.test.ts \
125+
tests/terminalWalletBtcOperation.test.ts \
126+
tests/terminalJournalReconciliation.test.ts \
127+
tests/terminalOrganizationAuthority.test.ts \
128+
tests/protocolCommercialBoundary.test.ts \
129+
tests/terminalTransactionDetailCards.test.tsx \
130+
tests/terminalTransactionDetailSnapshot.test.ts \
131+
tests/terminalUxBrowserProof.test.tsx \
79132
tests/pipelineExecutionLogHeader.test.tsx \
80133
--runInBand
81134
135+
- name: Install Terminal browser proof browser
136+
run: pnpm --dir uapi exec playwright install chromium --with-deps
137+
138+
- name: Browser proof Terminal cockpit
139+
run: pnpm --dir uapi run test:e2e:terminal-ux
140+
82141
- name: Test pipeline readback verifier
83142
run: pnpm test:qa:v28:pipeline-readback
84143

Lines changed: 145 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,145 @@
1+
name: V29 Canon Promotion
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
types:
8+
- opened
9+
- synchronize
10+
- reopened
11+
- ready_for_review
12+
workflow_dispatch:
13+
14+
concurrency:
15+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
16+
cancel-in-progress: true
17+
18+
permissions:
19+
contents: write
20+
pull-requests: read
21+
22+
jobs:
23+
promote-v29:
24+
name: V29 Promotion Validation
25+
if: >-
26+
${{
27+
github.event_name == 'workflow_dispatch' ||
28+
(
29+
github.event.pull_request.base.ref == 'main' &&
30+
github.event.pull_request.head.ref == 'version/v29' &&
31+
github.event.pull_request.head.repo.full_name == github.repository
32+
)
33+
}}
34+
runs-on: ubuntu-latest
35+
36+
steps:
37+
- name: Checkout version branch
38+
uses: actions/checkout@v4
39+
with:
40+
ref: ${{ github.event.pull_request.head.ref || github.ref_name }}
41+
token: ${{ github.token }}
42+
fetch-depth: 0
43+
44+
- name: Setup pnpm
45+
uses: pnpm/action-setup@v4
46+
47+
- name: Setup Node
48+
uses: actions/setup-node@v4
49+
with:
50+
node-version: "24"
51+
cache: pnpm
52+
53+
- name: Install dependencies
54+
run: pnpm install --frozen-lockfile
55+
56+
- name: Validate V29 promotion readiness
57+
run: |
58+
POINTER="$(cat BITCODE_SPEC.txt)"
59+
if [ "$POINTER" = "V28" ]; then
60+
node scripts/check-bitcode-spec-family.mjs --version V29 --mode draft --current-target V28
61+
node scripts/check-bitcode-canon-posture-drift.mjs --active-canon V28 --draft-target V29
62+
node scripts/check-bitcode-canonical-inputs.mjs --current-target V28
63+
node scripts/check-v29-gate1-objectives-and-gating.mjs --skip-branch-check
64+
node scripts/check-v29-gate2-terminal-transaction-read-models.mjs --skip-branch-check
65+
node scripts/check-v29-gate3-wallet-signer-btc-operations.mjs --skip-branch-check
66+
node scripts/check-v29-gate4-reading-pipeline-observability.mjs --skip-branch-check
67+
node scripts/check-v29-gate5-assetpack-disclosure-rights.mjs --skip-branch-check
68+
node scripts/check-v29-gate6-settlement-reconciliation-repair.mjs --skip-branch-check
69+
node scripts/check-v29-gate7-organization-permission-authority.mjs --skip-branch-check
70+
node scripts/check-v29-gate8-demonstration-origin-formalization.mjs --skip-branch-check
71+
node scripts/check-v29-gate9-terminal-ux-browser-proof.mjs --skip-branch-check
72+
node scripts/check-v29-gate10-local-staging-promotion-readiness.mjs --promotion-mode --skip-branch-check
73+
node scripts/promote-bitcode-canon.mjs --version V29 --commit HEAD --dry-run
74+
elif [ "$POINTER" = "V29" ]; then
75+
node scripts/check-bitcode-spec-family.mjs --version V29 --mode promoted --current-target V29
76+
node scripts/check-bitcode-canonical-inputs.mjs --current-target V29
77+
node scripts/check-bitcode-canon-posture-drift.mjs --active-canon V29 --draft-target V30
78+
node scripts/check-v29-gate10-local-staging-promotion-readiness.mjs --promotion-mode --skip-branch-check
79+
else
80+
echo "Unexpected BITCODE_SPEC.txt pointer: $POINTER" >&2
81+
exit 1
82+
fi
83+
pnpm test:qa:v28:pipeline-readback
84+
pnpm --filter @bitcode/protocol typecheck
85+
pnpm --filter @bitcode/protocol test
86+
pnpm --filter @bitcode/btd typecheck
87+
pnpm --filter @bitcode/btd test
88+
npm --prefix protocol-demonstration test
89+
npm --prefix protocol-demonstration run test:v28-mvp-qa
90+
pnpm --filter @bitcode/pipeline-asset-pack typecheck
91+
pnpm --filter @bitcode/pipeline-hosts typecheck
92+
pnpm --filter @bitcode/pipeline-asset-pack exec jest --config jest.config.cjs --passWithNoTests --forceExit
93+
pnpm --filter @bitcode/pipeline-hosts exec jest --config jest.config.cjs --passWithNoTests --forceExit
94+
pnpm --dir uapi exec jest --runTestsByPath \
95+
tests/api/readReviewRoute.test.ts \
96+
tests/api/pipelineHarnessRoute.test.ts \
97+
tests/terminalPipelineHarnessClient.test.ts \
98+
tests/terminalDepositReadWorkbench.test.ts \
99+
tests/terminalTransactionQuery.test.ts \
100+
tests/terminalTransactionReadModel.test.ts \
101+
tests/terminalWalletBtcOperation.test.ts \
102+
tests/terminalJournalReconciliation.test.ts \
103+
tests/terminalOrganizationAuthority.test.ts \
104+
tests/protocolCommercialBoundary.test.ts \
105+
tests/terminalTransactionDetailCards.test.tsx \
106+
tests/terminalTransactionDetailSnapshot.test.ts \
107+
tests/terminalUxBrowserProof.test.tsx \
108+
tests/pipelineExecutionLogHeader.test.tsx \
109+
--runInBand
110+
pnpm --dir uapi exec playwright install chromium --with-deps
111+
pnpm --dir uapi run test:e2e:terminal-ux
112+
git diff --check
113+
114+
- name: Promote V29 canon files
115+
if: >-
116+
${{
117+
github.event_name == 'pull_request' &&
118+
github.event.pull_request.head.ref == 'version/v29'
119+
}}
120+
env:
121+
HEAD_BRANCH: ${{ github.event.pull_request.head.ref }}
122+
run: |
123+
if [ "$(cat BITCODE_SPEC.txt)" = "V29" ]; then
124+
echo "BITCODE_SPEC.txt already points to V29."
125+
exit 0
126+
fi
127+
PROOF_SOURCE_COMMIT="$(git rev-parse HEAD)"
128+
npm run promote:canon -- --version V29 --commit "$PROOF_SOURCE_COMMIT"
129+
git config user.name "github-actions[bot]"
130+
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
131+
git add \
132+
BITCODE_SPEC.txt \
133+
BITCODE_SPEC_V29.md \
134+
BITCODE_SPEC_V29_DELTA.md \
135+
BITCODE_SPEC_V29_NOTES.md \
136+
BITCODE_SPEC_V29_PARITY_MATRIX.md \
137+
BITCODE_SPEC_V29_PROVEN.md \
138+
protocol-demonstration/src/canon-posture.js \
139+
protocol-demonstration/README.md \
140+
packages/protocol/src/canon-posture.js \
141+
packages/protocol/data/state.json \
142+
packages/protocol/README.md \
143+
.bitcode
144+
git commit -m "Promote Bitcode canon to V29"
145+
git push origin "HEAD:$HEAD_BRANCH"

AGENTS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
- Do not consider any legacy code. All legacy code is located under `_legacy/`.
66
- Highest caliber software engineering crafstmanship (maintainibility, abstractions, architectures, naming, patterns, comments, documentation, structures, algorithmic and data flow designs, UI/UX, etc.), correctness (specification and implementation precision, reliability, completeness, boundaried, scoped, encapsulated, etc.), and auditable (totalistic proofs systems from static code, build time, runtime, etc. etc. as is Bitcode, tests from unit, integration, E2E, linting and building, etc.).
77
- Do not push work directly to `main`. Create a version base branch for each draft target, such as `version/v28`, then create scoped gate branches from that version branch. Gate branches must be prefixed with the gate number, such as `v28/gate-3-read-fit-workflow` or `v28/gate-8-promotion-proof`. Pull-request each closed gate back into the version branch. Pull-request the version branch into `main` only when all gates are closed and the version is formally promoted as canon. The default branch is protected by the `Bitcode Core Contributions` ruleset and requires pull requests plus verified signatures.
8+
- Gate pull request titles must begin with the uppercase version and gate prefix, followed by a concise topical title, for example `V29 Gate 5: AssetPack Disclosure Rights And Preview Depth`. Version-promotion pull requests must begin with the uppercase version and name canonical promotion.
89
- Once implementation starts on a gate branch, do not stop at partial progress unless blocked by missing external input or explicit user pause. A gate branch is ready to stop only when the gate's acceptance criteria are implemented, specified, tested, documented, committed, pushed, and pull-requested for closure into the version branch.
910
- Treat gate and promotion workflow health as part of gate closure. Gate pull requests into version branches must be green through the maintained gate-quality checks, and repository-wide canon-quality checks must remain greenable during draft work. Version pull requests into `main` must pass the version promotion workflow, which performs promotion-grade validations and commits the standalone `BITCODE_SPEC.txt` pointer change only after those validations pass.
1011
- Keep CI greenable rather than ceremonial. Required application CI uses root pnpm workspace installation and maintained uapi lint/typecheck/build/Jest coverage. Heavy legacy scans such as full DB/browser E2E, Storybook build, super-linter, and advanced CodeQL are opt-in by repository variables until their backing catalogs and service assumptions are maintained for required branch protection.

BITCODE_SPEC.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
V28
1+
V29

0 commit comments

Comments
 (0)