Function: evaluateFsRequireReadBeforeWriteGuard()
ts
function evaluateFsRequireReadBeforeWriteGuard(
_node,
input,
ctx
): PolicyGuardEvaluationResult;Defined in: fs/src/executors/fs-write-guard-executors.ts:52
Evaluates an FsRequireReadBeforeWriteGuardNode (fs:require-read-before-write) (SPEC.md §4.3).
Rejects mutating any file that existed at baseRef unless ctx.observedEffects contains a prior read effect for that path in the current session.
Parameters
| Parameter | Type | Description |
|---|---|---|
_node | FsRequireReadBeforeWriteGuardNode | Read-before-write guard AST node. |
input | PolicyGuardEvaluationInput | Tool name, proposed effects, and active leases. |
ctx | StepExecutionContext<unknown> | Step execution context providing observedEffects. |
Returns
Guard evaluation result and projected violatedEffects.