Repository navigation
fix(dashmate): stop the GitHub release lookup throwing and validate its version - #5653
Conversation
…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]>
|
Warning Review limit reachedYou'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. View limit details
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. Comment |
|
@coderabbitai review |
|
|
Waiting for bot review — thepastaclaw not yet. Wait for the missing reviews, or a writer can post |
|
✅ Final review complete — no blockers (commit dc05e4e) · triage: normal |
thepastaclaw
left a comment
There was a problem hiding this comment.
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:
normalbygpt-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); agentphase1-reviewer - Phase 1 model:
muse-spark-1.3-contributor— not quota-gated; passed overgemini-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; agentsol-verifier - Phase 2 reviewers:
gpt-6.1-sol— general (completed, effort high); agentphase2-reviewer,gpt-6.1-sol— architecture-layering (completed, effort high); agentphase2-reviewer,gpt-6.1-sol— security-auditor (completed, effort high); agentphase2-reviewer
|
Bots are done — your move: post |
Issue being fixed or feature implemented
dashmate statuslooks 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 withTypeError('fetch failed')and aTimeoutErrorDOMException. Neither matched, so the lookup'snullbranch was unreachable. It also stripped one character fromtag_nameunconditionally, mangling any tag without avprefix.Split out of #4283, where it was reviewed.
What was done?
packages/dashmate/src/status/providers.js:content-length.How Has This Been Tested?
test/unit/status/providers.spec.js: 32 tests. They cover native fetch failures and timeouts, oversized and malformed responses, tags with and withoutv, non-semver and control-character tags, and the sanitized and bounded diagnostics. The tests were written failing first in fix(dashmate): keep the node up when an image pull fails, and stop reporting success when it did not #4283.Breaking Changes
None.
Checklist:
For repository code-owners and collaborators only
🤖 Generated with Claude Code
PR Hygiene ·
dc05e4e/self-reviewedWhen every merge requirement is met, the
PR Hygienecheck passes. Reviewer limits do not block merging; other required GitHub checks and protections still apply.