diff --git a/tests/e2e/e2e-native-dsh-persona.test.ts b/tests/e2e/e2e-native-dsh-persona.test.ts index 06d0d4ab65..f912294e05 100644 --- a/tests/e2e/e2e-native-dsh-persona.test.ts +++ b/tests/e2e/e2e-native-dsh-persona.test.ts @@ -396,7 +396,15 @@ function buildRig(tag: string, withAutoReview: boolean): Rig { // compress could never fold ("Range is entirely within the protected // zone"). Zeroing them is established product behavior, not a hack. fs.writeFileSync(path.join(xdg.config, "billion-context", "billion-context.json"), - JSON.stringify({ providers: {}, compress: { preserveRecentTokens: 0, preserveRecentMessages: 0 } }, null, 2) + "\n"); + JSON.stringify({ + providers: {}, + compress: { preserveRecentTokens: 0, preserveRecentMessages: 0 }, + // #6480 made pure-SQLite the default (jsonWriter off), so the JSON + // envelopes this lane's persistedSessions() traversal asserts on are + // no longer written. Pin dual-write the way BILI_PI_INLINE=0 pins the + // posture: a test-only, explicit choice for this lane's assertions. + storage: { unified: "full", jsonWriter: "on" }, + }, null, 2) + "\n"); const env: NodeJS.ProcessEnv = { ...cleanEnv(), diff --git a/tests/e2e/e2e-native-dsh.test.ts b/tests/e2e/e2e-native-dsh.test.ts index 93d2521c7e..0ec738816e 100644 --- a/tests/e2e/e2e-native-dsh.test.ts +++ b/tests/e2e/e2e-native-dsh.test.ts @@ -363,7 +363,15 @@ function writeBiliConfig(ctx: Ctx): void { // cannot fold under the kernel's default protected-zone token window. fs.writeFileSync( path.join(dir, "billion-context.json"), - JSON.stringify({ providers: {}, compress: { preserveRecentTokens: 0 } }, null, 2) + "\n", + JSON.stringify({ + providers: {}, + compress: { preserveRecentTokens: 0 }, + // #6480 made pure-SQLite the default (jsonWriter off), so the JSON + // envelopes this lane's sessionFiles() traversal asserts on are no + // longer written. Pin dual-write the way BILI_PI_INLINE=0 pins the + // posture: a test-only, explicit choice for this lane's assertions. + storage: { unified: "full", jsonWriter: "on" }, + }, null, 2) + "\n", ); } diff --git a/tests/e2e/e2e-native-opencode.test.ts b/tests/e2e/e2e-native-opencode.test.ts index cf2200f2d2..4b552c3d75 100644 --- a/tests/e2e/e2e-native-opencode.test.ts +++ b/tests/e2e/e2e-native-opencode.test.ts @@ -287,7 +287,18 @@ async function startCtx(): Promise { // the two push-back runs clear deterministically. fs.writeFileSync( path.join(ctx.xdg.config, "billion-context", "billion-context.json"), - JSON.stringify({ compress: { preserveRecentTokens: 0 } }, null, 2), + JSON.stringify( + { + compress: { preserveRecentTokens: 0 }, + // #6480 made pure-SQLite the default (jsonWriter off), so the JSON + // session envelopes this lane's sessionFiles() traversal asserts on + // are no longer written. Same test-only dual-write pin as the + // pi/dsh native lanes: an explicit choice for this lane's assertions. + storage: { unified: "full", jsonWriter: "on" }, + }, + null, + 2, + ), ); await assertPortDead(ctx.fakePort); // #1689: prove still free right before the child binds it diff --git a/tests/e2e/e2e-native-pi.test.ts b/tests/e2e/e2e-native-pi.test.ts index 997d14734f..30b2432a1f 100644 --- a/tests/e2e/e2e-native-pi.test.ts +++ b/tests/e2e/e2e-native-pi.test.ts @@ -246,6 +246,23 @@ async function startCtx(): Promise { ]) fs.mkdirSync(d, { recursive: true }); + // #6480 flipped the storage default to pure-SQLite (the JSON envelope + // writer is off unless dual-write is explicitly requested), so a default- + // posture sandbox no longer contains session JSON files at all — and every + // persistence assertion in this suite walks those files (sessionFiles() + // below), failing structurally. Pin dual-write the way BILI_PI_INLINE=0 + // pins the spawn posture above: these assertions verify what they have + // always verified (envelope presence, folded blocks, the pluginAgent + // binding); the pure-sqlite default itself is covered by the unit suites + // (storage-json-writer-off*). ensureConfigTemplate() never overwrites an + // existing file, so this pre-seed survives plugin bootstrap. + const cfgDir = path.join(ctx.xdg.config, "billion-context"); + fs.mkdirSync(cfgDir, { recursive: true }); + fs.writeFileSync( + path.join(cfgDir, "billion-context.json"), + JSON.stringify({ storage: { unified: "full", jsonWriter: "on" } }, null, 2), + ); + await assertPortDead(ctx.fakePort); // #1689: prove still free right before the child binds it const fake = spawn(process.execPath, [FAKE_UPSTREAM], { env: { diff --git a/tests/e2e/e2e-pi-codex-ws.test.ts b/tests/e2e/e2e-pi-codex-ws.test.ts index bab066d3f4..6d748496f7 100644 --- a/tests/e2e/e2e-pi-codex-ws.test.ts +++ b/tests/e2e/e2e-pi-codex-ws.test.ts @@ -322,7 +322,10 @@ async function startCtx(transport: string, mockPort: number): Promise { ); // Loosen the kernel's recent-content protection so the scripted fold can // target the planted bulk (same seam the opencode WS suite uses). - fs.writeFileSync(path.join(biliCfgDir, "billion-context.json"), JSON.stringify({ compress: { preserveRecentTokens: 0 } })); + // #6480 made pure-SQLite the default (jsonWriter off), so the JSON session + // envelopes this lane's sessionFiles() traversal asserts on are no longer + // written — same test-only dual-write pin as the pi/dsh native lanes. + fs.writeFileSync(path.join(biliCfgDir, "billion-context.json"), JSON.stringify({ compress: { preserveRecentTokens: 0 }, storage: { unified: "full", jsonWriter: "on" } })); return ctx; }