(janitor/test-prune): remove tautological triage-service test file - #5845
Open
kilo-code-bot[bot] wants to merge 1 commit into
Open
(janitor/test-prune): remove tautological triage-service test file#5845kilo-code-bot[bot] wants to merge 1 commit into
kilo-code-bot[bot] wants to merge 1 commit into
Conversation
The file imports only @jest/globals and asserts on locally-constructed fixtures, never on triage-service.ts. No production regression can make any of its 12 assertions fail.
Contributor
Author
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Files Reviewed (1 file)
Reviewed by grok-4.6 · Input: 34.5K · Output: 5.8K · Cached: 388.4K Review guidance: REVIEW.md from base branch |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Deletes
apps/web/src/lib/security-agent/services/triage-service.test.ts(236 lines, 12 tests). The file imports only@jest/globalsand never imports or calls any code fromtriage-service.ts(or any other production module). Every assertion targets a value constructed locally in the same test — either thecreateMockFinding()factory's own defaults or an inline object literal.Why these tests cannot detect a regression
buildTriagePrompt,extractJsonContent,parseTriageResult,createFallbackTriage, ortriageSecurityFinding, which are the actual functions intriage-service.ts. Changing or breaking any of them cannot affect these tests.expect(finding.package_name).toBe('lodash')wherecreateMockFinding()setspackage_name: 'lodash';expect(parseFloat('9.8')).toBeGreaterThan(9);expect(Array.isArray(['CWE-1321'])).toContain('CWE-1321'). Each passes by construction, independent of any repository code.Surviving coverage
No behavioral coverage is lost, because none existed. Relevant triage logic that is genuinely tested elsewhere:
triageSecurityFindingand its fallback/parsing paths:services/security-auto-analysis/src/triage.test.ts.triageSecurityFindingas a mocked collaborator:apps/web/src/lib/security-agent/services/analysis-service.test.tsandanalysis-service.token-source.test.ts.Validation
oxlintonapps/web/src/lib/security-agent/services: 0 warnings, 0 errors.workerSetup.ts) requires a PostgreSQL connection (cleanupDbForTest), which is unavailable in this environment. The failure was at DB setup, not at test assertions.