You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
The patch lifecycle: retire, restore, delete with a recovery window, rollback #232
What is the state model of a patch after publish, replacing today's 90-day expiry and no-restore owner delete? Absorbs #93.
Settle: the states (live, retired, deleted-recoverable, gone) and who moves a patch between them; the recovery window's length and what expiry of it frees; what retire does to the address, old links, numbered version URLs and the name (reserved or reusable); what happens to a patch's tables, files and stored bundles at each transition; what happens to other patches declaring its shared tables at each transition, and whether a transition is refused or warns when dependants exist; rollback as selecting a served version without touching data, cumulative provisioning or sharing; whether retire, restore, delete and rollback are CLI actions, portal actions or both, and what each shows in the portal; the existing disabled_at / disabled_reason and sweep machinery and what of it survives.
Every question carries product context, consequences and a recommendation.
Two grilling rounds with Allison on 2026-09-12, over the three research resolutions. Framing: Patchy Cloud is paid, so automatic expiry goes; companies need basic tools to manage their team's patches; bias toward not breaking things, with the actor choosing to break rather than the system breaking by default.
States and moves
Three states a person sees: live, retired, deleted. Gone is the sweep having run, not a state. Retire is the shelf: off indefinitely, storage kept and paid for, for a patch you may want back. Delete is the trash: off, reclaimed after the recovery window, there for the "I deleted the wrong thing" case.
Three moves: retire, delete, restore. Retire from live. Delete from live or retired. Restore from retired or deleted, always landing live (shelve it again if you want it retired).
Recovery window: 30 days from the delete, fixed, not per-company. When it runs out the sweep reclaims everything: row, versions, bundles, tables, files, the company-database namespace, and the names.
Names stay reserved until gone. Retire and delete free nothing, so restore always gets its address back. Rename redirects are untouched by retire and dropped at gone, as today.
The address of a retired or deleted patch shows a signed-in colleague a first-party notice (who, when, which state, days left if deleted) with a Restore action for the owner or an admin. Signed-out readers keep the login door; another company's members keep the 404. Numbered version URLs and the content URL follow the same rule.
Dependants
Off is off for everything. A retired or deleted patch's shared tables are denied to consumers on their next read, whole call, access_denied, their own rows untouched, exactly as delete does today. Restore brings consumers back automatically because declarations bind the patch id.
Warn, then it's on them. Retire, delete and a publish that flips a shared table to shared: false all show the live dependants by patch name and owner, and refuse unless the actor accepts the breakage. Portal: an acknowledgement. CLI: refuse with the list and an exit code, proceed with --force. The refusal text tells the agent to ask its user before forcing.
No clock on tables. Nothing is physically dropped by a publish today: an omitted table stays as an unused definition with its data, and older or rolled-back versions reach it. The only breaking act is unsharing, covered above.
Rollback
A pointer move to any retained version, in place, creating no new version; the next publish moves the pointer forward again. Never touches data, cumulative provisioning, sharing flags or the description, as the docs already promise.
No new refusals: a gone source shows as access_denied at runtime like any dead source; a retired wire shows the needs-rebuild door.
All versions are kept. No cap and no pruning; a prune setting can come later if storage ever matters.
Who and where
Owner on their own patches; admins on every patch in the company, for retire, delete, restore and rollback alike. Nuance comes with personal and team patches later.
CLI is for owners: patchy retire, patchy delete, patchy restore, patchy rollback <n>, resolving the patch from patchy.json or --patch <id>, with --json and exit codes per ADR-0004, --yes on delete, --force where dependants exist. Admin actions live in the portal only.
Portal: the same four on the patch's management page. Delete asks the actor to type the patch name.
Drop expires_at and the retention-clock top-ups, and every expiry mirror the research listed.
deleted_at becomes the recovery clock (gone at deleted_at + 30 days). Add retired_at with an actor.
disabled_at / disabled_reason stay as the operator's takedown: never owner-restorable, the abuse lever a paid service still needs. Glossary unchanged: disable is the operator's word.
The expiry sweep becomes the deletion sweep: reclaims rows past the window and orphaned content, nothing else.
Doc lines this contradicts
Everything under "What a retire / restore / delete / rollback model contradicts" in the repo research (#236): the no-restore delete, in-transaction name freeing, expiry and its mirrors, the welcome-patch wording, and the CLI contract gaining four verbs. The spec ticket (#242) carries them into docs/product.md, packages/patches/CONTEXT.md, ADR-0003, ADR-0004 and ADR-0009.
Amended by Admin authority over patches and the deactivation of an owner: restore warns like delete when the restored patch's own declared sources are retired, deleted or gone, on the patch page and in the CLI (patchy restore refuses with the list, proceeds with --force). Rollback's "no new refusals" stands.
Activity
allisonmahmood commentedon Sep 12, 2026
Resolution
Two grilling rounds with Allison on 2026-09-12, over the three research resolutions. Framing: Patchy Cloud is paid, so automatic expiry goes; companies need basic tools to manage their team's patches; bias toward not breaking things, with the actor choosing to break rather than the system breaking by default.
States and moves
Dependants
access_denied, their own rows untouched, exactly as delete does today. Restore brings consumers back automatically because declarations bind the patch id.shared: falseall show the live dependants by patch name and owner, and refuse unless the actor accepts the breakage. Portal: an acknowledgement. CLI: refuse with the list and an exit code, proceed with--force. The refusal text tells the agent to ask its user before forcing.Rollback
access_deniedat runtime like any dead source; a retired wire shows the needs-rebuild door.Who and where
patchy retire,patchy delete,patchy restore,patchy rollback <n>, resolving the patch frompatchy.jsonor--patch <id>, with--jsonand exit codes per ADR-0004,--yeson delete,--forcewhere dependants exist. Admin actions live in the portal only.--allin the CLI. Every row carriesstateand its timestamp in JSON (for Discovery for agents: patchy list and patchy inspect under the machine token #234).Schema and machinery
expires_atand the retention-clock top-ups, and every expiry mirror the research listed.deleted_atbecomes the recovery clock (gone atdeleted_at+ 30 days). Addretired_atwith an actor.disabled_at/disabled_reasonstay as the operator's takedown: never owner-restorable, the abuse lever a paid service still needs. Glossary unchanged: disable is the operator's word.Doc lines this contradicts
Everything under "What a retire / restore / delete / rollback model contradicts" in the repo research (#236): the no-restore delete, in-transaction name freeing, expiry and its mirrors, the welcome-patch wording, and the CLI contract gaining four verbs. The spec ticket (#242) carries them into
docs/product.md,packages/patches/CONTEXT.md, ADR-0003, ADR-0004 and ADR-0009.allisonmahmood commentedon Sep 12, 2026
Amended by Admin authority over patches and the deactivation of an owner: restore warns like delete when the restored patch's own declared sources are retired, deleted or gone, on the patch page and in the CLI (
patchy restorerefuses with the list, proceeds with--force). Rollback's "no new refusals" stands.