Skip to content

Commit e388de0

Browse files
V48 (impl-only): Drop bitcoin demonstration product surface
Remove the 870MB Vercel function route and demo app-context API, exclude retired demo paths from file tracing, harden boundary.
1 parent bb77adb commit e388de0

5 files changed

Lines changed: 22 additions & 31 deletions

File tree

apps/uapi/app/api/bitcoin-demonstration-service/route.ts

Lines changed: 0 additions & 13 deletions
This file was deleted.

apps/uapi/next.config.mjs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,19 @@ let nextConfig = {
6969
// cannot leak between lanes.
7070
distDir: process.env.NEXT_DIST_DIR || '.next',
7171
productionBrowserSourceMaps: false,
72+
// Keep retired demonstration/spec fixtures out of serverless traces.
73+
// (Next does not honor vercel.json excludeFiles for App Router functions.)
74+
outputFileTracingExcludes: {
75+
'*': [
76+
'**/protocol-demonstration/**',
77+
'**/v23-bitcoin-demonstration-service.*',
78+
'**/bitcode-demo.js',
79+
'**/ai-reading-demonstration/**',
80+
'**/.proofs/**',
81+
'**/storybook-static/**',
82+
'**/tmp/**',
83+
],
84+
},
7285
experimental: {
7386
// Allow importing source files from outside the `uapi` package directory.
7487
externalDir: true,

apps/uapi/tests/protocolCommercialBoundary.test.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ const DISALLOWED_DEMONSTRATION_BOUNDARY_PATTERNS = [
2121
/@bitcode\/protocol-demonstration/,
2222
/protocol-demonstration\/public/,
2323
/BITCODE_DEMONSTRATION_PUBLIC_DIR/,
24+
// Removed product surface — do not reintroduce (Vercel 250mb function bombs).
25+
/bitcoin-demonstration-service/,
26+
/getBitcoinDemonstrationService\s*\(/,
2427
];
2528

2629
function collectSourceFiles(root: string): string[] {
@@ -97,6 +100,12 @@ describe('commercial protocol boundary', () => {
97100
expect(violations).toEqual([]);
98101
});
99102

103+
it('does not ship a bitcoin-demonstration-service product API route', () => {
104+
expect(
105+
existsSync(path.join(uapiRoot, 'app/api/bitcoin-demonstration-service')),
106+
).toBe(false);
107+
});
108+
100109
it('depends on the formal protocol package instead of the standalone demonstration package', () => {
101110
const uapiPackageJson = JSON.parse(readFileSync(path.join(uapiRoot, 'package.json'), 'utf8'));
102111
const dependencies = {

scripts/specifying/server.js

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,6 @@ import {
130130
SPEC_VERSION
131131
} from './src/bitcode-runtime.js';
132132
import { CURRENT_CANON_POSTURE } from './src/canon-posture.js';
133-
import { buildBitcoinDemonstrationServiceDescriptor } from './src/canonical/v23-bitcoin-demonstration-service.js';
134133
import {
135134
buildV24ExternalRealizationDescriptor,
136135
resolveV24ActiveExternalRuntime
@@ -895,17 +894,6 @@ export function createAppContext({
895894
return sendJson(res, 200, { ok: true, state: buildPublicState(state) });
896895
}
897896

898-
/**
899-
* @returns {{ ok: true, specVersion: string, service: unknown }}
900-
*/
901-
function getBitcoinDemonstrationService() {
902-
return {
903-
ok: true,
904-
specVersion: SPEC_VERSION,
905-
service: buildBitcoinDemonstrationServiceDescriptor()
906-
};
907-
}
908-
909897
/**
910898
* @param {{ environmentMode?: string | null | undefined }} [input]
911899
* @returns {{ ok: true, specVersion: string, externalRealization: unknown, activeRuntime: unknown }}
@@ -983,10 +971,6 @@ export function createAppContext({
983971
return sendJson(res, 200, resetState());
984972
}
985973

986-
if (req.method === 'GET' && req.url === '/api/bitcoin-demonstration-service') {
987-
return sendJson(res, 200, getBitcoinDemonstrationService());
988-
}
989-
990974
if (req.method === 'GET' && req.url?.startsWith('/api/external-realization')) {
991975
const url = new URL(req.url, 'http://127.0.0.1');
992976
return sendJson(
@@ -1042,7 +1026,6 @@ export function createAppContext({
10421026
createDeposit,
10431027
makeBitcodeBranch,
10441028
resetState,
1045-
getBitcoinDemonstrationService,
10461029
getExternalRealization,
10471030
executeLocalExecutorById,
10481031
handle

scripts/specifying/src/index.d.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ export interface BitcodeAppContext {
22
handle(req: unknown, res: unknown): Promise<void>;
33
getState(principal?: string): unknown;
44
resetState(): unknown;
5-
getBitcoinDemonstrationService(): unknown;
65
getExternalRealization(input?: Record<string, unknown>): unknown;
76
getReadReview(input?: Record<string, unknown>): unknown;
87
reviewRead(input?: Record<string, unknown>): unknown;

0 commit comments

Comments
 (0)