On stage, staff picked "Apply" (set status) with trial selected on a trial tenant, instead of "Extend". The registry wrote an update, a tenant.status_changed audit entry (trial → trial) and a Keycloak sync. The audit log showed an entry, but nothing had changed.
Change:POST /v1/tenants/{id}/status with the tenant's current status answers 200 with the unchanged tenant: no write, no audit entry, no Keycloak sync. The call stays idempotent for scripts. Other transitions are unchanged.
Test:TestSetStatus_unchangedIsNoOp (memory and Postgres) checks 200 and that no audit entry is added. It fails without the fix ("audit entries: 1, want 0"). go vet and go test -short ./... pass locally; the full Postgres suite runs in CI.
Companion: the portal staff page greys out "Apply" until a different status is chosen (separate portal PR).
On stage, staff picked "Apply" (set status) with `trial` selected on a trial tenant, instead of "Extend". The registry wrote an update, a `tenant.status_changed` audit entry (`trial` → `trial`) and a Keycloak sync. The audit log showed an entry, but nothing had changed.
**Change:** `POST /v1/tenants/{id}/status` with the tenant's current status answers 200 with the unchanged tenant: no write, no audit entry, no Keycloak sync. The call stays idempotent for scripts. Other transitions are unchanged.
**Test:** `TestSetStatus_unchangedIsNoOp` (memory and Postgres) checks 200 and that no audit entry is added. It fails without the fix ("audit entries: 1, want 0"). `go vet` and `go test -short ./...` pass locally; the full Postgres suite runs in CI.
Companion: the portal staff page greys out "Apply" until a different status is chosen (separate portal PR).
🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_01DmXxNULoSNPvjF7buKipsB
POST /v1/tenants/{id}/status with the status the tenant already has wrote
an update, a tenant.status_changed audit entry ("trial" → "trial") and a
Keycloak sync. Staff picking "Apply" instead of "Extend" on a trial then saw
an audit entry but no change. Now the call answers 200 with the unchanged
tenant and does nothing else, so repeating it stays harmless.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DmXxNULoSNPvjF7buKipsB
sharang
merged commit 310c438aea into main2026-10-14 11:09:30 +00:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
On stage, staff picked "Apply" (set status) with
trialselected on a trial tenant, instead of "Extend". The registry wrote an update, atenant.status_changedaudit entry (trial→trial) and a Keycloak sync. The audit log showed an entry, but nothing had changed.Change:
POST /v1/tenants/{id}/statuswith the tenant's current status answers 200 with the unchanged tenant: no write, no audit entry, no Keycloak sync. The call stays idempotent for scripts. Other transitions are unchanged.Test:
TestSetStatus_unchangedIsNoOp(memory and Postgres) checks 200 and that no audit entry is added. It fails without the fix ("audit entries: 1, want 0").go vetandgo test -short ./...pass locally; the full Postgres suite runs in CI.Companion: the portal staff page greys out "Apply" until a different status is chosen (separate portal PR).
🤖 Generated with Claude Code
https://claude.ai/code/session_01DmXxNULoSNPvjF7buKipsB
POST /v1/tenants/{id}/status with the status the tenant already has wrote an update, a tenant.status_changed audit entry ("trial" → "trial") and a Keycloak sync. Staff picking "Apply" instead of "Extend" on a trial then saw an audit entry but no change. Now the call answers 200 with the unchanged tenant and does nothing else, so repeating it stays harmless. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DmXxNULoSNPvjF7buKipsB