mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-14 20:01:09 +02:00
Two critical fixes from the AI Workbench audit: 1. Tool exceptions in the reasoning loop: stage(ps, aiActor) is now wrapped in try-catch. If a tool throws (Dexie error, vault locked, network timeout), the step is recorded as failed with the error message in the summary, and the loop continues with the next step. Previously, one broken tool crashed the entire iteration. 2. Concurrent mission scope interleaving: runMission() now serializes through a promise-based mutex. Two concurrent calls (double-click, cadence overlap) queue instead of interleaving — prevents the ambient withAgentScope() from stomping a running mission's scope with a different agent's tags. scope-context.ts also gains filterByScopeExplicit(records, scopeTagIds, getTagIds) — the explicit, race-safe variant that doesn't read ambient state. Callers that already have the scope should prefer it. Also adds docs/optimizable/ai-workbench-audit-2026-04-16.md with the full audit (P0–P2, 12 items). Runner tests: 8/8. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| ai-workbench-audit-2026-04-16.md | ||
| foundation-layer-improvements.md | ||
| frontend-consistency-improvements.md | ||