Skip to content

Commit 5a1f1c4

Browse files
anandgupta42claude
andcommitted
fix(storage): mark the extracted open() as a fork change and isolate the alias env in the concurrent-open test
Co-Authored-By: Claude Opus 5.5 <[email protected]>
1 parent 31d9ea1 commit 5a1f1c4

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

‎packages/opencode/src/storage/db.ts‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -407,6 +407,7 @@ export namespace Database {
407407
// altimate_change end
408408
})
409409

410+
// altimate_change start — upstream_fix: setup extracted from the lazy Client so it runs under the setup lock
410411
function open() {
411412
const sqlite = new BunDatabase(Path, { create: true })
412413
state.sqlite = sqlite
@@ -473,6 +474,7 @@ export namespace Database {
473474

474475
return db
475476
}
477+
// altimate_change end
476478

477479
export function close() {
478480
const sqlite = state.sqlite

‎packages/opencode/test/storage/concurrent-open.test.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ const fixture = path.join(import.meta.dir, "fixture", "open-database.ts")
88
async function launch(data: string) {
99
const proc = Bun.spawn([process.execPath, "run", fixture], {
1010
cwd: path.join(import.meta.dir, "..", ".."),
11-
env: { ...process.env, XDG_DATA_HOME: data, OPENCODE_DB: "" },
11+
env: { ...process.env, XDG_DATA_HOME: data, OPENCODE_DB: "", ALTIMATE_CLI_DB: "" },
1212
stdout: "pipe",
1313
stderr: "pipe",
1414
})

0 commit comments

Comments
 (0)