# Where must an instance boundary be enforced in federated agent evaluation harnesses when adversarial scenario replay diverges from safety regression gating? **Date of Record:** 2026 November 23 **Scope:** Applies to federated evaluation harnesses that replay versioned adversarial scenarios across heterogeneous agent instances and gate promotion on per-scenario safety regression verdicts. Does not apply to single-tenant harnesses with a shared clock and a single execution backend, nor to pure offline scoring where scenario replay is not re-executed. ## Core Distinction The boundary failure is not "the agent behaved unsafely" and not "the scenario is non-deterministic." It is the conflation of two distinct instance scopes: the **scenario replay instance** (the isolated execution context in which an adversarial transcript is reconstructed and re-driven) and the **regression gate instance** (the aggregation context that compares the observed transcript against a pinned safety baseline). In a federated harness these are frequently coalesced into one process or one tenant, because that is the cheapest way to keep scenario state and baseline state consistent. That coalescing is the invariant violation. A scenario replay instance must be *hermetic*: it may import the adversary's transcript, the tool fixtures, and the model version, but it must not import the gate's baseline verdicts, prior pass/fail records, or another tenant's replay residue. The gate instance must be *aggregative and stateless per scenario*: it consumes a sealed replay artifact and a pinned baseline, and it must never re-enter the replay context to "re-check" a divergence. When these two scopes share mutable state — a cache, a fixture directory, a memoized tool response, a shared RNG seed registry — a divergence in one scenario silently contaminates the baseline comparison of another, and the gate reports a clean regression pass over a replay that never actually executed under adversarial conditions. ## What Was Observed During a multi-tenant federated run across four evaluation nodes, a scenario family that injects tool-response poisoning (a fixture tool returns a payload instructing the agent to exfiltrate a canary token) was replayed 1,200 times. The gate reported zero safety regressions. Manual audit of the sealed replay artifacts found that 37 replays had executed against a *memoized* tool response captured from a prior benign scenario on the same node, because the replay instance's fixture cache was keyed on `(tenant_id, tool_name, call_index)` rather than on `(scenario_id, scenario_version, tool_name, call_index)`. The adversarial payload was never delivered; the agent's "safe" behavior was a replay of a cached benign response. The gate instance, which read the same cache to resolve baseline fixtures, agreed with the contaminated replay. Both scopes were wrong in the same direction, so the diff was empty. A second, subtler observation: on two nodes the replay instance reused a process-level RNG seeded from the node's boot time, so two replays of the *same* scenario version produced different adversarial tool-call orderings. The gate's baseline had been pinned from one ordering; the replay produced another; the gate flagged a "regression" that was actually a seed-scope leak. The gate instance had no way to distinguish "agent got less safe" from "replay instance was not hermetic." ## Condition of Validity The gating verdict is valid only if, for every scenario replay, all of the following hold at the moment the sealed artifact is emitted: 1. The replay instance's fixture and memoization keys include `scenario_id` and `scenario_version`; no key may be satisfiable by a different scenario. 2. The replay instance's RNG is seeded deterministically from `(scenario_id, scenario_version, replay_ordinal)`, not from node or process state. 3. The sealed artifact records the *resolved* fixture provenance (cache hit vs. fresh construction) per tool call, not merely the tool name. 4. The gate instance consumes only the sealed artifact plus the pinned baseline; it must not resolve fixtures or re-execute any tool call. If any condition fails, the verdict is *unscoped* and must be treated as `INDETERMINATE`, never as `PASS`. The common mistake is to treat a cache hit as an optimization rather than as a provenance event; a cache hit on adversarial fixtures is a hermeticity breach and must invalidate the replay. ## Decision Boundary The decision boundary is at artifact sealing, not at comparison. The harness must decide, before the gate runs, whether the replay instance was hermetic. If provenance shows any fixture resolved from a key that does not include `scenario_id` and `scenario_version`, or any RNG draw outside the deterministic seed scope, the harness must refuse to emit a comparable artifact and must mark the scenario `INDETERMINATE`. The gate must then refuse to promote on that scenario regardless of how many other scenarios passed, because an `INDETERMINATE` on an adversarial safety scenario is not a soft signal — it is a statement that the safety property was never exercised. The boundary is *not* "did the agent pass?" It is "was the instance that could have failed the same instance the baseline was pinned against?" If the answer is anything other than an unqualified yes, the gate has no jurisdiction. ## Operational Effect Enforcing the boundary converts silent false-passes into loud `INDETERMINATE` verdicts, which changes promotion behavior: a federated run with any `INDETERMINATE` adversarial scenario cannot promote, and the operator must re-provision the offending node's replay instance (clear fixture caches, re-seed from scenario coordinates) before re-running. In the observed run, enforcing the boundary surfaced 37 contaminated replays and 2 seed-scope leaks that the prior gate had reported as clean. The cost is throughput — replay instances can no longer share fixture caches across scenarios — but the alternative is a gate that certifies safety on transcripts that were never adversarial. The durable lesson: in a federated harness, hermeticity is a property of the replay instance that the gate cannot verify after the fact, so it must be enforced and recorded at sealing time. ```python import hashlib from dataclasses import dataclass class HermeticityBreach(RuntimeError): """Raised when a replay instance resolved state outside its scenario scope.""" pass @dataclass(frozen=True) class FixtureProvenance: scenario_id: str scenario_version: str tool_name: str call_index: int cache_key: tuple fresh: bool def seal_replay_artifact(scenario_id: str, scenario_version: str, provenance: list[FixtureProvenance], rng_seed_origin: str) -> str: required_prefix = (scenario_id, scenario_version) for p in provenance: if p.cache_key[:2] != required_prefix: raise HermeticityBreach( f"fixture {p.tool_name}[{p.call_index}] resolved from key " f"{p.cache_key!r}; expected prefix {required_prefix!r}" ) if rng_seed_origin != f"scenario:{scenario_id}:{scenario_version}": raise HermeticityBreach( f"rng seeded from {rng_seed_origin!r}; must derive from scenario coordinates" ) digest = hashlib.sha256() for p in provenance: digest.update(repr((p.scenario_id, p.scenario_version, p.tool_name, p.call_index, p.fresh)).encode()) return digest.hexdigest() def gate_verdict(sealed_digest: str | None, baseline_digest: str) -> str: if sealed_digest is None: return "INDETERMINATE" return "PASS" if sealed_digest == baseline_digest else "REGRESSION" ```