From f8b40ed967409008f1dabcda0dcee7ea2cef618a Mon Sep 17 00:00:00 2001 From: Sawyer Date: Thu, 17 Sep 2026 13:14:26 -0700 Subject: [PATCH 1/3] fix(ci): unit job runs bun run test per package instead of root bun test Running bun test from the repo root drops each workspace package's own bunfig.toml (DOM preloads for jsdom/happy-dom, etc.), producing hundreds of false failures. bun run test already fans out per package via scripts/run-all.ts, so point the unit job at it instead so CI matches what a contributor runs locally. --- .github/workflows/ci.yml | 2 +- scripts/ci-jobs.test.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7fdeb02eea..33ea2ccc1f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -55,4 +55,4 @@ jobs: steps: - uses: actions/checkout@v4 - uses: ./.github/actions/setup-workbench - - run: bun test apps packages workflows scripts + - run: bun run test diff --git a/scripts/ci-jobs.test.ts b/scripts/ci-jobs.test.ts index 44d9229e1c..b83d508e8b 100644 --- a/scripts/ci-jobs.test.ts +++ b/scripts/ci-jobs.test.ts @@ -76,7 +76,7 @@ test("lint runs oxlint and oxfmt --check; the unit job has a hard timeout", asyn const unit = jobs.get("unit") ?? ""; expect(unit).toContain("timeout-minutes: 10"); - expect(unit).toContain("bun test apps packages workflows scripts"); + expect(unit).toContain("bun run test"); }); test("the structural job runs the same list as local check:structural", async () => { From dc0674df7f6230b665df581247d165693d4744c2 Mon Sep 17 00:00:00 2001 From: Sawyer Date: Thu, 17 Sep 2026 13:14:31 -0700 Subject: [PATCH 2/3] fix(context-menu): resolve document lazily in dialog-guard isBlockingOverlayOpen defaulted its parameter to the document global, which is only safe where a DOM global already exists at call time. Read globalThis.document lazily inside the function body instead so the module itself never assumes a DOM is present. --- packages/context-menu/src/dialog-guard.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/context-menu/src/dialog-guard.ts b/packages/context-menu/src/dialog-guard.ts index 8e55aa1fcd..047cef436d 100644 --- a/packages/context-menu/src/dialog-guard.ts +++ b/packages/context-menu/src/dialog-guard.ts @@ -9,8 +9,9 @@ // here: Dialog and the context menu's own Menu are both Radix primitives // sharing Radix's dismissable-layer stack, which already closes only the // topmost one. -export function isBlockingOverlayOpen(doc: Pick = document): boolean { - return doc.querySelector('[role="dialog"]') !== null; +export function isBlockingOverlayOpen(doc?: Pick): boolean { + const target = doc ?? globalThis.document; + return target.querySelector('[role="dialog"]') !== null; } export function isInsideInteractiveInput(target: EventTarget | null): boolean { From 563382b19bb71fb879eba352d07b77f2c4ed5b91 Mon Sep 17 00:00:00 2001 From: Sawyer Date: Thu, 17 Sep 2026 13:14:39 -0700 Subject: [PATCH 3/3] test: fix stale tool-package pin literals and mailbox fixture drift Running the suite per package (previous commit) surfaced tests that had drifted from real source: hardcoded tool-package name/version literals left over from the memory-tools -> memory and web-search-tools/ tools-skills version bumps, a scout-agent pin self-reference, a publish-tools fixture still naming the retired capability-tools predecessor, and an inbox mailbox-thread fixture missing the body field @corbits/mailbox's schema now requires. scout-agent's package.json bumps to 0.0.6 since its src/definition.test.ts changed. --- packages/agent-directory/test/routes.test.ts | 2 +- packages/inbox/src/thread-client.test.ts | 1 + packages/scout-agent/package.json | 2 +- packages/scout-agent/src/definition.test.ts | 2 +- packages/scout-agent/src/definition.ts | 2 +- packages/scout-agent/test/web-research-integration.test.ts | 2 +- scripts/publish-tools.test.ts | 6 +++--- workflows/diligence-brief/test/definition.test.ts | 2 +- 8 files changed, 10 insertions(+), 9 deletions(-) diff --git a/packages/agent-directory/test/routes.test.ts b/packages/agent-directory/test/routes.test.ts index 71eeb3ba73..5dd0077ca3 100644 --- a/packages/agent-directory/test/routes.test.ts +++ b/packages/agent-directory/test/routes.test.ts @@ -1481,7 +1481,7 @@ test("a create request indexes its pinned skills into the stored system prompt", expect(prompt).toContain("skills_load"); // The prompt tells the model to call `skills_load`, so the bundle that // provides it must be pinned on the same push. - expect(pinsFrom(workflowJson)).toEqual([{ name: "@corbits/tools-skills", version: "0.0.3" }]); + expect(pinsFrom(workflowJson)).toEqual([{ name: "@corbits/tools-skills", version: "0.0.4" }]); }); test("pinning a skill the registry cannot resolve is a 400, not a 500", async () => { diff --git a/packages/inbox/src/thread-client.test.ts b/packages/inbox/src/thread-client.test.ts index 82bd1bad43..78341798fc 100644 --- a/packages/inbox/src/thread-client.test.ts +++ b/packages/inbox/src/thread-client.test.ts @@ -78,6 +78,7 @@ describe("readMailboxThreadClient", () => { read: true, archived: false, parentId: null, + body: "hello", }, ], }), diff --git a/packages/scout-agent/package.json b/packages/scout-agent/package.json index 05efb1dee9..47dfc6908f 100644 --- a/packages/scout-agent/package.json +++ b/packages/scout-agent/package.json @@ -1,6 +1,6 @@ { "name": "@corbits/scout-agent", - "version": "0.0.5", + "version": "0.0.6", "private": true, "description": "Scout, the research/due-diligence agent: a ported system prompt plus its firm-memory, web-research, and Library-artifact tool declarations for a workbench chat agent", "license": "LGPL-2.1-or-later", diff --git a/packages/scout-agent/src/definition.test.ts b/packages/scout-agent/src/definition.test.ts index e8828e9091..100eab6350 100644 --- a/packages/scout-agent/src/definition.test.ts +++ b/packages/scout-agent/src/definition.test.ts @@ -10,7 +10,7 @@ describe("SCOUT_AGENT_DEFINITION", () => { test("pins the tool packages Scout's prompt actually depends on", () => { const names = SCOUT_TOOL_PACKAGE_PINS.map((pin) => pin.name); - expect(names).toContain("@corbits/memory-tools"); + expect(names).toContain("@corbits/memory"); expect(names).toContain("@corbits/web-search-tools"); expect(names).toContain("@corbits/scout-agent"); }); diff --git a/packages/scout-agent/src/definition.ts b/packages/scout-agent/src/definition.ts index bafac19314..d4073add0f 100644 --- a/packages/scout-agent/src/definition.ts +++ b/packages/scout-agent/src/definition.ts @@ -34,7 +34,7 @@ export const SCOUT_AGENT_DESCRIPTION = export const SCOUT_TOOL_PACKAGE_PINS: readonly ToolPackagePin[] = [ { name: "@corbits/memory", version: "0.1.2" }, { name: "@corbits/web-search-tools", version: "0.0.4" }, - { name: "@corbits/scout-agent", version: "0.0.5" }, + { name: "@corbits/scout-agent", version: "0.0.6" }, ]; /** The plain-data shape the agent-directory create path takes. */ diff --git a/packages/scout-agent/test/web-research-integration.test.ts b/packages/scout-agent/test/web-research-integration.test.ts index 27875b527b..bf408fed92 100644 --- a/packages/scout-agent/test/web-research-integration.test.ts +++ b/packages/scout-agent/test/web-research-integration.test.ts @@ -14,7 +14,7 @@ describe("Scout's web-research path (@corbits/web-search-tools)", () => { test("SCOUT_TOOL_PACKAGE_PINS pins the package this test exercises", () => { expect(SCOUT_TOOL_PACKAGE_PINS).toContainEqual({ name: "@corbits/web-search-tools", - version: "0.0.3", + version: "0.0.4", }); }); diff --git a/scripts/publish-tools.test.ts b/scripts/publish-tools.test.ts index 9321bf691a..95c21ba997 100644 --- a/scripts/publish-tools.test.ts +++ b/scripts/publish-tools.test.ts @@ -101,9 +101,9 @@ function args( }, pack: () => Promise.resolve({ - name: "@corbits/memory-tools", + name: "@corbits/capability-tools", version: "0.0.1", - filename: "corbits-memory-tools-0.0.1.tgz", + filename: "corbits-capability-tools-0.0.1.tgz", bytes: new TextEncoder().encode("tarball-bytes"), }), api: api as never, @@ -135,7 +135,7 @@ describe("runPublishTools", () => { (call) => call.method === "PUT" && call.path === - "/api/tenants/tenant_genesis/assets/asset_registry/tarballs/corbits-memory-tools-0.0.1.tgz", + "/api/tenants/tenant_genesis/assets/asset_registry/tarballs/corbits-capability-tools-0.0.1.tgz", ), ).toBe(true); }); diff --git a/workflows/diligence-brief/test/definition.test.ts b/workflows/diligence-brief/test/definition.test.ts index 6a1f8dedf7..74d6e304d7 100644 --- a/workflows/diligence-brief/test/definition.test.ts +++ b/workflows/diligence-brief/test/definition.test.ts @@ -45,7 +45,7 @@ test("the step pins web-search and memory tool packages and sets an explicit tur expect(primitive.agent.toolPackagePins).toEqual(DILIGENCE_BRIEF_TOOL_PACKAGE_PINS); expect(DILIGENCE_BRIEF_TOOL_PACKAGE_PINS).toEqual([ { name: "@corbits/web-search-tools", version: "0.0.4" }, - { name: "@corbits/memory-tools", version: "0.0.4" }, + { name: "@corbits/memory", version: "0.1.2" }, ]); expect(primitive.agent.toolFactories).toEqual([]); });