fix(opencode): enforce storage path invariants (#29666)

This commit is contained in:
Luke Parker 2026-06-02 10:54:41 +10:00 committed by GitHub
commit f0c7febb02
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
15 changed files with 1993 additions and 17 deletions

View file

@ -4,6 +4,7 @@ import { Database } from "@opencode-ai/core/database/database"
import { eq } from "drizzle-orm"
import { SessionTable } from "@opencode-ai/core/session/sql"
import { ProjectTable } from "@opencode-ai/core/project/sql"
import { AbsolutePath } from "@opencode-ai/core/schema"
import { ProjectV2 } from "@opencode-ai/core/project"
import { SessionID } from "../../src/session/schema"
import * as Log from "@opencode-ai/core/util/log"
@ -48,7 +49,7 @@ function ensureGlobal() {
.insert(ProjectTable)
.values({
id: ProjectV2.ID.global,
worktree: "/",
worktree: AbsolutePath.make("/"),
time_created: Date.now(),
time_updated: Date.now(),
sandboxes: [],