Skip to content

Commit 0fad25b

Browse files
wip v27
1 parent baec2c2 commit 0fad25b

37 files changed

Lines changed: 2673 additions & 93 deletions

.bitcode/v27-crypto-primitives-proof.json

Lines changed: 43 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,12 @@
2222
"deployment-lane guards",
2323
"protocol upgrade receipts",
2424
"protocol-demonstration V27 crypto receipt witness",
25-
"V27 registry/projection migration and ORM boundary"
25+
"V27 registry/projection migration and ORM boundary",
26+
"authenticated registry snapshot and mint-draft API route boundary",
27+
"package/API Need-Fit-Prove-Settle mint admission rejection",
28+
"source-to-shares minted range proof binding",
29+
"mint receipt and contributor allocation replay",
30+
"Exchange registry migration and ORM boundary"
2631
],
2732
"sourceSurfaces": [
2833
"BITCODE_SPEC_V27.md",
@@ -51,29 +56,53 @@
5156
"packages/btd/src/telemetry.ts",
5257
"packages/btd/src/upgrade.ts",
5358
"packages/btd/__tests__/v27-crypto-primitives.test.ts",
59+
"packages/api/src/routes/btd-crypto.ts",
60+
"packages/api/src/routes/__tests__/btd-crypto.test.ts",
61+
"packages/api/src/routes/__tests__/user-btd-mutation.test.ts",
62+
"packages/api/src/index.ts",
63+
"uapi/app/api/btd/registry/route.ts",
64+
"uapi/app/api/btd/mint-draft/route.ts",
5465
"protocol-demonstration/src/receipt-schemas.js",
5566
"protocol-demonstration/src/v27-crypto-primitives.js",
5667
"protocol-demonstration/test/v27-crypto-primitives.test.js",
5768
"supabase/migrations/002_v27_btd_crypto_registry.sql",
69+
"packages/orm/src/client.ts",
5870
"packages/orm/src/models/btd-registry.ts",
59-
"internal-docs/BITCODE_EXCHANGE_DATABASE.md"
71+
"packages/orm/src/__tests__/btd-registry.test.ts",
72+
"internal-docs/BITCODE_EXCHANGE_DATABASE.md",
73+
".bitcode/v27-gate-3-supply-range-proof.json",
74+
".bitcode/v27-source-to-shares-mint-admission-proof.json",
75+
".bitcode/v27-gate-4-mint-admission-proof.json",
76+
".bitcode/v27-receipt-replay-proof.json",
77+
".bitcode/v27-gate-5-receipt-replay-proof.json",
78+
".bitcode/v27-gate-6-exchange-persistence-proof.json"
6079
],
6180
"validation": [
6281
{
63-
"command": "./uapi/node_modules/.bin/jest --config '{...packages/btd focused ts-jest config...}' --runInBand",
82+
"command": "./uapi/node_modules/.bin/jest --config '{...packages/api + packages/btd focused ts-jest config...}' --runInBand",
6483
"status": "passed",
65-
"assertions": 27,
66-
"notes": "Jest still reports pre-existing duplicate manual mock warnings outside the V27 package slice."
84+
"assertions": 44,
85+
"notes": "Jest still reports pre-existing duplicate manual mock warnings outside the V27 package/API slice."
86+
},
87+
{
88+
"command": "pnpm -C packages/api build",
89+
"status": "passed"
6790
},
6891
{
6992
"command": "pnpm -C protocol-demonstration test:v27-crypto",
7093
"status": "passed",
71-
"assertions": 7
94+
"assertions": 8
7295
},
7396
{
7497
"command": "pnpm -C packages/orm build",
7598
"status": "passed"
7699
},
100+
{
101+
"command": "pnpm -C packages/orm exec jest --runTestsByPath src/__tests__/btd-registry.test.ts --runInBand",
102+
"status": "passed",
103+
"assertions": 3,
104+
"notes": "Jest reports an existing ts-jest globals deprecation warning."
105+
},
77106
{
78107
"command": "git diff --check",
79108
"status": "passed"
@@ -88,13 +117,20 @@
88117
"package-level zero-cell tail receipt behavior",
89118
"package-level semantic-volume measurement",
90119
"package-level range/mint/access/replay primitives",
120+
"package-level one-AssetPack-one-primary-range rejection",
121+
"package-level stale-state range-overlap rejection",
122+
"package/API-level Need-Fit-Prove-Settle mint admission rejection",
123+
"source-to-shares minted range root proof binding",
124+
"package/demonstration mint receipt replay closure",
125+
"Exchange registry migration/ORM boundary closure",
91126
"package-level contributor allocation conservation",
92127
"package-level optional ancestry review with unpaid weak/citation edges",
93128
"package-level local BTC revenue-route conservation",
94129
"package-level BTC fee receipt lifecycle and provider boundary",
95130
"package-level deployment-lane mainnet approval guard",
96131
"demonstration receipt family coverage for V27 crypto primitives",
97-
"database migration and ORM projection boundary for V27 registry tables"
132+
"database migration and ORM projection boundary for V27 registry tables",
133+
"authenticated registry snapshot and deterministic mint-draft route boundary"
98134
],
99135
"remainingBlockingForPromotion": [
100136
"live wallet adapters",
Lines changed: 135 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,135 @@
1+
{
2+
"proofId": "v27-gate-1-source-audit-proof",
3+
"version": "V27",
4+
"generatedAt": "2026-05-06T00:00:00.000Z",
5+
"activeCanonicalPointer": "V26",
6+
"state": "draft-target-gate-closure",
7+
"gate": {
8+
"number": 1,
9+
"name": "Draft Opening And Source Audit",
10+
"status": "closed"
11+
},
12+
"closureCriteria": [
13+
{
14+
"criterion": "V27 SPEC, DELTA, NOTES, and PARITY files exist",
15+
"status": "closed",
16+
"evidence": [
17+
"BITCODE_SPEC_V27.md",
18+
"BITCODE_SPEC_V27_DELTA.md",
19+
"BITCODE_SPEC_V27_NOTES.md",
20+
"BITCODE_SPEC_V27_PARITY_MATRIX.md"
21+
]
22+
},
23+
{
24+
"criterion": "V26 remains the active canonical pointer",
25+
"status": "closed",
26+
"evidence": [
27+
"BITCODE_SPEC.txt contains V26"
28+
]
29+
},
30+
{
31+
"criterion": "audited surfaces are listed in the parity matrix",
32+
"status": "closed",
33+
"evidence": [
34+
"BITCODE_SPEC_V27_PARITY_MATRIX.md audit basis lists spec, package, API, ORM, migration, UAPI, MCP, demonstration, and proof-slice surfaces"
35+
]
36+
},
37+
{
38+
"criterion": "parity rows classify source truth as implemented, partial, gap, or deferred",
39+
"status": "closed",
40+
"evidence": [
41+
"BITCODE_SPEC_V27_PARITY_MATRIX.md judgment legend and V27 Source Parity Matrix classify all current rows"
42+
]
43+
},
44+
{
45+
"criterion": "no generated proof claim is made before proof artifacts exist",
46+
"status": "closed",
47+
"evidence": [
48+
"BITCODE_SPEC_V27.md, BITCODE_SPEC_V27_DELTA.md, and BITCODE_SPEC_V27_PARITY_MATRIX.md still state generated proof appendix is not generated yet",
49+
".bitcode/v27-crypto-primitives-proof.json is only a draft-target proof slice",
50+
".bitcode/v27-gate-1-source-audit-proof.json is only a source-audit gate closure proof"
51+
]
52+
}
53+
],
54+
"sourceDiscovery": {
55+
"excluded": [
56+
"_legacy/**"
57+
],
58+
"queryClasses": [
59+
"active canonical pointer and current spec family discovery",
60+
"V26 commercial canon, parity, application systems, and proof surfaces",
61+
"V27 draft spec family synchronization",
62+
"$BTD, BTC fee, non-fungible, range, supply, mint, access, revenue, ancestry, compatibility-storage searches",
63+
"wallet, ledger, Bitcoin, Taproot, Ethereum, testnet, mainnet, telemetry, reconciliation, Exchange, Terminal, order, bid, ask, buy, sell, transfer, journal searches",
64+
"package discovery under packages/btd, packages/api, packages/orm, packages/supabase, and packages/executions-mcp",
65+
"commercial interface discovery under uapi",
66+
"protocol reference discovery under protocol-demonstration",
67+
"database and migration discovery under supabase and internal-docs"
68+
],
69+
"canonicalDraftSurfaces": [
70+
"BITCODE_SPEC.txt",
71+
"BITCODE_SPEC_V27.md",
72+
"BITCODE_SPEC_V27_DELTA.md",
73+
"BITCODE_SPEC_V27_NOTES.md",
74+
"BITCODE_SPEC_V27_PARITY_MATRIX.md",
75+
"packages/btd/src/constants.ts",
76+
"packages/btd/src/supply.ts",
77+
"packages/btd/src/measuremint.ts",
78+
"packages/btd/src/semantic-volume.ts",
79+
"packages/btd/src/range.ts",
80+
"packages/btd/src/receipts.ts",
81+
"packages/btd/src/replay.ts",
82+
"packages/btd/src/allocation.ts",
83+
"packages/btd/src/access.ts",
84+
"packages/btd/src/ancestry.ts",
85+
"packages/btd/src/revenue.ts",
86+
"packages/btd/src/wallet.ts",
87+
"packages/btd/src/bitcoin-fees.ts",
88+
"packages/btd/src/bitcoin-provider.ts",
89+
"packages/btd/src/deployment-lanes.ts",
90+
"packages/btd/src/ledger-anchor.ts",
91+
"packages/btd/src/exchange.ts",
92+
"packages/btd/src/terminal-journal.ts",
93+
"packages/btd/src/reconciliation.ts",
94+
"packages/btd/src/telemetry.ts",
95+
"packages/btd/src/upgrade.ts",
96+
"packages/api/src/routes/btd-crypto.ts",
97+
"packages/api/src/routes/__tests__/btd-crypto.test.ts",
98+
"packages/api/src/routes/__tests__/user-btd-mutation.test.ts",
99+
"uapi/app/api/btd/registry/route.ts",
100+
"uapi/app/api/btd/mint-draft/route.ts",
101+
"packages/orm/src/models/btd-registry.ts",
102+
"packages/orm/src/client.ts",
103+
"supabase/migrations/002_v27_btd_crypto_registry.sql",
104+
"protocol-demonstration/src/v27-crypto-primitives.js",
105+
"protocol-demonstration/test/v27-crypto-primitives.test.js",
106+
"internal-docs/BITCODE_EXCHANGE_DATABASE.md",
107+
".bitcode/v27-crypto-primitives-proof.json",
108+
".bitcode/v27-gate-2-ontology-cap-proof.json",
109+
".bitcode/v27-gate-3-supply-range-proof.json",
110+
".bitcode/v27-source-to-shares-mint-admission-proof.json",
111+
".bitcode/v27-gate-4-mint-admission-proof.json",
112+
".bitcode/v27-receipt-replay-proof.json",
113+
".bitcode/v27-gate-5-receipt-replay-proof.json",
114+
".bitcode/v27-gate-6-exchange-persistence-proof.json"
115+
]
116+
},
117+
"nonPromotionAssertions": [
118+
"BITCODE_SPEC.txt remains V26",
119+
"BITCODE_SPEC_V27_PROVEN.md does not exist",
120+
"V27 remains draft target until later gates, generated proofs, tests, and promotion closure complete",
121+
"No value-bearing mainnet readiness or launch is claimed by Gate 1 closure"
122+
],
123+
"remainingGateFamilies": [
124+
"Gate 7: Access And Policy",
125+
"Gate 8: Allocation And Revenue",
126+
"Gate 9: Ancestry And Anti-Game",
127+
"Gate 10: Wallet And BTC Fee Settlement",
128+
"Gate 11: Ledgerized AssetPack Anchoring",
129+
"Gate 12: Minimal AssetPack Exchange",
130+
"Gate 13: Terminal Transactions And Journal Diffing",
131+
"Gate 14: Ledger/Database Reconciliation",
132+
"Gate 15: Testnet/Mainnet Telemetry And Upgrades",
133+
"Gate 16: Product Surfaces, Research Rebinding, And Promotion Proof"
134+
]
135+
}
Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
{
2+
"proofId": "v27-gate-2-ontology-cap-proof",
3+
"version": "V27",
4+
"generatedAt": "2026-05-06T00:00:00.000Z",
5+
"activeCanonicalPointer": "V26",
6+
"state": "draft-target-gate-closure",
7+
"gate": {
8+
"number": 2,
9+
"name": "Ontology And Hard Cap",
10+
"status": "closed"
11+
},
12+
"closureCriteria": [
13+
{
14+
"criterion": "$BTD cell/range ontology is complete in SPEC",
15+
"status": "closed",
16+
"evidence": [
17+
"BITCODE_SPEC_V27.md defines supply state, cell/range model, mint lifecycle, measureminting quantity law, access rights, and non-fungible semantics"
18+
]
19+
},
20+
{
21+
"criterion": "BTD_MAX_MINTABLE_SUPPLY = 21_000_000 is package-owned",
22+
"status": "closed",
23+
"evidence": [
24+
"packages/btd/src/constants.ts exports BTD_MAX_MINTABLE_SUPPLY = 21_000_000",
25+
"packages/btd/src/index.ts re-exports the package-owned constant"
26+
]
27+
},
28+
{
29+
"criterion": "tests prove cap existence and overflow rejection",
30+
"status": "closed",
31+
"evidence": [
32+
"packages/btd/__tests__/btd.test.ts asserts the 21,000,000 ceiling",
33+
"packages/btd/__tests__/btd.test.ts asserts overflow rejection"
34+
]
35+
},
36+
{
37+
"criterion": "fungible mutation remains rejected in API and package surfaces",
38+
"status": "closed",
39+
"evidence": [
40+
"packages/btd/src/index.ts exposes BtdFungibleMutationRejectedError and rejectFungibleBtdMutation",
41+
"packages/api/src/routes/user.ts returns 410 for admin generic BTD mutation attempts",
42+
"packages/api/src/routes/auxillaries.ts returns 410 for auxillary generic BTD mutation attempts",
43+
"packages/api/src/routes/__tests__/user-btd-mutation.test.ts covers unauthenticated, non-admin, and admin package-route mutation rejection",
44+
"uapi/tests/api/userBtdRoute.test.ts covers active auxillary mutation route rejection"
45+
]
46+
},
47+
{
48+
"criterion": "UI copy keeps BTC fee and $BTD share/read-right separate",
49+
"status": "closed",
50+
"evidence": [
51+
"uapi/components/base/bitcode/btd/btd-tracker.tsx separates BTC fee liquidity from non-fungible BTD share/read-right holdings",
52+
"uapi/components/base/bitcode/btd/BTDPrices.tsx labels BTC fee basis and Terminal/Exchange acquisition paths",
53+
"uapi/app/auxillaries/components/AuxillariesBTDPane.tsx describes BTC fee liquidity separately from BTD holdings",
54+
"uapi/app/(root)/components/MarketingBtdShareMetricsSection.tsx separates BTC fees and BTD read-right posture",
55+
"uapi/app/(root)/components/MarketingFaqSection.tsx states BTC is the fee asset and BTD is not a fungible checkout token"
56+
]
57+
}
58+
],
59+
"validatedCommands": [
60+
{
61+
"command": "./uapi/node_modules/.bin/jest --config '{...packages/api + packages/btd focused ts-jest config...}' --runInBand",
62+
"status": "passed",
63+
"assertions": 34,
64+
"notes": "Jest reports pre-existing duplicate manual mock warnings outside the V27 package/API slice."
65+
},
66+
{
67+
"command": "pnpm -C uapi exec jest --runTestsByPath tests/api/userBtdRoute.test.ts --runInBand",
68+
"status": "passed",
69+
"assertions": 3,
70+
"notes": "Jest reports an existing ts-jest globals deprecation warning."
71+
},
72+
{
73+
"command": "pnpm -C packages/api build",
74+
"status": "passed"
75+
}
76+
],
77+
"nonPromotionAssertions": [
78+
"BITCODE_SPEC.txt remains V26",
79+
"BITCODE_SPEC_V27_PROVEN.md does not exist",
80+
"Gate 2 closure does not claim registry persistence, range proof, access policy UI, generated V27 proof-family closure, or promotion",
81+
"No value-bearing mainnet readiness or launch is claimed by Gate 2 closure"
82+
],
83+
"remainingGateFamilies": [
84+
"Gate 7: Access And Policy",
85+
"Gate 8: Allocation And Revenue",
86+
"Gate 9: Ancestry And Anti-Game",
87+
"Gate 10: Wallet And BTC Fee Settlement",
88+
"Gate 11: Ledgerized AssetPack Anchoring",
89+
"Gate 12: Minimal AssetPack Exchange",
90+
"Gate 13: Terminal Transactions And Journal Diffing",
91+
"Gate 14: Ledger/Database Reconciliation",
92+
"Gate 15: Testnet/Mainnet Telemetry And Upgrades",
93+
"Gate 16: Product Surfaces, Research Rebinding, And Promotion Proof"
94+
]
95+
}

0 commit comments

Comments
 (0)