fix(httpapi): install Instance ALS for adapter Promise bridge (#25417)

This commit is contained in:
Kit Langton
2026-05-02 10:49:44 -04:00
committed by GitHub
parent 075f876e6f
commit 5242a1c6b4
4 changed files with 49 additions and 12 deletions

View File

@@ -217,6 +217,24 @@ describe("workspace HttpApi", () => {
}),
)
it.live("creates a real git worktree workspace via the builtin adapter", () =>
Effect.gen(function* () {
Flag.OPENCODE_EXPERIMENTAL_WORKSPACES = true
const dir = yield* tmpdirScoped({ git: true })
const created = yield* request(WorkspacePaths.list, dir, {
method: "POST",
headers: { "content-type": "application/json" },
body: JSON.stringify({ type: "worktree", branch: null }),
})
const body = yield* Effect.promise(() => created.text())
expect({ status: created.status, body }).toMatchObject({ status: 200 })
const workspace = JSON.parse(body) as Workspace.Info
expect(workspace).toMatchObject({ type: "worktree" })
}),
)
it.live("documents legacy Hono accepting the TUI payload shape", () =>
Effect.gen(function* () {
Flag.OPENCODE_EXPERIMENTAL_WORKSPACES = true