Repository navigation
feat(openbao): judge server health from captured evidence - #4964
Conversation
Kubernetes Ready accepts sealed and uninitialized OpenBao servers on purpose so bootstrap can reach them, so it cannot gate a server replacement. Add an offline judge that proves every expected server is initialized, unsealed and on the expected release, in one cluster with exactly one active server, from one strictly parsed, fresh capture. Definite findings exit 1 (HOLD); missing, duplicate, stale, partial or ambiguous evidence exits 2 (UNKNOWN) and outranks HOLD. The expected servers and release come only from arguments, and the output never echoes a health body or identity. The verdict states that health is not Raft quorum proof. The strict-JSON check moves from the ARC transport proof into internal/strictjson so both share one copy. Fixes #4962 Part of #4756 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
OpenBao's health response omits the cluster name and identity while a server is sealed or uninitialized (api/v2 HealthResponse marks them omitempty). Requiring the identity first turned those definite findings into UNKNOWN. Judge the seal and initialization state first, and make the test fixture mirror the real response shape. Part of #4962 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Part of #4962 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Validation at head
|
A local review round found three ways to reach a verdict the evidence did not support: - `-h`/`--help` exited 0 with nothing printed, which a caller gating on the exit code reads as PROVEN. Parse with ContinueOnError and make every parse error, help included, exit 2. - A repeated flag silently replaced the earlier value, so a trailing `--expect-servers openbao-0` narrowed the expected set to one server. Refuse any flag given twice. - Within one server, a definite finding was checked before the evidence that could make it UNKNOWN (missing HTTP status, empty cluster identity, failing status). Run every completeness check before the check it guards. Bind each health body to the capture: its own server_time_utc must fall inside the capture window, give or take a minute, so a fresh envelope cannot carry an old body. Make the escaped-key regressions contain a real escape; the earlier cases had been unescaped when written. Part of #4962 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Validation at head The internal review found three gaps at
Also new in this commit: each body's own
|
@codex review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
@coderabbitai review |
✅ Action performedReview finished.
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📜 Recent review details
📝 Walkthrough
Priority: ➖ Normal Severity of issue fixed: Medium Merge Risk: ⚪ Minimal · up to
|
Readiness at head
Promoting and queueing at this head. |
Merged. This PR went through the queue at 21:29 UTC as |
Why
OpenBao server upgrades are on hold because nothing can prove the secrets service is healthy before the next server is replaced. Kubernetes reports a sealed server as ready on purpose, for bootstrap, so its readiness cannot be that proof.
What
As the first step toward safe upgrades, add a tool that reads one captured health snapshot of every OpenBao server and changes nothing in production. It says "proven" only when each expected server is unsealed, initialized and on the expected release, in one cluster with exactly one active server. Missing, old or ambiguous evidence is never proven.
🤖 Generated with Claude Code
Fixes #4962
Part of #4756