Commit graph

4 commits

Author SHA1 Message Date
35069fe4ad
fix(backend): parse triage proposals wrapped in prose or code fences
Free-model routers often answer with surrounding prose, so a strict whole-
response JSON parse failed and every triage run ended in error. Extract the
first JSON block before parsing, keeping the zod schema gate intact.
2026-08-19 22:05:20 +05:30
1ca37a6504
feat(backend): return the created run id from manual triage
runTriage now resolves to { outcome, runId } so the admin API can hand the
run id back to the UI for deep-linking into the run detail.
2026-08-19 21:46:21 +05:30
b8cb205e69
test(backend): raise AI surface coverage — provider client, admin agent API, policy, triage skip paths 2026-08-19 20:03:39 +05:30
7a84996f51
test(backend): agent runtime, copilot API, and triage/worker suites with mocked provider
Also fix two bugs the tests surfaced in the merged AI implementation:
- agent-tool-call model made approval.summary/expiresAt conditionally required only when an approval subdocument is present, so blocked/error tool calls persist without a fake approval
- agent.repo.createRun coerced empty-string session/user ids to null so autonomous triage runs (no session/user) no longer fail ObjectId casting
2026-08-19 19:23:00 +05:30