Decide what happens to linked records

Ashroot can block a deletion or include dependent rows in it. Follow a fixture that checks the outcome when two relationship paths reach the same row.

Give each relationship a deletion rule

Ashroot manages keys, indexes and relationships declared by an app. Its relationship fixture stores people, cars, passes and locks. A car belongs to a person. A pass points to that person and their car. Those relationships cascade on deletion, so when a person goes away their car and pass go with them. A lock on a pass restricts deletion because removing a locked pass would break a rule the app needs to keep.

Test what the caller will see

Delete the person while the lock exists and the nested restriction refuses the whole change. After the restriction is removed, two paths reach the same pass. The runner expects exactly three rows to be deleted, one person, one car and one pass. Separate cases exceed the configured row, edge and byte limits and check that each refusal leaves the data as it was.

The fixture uses an independent model to check primary rows, secondary indexes and relationships after operations. It also compares saved bytes around checked refusals and traps. The November 10 report records 12 passing lifecycle checks across 44 measured PocketIC updates, with 32 rows per table on both tested storage variants.

Write the rule into the app brief

Specify who owns each fact, which references must be valid, and which deletions should cascade, clear a nullable reference or stop. Give the team examples with shared dependencies and a fan-out large enough to hit the configured bounds. Include what callers can read after both success and refusal.

Code, tests, and related material