Refactor-Sensitive Function
Intent
Section titled “Intent”Show that RefactorSensitive on a function requires a matching RefactorConstraint memory for the same function target. Without that context, the checker reports missing required context.
Matches fixtures/pass/memory_guard_refactor_constraint_unknown/audit.shape:
module bridge
resource PolicySnapshot
component BridgePoller { owns PolicySnapshot grants Read<PolicySnapshot> fn pollAttestation : RefactorSensitive effects complete { Read<PolicySnapshot> }}
memory BridgePollingDelayConstraint : RefactorConstraint<fn BridgePoller.pollAttestation> { applies_to fn BridgePoller.pollAttestation status Unexplained confidence High summary "Previous attempts to lower this delay caused intermittent settlement failures." who { owner BridgeTeam }}status Unexplained keeps uncertainty explicit: the team records that the shape is refactor-sensitive even when the full explanation lives elsewhere.
Expected result
Section titled “Expected result”shp check fixtures/pass/memory_guard_refactor_constraint_unknown/audit.shapeShape check passed.List recorded memory with:
shp memory fixtures/pass/memory_guard_refactor_constraint_unknown/audit.shapeMemory Guards
fn BridgePoller.pollAttestation memory BridgePollingDelayConstraint type: RefactorConstraint status: Unexplained confidence: High owner: BridgeTeamWhy it passes
Section titled “Why it passes”- Prelude trait
RefactorSensitiverequiresRefactorConstraintsatisfied by memory. - The memory type target and
applies_toboth namefn BridgePoller.pollAttestation. - No guarded change is present, so reevaluation is not required.