From 1ec21f1c0560cdaa5fff27a8dffaec94fd63807f Mon Sep 17 00:00:00 2001 From: weichen Date: Thu, 15 Oct 2026 06:33:31 +0000 Subject: [PATCH] Disable unaudited native tools for project runs Why: Direct search, exec, fetch, and MCP providers could return project-driving results without entering the trusted source observation gate. Evidence: App and run-manager suites pass with project runs confined to the audited runCtx tool path. Impact: Non-project native runs retain configured tools; project runs fail closed until native result hooks can prove durable observation. Refs: TT-N03 TT-R01 --- internal/app/app.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/internal/app/app.go b/internal/app/app.go index f6a8fde..711e95a 100644 --- a/internal/app/app.go +++ b/internal/app/app.go @@ -402,6 +402,16 @@ func Run(opt Options) error { if mgr := mcpManagerFor(rawMCP, strings.TrimSpace(effNow.GetString("tools.mcp.overrides", ""))); mgr != nil { cfg.MCP = mgr } + // Native squad tools do not yet expose a fail-closed result hook to the + // project observation outbox. Project runs therefore use the audited + // runCtx retrieval/tool path only; enabling these direct providers would + // let their results reach the next model turn without source analysis. + if rc.Run().ProjectID != "" { + cfg.Search = nil + cfg.Exec = nil + cfg.Fetch = nil + cfg.MCP = nil + } cfg.CodeOrchestration = effNow.GetBool("runtime.codeOrchestration", false) if ask, ok := rc.(interface { AskUser(card core.HITLCard) (core.HITLResponse, error)