Skip to content

Refactor-Sensitive Function

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.

Terminal window
shp check fixtures/pass/memory_guard_refactor_constraint_unknown/audit.shape
Shape check passed.

List recorded memory with:

Terminal window
shp memory fixtures/pass/memory_guard_refactor_constraint_unknown/audit.shape
Memory Guards
fn BridgePoller.pollAttestation
memory BridgePollingDelayConstraint
type: RefactorConstraint
status: Unexplained
confidence: High
owner: BridgeTeam
  • Prelude trait RefactorSensitive requires RefactorConstraint satisfied by memory.
  • The memory type target and applies_to both name fn BridgePoller.pollAttestation.
  • No guarded change is present, so reevaluation is not required.