One Flag Was Doing Two Jobs
The first version of the seal was keyed to the pipeline. A pipeline was either restricted or it was not, and a single flag both armed the guard and drove the after-the-fact gate that checks nothing was written.
Those are different questions. The gate asks did this run edit the source. The guard asks has this session read it. Once you see the difference, the flag is obviously overloaded — and the cost of the overload was that three pipelines ran their most sensitive stage with no guard at all across more than a hundred delegations, while everyone believed the flag covered them.
The reason is worth following, because it is not carelessness. One of those pipelines has a late stage whose whole job is to reconcile facts across both languages, and reconciling means editing both — it writes the source, not merely reads it. So the pipeline could not carry the restricted flag, because the flag would have failed the write gate on work the contract requires. And since the flag was the only switch, the pipeline's earlier stage — which genuinely does forbid the source — inherited no guard. The fix was never to flip the flag; it was to stop asking one flag two questions.
Two Real Shapes, and Why Both Fall Out of One Rule
Replace the flag with a list: which stages close which inputs. Then arm the guard from the first restricted stage through the last, inclusive, and two different pipeline shapes appear on their own.
A repair pipeline restricts its early stages and opens the source at the end, so its sealed window is a prefix. A creation pipeline authors the source in the middle and only forbids it during the final cold pass, so its window is a suffix. Same rule, opposite shapes, no special cases in the code.
Inclusive, Because Context Is Cumulative
The window has to span from the first restricted stage to the last, covering everything in between — including stages that do not themselves restrict anything. A seal that lifted for a middle stage and came back down afterward would protect nothing, because whatever entered the working context during the gap is still sitting there when the restricted stage resumes. Contexts do not empty between stages, and any design that assumes they do is a design that only works on a whiteboard.