Skip to content

Fix governance feed and IPv6 masternode search#27

Merged
sidhujag merged 2 commits intomainfrom
fix/govlist-mnsearch-edge-cases
May 1, 2026
Merged

Fix governance feed and IPv6 masternode search#27
sidhujag merged 2 commits intomainfrom
fix/govlist-mnsearch-edge-cases

Conversation

@sidhujag
Copy link
Copy Markdown
Member

@sidhujag sidhujag commented May 1, 2026

Summary

  • Skip malformed governance DataString entries so one bad object does not fail /govlist.
  • Preserve IPv6 hosts in /mnsearch so exact IPv6 searches do not collapse to the first hextet.
  • Add route regressions for both cases.

Fixes #25.
Fixes #26.

Test plan

  • npm test -- --runInBand tests/governance.routes.test.js tests/mnSearch.routes.test.js
  • npm test -- --runInBand

Made with Cursor

Skip malformed governance objects instead of failing the public feed, and preserve IPv6 host searches so exact lookups do not over-match unrelated nodes.

Co-authored-by: Cursor <cursoragent@cursor.com>
@sidhujag
Copy link
Copy Markdown
Member Author

sidhujag commented May 1, 2026

@codex review

1 similar comment
@sidhujag
Copy link
Copy Markdown
Member Author

sidhujag commented May 1, 2026

@codex review

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 642453a4ef

ℹ️ 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".

Comment thread routes/mnSearch.js
const search = (req.body.search || "").replace(/ /g, "");

const query = search.includes(":") ? search.split(":")[0] : search;
const query = endpointHost(search);
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Strip unbracketed IPv6 port from search query

When a user searches with an unbracketed IPv6 endpoint that includes a port (for example, copy/pasting 2001:db8::1:18370 from the address column), query keeps the port while each masternode address is normalized with stripUnbracketedIpv6Port: true, so the exact IPv6 comparison can never match. This makes valid IPv6 entries unsearchable in that common input path; normalize the query with the same port-stripping rule (or compare endpoint-to-endpoint consistently) before the addressHost === query check.

Useful? React with 👍 / 👎.

Accept copied unbracketed IPv6 endpoints with ports while keeping exact host matching for IPv6 searches.

Co-authored-by: Cursor <cursoragent@cursor.com>
@sidhujag
Copy link
Copy Markdown
Member Author

sidhujag commented May 1, 2026

@codex review

@sidhujag
Copy link
Copy Markdown
Member Author

sidhujag commented May 1, 2026

Fixed the previous IPv6 endpoint feedback in e38f356. @codex review

@chatgpt-codex-connector
Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Keep it up!

ℹ️ 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".

@sidhujag sidhujag merged commit 999b9df into main May 1, 2026
8 checks passed
@sidhujag sidhujag deleted the fix/govlist-mnsearch-edge-cases branch May 1, 2026 23:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant