mirror of
https://github.com/morluto/rea
synced 2026-10-27 22:45:19 -04:00
feat(sqlite): make worker deadlines adjustable with recovery guidance (#5818)
Expose a per-call SQLite worker deadline with exact CLI/MCP recovery controls, parent-owned execution metadata and historical unknown preservation. Keep fixed resource limits and cleanup admission intact. Share typed cleanup composition with one captured-output owner and preserve the timeout after cleanup resolves. Fixes #5812. Follow-up tracking: #5808. Existing CLI test-oracle failure: #5845. Verified 155 SQLite tests (3 skipped), static/docs/discovery checks, six real CLI/MCP pairs and 13 actual Codex sessions including four corrected deadline recoveries. Three pre-dispatch discovery failures remain explicit, not passes. Review findings include real retained-cleanup and fixture ownership regressions. Assisted-by: Kogasa (gensokyo-skills:kogasa-surprise-testing)
This commit is contained in:
@@ -7,6 +7,7 @@ import type { CliInstance } from "./types.js";
|
||||
import { withCommandCancellation } from "./commandCancellation.js";
|
||||
import { absoluteCallerPath } from "../filesystem/callerPath.js";
|
||||
import { finishAnalysisCommand } from "./finishAnalysisCommand.js";
|
||||
import { inspectSqliteDatabaseInputSchema } from "../domain/sqlite/sqliteDatabase.js";
|
||||
|
||||
/** Resolve an operator-selected SQLite snapshot through the shared inspection workflow. */
|
||||
export const registerSqliteCommands = (
|
||||
@@ -22,6 +23,7 @@ export const registerSqliteCommands = (
|
||||
path: z.string().describe("Local SQLite database snapshot"),
|
||||
}),
|
||||
options: z.object({
|
||||
workerTimeoutMs: inspectSqliteDatabaseInputSchema.shape.worker_timeout_ms,
|
||||
table: z
|
||||
.string()
|
||||
.optional()
|
||||
@@ -55,6 +57,9 @@ export const registerSqliteCommands = (
|
||||
service.inspect(
|
||||
{
|
||||
path: absoluteCallerPath(args.path),
|
||||
...(options.workerTimeoutMs === undefined
|
||||
? {}
|
||||
: { worker_timeout_ms: options.workerTimeoutMs }),
|
||||
...(options.table === undefined
|
||||
? {}
|
||||
: { table: options.table }),
|
||||
|
||||
Reference in New Issue
Block a user