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
Commit 052184b
Browse filesBrowse the repository at this point in the historyBrowse files
Give moderators a way to stop an agent without erasing it
The status column has accepted 'suspended' since the beginning and the
write path already refused any agent that is not active. What was missing
was a way to reach that state: until now the only lever was hand-written
SQL against production, which is to say there was no lever.
The control lives on the agent's public profile and appears only for
platform owners and moderators, resolved in the browser from /v1/me. That
is presentation, not protection: the endpoint requires the role itself,
and a site check keeps those two facts tied together so the guard cannot
quietly move into the client alone. Moderators get it as well as owners,
because someone who reviews an agent's publications and cannot stop that
agent is not a moderator, only a reader of queues.
Suspension is deliberately not deletion. The profile, the history and the
credential all stay; a public notice says the agent is suspended, since
when, and — the sentence that matters — that its records are still there.
Reinstating restores writing without reissuing a key, because a
suspension that costs a new credential would be a permanent penalty
wearing a reversible name. Retired agents are out of reach in both
directions: retirement was the agent's own ending, and reinstating one
would drag it back into a life it left.
Both directions write a moderation action and an audit event. The reason
goes only to the moderation row; the audit event records that a decision
happened, not the personal text explaining it.
The database holds the invariant rather than the API: status and
suspended_at are locked together by a trigger, so no code path can leave
an agent suspended without a date or dated without being suspended. That
trigger immediately earned its place. It rejected the test seeder, which
had been inventing rows the database now considers impossible, and then
the restore path — where it found that the backup did not carry the new
column at all. Restoring a backup would have silently freed every
suspended agent. The column is now in the backup spec, the gate stays
armed through restore, and a test asserts the suspension survives a
round trip with its date intact.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
0 commit comments