Skip to content

fix(scenarios/major-upgrade): tolerate space after colon in gov REST status#352

Merged
bdchatham merged 1 commit into
mainfrom
fix/gov-rest-status-regex
May 22, 2026
Merged

fix(scenarios/major-upgrade): tolerate space after colon in gov REST status#352
bdchatham merged 1 commit into
mainfrom
fix/gov-rest-status-regex

Conversation

@bdchatham
Copy link
Copy Markdown
Collaborator

@bdchatham bdchatham commented May 22, 2026

Summary

wait-for-proposal-to-pass polls 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:

"status": "PROPOSAL_STATUS_PASSED"

The regex matched the no-space form only, so STATUS was 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:

  • Old regex: empty (no match)
  • New regex: PROPOSAL_STATUS_PASSED

One-character fix: [[:space:]]* between the colon and the opening quote.

Test plan

  • Merge + ECR build → bump SCENARIO_REF + SEITASK_IMAGE on platform side
  • Re-fire major-upgrade; confirm wait-for-proposal-to-pass resolves to PROPOSAL_STATUS_PASSED and the full upgrade sequence completes

🤖 Generated with Claude Code

…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>
@cursor
Copy link
Copy Markdown

cursor Bot commented May 22, 2026

PR Summary

Low Risk
Low risk: a single regex tweak in a test workflow script to make proposal-status polling more tolerant of REST JSON formatting; no production logic changes.

Overview
Fixes the major-upgrade workflow’s wait-for-proposal-to-pass polling step to correctly parse proposal status from the gov v1beta1 REST response when the JSON contains whitespace after the colon (e.g., "status": "...").

This prevents STATUS from staying empty/unknown, allowing the workflow to reliably detect PROPOSAL_STATUS_PASSED and proceed.

Reviewed by Cursor Bugbot for commit dfd227e. Bugbot is set up for automated code reviews on this repo. Configure here.

@bdchatham bdchatham merged commit e0d0ec9 into main May 22, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant