Skip to content

test(review): full branch coverage for the linked-issue-hard-rules-config src twin - #5870

Closed
jaytbarimbao-collab wants to merge 1 commit into
JSONbored:mainfrom
jaytbarimbao-collab:test-linked-issue-hard-rules-config-src-twin
Closed

test(review): full branch coverage for the linked-issue-hard-rules-config src twin#5870
jaytbarimbao-collab wants to merge 1 commit into
JSONbored:mainfrom
jaytbarimbao-collab:test-linked-issue-hard-rules-config-src-twin

Conversation

@jaytbarimbao-collab

Copy link
Copy Markdown
Contributor

Fixes #5845.

src/review/linked-issue-hard-rules-config.ts is a byte-identical twin of packages/loopover-engine/src/review/linked-issue-hard-rules-config.ts (a directory-scanned parity pair). The engine copy has full branch coverage via linked-issue-hard-rules-config-engine.test.ts, but the src twin's own test only exercised a subset of its normalizer branches.

Test-only: adds the missing src-side cases to reach 100% branch coverage on the twin —

  • isLinkedIssueHardRuleMode valid/invalid inputs
  • undefined input (all-off default, no warning) vs string/null top-level input (warns + default)
  • a fully-valid object (valid modes, label trimming, valid booleans, valid delay all kept)
  • invalid mode → field-default fallback + warning
  • non-boolean flag → field-default fallback + warning
  • closeDelaySeconds floor (10.9→10) + clamp (5000→300) + invalid (negative / NaN → default 30 + warning)

All 65 tests in the file pass; typecheck clean.

@superagent-security

Copy link
Copy Markdown
Contributor

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

…ll branch coverage

Fixes JSONbored#5845.

src/review/linked-issue-hard-rules-config.ts is a byte-identical twin of the
engine copy, but its own test exercised only a subset of the normalizer branches.
Adds the missing src-side cases (isLinkedIssueHardRuleMode, undefined vs
string/null top-level input, a fully-valid object, invalid mode / non-boolean
fallbacks, and closeDelaySeconds floor/clamp/invalid handling), bringing the
src twin to 100% branch coverage. Test-only.
@JSONbored
JSONbored force-pushed the test-linked-issue-hard-rules-config-src-twin branch from c5606cf to 6a38109 Compare July 14, 2026 21:06
@loopover-orb loopover-orb Bot added the gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier. label Jul 14, 2026
@loopover-orb

loopover-orb Bot commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Caution

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

🛑 LoopOver review result - fixes required

Review updated: 2026-07-14 21:30:15 UTC

1 file · 1 AI reviewer · no blockers · readiness 75/100 · CI failing · blocked

🛑 Suggested Action - Fix Blockers

Review summary
This is a test-only PR adding coverage cases for the src-side twin of linked-issue-hard-rules-config normalizer, mirroring branches already covered on the engine copy per issue #5845. The new tests exercise isLinkedIssueHardRuleMode, undefined vs invalid top-level input, a fully-valid object, invalid mode/boolean fallback with warnings, and closeDelaySeconds floor/clamp/invalid handling — each assertion checks concrete expected output values, not just that a call doesn't throw, so the tests look like real coverage rather than fabricated ones. The diff is narrow, self-contained, and directly tied to the linked issue.

Nits — 4 non-blocking
  • The comment at test/unit/linked-issue-hard-rules.test.ts:373 says 'still-uncovered src-side arms' but doesn't state the resulting coverage percentage achieved, which would help future readers confirm the parity claim without re-running coverage tooling.
  • The `for (const bad of ["nope", null as unknown])` loop-based table test (test/unit/linked-issue-hard-rules.test.ts ~386) mixes two distinct invalid-type cases into one loop with a shared assertion; separate `it` blocks (or a `test.each`) would give clearer failure attribution if one case regresses.
  • Consider using `test.each` for the string/null invalid-input case and the floor/clamp/invalid closeDelaySeconds case to get per-case failure messages instead of a single loop-wrapped assertion.
  • If the src/ and engine copies are meant to stay byte-identical twins, a nit-level follow-up could add a lightweight test asserting file parity so future edits to one don't silently drift from the other.

CI checks failing

  • validate
  • validate-tests (3)
  • validate-tests (2)
  • validate-tests (1)
  • validate-tests (6)
  • validate-tests (5)
  • validate-tests (4)
Signal Result Evidence
Code review ✅ No blockers 1 reviewer
Linked issue ✅ Linked #5845
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 (1 linked issue).
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: 102 registered-repo PR(s), 50 merged, 4 issue(s).
Contributor context ✅ Confirmed Gittensor contributor jaytbarimbao-collab; Gittensor profile; 102 PR(s), 4 issue(s).
Gate result ✅ Passing No configured blocker found.
Improvement ⚠️ ℹ️ Insufficient signal risk: clean · value: insufficient-signal — Nothing measurable for the structural-improvement analyzers on this PR (e.g. no code files changed). LLM value judgment: minor — The change is a well-targeted, test-only coverage backfill for a linked issue that closes a specific coverage gap without touching production logic.
Linked issue satisfaction

Addressed
The diff adds targeted tests hitting all the previously-uncovered branches: the top-level undefined-input default, invalid-mode fallback+warning, non-boolean fallback+warning (both true and false directions), and closeDelaySeconds floor/clamp/negative/NaN cases — and the undefined-input test also exercises the per-field 'value===undefined' branches for mode/boolean/delay since none are supplied, m

Review context
  • Author: jaytbarimbao-collab
  • Role context: outside_contributor
  • Public audience mode: oss maintainer
  • Lane context: Repository registration is not available in the local Gittensory cache.
  • Public profile languages: not available
  • Official Gittensor activity: 102 PR(s), 4 issue(s).
  • PR-specific overlap: none found.
Contributor next steps
  • Await review-lane availability.
  • Triage stale or unlinked PRs.
  • Refresh registry data or choose a registered active repo.
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.
[BETA] Chat with Gittensory

Ask Gittensory a question about this PR directly in a comment — grounded only in the same cached, public-safe facts shown above, never a new claim.

  • @gittensory ask <question> answers contribution-quality Q&A with source citations and freshness.
  • @gittensory chat <question> answers in natural prose from cached decision-pack facts via local inference (maintainer/collaborator; read-only).
  • A plain-language @gittensory mention with a real question is routed to the closest matching read-only command automatically -- no exact syntax required.

Full command reference: https://gittensory.aethereal.dev/docs/gittensory-commands

🟩 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 LoopOver, a quiet PR intelligence layer for OSS maintainers.

  • Re-run LoopOver review

@loopover-orb

loopover-orb Bot commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Gittensory is closing this pull request on the maintainer's behalf (CI is failing (validate, validate-tests (3), validate-tests (2), validate-tests (1), validate-tests (6), validate-tests (5), validate-tests (4))). 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.

@loopover-orb loopover-orb Bot closed this Jul 14, 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

None yet

Development

Successfully merging this pull request may close these issues.

test(review): cover the src/ linked-issue-hard-rules-config normalizer branches (62.50% branch coverage)

1 participant