Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion tests/e2e/e2e-native-dsh-persona.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down
10 changes: 9 additions & 1 deletion tests/e2e/e2e-native-dsh.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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",
);
}

Expand Down
13 changes: 12 additions & 1 deletion tests/e2e/e2e-native-opencode.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,18 @@ async function startCtx(): Promise<Ctx> {
// 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
Expand Down
17 changes: 17 additions & 0 deletions tests/e2e/e2e-native-pi.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,23 @@ async function startCtx(): Promise<Ctx> {
])
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: {
Expand Down
5 changes: 4 additions & 1 deletion tests/e2e/e2e-pi-codex-ws.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,10 @@ async function startCtx(transport: string, mockPort: number): Promise<Ctx> {
);
// 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;
}

Expand Down
Loading