*Continent · 4 territory* ## Summary The tool-call adapter govern(call, session, harness, executor) is described across the governance documents as the trusted layer: it takes the call, draws scope, facts, derived facts, a spend reservation, approvals, history, time and nonces from the harness, verifies approvals, evaluates, and runs the executor only on ALLOW or LIMIT. ## Explanation - In SPEC.md, adapters/tool-call/ is the reference adapter: govern(call, session, harness, executor). - adapters/tool-call/ is the reference adapter: govern(call, session, harness, executor). - In CHANGELOG.md, the enforcing adapter (adapters/tool-call/, exported from the root) has govern(call, session, harness, executor) take a tool call as { id?, function: { name, arguments } } or { name, args }, build the request from the harness alone, verify approvals in the trusted layer, evaluate, and call the executor only on ALLOW or LIMIT, with the limits. - The enforcing adapter (`adapters/tool-call/`, exported from the root) has `govern(call, session, harness, executor)` take a tool call as `{ id?, function: { na… - In README.md, adapters/tool-call/ holds the enforcing adapter (govern), the reference harness (spend ledger with reserve-then-commit, nonce set, history store) and a data-driven harness for conformance, exported from the root bundle. - adapters/tool-call/ holds the enforcing adapter (`govern`), the reference harness (spend ledger with reserve-then-commit, nonce set, history store) and a data-… - In BOUNDARY.md, adapters/tool-call/ is the reference shape of the trusted layer for tool calls, where govern(call, session, harness, executor) parses the call ({ id?, function: { name, arguments } } or { name, args }), asks the harness for the scope, the supplied facts, the derived facts (integrator-declared functions over the arguments), an atomic spend reservation, the approvals it holds, the participant's history, the time and the consumed nonces, verifies the approvals, evaluates, claims every nonce the decision used atomically, and calls the executor only on ALLOW or LIMIT, passing the limits. - adapters/tool-call/ is the reference shape of the trusted layer for tool calls, where govern(call, session, harness, executor) parses the call ({ id?, function… - In README.md, for an enforcement expectation the loop builds a harness from case.harness, runs each case.before[].call through it (not judged), runs case.call through the adapter with a session on the rulebook, that harness and a spy executor, and asserts status, executed count, outcome, limits, reason IDs, error stage and rejection codes equal expect.enforcement. - For an enforcement expectation the loop builds a harness from case.harness, runs each case.before[].call through it (not judged), runs case.call through the ad… - For each line the run procedure uses a session on the base or the mission rulebook, a reference harness (`referenceHarness` from the engine's tool-call adapter) with this business's resolver and derived-fact functions, the shared ledger, nonce set and history store, and the line's `now`, then calls `govern({ name, args }, session, harness, executor)` with a spy executor. - For each line the run procedure uses a session on the base or the mission rulebook, a reference harness (`referenceHarness` from the engine's tool-call adapter… - govern takes a tool call ({ id?, function: { name, arguments } } or { name, args }), a session ({ rulebook, principal, participant, delegation? }), a harness (now(), resolveScope, facts, derive functions by fact, reserve for spend ledgers, approvals, the consumed-nonce set, the history store) and an executor. - govern takes a tool call ({ id?, function: { name, arguments } } or { name, args }), a session ({ rulebook, principal, participant, delegation? }), a harness (… - In RELATED-WORK.md, enforcement is the adapter's: it runs the tool only on ALLOW or LIMIT (§ 16.9, `conformance/d6-enforcement.json`). - Enforcement is the adapter's: it runs the tool only on ALLOW or LIMIT (§ 16.9, `conformance/d6-enforcement.json`). - The records do not establish what the adapter does when the executor throws after the call has run, or how an uncertain outcome is settled. - The enforcing adapter (`adapters/tool-call/`, exported from the root) has `govern(call, session, harness, executor)` take a tool call as `{ id?, function: { na… - adapters/tool-call/ is the reference shape of the trusted layer for tool calls, where govern(call, session, harness, executor) parses the call ({ id?, function… - For an enforcement expectation the loop builds a harness from case.harness, runs each case.before[].call through it (not judged), runs case.call through the ad… ## Threads - The single function govern(call, session, harness, executor) as the reference adapter in adapters/tool-call/. - adapters/tool-call/ is the reference adapter: govern(call, session, harness, executor). - The enforcing adapter (`adapters/tool-call/`, exported from the root) has `govern(call, session, harness, executor)` take a tool call as `{ id?, function: { na… - adapters/tool-call/ holds the enforcing adapter (`govern`), the reference harness (spend ledger with reserve-then-commit, nonce set, history store) and a data-… - adapters/tool-call/ is the reference shape of the trusted layer for tool calls, where govern(call, session, harness, executor) parses the call ({ id?, function… - What govern draws from the harness: scope, facts, derived facts, a spend reservation, approvals, history, time and consumed nonces. - govern takes a tool call ({ id?, function: { name, arguments } } or { name, args }), a session ({ rulebook, principal, participant, delegation? }), a harness (… - adapters/tool-call/ is the reference shape of the trusted layer for tool calls, where govern(call, session, harness, executor) parses the call ({ id?, function… - The conformance loop that builds a harness from case.harness and checks status, executed count, outcome, limits, reason IDs, error stage and rejection codes. - For an enforcement expectation the implementation must build one harness from the harness data (scope, facts, approvals, now, consumed nonces, history, a ledge… - For an enforcement expectation the loop builds a harness from case.harness, runs each case.before[].call through it (not judged), runs case.call through the ad… - The run procedure that builds a session on the base or mission rulebook and a reference harness per line, then calls govern with a spy executor. - For each line the run procedure uses a session on the base or the mission rulebook, a reference harness (`referenceHarness` from the engine's tool-call adapter… ## How it formed The earliest record, dated Oct 18, 2026, states that enforcement is the adapter's and the tool runs only on ALLOW or LIMIT; the records dated Oct 19, 2026 describe govern's full step order and the conformance loop that checks it. - For each line the run procedure uses a session on the base or the mission rulebook, a reference harness (`referenceHarness` from the engine's tool-call adapter… - adapters/tool-call/ is the reference adapter: govern(call, session, harness, executor). - govern takes a tool call ({ id?, function: { name, arguments } } or { name, args }), a session ({ rulebook, principal, participant, delegation? }), a harness (… - The enforcing adapter (`adapters/tool-call/`, exported from the root) has `govern(call, session, harness, executor)` take a tool call as `{ id?, function: { na… - adapters/tool-call/ holds the enforcing adapter (`govern`), the reference harness (spend ledger with reserve-then-commit, nonce set, history store) and a data-… - …and 3 more ## What's still open The conformance check compares an outcome of not_run, ran or uncertain, and the adapter descriptions do not say what happens when the executor throws after the call has run. - The enforcing adapter (`adapters/tool-call/`, exported from the root) has `govern(call, session, harness, executor)` take a tool call as `{ id?, function: { na… - adapters/tool-call/ is the reference shape of the trusted layer for tool calls, where govern(call, session, harness, executor) parses the call ({ id?, function… - For an enforcement expectation the loop builds a harness from case.harness, runs each case.before[].call through it (not judged), runs case.call through the ad… ## Consultant **Where it shows up** — The same function keeps coming up: govern(call, session, harness, executor) in adapters/tool-call/, described in SPEC.md, CHANGELOG.md, README.md and BOUNDARY.md, with the harness supplying scope, facts, derived facts, a spend reservation, approvals, history, time and nonces. **A question to sit with** — When the executor throws after the call has run, what should the adapter report and who settles the spend and the nonce? **A way forward** — Keep the four descriptions of govern side by side and mark the one place they diverge — the uncertain outcome — so the next edit to any of them stays consistent with the others. ## Ideas - The adapter should run the tool only on ALLOW or LIMIT, passing the limits through. - The request should be built from the harness alone, with approvals verified in the trusted layer. - Every nonce the decision used should be claimed atomically before the executor runs. - The in-memory reference harness is a starting point; a real deployment should swap in its own stores while keeping the same contract. ## Territories - [[Bevia/World/Territories/Enforcement expectation, before calls and rejection codes|Enforcement expectation, before calls and rejection codes]] - [[Bevia/World/Territories/Reference harness and the govern call signature|Reference harness and the govern call signature]] - [[Bevia/World/Territories/The enforcing tool-call adapter and its govern function|The enforcing tool-call adapter and its govern function]] - [[Bevia/World/Territories/Enforcement conformance and adapter tests|Enforcement conformance and adapter tests]]