Skip to content

test(config): harden gate.slop.minScore round-trip coverage#3452

Closed
bohdansolovie wants to merge 1 commit into
JSONbored:mainfrom
bohdansolovie:test/gate-slop-minscore-roundtrip
Closed

test(config): harden gate.slop.minScore round-trip coverage#3452
bohdansolovie wants to merge 1 commit into
JSONbored:mainfrom
bohdansolovie:test/gate-slop-minscore-roundtrip

Conversation

@bohdansolovie

Copy link
Copy Markdown
Contributor

Related to #2053

Summary

Applies the same round-trip/boundary test hardening from #3436 (gate.readiness.minScore) to gate.slop.minScore — both fields share normalizeOptionalScore in focus-manifest.ts:

  • gate.present flips true when only slop.minScore is set
  • Boundary round-trip (0, 1, 42, 99, 100) through gateConfigToJsonparseFocusManifest
  • Invalid values (string, NaN, ±Infinity) warn and null out the score
  • Omitted minScore stays absent from serialized slop block

Test-only hardening; no production behavior change.

Test plan

  • CI validate-code (vitest suite includes focus-manifest.test.ts)

Made with Cursor

@bohdansolovie bohdansolovie requested a review from JSONbored as a code owner July 5, 2026 07:33
@superagent-security

Copy link
Copy Markdown

Superagent didn't find any vulnerabilities or security issues in this PR.

@gittensory-orb gittensory-orb Bot added the gittensor:bug Gittensor-scored bug fix — scores a 0.5x multiplier. label Jul 5, 2026
@gittensory-orb

gittensory-orb Bot commented Jul 5, 2026

Copy link
Copy Markdown

Caution

🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥

🛑 Gittensory review result - reject/close recommended

Review updated: 2026-07-05 07:57:15 UTC

1 file · 1 AI reviewer · 2 blockers · readiness 80/100 · CI pending · blocked

🛑 Suggested Action - Reject/Close

  • No linked issue detected — If this PR is intended to solve an issue, link it explicitly in the PR body.
  • Maintainer requires a linked issue — Link the relevant issue (for example Closes #123) before opening the PR.

Review summary
This is a focused test-only change that extends the existing gate config coverage to gate.slop.minScore: clamping/rounding, present-bit behavior, serialization round-trip boundaries, invalid numeric inputs, and omitted serialization. The added cases directly exercise the public parseFocusManifest/gateConfigToJson path described in the PR, and I do not see a reachable correctness defect in the diff itself.

Nits — 4 non-blocking
  • nit: test/unit/focus-manifest.test.ts:930 the test name says "clamps and rounds" but only covers one rounding direction; adding 59.4 or 59.5 would make the rounding contract more explicit.
  • nit: test/unit/focus-manifest.test.ts:954 the invalid-value loop checks strings and non-finite numbers, but not null/object/array shape drift; if gate.slop.minScore accepts unknown manifest JSON, one malformed-object case would document that boundary.
  • test/unit/focus-manifest.test.ts:930 add one lower-fraction rounding case, e.g. `expect(parseFocusManifest({ gate: { slop: { minScore: 59.4 } } }).gate.slopMinScore).toBe(59);`, so both sides of the rounding behavior are pinned.
  • test/unit/focus-manifest.test.ts:954 consider including one structurally invalid JSON value such as `{}` in the invalid loop if parseFocusManifest is expected to reject all non-number manifest shapes with the same warning.

Why this is blocked

  • No linked issue detected — If this PR is intended to solve an issue, link it explicitly in the PR body.
  • Maintainer requires a linked issue — Link the relevant issue (for example Closes #123) before opening the PR.
Signal Result Evidence
Code review ❌ 2 blockers 1 reviewer
Linked issue ✅ No-issue rationale PR body explains why no issue is linked.
Related work ✅ No active overlap found No same-issue or scoped active PR overlap found.
Change scope ✅ 20/20 Low review scope from cached public metadata (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: 267 registered-repo PR(s), 167 merged, 9 issue(s).
Contributor context ✅ Confirmed Gittensor contributor bohdansolovie; Gittensor profile; 267 PR(s), 9 issue(s).
Gate result ❌ Blocking Repo-configured hard blocker found.
Review context
  • Author: bohdansolovie
  • Role context: outside_contributor
  • Public audience mode: oss maintainer
  • Lane context: Repository registration is not available in the local Gittensory cache.
  • Public profile languages: Python, C++, JavaScript
  • Official Gittensor activity: 267 PR(s), 9 issue(s).
  • PR-specific overlap: none found.
Contributor next steps
  • Await review-lane availability.
  • Refresh registry data or choose a registered active repo.
  • Link the issue being solved, or explicitly explain why this is a no-issue PR.
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

@codecov

codecov Bot commented Jul 5, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.01%. Comparing base (65de78e) to head (6e9b1a2).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3452   +/-   ##
=======================================
  Coverage   93.01%   93.01%           
=======================================
  Files         297      297           
  Lines       31038    31038           
  Branches    11319    11319           
=======================================
+ Hits        28870    28871    +1     
  Misses       1513     1513           
+ Partials      655      654    -1     

see 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Cover slop-only present flag, boundary round-trips, invalid-value warnings, and omitted serialization — parity with JSONbored#2053 readiness tests.

Co-authored-by: Cursor <cursoragent@cursor.com>
@bohdansolovie bohdansolovie force-pushed the test/gate-slop-minscore-roundtrip branch from 2a010eb to 6e9b1a2 Compare July 5, 2026 07:55
@gittensory-orb

gittensory-orb Bot commented Jul 5, 2026

Copy link
Copy Markdown

Gittensory is closing this pull request on the maintainer's behalf (No linked issue detected; Maintainer requires a linked issue). This is an automated maintenance action — to pursue this change, please open a new pull request with the issues resolved. Closed PRs may be analyzed later to improve review accuracy, but they are not automatically reopened or re-reviewed.

@gittensory-orb gittensory-orb Bot closed this Jul 5, 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.5x multiplier.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant