idip stewards: a refused steward rotation (the 502 rotation_unavailable, and the 409) writes no journal line #1981
Labels
No labels
agent-blocked
agent-working
autopilot
bug
deferred
deploy-pending
enhancement
landing-pr
model-haiku
model-opus
model-sonnet
needs-design
needs-info
needs-triage
no-triage
out-of-scope
priority
ready-for-agent
ready-for-human
ready-for-session
rehearsal-183
snapshot-pending
standing-drive
wayfinder:grilling
wayfinder:map
wayfinder:prototype
wayfinder:research
wayfinder:task
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Matou/idss#1981
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Symptom
On the Whakatōhea Demo (2026-09-28, 22:40:40Z and 22:40:45Z),
POST /api/v1/idip/stewards/rotationanswered 502 twice and the control-plane journal carried no line for either — the operator had no way to see why. Seen while diagnosing #1979.Cause (traced offline, not the live root cause)
The rotation route refuses in two shapes and logs neither:
internal/controlapi/idip_stewards.gologslog.Info("idip steward-set rotation started", ...)only on success. On a refused start/co-sign/cancel it callswriteRotationError, which words akeriawire.ErrConflictas 409 and everything else as 502rotation_unavailable— with no log line.writeProblem→writeJSON(internal/controlapi/backups.go:362) does not log at 4xx/5xx (only on a marshal error).rotationConflictOf(internal/keria/adapter.go:1154), so a 502 is always a genuine store/engine failure (keria agent unreachable, or a mint that failed) — precisely the case an operator most needs a journal line for.The live 502 root cause is undiagnosed (needs the demo's control-plane logs / a repro); this ticket is only about closing the observability gap so the next 502 says why.
What to build
Log every refused rotation act with its reason, the same way #1962 landed "a refused sign-in logs WHY" — one line per refused start/co-sign/cancel naming the route, the direction/member where relevant, the HTTP status and the underlying error, at the level the failure warrants (a 502 store/engine failure at Error, a 409 conflict at Info/Warn). No secret material in the line.
Proof
Red-first at the
internal/controlapirotation seam: a start whose store returns a non-conflict error emits an Error line naming the reason and answers 502; a conflict emits its line and answers 409; success is unchanged. Offline, revertible.Related
#1979 (where this was seen), #1962 (the sign-in-refusal precedent), ADR 0197.
Close-report — advances #1981 (landed)
What landed: every refused steward-set rotation act now writes ONE journal line saying WHY, closing the observability gap behind the silent 502s on Whakatōhea Demo. Following the #1962 sign-in-refusal precedent,
writeRotationError(internal/controlapi/idip_stewards.go) emits one line per refused start / co-sign / cancel (and the GET read) naming the act, the HTTP status and the underlying reason, plus the direction/member/steward where relevant:rotationConflictOfmaps every KNOWN refusal to 409, so a 502 is always a genuine store/engine failure;No secret material is logged — only the same non-secret fields the existing success line already carries.
Proof (red-first, at the
internal/controlapirotation seam,idip_stewards_test.go):TestStewardRotation_StoreFailureLogsAndReturns502— a start over a down store emits an Error line naming the reason/act/direction/member and answers 502;TestStewardRotation_ConflictLogsAndReturns409— a second rotation while one waits emits a Warn line and answers 409;TestStewardRotation_CosignAndCancelFailuresLog— co-sign and cancel failures each log their own act at Error/502;TestStewardRotation_SuccessLogsNoRefusal— a successful start logs no refusal line (success unchanged).All four fail on
mainand pass after the fix. Fullinternal/controlapisuite +go build ./...+go vetclean; offline, revertible.Commit:
2ac01fb954060935a05a65f1168cb4c3adf0f1a4(onmain). STATUS.md updated in the same commit.Note on the live root cause: this ticket only closes the observability gap. The demo's live 502 root cause remains undiagnosed — the next 502 will now say why in the control-plane journal (referred back to #1979).
Ruled by agent under ADR 0174 — two-way (revertible code, proven by the offline seam) — veto anytime.