Skip to content

fix(ci): make tsc -p dir coverage match package workspaces (#10044) - #10118

Merged
loopover-orb[bot] merged 1 commit into
JSONbored:mainfrom
kai392:feat/10044-typecheck-coverage-dirs
Jul 31, 2026
Merged

fix(ci): make tsc -p dir coverage match package workspaces (#10044)#10118
loopover-orb[bot] merged 1 commit into
JSONbored:mainfrom
kai392:feat/10044-typecheck-coverage-dirs

Conversation

@kai392

@kai392 kai392 commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Summary

  • findTypecheckGaps now accepts { name, dir } workspaces so tsc -p packages/.../ coverage matches what main() already discovers.
  • Fixes the dead directory-coverage branch and updates tests that previously passed bare directory strings (hiding the bug).

Closes #10044

Test plan

  • npx vitest run test/unit/check-typecheck-coverage-script.test.ts
  • npm run typecheck-coverage:check
  • CI green

@kai392
kai392 requested a review from JSONbored as a code owner July 31, 2026 07:48
@loopover-orb

loopover-orb Bot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Tip

✅ LoopOver review result - approve/merge recommended

Review updated: 2026-07-31 08:18:07 UTC

2 files · 1 AI reviewer · no blockers · readiness 83/100 · CI green · clean

✅ Suggested Action - Approve/Merge

  • safe to merge

Review summary
This PR fixes a real dead-code bug: findTypecheckGaps' `-p <dir>` coverage check compared against `covered` (which stores directory paths) using only package-name-derived filters, so the tsc-path branch could never match against real main() input. The fix threads `{ name, dir }` through the whole pipeline and adds a `!covered.has(workspace.dir)` check, with tests updated to pass realistic shapes instead of bare strings that masked the bug. The change is narrow, well-targeted, and the new regression tests (particularly the #10044-labeled one) exercise the previously-dead branch correctly.

Nits — 3 non-blocking
  • scripts/check-typecheck-coverage.ts: the `-p` regex `/-p\s+((?:packages|apps)\/[\w.-]+)\//g` only captures one path segment after packages/apps, so a `tsc -p packages/foo/bar/tsconfig.json` (nested workspace dir) would not match cleanly — worth confirming no workspace dirs are nested deeper than one segment.
  • test/unit/check-typecheck-coverage-script.test.ts: several new tests overlap in what they verify (e.g. the 'ci(typecheck-coverage): the tsc -p <dir>/tsconfig.json coverage branch can never match, and its test hides that #10044' regression test duplicates the prior 'counts a project typechecked directly by path' test almost verbatim) — could be consolidated.
  • Consider asserting workspacesDeclaringTypecheck's dir format (`${group}/${dir}`) matches the `-p` regex's captured group format directly in a test, to pin that contract explicitly rather than only through findTypecheckGaps integration tests.

Decision drivers

  • ✅ Code review — No blockers (1 reviewer)
  • ✅ Gate result — Passing (No configured blocker found.)
Context & advisory signals — never blocks the verdict
Signal Result Evidence
Linked issue ✅ Linked #10044
Related work ✅ No active overlap found No same-issue or scoped active PR overlap found.
Change scope ❌ 8/20 High review scope from cached public metadata (1 linked issue).
Validation posture ✅ 25/25 PR body includes validation/test evidence.
Contributor workload ✅ 10/10 Author activity: 93 registered-repo PR(s), 50 merged, 10 issue(s).
Contributor context ✅ Confirmed Gittensor contributor kai392; Gittensor profile; 93 PR(s), 10 issue(s).
Improvement ✅ Minor risk: clean · value: minor · LLM: moderate
Linked issue satisfaction

Addressed
The diff changes findTypecheckGaps' second parameter to accept {name, dir} entries, matches dir against covered in the filter, keeps TypecheckGap.workspace reporting the package name, and updates main() to pass declared unchanged instead of mapping to names only — matching the required seam fix exactly. Tests are updated to use {name, dir} inputs including the exact contract/ui cases called out in

Review context
  • Author: kai392
  • Role context: outside_contributor
  • Public audience mode: oss maintainer
  • Lane context: Repository is configured for direct PR review.
  • Public profile languages: Python, Cuda, JavaScript, Kotlin, MDX, Perl, Ruby, Rust
  • Official Gittensor activity: 93 PR(s), 10 issue(s).
  • PR-specific overlap: none found.
Contributor next steps
  • Start here: Add a concise scope and risk note.
  • Then work through the remaining 2 steps in the Signals table above.
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.
🧪 Chat with LoopOver

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

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

Full command reference: https://loopover.ai/docs/loopover-commands

🧪 Experimental — new and may change.

🟩 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

@superagent-security

Copy link
Copy Markdown
Contributor

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

Closes JSONbored#10044

Co-authored-by: Cursor <cursoragent@cursor.com>
@loopover-orb loopover-orb Bot added the gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier. label Jul 31, 2026
@codecov

codecov Bot commented Jul 31, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.95%. Comparing base (c877ed6) to head (4fb0fcc).
⚠️ Report is 8 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #10118   +/-   ##
=======================================
  Coverage   91.95%   91.95%           
=======================================
  Files         931      931           
  Lines      113924   113924           
  Branches    27506    27506           
=======================================
  Hits       104760   104760           
  Misses       7863     7863           
  Partials     1301     1301           
Flag Coverage Δ
backend 95.67% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

@loopover-orb loopover-orb Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LoopOver approves — the gate is satisfied and CI is green.

@loopover-orb
loopover-orb Bot merged commit 117f750 into JSONbored:main Jul 31, 2026
8 checks passed
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.

ci(typecheck-coverage): the tsc -p <dir>/tsconfig.json coverage branch can never match, and its test hides that

2 participants