fix(assistant): keep the discovery Session to read and report tools #6256
All Vouch review confidence checks passed
Residual risk 0.19 = Change Risk (0.47) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.47 · 498 lines diff across 6 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.372
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #6256"
general
weight: 0.35
me2seeks
Summary
The proactive discovery Session runs open-ended investigation in the background. At
origin/main@59f61cf7dit could do more than investigate and report:MatterDelegate, #6249);MatterAdopt);MemoryIndex*, #6250);This PR gives the discovery Session its own exclusion list. The same visibility policy now governs the model-facing catalog and execution, so a tool hidden from a Session cannot run in it either. Read tools,
DiscoveryReportandDiscoveryContextstay available. The conversation, the Bot and index workers are unchanged.Fixes #6249. Refs #6250 (open: the allowlist decision for
MemorySourceQueryandMemoryExtract; native shell and edit tools in the discovery Session were not verified). Refs #6247 (RFC).Behavior change
DISCOVERY_EXCLUDED_TOOLS(index-initiative/discovery-capabilities.ts).DiscoveryReport.Verification
Regression tests were written first and run against the unfixed code: 4 of 6 failed, and the 2 that passed are guards for behavior that was already correct (conversation-delegated tasks cannot be controlled from discovery; discovery can still read conversation memory).
| Check | Result |
|---|---|
|
npm run typecheck(runtime-host, Node 24.21.0) | pass ||
discovery-boundary.test.ts, 6 tests | 6 of 6 pass (4 of 6 fail on the unfixed code) ||
npm run test:assistant(memory-network, index-initiative, proactive-matters) | 195 of 195 pass ||
npm run test:dist(runtime-host) | see the note below ||
biome checkandasf-license-headers checkon changed files | pass |Note on
test:dist: the full run exposed one pre-existing failure and several load-sensitive timeouts.assistant Host fallback registers a task workspace …fails onorigin/main@59f61cf7das well. I checked this by stashing this change and rebuilding the clean baseline. It is unrelated to the discovery boundary and is not fixed here.interrupt atomically …,two Clients share one execution …,invocation-owned detached Host retires …,non-serving Runtime Host kernel) pass when run in isolation. They failed only under the full concurrent run.assistant-initiative-boundary.test.tscame from this change: the test harness did not providetools.filter, and the new fail-closed check rejected it. The harness now provides it.Review focus
MatterRead,MatterReadFile,InboxListandInboxReadare excluded because they are worker-only or Bot-only. Please confirm none is needed by discovery.MemorySourceQueryandMemoryExtractremain available. Native shell and edit tools were not exercised because the test fixture exposes plugin tools only.AI use
Tool(s) and scope: Claude Code (Anthropic) investigated the code paths, wrote the regression tests and the change, and drafted this description. The checks above were run locally by the tool. Human review is pending; the contributor of record owns the change's accuracy and licensing. Commits carry
Generated-by: Claude Code.Checklist
test:dist)Does this PR entail a change in behavior?
🤖 Generated with Claude Code