Skip to content

fix(signals): classify Dart source across all code classifiers - #3316

Merged
JSONbored merged 1 commit into
JSONbored:mainfrom
jimcody1995:fix/signals-dart-source-code
Jul 5, 2026
Merged

fix(signals): classify Dart source across all code classifiers#3316
JSONbored merged 1 commit into
JSONbored:mainfrom
jimcody1995:fix/signals-dart-source-code

Conversation

@jimcody1995

Copy link
Copy Markdown
Contributor

Summary

Dart/Flutter hand-authored source (.dart) is already indexed as code by review/rag.ts and test-evidence.ts recognizes co-located *_test.dart files, but isCodeFile and isCodePath did not recognize .dart. Flutter-only PRs could be misclassified as non-code in slop signals, missing-tests checks, and check-run annotations.

This PR extends both isCodeFile and isCodePath (plus MCP score-preview mirrors), following the all-classifier parity pattern from #3292 and #3301. Generated Dart (.g.dart, .freezed.dart, .gr.dart) remains non-code via isGeneratedFile.

No linked issue — classifier parity fix with clear product impact.

Conflict avoidance: Touches src/signals/local-branch.ts, src/signals/engine.ts (only the isCodeFile mirror at ~L5538), src/rules/advisory.ts, MCP mirrors, and unit tests. Open PR #3304 also edits engine.ts but only around imports (~L29) and unrelated helpers (~L5012) — disjoint hunks, so this should merge cleanly after #3304 lands without rebase. Does not touch test-evidence.ts (which #3304 modifies). No other open PR overlaps these paths.

Scope

  • The PR title follows type(scope): short summary Conventional Commit format, for example fix(api): restore profile access checks.
  • This PR is focused and does not mix unrelated backend, UI, MCP, docs, dependency, and deploy changes.
  • This follows CONTRIBUTING.md and does not reintroduce GitHub Pages, VitePress, site/, or CNAME.
  • I linked an issue, or this is small enough that the summary explains why an issue is not needed.

Validation

  • git diff --check
  • npm run actionlint
  • npm run typecheck
  • npm run test:coverage locally; codecov/patch requires ≥99% coverage of the lines AND branches you changed (aim for 100% on your diff so CI variance does not fail near the threshold). Global coverage is a non-blocking trend with a loose 90% backstop, not the gate.
  • npm run test:workers
  • npm run build:mcp
  • npm run test:mcp-pack
  • npm run ui:openapi:check
  • npm run ui:lint
  • npm run ui:typecheck
  • npm run ui:build
  • npm audit --audit-level=moderate
  • New or changed behavior has unit/integration tests for new branches, fallback paths, and sanitizer boundaries

If any required check was skipped, explain why:

  • None skipped. Full npm run test:ci and npm audit --audit-level=moderate both passed locally on latest main (commit 1e9284b).

Safety

  • No secrets, wallet details, hotkeys, coldkeys, user PATs, private keys, raw trust scores, private rankings, or private maintainer evidence are exposed.
  • Public GitHub text stays sanitized, low-noise, and does not imply compensation guarantees or optimization tactics.
  • Auth, cookie, CORS, GitHub App, Cloudflare, or session changes include negative-path tests.
  • API/OpenAPI/MCP behavior is updated and tested where needed.
  • UI changes use live API data or real empty/error/loading states, not production mock/demo fallbacks.
  • Visible UI changes include a UI Evidence section below with JPG/JPEG or PNG screenshots arranged as organized, captioned, clickable thumbnails. SVG screenshots are not used as review evidence. Review-only screenshots or recordings are not committed to the repository.
  • Public docs/changelogs are updated where needed; changelogs are only edited for release-prep PRs.

UI Evidence

N/A — no visible UI change.

Notes

  • Updates isCodeFile, isCodePath, and MCP mirrors in the same PR.
  • rules.test.ts regression asserts .dart files receive missing-test annotations.
  • *_test.dart remains classified as test, not source.

Extend isCodeFile and advisory isCodePath to recognize .dart so Flutter
source aligns with review/rag.ts indexing and receives correct slop,
missing-tests, and check-run annotation treatment.

Co-authored-by: Cursor <cursoragent@cursor.com>
@jimcody1995
jimcody1995 requested a review from JSONbored as a code owner July 5, 2026 01:43
@superagent-security

Copy link
Copy Markdown
Contributor

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

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

loopover-orb Bot commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

Warning

🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨

⏸️ Gittensory review result - manual review recommended

Review updated: 2026-07-05 01:45:30 UTC

10 files · 1 AI reviewer · no blockers · readiness 73/100 · CI pending · blocked

⏸️ Suggested Action - Manual Review

Review summary
This change consistently adds `.dart` to the visible TypeScript, MCP JS, MCP MJS, MCP Python, and advisory path classifiers, and the tests exercise both hand-authored Dart source and `*_test.dart` test evidence. I do not see a reachable correctness regression in the diff; the main implementation follows the existing classifier-parity pattern and keeps test files excluded from source classification where those helpers already do that.

Nits — 2 non-blocking
  • src/signals/local-branch.ts:1276 and src/signals/engine.ts:5542: consider extracting the shared source-extension regex or extension list into one module, because these mirrored classifiers now require repeated manual edits across server and MCP paths.
  • 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 ⚠️ Missing No linked issue or no-issue rationale found.
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: 28 registered-repo PR(s), 12 merged, 0 issue(s).
Contributor context ✅ Confirmed Gittensor contributor jimcody1995; Gittensor profile; 28 PR(s), 0 issue(s).
Gate result ✅ Passing No configured blocker found.
Review context
  • Author: jimcody1995
  • 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: 28 PR(s), 0 issue(s).
  • PR-specific overlap: none found.
Contributor next steps
  • Explain no-issue PR.
  • 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.73%. Comparing base (1e9284b) to head (0e06f96).
⚠️ Report is 30 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3316   +/-   ##
=======================================
  Coverage   93.73%   93.73%           
=======================================
  Files         276      276           
  Lines       30381    30381           
  Branches    11073    11073           
=======================================
  Hits        28479    28479           
  Misses       1257     1257           
  Partials      645      645           
Files with missing lines Coverage Δ
src/rules/advisory.ts 97.25% <100.00%> (ø)
src/signals/engine.ts 97.35% <100.00%> (ø)
src/signals/local-branch.ts 97.21% <100.00%> (ø)
🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@JSONbored
JSONbored merged commit 7e39efa into JSONbored:main Jul 5, 2026
9 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. manual-review Gittensor contributor context

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants