Skip to content

Append-Only Pass

Show the smallest passing model for a resource, component grant, function, and complete effect summary. The function emits only an effect the component grants, and that effect is allowed by the resource trait.

Matches fixtures/pass/append_only_append/audit.shape:

module audit
resource AuditEvent : AppendOnly
component AuditStore {
owns AuditEvent
grants Append<AuditEvent>
fn appendEvent
effects complete {
Append<AuditEvent>
}
}

AppendOnly comes from the standard prelude. It allows Append and forbids final destructive effects such as HardDelete.

Save the model (for example shape/audit.shape) and run:

Terminal window
shp check shape/audit.shape

In this repository the same model is the pass fixture:

Terminal window
shp check fixtures/pass/append_only_append/audit.shape
Shape check passed.
  • AuditStore grants Append<AuditEvent>.
  • appendEvent declares a complete summary that emits only that granted effect.
  • No final forbid applies to Append.