Summary#
An erasure is proven the only way it can be: write a word nobody else would ever write into everything a person
gives you, erase them, and look for the word everywhere. Assert.NoTraceOf("zanzibar-quill") fails naming each
place it is still found — table Customer, column Name: 1 row(s), file receipts/O-1.pdf — so a missed copy is a
red test that says where it is.
Signature#
Assert.NoTraceOf(string token) // a [Test] onlyDescription#
Where it looks, enumerated from the platform's own registries rather than a list someone keeps: every text and JSON column the database reports for every table of the app (its own entities, every kit's and capability's — so the audit trail, memory, outboxes, translation storage and the model-call log too); every file in the app's path store; every stored file version, inline or in the blob store. The test's own pending writes are committed first.
What it excepts: a row kept restricted (restricted rows and purpose reads (Restriction, [PurposeRead])) — the copy an erasure kept on purpose, for a stated basis. Everything else is a trace.
What it cannot see, said plainly: a token inside compressed content (a PDF's streams, a zip), and anything a processor outside the platform holds (a mail provider's logs).
Assert.NoTraceOf is refused outside a [Test]: it reads every store the app keeps.
Examples#
app Notes { use Osysharp.Observability; } // the audit trail is on — and is searched too
entity Note {
[Required, MaxLength(40)] string Tag;
[Classification(Personal.Content), MaxLength(400)] string? Text; // so the trail never records it
security { allow read, create, update, delete when IsAuthenticated || IsAnonymous; }
}[Test]
void A_deleted_note_leaves_no_trace() {
var n = new Note { Tag = "a", Text = "zanzibar-quill" };
UnitOfWork.Commit();
n.Delete();
UnitOfWork.Commit();
Assert.NoTraceOf("zanzibar-quill");
}See also#
- Assert — the other assertions
- restricted rows and purpose reads (Restriction, [PurposeRead]) — the copies an erasure is allowed to keep
- File.WriteAllBytes(..., about: row) — making a path-written file findable by the row it renders