Skip to content

test(crypto): cover uppercase hex in timingSafeEqualHex - #2111

Merged
JSONbored merged 1 commit into
JSONbored:mainfrom
kiannidev:test/crypto-uppercase-hex-equality
Jul 1, 2026
Merged

test(crypto): cover uppercase hex in timingSafeEqualHex#2111
JSONbored merged 1 commit into
JSONbored:mainfrom
kiannidev:test/crypto-uppercase-hex-equality

Conversation

@kiannidev

Copy link
Copy Markdown
Contributor

Summary

  • Add regression coverage that timingSafeEqualHex treats uppercase and lowercase hex as equal.

No-issue rationale

Test-only coverage lock with no linked issue.

Test plan

  • npx vitest run test/unit/crypto.test.ts

Made with Cursor

@kiannidev
kiannidev requested a review from JSONbored as a code owner July 1, 2026 09:08
@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.73%. Comparing base (8b0ac26) to head (ddea952).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2111   +/-   ##
=======================================
  Coverage   95.73%   95.73%           
=======================================
  Files         223      223           
  Lines       24741    24741           
  Branches     8969     8969           
=======================================
  Hits        23685    23685           
  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.

@JSONbored

Copy link
Copy Markdown
Owner

Moving forward, please do not open more than 2 PRs at a time - i'll be adding a configuration to gittensory orb to auto-close PRs over that threshold.

@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-01 17:11:26 UTC

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

⏸️ Suggested Action - Manual Review

Review summary
The diff is a narrow test-only change that adds coverage for `timingSafeEqualHex("ABCD", "abcd")`, confirming mixed-case hex strings compare equal. That matches the intended API behavior for hex decoding and does not change production behavior. The only notable issue is that the existing test name now undersells the valid-case assertions it contains.

Nits — 3 non-blocking
  • nit: `test/unit/crypto.test.ts:24` names the case `rejects invalid hex operands`, but the body now also covers valid equal, unequal, and uppercase-normalization behavior.
  • Rename or split `test/unit/crypto.test.ts:24` so the uppercase regression sits under a positive-case description such as `compares valid hex operands in constant time`.
  • 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 ✅ No-issue rationale PR body explains why no issue is linked.
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: 2694 registered-repo PR(s), 1487 merged, 48 issue(s).
Contributor context ✅ Confirmed Gittensor contributor kiannidev; Gittensor profile; 2694 PR(s), 48 issue(s).
Gate result ✅ Passing No configured blocker found.
Review context
Contributor next steps
  • 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
@kiannidev
kiannidev force-pushed the test/crypto-uppercase-hex-equality branch 2 times, most recently from 1550eea to 9aabec8 Compare July 1, 2026 12:27
Lock in case-insensitive hex parsing used by webhook signature verification.

Co-authored-by: Cursor <cursoragent@cursor.com>
@JSONbored
JSONbored force-pushed the test/crypto-uppercase-hex-equality branch from 9aabec8 to ddea952 Compare July 1, 2026 18:38
@dosubot dosubot Bot added the lgtm label Jul 1, 2026
@JSONbored
JSONbored merged commit 981355c into JSONbored:main Jul 1, 2026
8 checks passed
@github-project-automation github-project-automation Bot moved this from Todo to Done in gittensory - v1 roadmap Jul 1, 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