extractResultEnvelope keeps the last <workflow_result> block, treats empty/missing bodies as absent, and still yields an unclosed final block. validateAgainstJsonSchema reports missing/invalid JSON and path-qualified schema issues without throwing, and throws for a malformed caller schema so a repair turn is not wasted.thread/fork trims ids and worktree refs, accepts local / worktree, and rejects blanks, extras, unknown environment types, and local extras. Pin/archive require a real boolean and reject blanks or extras.test/server/tasks/taskPolicy.test.tstest/workflows/resultSchema.test.tstest/jsonrpc.thread-management-schema-rejects.test.tsThese are shared fail-closed gates with a large blast radius. The recent TaskCoordinator extraction left taskPolicy.ts as the authority for ownership, graph, and terminal-lock checks with no dedicated tests. Workflow envelope validation was only exercised through runner happy paths, so a parse/repair regression could accept invalid child output or burn repair turns. Thread fork/pin/archive schemas had integration happy paths only; a loosened environment union or optional boolean would let clients create or mutate threads with invalid params.
This run does not duplicate open coverage PRs #331, #332, or #333.
bun run typecheck, bun run check, bun run docs:check, and Biome on touched files: cleanbun run test: new files that reached the runner passed in-suite (taskPolicy, thread-management-schema-rejects). resultSchema passed isolated; the host suite truncated before test/workflows/* (same pattern as recent coverage runs). Reproduced the known ipc-files rewritten-mtime reauth failure; not introduced by this change.Sign in to comment.
Update README.md
#125 mobile-fixes ← main
Updated 4 months ago
test: cover task policy gates, workflow envelopes, and thread fork schemas
#334 main ← cursor/missing-test-coverage-f3be
Updated 2 weeks ago