You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Relocate the untrusted-content fence primitives from engine/agent to engine/governance #380
PR #366 (#363) graduated the WebSearch tool body into engine/adapter/search/. The tool body calls agent.FenceUntrusted (the single-source-of-truth LLM01 untrusted-content fence, engine/agent/fence.go), so the graduated package imports engine/agent — making it the first engine/adapter package to import the agent loop, growing that adapter's dependency cone (~5×: agent + governance + prompt + port + team + session + tool + x/sync/errgroup).
This was the pragmatic call (Option B in the PR): the alternative of copying ~560 lines of fence code (Option A) duplicates the most volatile security enumeration in the repo (framingHeaderSurfaces) with real drift risk, against AGENTS.md's "exactly one fence implementation". But the dep-cone cost is real and recorded in the engine-adapter-search depguard rule's NOTE.
Proposal
Relocate the fence primitives — UntrustedFence, WriteUntrustedBlock, FenceUntrusted, NeutraliseFraming and their private helpers — from engine/agent to engine/governance (stdlib-only, session-free, no cycle). This restores engine/adapter/search to a tiny cone ({session, tool, governance}) while keeping a single source of truth.
Blast radius (why it's a follow-up, not bundled into #363)
engine/governance is a guarded core package under task api:check / engine/COMPATIBILITY.md — relocating the exported fence API is a public-surface change (likely an api:update + CHANGELOG note + possibly its own ADR).
~6 production files + ~4 test files in engine/agent reference the fence; the re-export shim (alias in engine/agent for back-compat) or a clean break must be decided.
Activity