fix(scenarios/major-upgrade): tolerate space after colon in gov REST status#352
Merged
Conversation
…status The gov v1beta1 REST endpoint returns pretty-printed JSON: "status": "PROPOSAL_STATUS_PASSED" (space after colon) The sed regex in wait-for-proposal-to-pass matched no-space form only: 's/.*"status":"\([A-Z_]*\)".*/\1/p' All 300 polling attempts returned empty STATUS → "unknown" even though the proposal had passed on-chain (verified by live curl post-mortem). Add [[:space:]]* to tolerate any whitespace between the colon and the opening quote. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
PR SummaryLow Risk Overview This prevents Reviewed by Cursor Bugbot for commit dfd227e. Bugbot is set up for automated code reviews on this repo. Configure here. |
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
wait-for-proposal-to-passpolls the gov v1beta1 REST endpoint and extracts the proposal status with sed:sed -n 's/.*"status":"\([A-Z_]*\)".*/\1/p'The API returns pretty-printed JSON with a space after the colon:
The regex matched the no-space form only, so
STATUSwas always empty and all 300 polling attempts returned "unknown" — even though the proposal had passed on-chain.Validated live on harbor against the running chain:
PROPOSAL_STATUS_PASSED✓One-character fix:
[[:space:]]*between the colon and the opening quote.Test plan
wait-for-proposal-to-passresolves toPROPOSAL_STATUS_PASSEDand the full upgrade sequence completes🤖 Generated with Claude Code