feat(rotation): 90-day policy, due runs wait for owner approval (CLI 0.16.0) (#270)

Every automatic secret older than the team's max age (90 days default) is
queued as one run in awaiting-approval. An owner/admin approves it on the
Rotation page or with `teams rotation-approve`; machine keys can queue but
never approve. logicsrc-rotate --queue (*/5 cron) runs approved runs with
propagate + health checks + rollback. rotation_auto_approve per team is the
paid automatic rotation add-on (off by default).

Co-authored-by: Anthony Ettinger <anthony@profullstack.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
sh1pt-actions-fleet[bot] 2026-10-29 04:36:26 +00:00 • committed by GitHub
parent 87bbc50423
commit 0f237cb6e0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 407 additions and 24 deletions

View file

@ -172,8 +172,10 @@ export interface RemoteRotationRun {
project: string | null;
env: string | null;
approve: boolean;
options: { desktop?: string; propagate?: boolean; allowRoll?: boolean };
options: { desktop?: string; propagate?: boolean; allowRoll?: boolean; due?: boolean; maxAgeDays?: number };
status: string;
due?: boolean;
approvedBy?: string | null;
createdAt: number;
summary: string | null;
}
@ -311,6 +313,13 @@ export class TeamClient {
queueRotationRun(slug: string, body: { keys: string[]; project?: string; env?: string; approve?: boolean; desktop?: string; propagate?: boolean; allowRoll?: boolean }) {
return this.request<{ run: RemoteRotationRun }>("POST", `/teams/${encodeURIComponent(slug)}/rotation/runs`, body);
}
/** Queue every automatic key past the team's max age (90 days by default) as one run awaiting approval. */
queueDueRotation(slug: string) {
return this.request<{ run: RemoteRotationRun | null; created: boolean; due: number; maxAgeDays: number; approveUrl: string }>("POST", `/teams/${encodeURIComponent(slug)}/rotation/due`);
}
approveRotationRun(slug: string, id: string) {
return this.request<{ run: RemoteRotationRun }>("POST", `/teams/${encodeURIComponent(slug)}/rotation/runs/${encodeURIComponent(id)}/approve`);
}
claimRotationRun(slug: string, id: string) {
return this.request<{ run: RemoteRotationRun }>("POST", `/teams/${encodeURIComponent(slug)}/rotation/runs/${encodeURIComponent(id)}/claim`);
}