Skip to content

fix: include chains in /status when sync_state is empty#164

Merged
o-az merged 2 commits intomainfrom
o-az/fix-status-endpoint
Apr 7, 2026
Merged

fix: include chains in /status when sync_state is empty#164
o-az merged 2 commits intomainfrom
o-az/fix-status-endpoint

Conversation

@o-az
Copy link
Copy Markdown
Member

@o-az o-az commented Apr 6, 2026

Fixes /status returning an empty chains array when the API-visible database has no sync_state rows for configured chains.

Before this change, the endpoint built chains exclusively from sync_state, so it could return ok, version, and rev while omitting all configured chains. That showed up in production even though normal /query requests for both chain IDs still worked.

This updates the handler to fall back to the configured pool map and emit a placeholder status entry for each configured chain when sync_state is empty or unavailable. That keeps the response shape stable and ensures /status reflects configured chains instead of silently dropping them.

Also adds a regression test covering the previously-missed case: empty sync_state, configured chain still present in /status. Existing seeded-path /status integration coverage still passes.

chatgpt-codex-connector[bot]

This comment was marked as resolved.

@o-az
Copy link
Copy Markdown
Member Author

o-az commented Apr 7, 2026

@codex review

@chatgpt-codex-connector
Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Swish!

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@o-az o-az merged commit b6ec088 into main Apr 7, 2026
3 checks passed
@o-az o-az deleted the o-az/fix-status-endpoint branch April 7, 2026 11:22
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.

2 participants