Skip to content

fix(dashmate): stop the GitHub release lookup throwing and validate its version - #5653

Merged
shumkov merged 1 commit into
v5.1-devfrom
fix/dashmate/release-lookup
Oct 30, 2026
Merged

shumkov merged 1 commit into
v5.1-devfrom
fix/dashmate/release-lookup

Conversation

@shumkov

@shumkov shumkov commented Oct 29, 2026 •

Copy link
Copy Markdown
Collaborator

Issue being fixed or feature implemented

dashmate status looks up the latest Dash Core release on GitHub, and that lookup throws on almost any network failure. It caught node-fetch's error names, but dashmate runs on Node's native fetch, which rejects with TypeError('fetch failed') and a TimeoutError DOMException. Neither matched, so the lookup's null branch was unreachable. It also stripped one character from tag_name unconditionally, mangling any tag without a v prefix.

Split out of #4283, where it was reviewed.

What was done?

packages/dashmate/src/status/providers.js:

  • A failed request returns unknown instead of throwing.
  • The response size cap is enforced while the body is read, not only from content-length.
  • A version is returned only when the tag is valid semver. This keeps package-manager specifiers and terminal control sequences out of a value that callers act on.
  • Remote text that reaches the DEBUG diagnostics is stripped of control, zero-width and bidi characters (the Arabic letter mark included) and bounded in length.

How Has This Been Tested?

Breaking Changes

None.

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or updated relevant unit/integration/functional/e2e tests
  • I have added "!" to the title and described breaking changes in the corresponding section if my code contains any
  • I have made corresponding changes to the documentation if needed

For repository code-owners and collaborators only

  • I have assigned this pull request to a milestone

🤖 Generated with Claude Code

PR Hygiene · dc05e4e

  • Bots — thepastaclaw ✓
  • Self-review — post /self-reviewed
  • Build green
  • Approvals — you own every area touched; none needed

When every merge requirement is met, the PR Hygiene check passes. Reviewer limits do not block merging; other required GitHub checks and protections still apply.

…ts version

The lookup caught node-fetch's error names, but dashmate runs on Node's
native fetch, which rejects with `TypeError('fetch failed')` and a
`TimeoutError` DOMException. Neither matched, so its `null` branch was
unreachable and a network failure threw out of `dashmate status`. It
also stripped one character from `tag_name` unconditionally, mangling
any tag without a `v` prefix.

The lookup now returns unknown instead of throwing, enforces its
declared response size cap while reading the body, and returns a
version only when the tag is valid semver, which keeps package-manager
specifiers and terminal control sequences out of a value callers act
on. Remote text that reaches its DEBUG diagnostics is stripped of
control, zero-width and bidi characters, the Arabic letter mark
included, and bounded in length.

Moved out of #4283, where it was written test-first and reviewed.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@shumkov shumkov added this to the v5.1.0 milestone Oct 29, 2026
@coderabbitai

coderabbitai Bot commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 55 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration
Commits

Reviewing files that changed from the base of the PR and between 03945d3 and dc05e4e.

Files selected for processing: 2
  • packages/dashmate/src/status/providers.js
  • packages/dashmate/test/unit/status/providers.spec.js
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@shumkov

shumkov commented Oct 29, 2026

Copy link
Copy Markdown
Collaborator Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor
⚠️ Action not completed

Review rate limited.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@github-actions

github-actions Bot commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Waiting for bot review — thepastaclaw not yet. Wait for the missing reviews, or a writer can post /skip-bots to proceed without them; blocking findings still need addressing.
Full checklist in the description.

@github-actions github-actions Bot added the waiting-bots Waiting for the review bots to report on this head label Oct 29, 2026
@thepastaclaw

thepastaclaw commented Oct 29, 2026 •

Copy link
Copy Markdown
Collaborator

✅ Final review complete — no blockers (commit dc05e4e) · triage: normal

@thepastaclaw thepastaclaw left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Final validation — Phase 1 + Phase 2

The PR correctly hardens dashmate's remote status providers. Network and response-body failures are converted to unknown results, response sizes are bounded, release tags are validated and normalized, and diagnostic output is sanitized; callers already handle nullable provider results safely. No in-scope defects were found. Dashmate lint and unit checks were still pending in the supplied CI snapshot, with no failed code checks.

Review provenance

Source: reviewer 1: muse-spark-1.3-contributor (agent: phase1-reviewer, role: general); reviewer 2: gpt-6.1-sol (agent: phase2-reviewer, role: general); reviewer 3: gpt-6.1-sol (agent: phase2-reviewer, role: architecture-layering); reviewer 4: gpt-6.1-sol (agent: phase2-reviewer, role: security-auditor); final verifier: gpt-6.1-sol (agent: sol-verifier, role: final-verifier)

  • Triage: normal by gpt-6.1-sol (effort low) — This is a contained but nontrivial behavioral change to network failure handling, response-size enforcement, semantic-version validation, and diagnostic sanitization in dashmate, with a substantial test expansion.
  • Phase 1 reviewers: muse-spark-1.3-contributor — general (completed, effort xhigh); agent phase1-reviewer
  • Phase 1 model: muse-spark-1.3-contributor — not quota-gated; passed over gemini-3.8-flash-high (antigravity quota lookup failed), glm-5.3-flash (not used above high effort; tier asks max)
  • Fresh verifier: gpt-6.1-sol — final-verifier; agent sol-verifier
  • Phase 2 reviewers: gpt-6.1-sol — general (completed, effort high); agent phase2-reviewer, gpt-6.1-sol — architecture-layering (completed, effort high); agent phase2-reviewer, gpt-6.1-sol — security-auditor (completed, effort high); agent phase2-reviewer

@github-actions

Copy link
Copy Markdown
Contributor

Bots are done — your move: post /self-reviewed.
Full checklist in the description.

@github-actions github-actions Bot added waiting-self-review Waiting for the author to post /self-reviewed and removed waiting-bots Waiting for the review bots to report on this head labels Oct 29, 2026
@shumkov
shumkov merged commit c77adbb into v5.1-dev Oct 30, 2026
47 of 49 checks passed
@shumkov
shumkov deleted the fix/dashmate/release-lookup branch October 30, 2026 13:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

waiting-self-review Waiting for the author to post /self-reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants