Skip to content

Commit 3a2aecc

Browse files
committed
sync(bfmono): fix(gambit): finish sqlite cutover cleanup (+19 more) (bfmono@ac1a886b2)
This PR is an automated gambitmono sync of bfmono Gambit packages. - Source: `packages/gambit/` - Core: `packages/gambit/packages/gambit-core/` - bfmono rev: ac1a886b2 Changes: - 0a8233b0c fix(gambit): finish sqlite cutover cleanup - 1fee78d0f fix(gambit): show feedback rejection errors in test ui - 3386bf209 chore(gambit): regenerate feedback save graphql artifacts - 2321b92ca fix(gambit): quiet feedback rejection handling - bc574c906 test(gambit): update sqlite cutover test expectations - 7bc9ea312 fix(gambit): restore package exports and lint cleanup - 3a9e5c635 feat(gambit): synthesize chip-only build prompts - 514f34d9b feat(gambit): log workbench build chat payloads - c92f3849b fix(gambit): refresh simulator workspace meta queries - 8734862cb feat(gambit): remove legacy simulator state files - fa6d84f0d feat(gambit): cut simulator storage reads to sqlite - 620167b04 fix(gambit): stabilize scenario transcript ordering - 8cf906fa1 test(gambit): verify sqlite-authoritative simulator reloads - c6f7cc0fa feat(gambit): move simulator runtime authority into workspace sqlite - 0d79fc83e fix(gambit): honor claude workbench provider selection - 48be9821d fix(simulator-ui): make verify description tooltips keyboard accessible - 0ce337e1c feat(gambit-simulator): split verify results into tabs - c496b4cce feat(simulator-ui): streamline verify batch controls - de43c6b8a fix(gambit): keep manual Grade test run selection stable - 29c7ebc15 chore(gambit): cut 0.8.6-rc.7 release Do not edit this repo directly; make changes in bfmono and re-run the sync.
1 parent 4571f88 commit 3a2aecc

62 files changed

Lines changed: 2321 additions & 2465 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

mod.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,8 @@ export type {
3939
DefaultedRuntime,
4040
DefaultedRuntimeRunOptions,
4141
RunDeckWithDefaultsOptions,
42+
SessionArtifactsConfig,
4243
} from "./src/default_runtime.ts";
43-
/** Session artifact persistence config for default runtime runs. */
44-
export type { SessionArtifactsConfig } from "./src/session_artifacts.ts";
4544
/** Run a deck with default provider/model/runtime behavior. */
4645
export { runDeck } from "./src/default_runtime.ts";
4746
/** Run a deck directly through gambit-core without gambit defaults. */

scripts/seed_verify_fixture.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,15 +45,15 @@ function parseArgs(args: string[]): SeedVerifyFixtureOptions {
4545
async function main() {
4646
const opts = parseArgs(Deno.args);
4747
const seeded = await seedVerifyFixture(opts);
48-
const relativeState = path.relative(Deno.cwd(), seeded.statePath);
48+
const relativeSqlite = path.relative(Deno.cwd(), seeded.sqlitePath);
4949
console.log(
5050
[
5151
"[verify-fixture] seeded workspace fixture",
5252
`workspaceId: ${seeded.workspaceId}`,
5353
`deckPath: ${seeded.deckPath}`,
5454
`graderId: ${seeded.graderId}`,
5555
`runCount: ${seeded.runCount}`,
56-
`statePath: ${relativeState || seeded.statePath}`,
56+
`sqlitePath: ${relativeSqlite || seeded.sqlitePath}`,
5757
].join("\n"),
5858
);
5959
}

simulator-ui/__demos__/run-test-tab-demo.ts

Lines changed: 20 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -643,30 +643,31 @@ async function main(): Promise<void> {
643643
ids.workspaceId,
644644
"workspace.sqlite",
645645
);
646-
const statePath = path.join(
647-
serveRoot,
648-
".gambit",
649-
"workspaces",
650-
ids.workspaceId,
651-
"state.json",
652-
);
653-
654-
const state = JSON.parse(await Deno.readTextFile(statePath)) as {
655-
meta?: { scenarioRunId?: string };
656-
messages?: Array<{ role?: string; content?: unknown }>;
657-
};
658-
if (state.meta?.scenarioRunId !== ids.runId) {
659-
throw new Error(
660-
`Expected state scenarioRunId ${ids.runId}, got ${state.meta?.scenarioRunId}.`,
661-
);
662-
}
663-
664646
const db = new DatabaseSync(sqlitePath);
665647
let runEventCount = 0;
648+
let stateMessageCount = 0;
666649
let sqliteMessages: Array<
667650
{ role: string | null; content: string | null }
668651
> = [];
669652
try {
653+
const stateRow = db.prepare(`
654+
SELECT state_json
655+
FROM workspace_state_v0
656+
WHERE workspace_id = ?
657+
`).get(ids.workspaceId) as { state_json?: string } | undefined;
658+
if (typeof stateRow?.state_json !== "string") {
659+
throw new Error("Expected workspace state row in sqlite.");
660+
}
661+
const state = JSON.parse(stateRow.state_json) as {
662+
meta?: { scenarioRunId?: string };
663+
messages?: Array<unknown>;
664+
};
665+
if (state.meta?.scenarioRunId !== ids.runId) {
666+
throw new Error(
667+
`Expected state scenarioRunId ${ids.runId}, got ${state.meta?.scenarioRunId}.`,
668+
);
669+
}
670+
stateMessageCount = state.messages?.length ?? 0;
670671
const eventRow = db.prepare(`
671672
SELECT COUNT(*) AS count
672673
FROM openresponses_run_events_v0
@@ -879,7 +880,7 @@ async function main(): Promise<void> {
879880
logTestTabDemo("demo-complete", {
880881
workspaceId: ids.workspaceId,
881882
runId: ids.runId,
882-
stateMessageCount: state.messages?.length ?? 0,
883+
stateMessageCount,
883884
sqliteRunEventCount: runEventCount,
884885
graphqlMessageCount: graphqlMessages.length,
885886
feedbackScore,

simulator-ui/__generated__/__isograph/Mutation/GambitWorkspaceCreate/normalization_ast.ts

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

simulator-ui/__generated__/__isograph/Mutation/GambitWorkspaceCreate/param_type.ts

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

simulator-ui/__generated__/__isograph/Mutation/GambitWorkspaceCreate/query_text.ts

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

simulator-ui/__generated__/__isograph/Mutation/GambitWorkspaceCreate/raw_response_type.ts

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

simulator-ui/__generated__/__isograph/Mutation/GambitWorkspaceCreate/resolver_reader.ts

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

simulator-ui/__generated__/__isograph/Mutation/GambitWorkspaceFeedbackSave/param_type.ts

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

simulator-ui/__generated__/__isograph/Mutation/GambitWorkspaceFeedbackSave/raw_response_type.ts

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)