Commit graph

7 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
691980735a
fix(test): pin AI_MODEL in AI test env so suites are independent of the developer .env
The provider tests asserted the default gpt-4o-mini model, which broke once
a local .env set AI_MODEL=openrouter/free. The test env now pins the model
before config/env is imported.
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
6d4decb8f0
fix(auth): harden session handling and registration 2026-08-17 02:06:39 +05:30
d16fbf2dc8
feat(backend): implement Express work-order API with cookie auth 2026-08-17 01:31:48 +05:30