Skip to content

fix(rules): extend isCodePath for mts/cts/mjs/cjs/kts/scala/groovy parity - #9334

Closed
joaovictor91123 wants to merge 1 commit into
JSONbored:mainfrom
joaovictor91123:fix/advisory-iscodepath-extensions-9322
Closed

fix(rules): extend isCodePath for mts/cts/mjs/cjs/kts/scala/groovy parity#9334
joaovictor91123 wants to merge 1 commit into
JSONbored:mainfrom
joaovictor91123:fix/advisory-iscodepath-extensions-9322

Conversation

@joaovictor91123

Copy link
Copy Markdown
Contributor

Summary

  • Extend isCodePath in src/rules/advisory.ts with .mts, .cts, .mjs, .cjs, .kts, .scala, and .groovy so it matches isCodeFile/SOURCE_FILE_EXTENSION parity.
  • Add regression test mirroring the existing Vue/Svelte/Astro and Dart parity cases.

Closes #9322

Scope

  • Conventional Commit title, focused rules-only change, Closes #9322.

Validation

  • New parity regression test in test/unit/rules.test.ts.
  • Full CI (local Node v24; relying on CI).

Safety

  • No secrets or UI changes.

UI Evidence

N/A — no visible UI changes.

…rity

Bring advisory.ts isCodePath back in line with isCodeFile so Missing test evidence annotations reach TS/JS module variants and JVM scripting source files.

Closes JSONbored#9322
@superagent-security

Copy link
Copy Markdown
Contributor

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

@codecov

codecov Bot commented Jul 27, 2026

Copy link
Copy Markdown

❌ 3 Tests Failed:

Tests completed Failed Passed Skipped
11204 3 11201 16
View the top 2 failed test(s) by shortest run time
test/unit/selfhost-pg-retention.test.ts > runRetentionPrune + processJob on the Postgres backend (#977) > processJob prune-retention deletes eligible rows and records a success audit event on Postgres
Stack Traces | 0.00459s run time
AssertionError: expected 3 to be +0 // Object.is equality

- Expected
+ Received

- 0
+ 3

 ❯ test/unit/selfhost-pg-retention.test.ts:119:44
test/unit/selfhost-pg-retention.test.ts > pruneExpiredRecords on the Postgres backend (#977) > deletes across multiple bounded batches and stops at the per-table cap, same as the SQLite path
Stack Traces | 0.00996s run time
AssertionError: expected +0 to be 4 // Object.is equality

- Expected
+ Received

- 4
+ 0

 ❯ test/unit/selfhost-pg-retention.test.ts:76:33
View the full list of 1 ❄️ flaky test(s)
test/unit/salvageability.test.ts > resolveAiReviewSalvageableHold > defaults: no configured floor uses the gate default, and a confidence-less blocker counts as certainty (at/above floor)

Flake rate in main: 100.00% (Passed 0 times, Failed 11 times)

Stack Traces | 0.00495s run time
AssertionError: expected undefined to be defined
 ❯ test/unit/salvageability.test.ts:88:18

To view more test analytics, go to the Test Analytics Dashboard
📋 Got 3 mins? Take this short survey to help us improve Test Analytics.

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

loopover-orb Bot commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Caution

🛑 LoopOver review result - reject/close recommended

Review updated: 2026-07-27 13:23:19 UTC

2 files · 1 AI reviewer · 1 blocker · CI failing · unstable

🛑 Suggested Action - Reject/Close

Review summary
This is a narrow, well-targeted one-line regex extension to isCodePath adding .mts/.cts/.mjs/.cjs/.kts/.scala/.groovy for parity with isCodeFile, backed by a focused regression test that mirrors the existing Vue/Svelte/Astro/Dart parity pattern in the same test file. The change is closed against #9322, correctly scoped, and the test asserts all seven new extensions trigger the same 'Missing test evidence' annotation path via buildCheckRunAnnotations. The diff is small, mechanical, and low-risk.

Nits — 5 non-blocking
  • The `validate` and `validate-tests` CI checks failed with no detail provided in the given status — the failure cause could not be verified from what was given.
  • test/unit/rules.test.ts: consider also asserting the reverse (a matching *.test.mts or similar path suppresses the finding) to fully round out isCodeFile/isTestPath parity coverage, though this may already be covered by existing Dart/Vue tests using the same pattern.
  • src/rules/advisory.ts:554 — if isCodeFile (src/signals/local-branch.ts) has additional extensions beyond this list, run scripts/check-engine-parity.ts or grep SOURCE_FILE_EXTENSION directly to confirm no further drift remains post-fix.
  • Pull request duplicates other open work — Check for an existing pull request or issue covering this change and coordinate or consolidate before continuing.
  • Readiness score is below the configured threshold — Use the readiness panel as advisory maintainer context; the score does not block this PR.

Why this is blocked

📋 Copy for AI agents — paste into your coding agent
Fix the following blocker(s) from this PR review:

1. Linked issue overlaps another open PR: Other open pull requests reference the same linked issue set: #9327. — Review the related PRs before spending reviewer time on duplicate work.

CI checks failing

  • validate
  • validate-tests

Decision drivers

  • ❌ Code review — 1 blocker (1 reviewer)
  • ❌ Gate result — Blocking (Repo-configured hard blocker found.)
Context & advisory signals — never blocks the verdict
Signal Result Evidence
Linked issue ✅ Linked #9322
Related work ⚠️ Same linked issue: #9327 Another open PR references the same linked issue.
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: 133 registered-repo PR(s), 57 merged, 5 issue(s).
Contributor context ✅ Confirmed Gittensor contributor joaovictor91123; Gittensor profile; 133 PR(s), 5 issue(s).
Improvement ✅ Minor risk: low · value: minor · LLM: minor
Linked issue satisfaction

Addressed
The regex in isCodePath is extended to include all seven required extensions (.mts/.cts/.mjs/.cjs/.kts/.scala/.groovy) without removing any existing ones, and a new regression test covering all seven extensions asserting 'Missing test evidence' annotations is added adjacent to the existing parity tests, matching the requested structure.

Review context
Contributor next steps
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 <question> answers contribution-quality Q&A with source citations and freshness.
  • @loopover chat <question> 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

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.

fix(rules): advisory.ts's isCodePath is missing .mts/.cts/.mjs/.cjs/.kts/.scala/.groovy that isCodeFile recognizes

1 participant