openclaw/test/scripts/database-worker-registry.test.ts
RoboClaw c372034c36
feat(sessions): select cloud OS and size when spawning sessions (#148034)
* feat(sessions): add hosted cloud placement to spawn tools

Expose provider-authored cloud profiles and accept profile, OS, and machine selections for visible worktree spawns. Start tasks only after cloud dispatch and reuse native launch and exact-run cleanup ownership.

Co-authored-by: steipete <58493+steipete@users.noreply.github.com>
Co-authored-by: vyctorbrzezowski <51521767+vyctorbrzezowski@users.noreply.github.com>
Co-authored-by: vincentkoc <25068+vincentkoc@users.noreply.github.com>

* fix(ci): keep wizard recovery on database worker

Restore the single forked database-worker route removed when two independent deduplication fixes combined. Guard both registry uniqueness and required presence.

Co-authored-by: steipete <58493+steipete@users.noreply.github.com>
Co-authored-by: vyctorbrzezowski <51521767+vyctorbrzezowski@users.noreply.github.com>
Co-authored-by: vincentkoc <25068+vincentkoc@users.noreply.github.com>

* fix(sessions): share cloud profile identifier contract

Use the placement owner schema for discovery so valid listed profile identifiers survive normal tool argument validation. Cover129- and256-character round trips and rejection beyond the supported limit.

Co-authored-by: steipete <58493+steipete@users.noreply.github.com>
Co-authored-by: vyctorbrzezowski <51521767+vyctorbrzezowski@users.noreply.github.com>
Co-authored-by: vincentkoc <25068+vincentkoc@users.noreply.github.com>

* test(gateway): align placement dispatch assertion

Keep the current-main runtime-selection test aligned with the dispatch contract: request, transition callback, authorization, and caller signal. Preserve its model selection and admission assertions.

Co-authored-by: steipete <58493+steipete@users.noreply.github.com>
Co-authored-by: vyctorbrzezowski <51521767+vyctorbrzezowski@users.noreply.github.com>
Co-authored-by: vincentkoc <25068+vincentkoc@users.noreply.github.com>

* test(sessions): refresh cloud spawn model and prompt coverage

Preserve the configured auth-qualified child model while deferring cloud task admission, and regenerate prompt fixtures against the current model-selection owner.

Co-authored-by: steipete <58493+steipete@users.noreply.github.com>
Co-authored-by: vyctorbrzezowski <51521767+vyctorbrzezowski@users.noreply.github.com>
Co-authored-by: vincentkoc <25068+vincentkoc@users.noreply.github.com>

* test(sessions): isolate cloud placement coverage

Move cloud placement cases and their shared creation-permission control into a focused sibling suite. Preserve all cases and assertions without raising line or test-root limits.

Co-authored-by: steipete <58493+steipete@users.noreply.github.com>
Co-authored-by: vyctorbrzezowski <51521767+vyctorbrzezowski@users.noreply.github.com>
Co-authored-by: vincentkoc <25068+vincentkoc@users.noreply.github.com>

---------

Co-authored-by: steipete <58493+steipete@users.noreply.github.com>
Co-authored-by: vyctorbrzezowski <51521767+vyctorbrzezowski@users.noreply.github.com>
Co-authored-by: vincentkoc <25068+vincentkoc@users.noreply.github.com>
2026-09-18 01:20:46 -07:00

17 lines
712 B
TypeScript

import { describe, expect, it } from "vitest";
import {
databaseWorkerCoreTestFiles,
isDatabaseWorkerCoreTestFile,
} from "../vitest/vitest.database-worker-core-paths.mjs";
describe("database-worker test routing registry", () => {
it("contains no duplicate file routes", () => {
expect(new Set(databaseWorkerCoreTestFiles).size).toBe(databaseWorkerCoreTestFiles.length);
});
it("keeps wizard recovery on the forked database-worker route exactly once", () => {
const file = "src/wizard/setup.inference-recovery.integration.test.ts";
expect(databaseWorkerCoreTestFiles.filter((entry) => entry === file)).toEqual([file]);
expect(isDatabaseWorkerCoreTestFile(file)).toBe(true);
});
});