Skip to content

fix(signals): delegate engine test-path checks to isTestPath - #2499

Closed
joaovictor91123 wants to merge 2 commits into
JSONbored:mainfrom
joaovictor91123:fix/signals-engine-test-path-parity
Closed

fix(signals): delegate engine test-path checks to isTestPath#2499
joaovictor91123 wants to merge 2 commits into
JSONbored:mainfrom
joaovictor91123:fix/signals-engine-test-path-parity

Conversation

@joaovictor91123

Copy link
Copy Markdown
Contributor

Summary

engine.ts kept a private isTestFile matcher that missed Cypress/E2E and __snapshots__ paths already recognized by isTestPath in test-evidence.ts. That made preflight emit missing_test_evidence for Cypress-only changes and mis-bucketed repo-outcome test_evidence dimensions.

Upstream issue creation is blocked for this account (GraphQL CreateIssue returns FORBIDDEN), so this PR carries the full rationale inline instead of a linked issue.

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 ?97% coverage of the lines AND branches you changed (aim for 98%+ 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:

  • Full npm run test:ci was attempted locally on Windows; shell/Postgres backup script tests fail in this environment but are unrelated to this diff. Targeted vitest for the new regression test passed.

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

State / title JPG/PNG evidence
N/A - signal logic only

Notes

  • Regression test: Cypress path no longer triggers missing_test_evidence when listed in changedFiles.

@dosubot dosubot Bot added the size:S label Jul 2, 2026
@loopover-orb

loopover-orb Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Warning

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

⏸️ Gittensory review result - manual review recommended

Review updated: 2026-07-02 07:11:29 UTC

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

⏸️ Suggested Action - Manual Review

Review summary
The change correctly removes the private engine-local test-file matcher and delegates all affected signal/preflight counts to the shared `isTestPath` matcher, which aligns the code-file exclusion path with the test-evidence helper already used elsewhere. The visible call sites preserve the prior behavior shape while expanding recognition for Cypress/E2E and snapshot-style test paths. The main gap is test precision: the new regression title claims snapshot coverage, but the fixture only exercises a Cypress path.

Nits — 5 non-blocking
  • nit: `test/unit/signals.test.ts:423` says the preflight regression covers Cypress and snapshot paths, but `changedFiles` only includes `cypress/e2e/login.cy.ts` plus a source file, so either add a `__snapshots__` fixture or narrow the test name.
  • nit: `src/signals/engine.ts:2138` changes repo-outcome bucketing behavior, but the added test only exercises `buildPreflightResult`; add or point to an existing assertion for the `test_evidence` dimension so this wiring stays covered.
  • In `test/unit/signals.test.ts:423`, include a second assertion or parameterized case for a snapshot path recognized by `isTestPath`.
  • Add a focused assertion around `buildRepoOutcomePatterns` in `test/unit/signals.test.ts` showing Cypress/E2E-only changes are bucketed as `with_tests`.
  • 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 (size label size:S; 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: 59 registered-repo PR(s), 38 merged, 0 issue(s).
Contributor context ✅ Confirmed Gittensor contributor joaovictor91123; Gittensor profile; 59 PR(s), 0 issue(s).
Gate result ✅ Passing No configured blocker found.
Review context
  • Author: joaovictor91123
  • Role context: outside_contributor
  • Public audience mode: oss maintainer
  • Lane context: Repository registration is not available in the local Gittensory cache.
  • Public profile languages: JavaScript, C++, MDX, Rust, TypeScript
  • Official Gittensor activity: 59 PR(s), 0 issue(s).
  • PR-specific overlap: none found.
Contributor next steps
  • Explain no-issue PR.
  • Await review-lane availability.
  • Triage stale or unlinked PRs.
  • 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 2, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.95%. Comparing base (853ec9a) to head (034c2c3).
⚠️ Report is 31 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2499      +/-   ##
==========================================
+ Coverage   95.93%   95.95%   +0.02%     
==========================================
  Files         225      226       +1     
  Lines       25336    25423      +87     
  Branches     9217     9243      +26     
==========================================
+ Hits        24306    24395      +89     
  Misses        417      417              
+ Partials      613      611       -2     
Files with missing lines Coverage Δ
src/signals/engine.ts 97.71% <100.00%> (-0.01%) ⬇️

... and 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 gittensor gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier. labels Jul 2, 2026

@JSONbored JSONbored left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Test coverage issues, closing.

The main gap is test precision: the new regression title claims snapshot coverage, but the fixture only exercises a Cypress path.

@JSONbored JSONbored closed this Jul 2, 2026
@github-project-automation github-project-automation Bot moved this from Todo to Done in gittensory - v1 roadmap Jul 2, 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

No open projects
Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants