Skip to content

test(utils): cover empty JSON input and blank error messages#2375

Merged
JSONbored merged 1 commit into
JSONbored:mainfrom
bohdansolovie:test/json-utils-edge-cases
Jul 2, 2026
Merged

test(utils): cover empty JSON input and blank error messages#2375
JSONbored merged 1 commit into
JSONbored:mainfrom
bohdansolovie:test/json-utils-edge-cases

Conversation

@bohdansolovie

@bohdansolovie bohdansolovie commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Extend json-utils tests for empty/undefined parseJson input, nowIso, and blank Error messages.

Test plan

  • npx vitest run test/unit/json-utils.test.ts

Guard parseJson/nowIso/errorMessage edge cases used across handlers.

Co-authored-by: Cursor <cursoragent@cursor.com>
@bohdansolovie
bohdansolovie requested a review from JSONbored as a code owner July 1, 2026 13:37
@dosubot dosubot Bot added the size:XS label Jul 1, 2026
@codecov

codecov Bot commented Jul 1, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.71%. Comparing base (17d70b2) to head (f0585a5).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2375   +/-   ##
=======================================
  Coverage   95.71%   95.71%           
=======================================
  Files         222      222           
  Lines       24661    24661           
  Branches     8949     8949           
=======================================
  Hits        23605    23605           
  Misses        433      433           
  Partials      623      623           
🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@loopover-orb

loopover-orb Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Warning

🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨

⏸️ Gittensory review result - manual review recommended

Review updated: 2026-07-02 04:15:46 UTC

1 file · 1 AI reviewer · no blockers · readiness 48/100 · CI green · clean

⏸️ Suggested Action - Manual Review

Review summary
This diff only expands the json utility unit tests: it covers fallback behavior for empty and undefined parseJson input, imports and smoke-tests nowIso, and verifies blank Error messages fall back to the default text. The added assertions are coherent with the existing test style and do not change production behavior. CI passed on the exact commit, and there are no visible correctness or contract issues in the changed file.

Nits — 3 non-blocking
  • nit: test/unit/json-utils.test.ts:15 only validates nowIso with a format regex, so it would not catch an invalid-but-regex-shaped timestamp; consider also asserting Date.parse(nowIso()) is not NaN.
  • test/unit/json-utils.test.ts:16 covers errorMessage(new Error("")); if strippedErrorMessage is expected to share the same blank-message fallback, add a neighboring assertion for strippedErrorMessage(new Error(""), "unknown error") or the project’s intended fallback.
  • Readiness score is below the configured threshold — Use the readiness panel as advisory maintainer context; the score does not block this PR.
Signal Result Evidence
Code review ✅ No blockers 1 reviewer
Linked issue ⚠️ Missing No linked issue or no-issue rationale found.
Related work ⚠️ 3 scoped overlaps Top overlaps are listed below; lower-confidence bulk is hidden.
Change scope ❌ 8/20 High review scope from cached public metadata (size label size:XS; no linked issue context).
Validation posture ❌ 5/25 Preflight is holding this PR: the review lane is unavailable, so it is not ready for automated review.
Contributor workload ✅ 10/10 Author activity: 140 registered-repo PR(s), 68 merged, 11 issue(s).
Contributor context ✅ Confirmed Gittensor contributor bohdansolovie; Gittensor profile; 140 PR(s), 11 issue(s).
Gate result ✅ Passing No configured blocker found.
Review context
Contributor next steps
  • Explain no-issue PR.
  • Review top overlaps.
  • Add a concise scope and risk note.
  • Await review-lane availability.
  • Triage stale or unlinked PRs.
  • Refresh registry data or choose a registered active repo.
  • Link the issue being solved, or explicitly explain why this is a no-issue PR.
  • Check active issues and PRs before submitting.
Signal definitions
  • Related work = same linked issue, overlapping active PRs, or title/path similarity.
  • Change scope = cached public metadata such as size labels, draft state, and review-burden hints.
  • Validation posture = whether the PR provides enough public validation/test evidence for maintainer review.
  • Contributor workload = public contributor activity and cleanup pressure, not a repo-wide quality failure.
  • Contributor context = public GitHub/Gittensor identity context; non-Gittensor status is not a blocker.

🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed


💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →.

Checked by Gittensory, a quiet PR intelligence layer for OSS maintainers.

  • Re-run Gittensory review

@loopover-orb loopover-orb Bot added gittensor gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier. labels Jul 1, 2026
@dosubot dosubot Bot added the lgtm label Jul 2, 2026
@JSONbored
JSONbored merged commit 0a0254e into JSONbored:main Jul 2, 2026
9 checks passed
@github-project-automation github-project-automation Bot moved this from Todo to Done in gittensory - v1 roadmap Jul 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier.

Projects

No open projects
Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants