Phase 2: State Lattice
The Context
Once the ShadowFilesystem generates a MutationResult, we need a Rules Engine to enforce boundaries on that result. If the simulated mutation violates an invariant, the action is blocked before it ever executes.
Tasks
Part of Epic #651
Phase 2: State Lattice
The Context
Once the
ShadowFilesystemgenerates aMutationResult, we need a Rules Engine to enforce boundaries on that result. If the simulated mutation violates an invariant, the action is blocked before it ever executes.Tasks
StateInvariantstruct/class containing a name, a severity level, and a lambda/function for the check logic.StateCheckerengine that loops through registered invariants and evaluates theMutationResult.critical_paths_immutable: Rejects mutations affecting/etc,/var,~/.ssh, etc.max_file_deletion: Limits how many files can be deleted in a single action block.Part of Epic #651