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
Admin authority over patches and the deactivation of an owner #233
What may an admin do to a patch they do not own, and what happens to a user's patches when they are deactivated?
Settled in charting: admins see every patch; admins can reassign an owner, retire company patches and change a patch's scope; a deactivated owner's patches keep serving and show "owner deactivated"; ownership is preserved for attribution and reactivation. Allison: "there's more nuance here but that is for the actual grilling session about this."
Settle: the exact admin action set against the owner's (publish stays owner-only, since it needs the repo); reassignment's effect on the old owner's repo, patchy.json and any saved publish attempt; whether the last active admin rule has a patch analogue; the deactivation flow: what the admin is told (the user's patches, which other patches depend on them through shared tables), what "deactivate their patches too" does, and what happens on reactivation; what a member sees of admin-only state; audit: whether admin actions on a patch are logged like mutations.
Two grilling rounds with Allison on 2026-09-12, with an astra pass before the first round. Framing from Allison: admin is an elevated role with company-wide controls; admins own their own patches like anyone; admins manage every patch but never publish one they do not own.
The admin action set
Every owner action on any patch in the company, except publish: retire, delete, restore, rollback, change sharing, reassign the owner, edit the description. Publish stays owner-only because it needs the repo. Company controls admins already hold (invites, roles, deactivation, reactivation, connections) are unchanged and integrations stay admin-only; granting an integration to a patch identity is tier 2, not this map.
Reassignment: target is any active user in the company, the acting admin included, never a deactivated user. Per-version attribution is untouched (each version row already records its publisher). No notification beyond the portal state; there is no mail.
An admin can take a patch over by reassigning it to themself and publishing from the repo. Owner-only publish is accountability (one named person behind every version), not a boundary against admins; the docs say so.
Last-active-admin rule has no patch analogue. A patch always has an owner, possibly deactivated. Nothing must be reassigned before a deactivation.
The old owner's agent
After a reassignment the old repo still names the patch in patchy.json. A publish from a same-company member who is not the owner is refused with a stable ownership error naming the current owner ("this patch belongs to Sam; ask them or an admin to reassign it"). The saved attempt is forgotten (definitive), the patch id stays in patchy.json, and the message never suggests creating a new patch, which today's 404 path does and would fork the tool. Other companies keep the 404 that confirms nothing.
The server checks ownership when the version commits, atomically with the update, so a publish authorized before a reassignment cannot land after it.
Vocabulary
Retire is the only shelf state for a patch. "Deactivate" is the user's word, "disable" the operator's takedown. Allison's "deactivate a patch" reads as retire everywhere on this map.
The deactivation page offers three choices for the user's live patches: leave them all, retire selected, retire all. Two steps on plain forms:
Pick page: each live patch with a checkbox and a static badge listing its live dependants (patch name and owner), the user's own marked as theirs. Already retired or deleted patches are shown but not selectable.
Confirmation page: recomputed for the exact selection. Lists what breaks: every live dependant not itself in the selection, whichever owner it has. A chain inside the user's own patches retired together shows no breakage; a dependant owned by someone else always does. Acknowledgement per the lifecycle ticket; if nothing breaks it says so and confirms. "Retire all" is the same page with everything selected and always confirms.
Deactivation and the selected retires commit in one transaction. Each retire is the ordinary retire: actor the admin, no special reason, consumers denied on next read.
Bulk retire lives only in the deactivation flow. Later cleanup is per patch from the patch page; no multi-select on the list.
Reactivating a user
Access back, fresh machine tokens required, as today. The owner-deactivated mark lifts on patches the user still owns; reassigned patches stay reassigned; retired or deleted patches stay so.
The reactivation page mirrors deactivation: the user's retired patches, however they were retired, with leave them, restore selected, restore all, then a confirmation page.
Amendment to the lifecycle ticket (The patch lifecycle: retire, restore, delete with a recovery window, rollback #232): restore warns like delete when the restored patch's own declared sources are retired, deleted or gone, since the patch comes back broken. The warning lists those sources and asks for the same acknowledgement; in the CLI patchy restore refuses with the list and proceeds with --force. This applies to single restore on the patch page and in the CLI, not just the reactivation page. The lifecycle ticket's "no new refusals" for rollback stands; this is restore only.
What members see, and audit
Members see resulting state, not intervening acts: the current owner, the owner-deactivated mark, and the actor on the retired and deleted notices. No "reassigned by" and no history on the page.
Actor columns only (retired by, deleted by, reassigned by and when) for now; proper logging and auditability come later. Known gap, not a future: history is lost when a row is reclaimed and only the last reassignment is kept.
The spec (Write the deployed-stage spec and file the build tickets #242) carries the ownership refusal into the CLI contract (ADR-0004) and the docs, the admin action set into docs/product.md (replacing "admin status grants no extra patch-management permission"), and the restore warning into the lifecycle section.
Activity
allisonmahmood commentedon Sep 12, 2026
Resolution
Two grilling rounds with Allison on 2026-09-12, with an astra pass before the first round. Framing from Allison: admin is an elevated role with company-wide controls; admins own their own patches like anyone; admins manage every patch but never publish one they do not own.
The admin action set
The old owner's agent
patchy.json. A publish from a same-company member who is not the owner is refused with a stable ownership error naming the current owner ("this patch belongs to Sam; ask them or an admin to reassign it"). The saved attempt is forgotten (definitive), the patch id stays inpatchy.json, and the message never suggests creating a new patch, which today's 404 path does and would fork the tool. Other companies keep the 404 that confirms nothing.Vocabulary
Deactivating a user
patchy listrows (Discovery for agents: patchy list and patchy inspect under the machine token #234), for members too. Their access and machine tokens stop, as today.Reactivating a user
patchy restorerefuses with the list and proceeds with--force. This applies to single restore on the patch page and in the CLI, not just the reactivation page. The lifecycle ticket's "no new refusals" for rollback stands; this is restore only.What members see, and audit
Carried to the mocks and the spec
docs/product.md(replacing "admin status grants no extra patch-management permission"), and the restore warning into the lifecycle section.