Skip to content

test(commands): cover the intent-router ask/chat question-threading branch - #5056

Merged
JSONbored merged 1 commit into
mainfrom
fix/intent-router-ask-chat-question-coverage
Jul 11, 2026
Merged

test(commands): cover the intent-router ask/chat question-threading branch#5056
JSONbored merged 1 commit into
mainfrom
fix/intent-router-ask-chat-question-coverage

Conversation

@JSONbored

Copy link
Copy Markdown
Owner

Summary

Follow-up to #4596 (PR #5036, merged): Codecov's codecov/patch check flagged one partial branch in processors.ts at merge time (98.80% vs the 99% target) — advisory-only for this maintainer PR, so it merged, but worth closing properly rather than leaving it.

The gap: question: matchedCommand === "ask" || matchedCommand === "chat" ? command.unrecognizedText : undefined — all 3 existing #4596 integration tests only ever reroute an unrecognized mention to "blockers", so the true side of this ternary (rerouting to ask/chat specifically, the only two commands that take a free-text question) was never exercised. That's the one behavior in this line that actually matters: does the contributor's original text survive the reroute into the target command's own question field, or get silently dropped.

Added one integration test rerouting to ask and asserting the resulting card does NOT show "No specific question was provided" (the marker ask renders when its question is empty/undefined) — proving the text threaded through correctly.

Test-only change; no production code touched.

Test plan

  • npm run typecheck — clean
  • New test run in isolation — passes, confirmed via direct lcov.info inspection that the previously-0-hit branch at processors.ts:12516 is now hit on both sides
  • npm run test:coverage (full, unsharded) — 718 files / 14203 tests passed, 0 failures
  • npm run test:ci (full gate) — green
  • npm audit --audit-level=moderate — 0 vulnerabilities

…ranch

#5036's codecov/patch flagged one partial branch in processors.ts:
matchedCommand === "ask" || matchedCommand === "chat" ? command.unrecognizedText
: undefined. The 3 existing #4596 integration tests only ever reroute to
"blockers", so the true side (rerouting to ask/chat specifically) was never
exercised -- meaning the one behavior that actually matters here (does the
contributor's original free text survive the reroute into the command's own
question field, instead of silently dropping it) was untested.
@superagent-security

Copy link
Copy Markdown
Contributor

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

@codecov

codecov Bot commented Jul 11, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.13%. Comparing base (dc81d72) to head (fe18731).
⚠️ Report is 1 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5056   +/-   ##
=======================================
  Coverage   94.13%   94.13%           
=======================================
  Files         465      465           
  Lines       39542    39542           
  Branches    14431    14431           
=======================================
+ Hits        37222    37223    +1     
  Misses       1664     1664           
+ Partials      656      655    -1     
Flag Coverage Δ
shard-1 46.49% <ø> (-0.02%) ⬇️
shard-2 33.45% <ø> (-0.05%) ⬇️
shard-3 31.59% <ø> (+0.25%) ⬆️
shard-4 32.65% <ø> (-0.03%) ⬇️
shard-5 33.25% <ø> (-0.20%) ⬇️
shard-6 45.15% <ø> (+0.19%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.
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.

@loopover-orb loopover-orb Bot added the gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier. label Jul 11, 2026
@JSONbored JSONbored self-assigned this Jul 11, 2026
@JSONbored
JSONbored merged commit 9ba03e0 into main Jul 11, 2026
18 checks passed
@JSONbored
JSONbored deleted the fix/intent-router-ask-chat-question-coverage branch July 11, 2026 11:12
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.

feat(commands): intent-classification router for unrecognized @gittensory mentions

1 participant