chore: generate

This commit is contained in:
opencode-agent[bot]
2026-05-09 22:47:54 +00:00
parent 29b5b24787
commit 818b56dbd0
3 changed files with 4 additions and 12 deletions

View File

@@ -406,9 +406,7 @@ export const { use: useSync, provider: SyncProvider } = createSimpleContext({
// Surface every failed endpoint in one labeled message instead of
// letting the first rejection drown its siblings as unhandled
// rejections.
const failure = aggregateFailures(
blockingRequests.map((r, i) => ({ name: r.name, result: settled[i] })),
)
const failure = aggregateFailures(blockingRequests.map((r, i) => ({ name: r.name, result: settled[i] })))
if (failure) throw failure
})
.then(async () => {

View File

@@ -43,17 +43,13 @@ describe("aggregateFailures", () => {
test("attaches structured failure list under .cause", () => {
const reason = new Error("nope")
const err = aggregateFailures([
{ name: "providers", result: { status: "rejected", reason } },
])
const err = aggregateFailures([{ name: "providers", result: { status: "rejected", reason } }])
const cause = err!.cause as { failures: Array<{ name: string; reason: unknown }> }
expect(cause.failures).toEqual([{ name: "providers", reason }])
})
test("falls back to String() for opaque reasons", () => {
const err = aggregateFailures([
{ name: "x", result: { status: "rejected", reason: 42 } },
])
const err = aggregateFailures([{ name: "x", result: { status: "rejected", reason: 42 } }])
expect(err!.message).toContain("x: 42")
})
})

View File

@@ -79,9 +79,7 @@ const setupWorkspace = (kind: string) =>
Effect.gen(function* () {
const dir = yield* tmpdirScoped({ git: true })
yield* Project.use.fromDirectory(dir)
const projectID = yield* Project.Service.use((svc) =>
svc.fromDirectory(dir).pipe(Effect.map((p) => p.project.id)),
)
const projectID = yield* Project.Service.use((svc) => svc.fromDirectory(dir).pipe(Effect.map((p) => p.project.id)))
registerAdapter(projectID, kind, localAdapter(dir))
const workspace = yield* Workspace.Service.use((svc) =>
svc.create({ type: kind, branch: null, extra: null, projectID }),