docs: design for graceful upgrade-halt contract#8
Merged
Conversation
Adds a first-draft issue + design under docs/upgrade-shutdown-contract/ covering an exit-code and HaltIntent contract for seid expected halts (operator-action-required vs genuine crash). Captures the cross-repo coordination story (sei-config = contract, sei-chain = producer, sei-k8s-controller = consumer) and the explicit case for a dedicated /halt_intent route over extending /status. No code yet — first draft for review and iteration. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
bdchatham
commented
Apr 26, 2026
Previous draft recommended a dedicated /halt_intent route on failure-domain-isolation grounds. PR review pushed back: the "monitoring fleet polling /status" premise doesn't hold for Sei's actual stack. Audit confirmed: every /status consumer in the workspace is integration tests or thin orchestration (sei-tendermint/rpc/test/helpers.go, sei-cosmos/contrib/localnet_liveness.sh, networks/remote/integration.sh, autobahn explicitly avoids it). No production code in seid polls /status. No Prometheus/Grafana/Tenderduty config in workspace. Cosmovisor scans stderr. What's left of the failure-isolation concern is defensive programming — solvable with defer recover() in the /status handler's halt-intent population path, not requiring a separate endpoint. Updated: - Architecture (Tier 1) describes the field, not the route - Decision section rewritten with the audit findings and concession - Endpoint section retitled and rewritten to describe the field - Cross-repo coordination updated - ISSUE.md scope line updated Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This was referenced Apr 26, 2026
Collaborator
Author
|
Merge gate satisfied. Follow-up tracking issues filed:
Both reference back to #9 (this contract issue) and the design doc in this PR. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
First-draft issue + design under
docs/upgrade-shutdown-contract/for a graceful, distinguishable shutdown signal when seid hits an upgrade-required halt condition. Today this is a Gopanic()(three sites insei-cosmos/x/upgrade/abci.go), indistinguishable to any process supervisor from a genuine crash. The proposal:ShutdownReasonenum, exit-code constants (70/71/72), a typedHaltIntentstruct, and aParseExitCodehelper. ~30-50 lines plus a unit test./halt_intent(Tier 1, sidecar-optional); a future controller-side sidecar exposes an opinionated aggregated/status(Tier 2, not in scope).No code in this PR — first draft for review and iteration. The producer (sei-chain) and consumer (sei-k8s-controller) changes ship as follow-ups. This PR captures the contract shape and the coordination story.
Files
docs/upgrade-shutdown-contract/ISSUE.md— problem statement, customer/JTBD, scope, done criteria, placement caveat.docs/upgrade-shutdown-contract/DESIGN.md— full design with goals, two-tier architecture, the endpoint-placement decision, sei-config surface, producer-side sketch, open questions, cross-repo coordination.Test plan
UpgradeInforeader, nohalt-intent.json, no termination-log JSON)🤖 Generated with Claude Code