Append-Only Pass
Intent
Section titled “Intent”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.
Expected result
Section titled “Expected result”Save the model (for example shape/audit.shape) and run:
shp check shape/audit.shapeIn this repository the same model is the pass fixture:
shp check fixtures/pass/append_only_append/audit.shapeShape check passed.Why it passes
Section titled “Why it passes”AuditStoregrantsAppend<AuditEvent>.appendEventdeclares a complete summary that emits only that granted effect.- No final forbid applies to
Append.