Skip to content
C.W.K.
Stream
Lesson 04 of 05 · published

Archive, Do Not Erase

~12 min · archive, history, referential-integrity, lifecycle

Level 0Cold Vessel
0 XP0/36 lessons0/12 achievements
0/100 XP to next level100 XP to go0% complete

Archive, Do Not Erase

A pipeline can stop accepting new work without ceasing to exist in history. Archive expresses exactly that state. It removes the row from normal compose choices, preserves its versions and descriptions, and lets every old delegation continue to resolve the name it recorded.

Deletion cannot express retirement. It says the identity never needs to be interpreted again. Once a brief, stage trail, review round, or landing record names the pipeline, that claim is false. Cascading the references away would make the database tidy by destroying the proof the workshop exists to keep.

Archive should be reversible only if product policy allows reuse of the same identity. Unarchiving is not harmless: the old name and evolved template may now mislead operators. A careful design either exposes an explicit restore with review or makes archival terminal and asks for a new row.

Presentation matters. Archived rows belong in history and administrative views, clearly marked and excluded from creation defaults. Hiding them everywhere makes old records look broken; showing them beside active rows without a state marker invites accidental reuse.

Retirement Is a State Transition

Model archive as a timestamped transition, not a boolean cosmetic toggle. The timestamp answers when new intake stopped, and the trail should record who requested it and which row version was retired.

Then test both directions of visibility: compose must exclude archived rows, while show and historical delegation views must still resolve them. A single list test cannot prove both promises.

Archive retires a choice without falsifying its past. Hide the row from new intake while keeping its versions, delegations, and landing receipts queryable. Operators can then explain why an old task used retired craft instead of encountering a hole where policy used to be.

Code

Archive while preserving historical identity·sql
UPDATE pipelines
SET archived_at = CURRENT_TIMESTAMP,
    updated_at = CURRENT_TIMESTAMP
WHERE name = 'weekly-audit'
  AND archived_at IS NULL;

SELECT name, version, archived_at
FROM pipelines
WHERE name = 'weekly-audit';

External links

Exercise

Specify archive behavior across compose, list, show, and historical delegation views. Write one assertion for each surface.
Hint
At least one surface should exclude the row and at least one must continue resolving it.

Progress

Progress is local-only — sign in to sync across devices.
Spotted a bug or have feedback on this page?Report an Issue

Comments 0

🔔 Reply notifications (sign in)
Sign inPlease sign in to comment.

No comments yet — be the first.