You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add exit-code assertion to excluded test-file fixture test #30
The test default mode skips unsafe_type_assertion in test files (tests/ai-slop-detector.behavior.test.ts:413-431) only asserts on stdout content but does not verify the process exit code. The sister test default mode still reports unsafe_type_assertion in non-test files already asserts result.status === 1.
Without an explicit exit-code assertion, the test can pass when the process fails without producing the checked stdout text (e.g., crash before emitting output).
Evidence
// Current — no exit-code assertion:try{assert.ok(!result.stdout.includes('unsafe_type_assertion'),"should not report as any in test files. stdout: "+result.stdout);}finally{ ... }// Sister test — already has exit-code assertion for status 1:try{assert.equal(result.status,1, ...);
...
}
Requirements
The excluded test-file test must assert result.status === 0 before the stdout check, including stderr in the failure message.
Constraints
Do not alter production exit-code behavior.
Do not weaken the existing stdout assertion.
Do not remove or change the sister test's exit-code assertion.
Do not combine with unrelated test changes.
Validation
The test must fail (RED) if the fixture file has an actual finding and the process would exit non-zero, and pass (GREEN) when the finding is correctly excluded and the process exits 0.
Rollback
A reverted test-only commit restores current coverage.
#9 - fix: resolve all false positives (issues #2, #6, #7, #8) [closed] #23 - feat: detect unsafe TypeScript type assertions via AST (issue #22) [open] #24 - feat: migrate unsafe_type_assertion from regex to AST detection [open]
📝 Issue Planner
Check the box below or use the @coderabbitai plan command to generate an implementation plan and prompts that you can use with your favorite coding assistant.
Create Plan
🧪 Issue enrichment is currently in open beta.
You can configure auto-planning by selecting labels in the issue_enrichment configuration.
To disable automatic issue enrichment, add the following to your .coderabbit.yaml:
issue_enrichment:
auto_enrich:
enabled: false
💬 Have feedback or questions? Drop into our discord!
Activity
coderabbitai commentedon Jul 27, 2026
🔗 Related PRs
#9 - fix: resolve all false positives (issues
#2,#6,#7,#8) [closed]#23 - feat: detect unsafe TypeScript type assertions via AST (issue
#22) [open]#24 - feat: migrate unsafe_type_assertion from regex to AST detection [open]
📝 Issue Planner
Check the box below or use the
@coderabbitai plancommand to generate an implementation plan and prompts that you can use with your favorite coding assistant.🧪 Issue enrichment is currently in open beta.
You can configure auto-planning by selecting labels in the issue_enrichment configuration.
To disable automatic issue enrichment, add the following to your
.coderabbit.yaml:💬 Have feedback or questions? Drop into our discord!