symfonic.services.effects.exposure¶
exposure ¶
Opaque-extension exposure accounting, and the claim a revert may make.
Effect fencing binds effects that cross classified framework ports. An opaque in-process extension — a preserved Python tool, a plugin callback, a contributed stage — can open a socket without any port being involved. No lease check saw it, no fence could suppress it, and no cancellation reached it. The only defensible thing a security revert can say about an invocation that executed one is that it is potentially exposed.
So the claim is derived, never set. claim_for starts from "suppressed" and
withdraws it on any of three findings, in order of how much they are trusted:
- the extension is opaque (T2.3.7 TR-1/TR-2, including the default for anything unregistered) — nothing was mediated, so nothing was fenced;
- the extension was declared port-mediated but the sentinel witnessed a direct effect (TR-7) — the declaration was wrong and is demoted here;
- the extension was declared port-mediated and carries no attestation at all — the sentinel is a detector rather than a sandbox, so an un-probed direct effect is invisible to it, and the conservative default is the only control against that residual.
Case 3 is the one that matters for mutation coverage: it means a mis-declared extension either gets caught (case 2) or takes the claim down anyway (case 3). There is no configuration that turns it off.
ExposureRecord
dataclass
¶
ExposureRecord(invocation_id: str, kind: ExposureKind, subject: str, reason: str, ticket_id: str | None = None)
Something a revert could not suppress, named rather than glossed over.
ExtensionExecution
dataclass
¶
One extension the invocation actually ran.
attested_clean is tri-state on purpose. True is a sentinel
attestation that no direct effect was witnessed, False is a witnessed
one, and None — the default — is "nobody watched", which is not the
same as "nothing happened".
FencingClaim
dataclass
¶
What the revert is entitled to say about one invocation's effects.
OpaqueExposureAccountant ¶
Turns executed extensions into exposures and a withheld-or-not claim.
Source code in src/symfonic/services/effects/exposure.py
account ¶
Every extension exposure for these invocations, demoting as it goes.
Source code in src/symfonic/services/effects/exposure.py
claim_for ¶
Derived from live trust state, so a later demotion still withdraws it.