Clean up post-Hono references (#26903)

This commit is contained in:
Kit Langton
2026-05-11 13:20:54 -04:00
committed by GitHub
parent cddab63808
commit 6f2f759fbb
16 changed files with 90 additions and 736 deletions
@@ -25,7 +25,7 @@ afterEach(async () => {
})
describe("config HttpApi", () => {
test("serves config update through Hono bridge", async () => {
test("serves config update through the default server app", async () => {
await using tmp = await tmpdir({ config: { formatter: false, lsp: false } })
const disposed = waitDisposed(tmp.path)
@@ -1,6 +1,5 @@
import { afterEach, describe, expect, test } from "bun:test"
import { Effect } from "effect"
import { Instance } from "../../src/project/instance"
import { WithInstance } from "../../src/project/with-instance"
import { Server } from "../../src/server/server"
import { ExperimentalPaths } from "../../src/server/routes/instance/httpapi/groups/experimental"
@@ -41,7 +40,7 @@ afterEach(async () => {
})
describe("experimental HttpApi", () => {
test("serves read-only experimental endpoints through Hono bridge", async () => {
test("serves read-only experimental endpoints through the default server app", async () => {
await using tmp = await tmpdir({
config: {
formatter: false,
@@ -94,7 +93,7 @@ describe("experimental HttpApi", () => {
expect(await resources.json()).toEqual({})
})
test("serves Console org switch through Hono bridge", async () => {
test("serves Console org switch through the default server app", async () => {
await using tmp = await tmpdir({ config: { formatter: false, lsp: false } })
Database.Client()
.$client.prepare(
@@ -120,7 +119,7 @@ describe("experimental HttpApi", () => {
expect(await switched.json()).toBe(true)
})
test("serves global session list through Hono bridge", async () => {
test("serves global session list through the default server app", async () => {
await using tmp = await tmpdir({ git: true, config: { formatter: false, lsp: false } })
const first = await WithInstance.provide({
@@ -157,7 +156,7 @@ describe("experimental HttpApi", () => {
expect(((await next.json()) as Session.GlobalInfo[]).map((session) => session.id)).toContain(first.id)
})
testWorktreeMutations("serves worktree mutations through Hono bridge", async () => {
testWorktreeMutations("serves worktree mutations through the default server app", async () => {
await using tmp = await tmpdir({ git: true, config: { formatter: false, lsp: false } })
const headers = { "x-opencode-directory": tmp.path, "content-type": "application/json" }
@@ -11,7 +11,7 @@ import { SessionPaths } from "../../src/server/routes/instance/httpapi/groups/se
import { ExperimentalHttpApiServer } from "../../src/server/routes/instance/httpapi/server"
import { HEADER as FenceHeader } from "../../src/server/shared/fence"
import { resetDatabase } from "../fixture/db"
import { disposeAllInstances, tmpdirScoped } from "../fixture/fixture"
import { tmpdirScoped } from "../fixture/fixture"
import { testEffect } from "../lib/effect"
// Flip the experimental workspaces flag so SyncEvent.run actually writes to
@@ -35,8 +35,7 @@ const testStateLayer = Layer.effectDiscard(
// Mount the production HttpApi route tree on a real Node HTTP server bound to
// 127.0.0.1:0 and a fetch-based HttpClient that prepends the server URL. This
// keeps the test wired through the same route layer production uses, without
// going through Server.Default()/Hono.
// keeps the test wired directly through the same route layer production uses.
const servedRoutes: Layer.Layer<never, Config.ConfigError, HttpServer.HttpServer> = HttpRouter.serve(
ExperimentalHttpApiServer.routes,
{ disableListenLog: true, disableLogger: true },