Skip to content

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

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

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

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 in test/unit/rules.test.ts.

Closes #9322

Scope

Validation

Safety

  • No secrets or UI changes.

UI Evidence

N/A.

Notes

…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
11210 3 11207 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.00585s 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.0146s 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 14 times)

Stack Traces | 0.0073s 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.

@joaovictor91123

Copy link
Copy Markdown
Contributor Author

Closing - CI failed on the same 3 pre-existing test failures (selfhost-pg-retention, salvageability) tracked by maintainer #9285 (still open). Our
ules.test.ts change is unrelated; src/rules/advisory.ts fans out to ~458 scoped test files (not narrow like signals/onboarding-pack). Will reopen after #9285 merges and main CI is green (one-shot policy).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

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