symfonic.services.shadow.state¶
state ¶
Replacement state writes, suppressed.
A shadow run must be able to read what it wrote โ otherwise a multi-step invocation diverges for a reason that has nothing to do with the replacement implementation โ while the replacement's real state store must be left exactly as it was found.
So writes land in a private overlay and are recorded as intents, reads consult
the overlay before the baseline, and the real backing store is never handed to
the run at all. The writer keeps a digest of the backing store taken at
construction so assert_backing_untouched can prove the claim rather than
assert it.
StateWriteIntent
dataclass
¶
A write the replacement would have performed. Never applied.
SuppressedStateWriter
dataclass
¶
SuppressedStateWriter(baseline: Mapping[str, Any] = dict(), backing: Mapping[str, Any] | None = None)
Copy-on-write overlay over a read-only baseline.
assert_backing_untouched ¶
Prove the replacement's real store is byte-identical to before.