Skip to content

Global Model Update

A source change that adds a material effect should be reflected in the global Shape model.

Before:

module audit
resource AuditEvent : AppendOnly
component AuditStore {
owns AuditEvent
grants Append<AuditEvent>
}

After:

module audit
resource AuditEvent : AppendOnly
component AuditStore {
owns AuditEvent
grants Append<AuditEvent>
grants HardDelete<AuditEvent>
fn purgeOldEvents
source ts("src/audit/purge.ts#purgeOldEvents")
effects complete {
HardDelete<AuditEvent>
evidence ts("src/audit/purge.ts:12-16")
}
}

Because AuditEvent is append-only, this global model update fails for the right reason: the declared HardDelete<AuditEvent> effect violates the final forbid.