(janitor/test-prune): remove tautological security-agent settings field-set tests - #5830
Open
kilo-code-bot[bot] wants to merge 1 commit into
Open
Conversation
…ld-set tests Remove the "Task 9 settings screens each own a disjoint field set" block from packages/app-shared/src/security-agent/settings.test.ts. Each of the three tests builds a patch object literal inside the test and then asserts that `Object.keys(patch)` equals a hand-written list of those same keys. No production module is imported or invoked in the block: `settings.ts` exports no per-screen field-set definition, so the assertion is true by construction and no production behavior change can make it fail. The block's stated intent — that each settings screen submits only the fields it owns — is not exercised here (there is no screen component, submit handler, or patch-builder in the assertion path), so removing it changes no coverage. The surviving tests in the same file still protect the real contracts: patch-dirty comparison, day-count parsing/validation, dirty-state classification, and back-guard options.
Contributor
Author
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Files Reviewed (1 files)
Reviewed by grok-4.6 · Input: 104.1K · Output: 3.3K · Cached: 69.5K 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
Removes the
Task 9 settings screens each own a disjoint field setblock (3 tests) frompackages/app-shared/src/security-agent/settings.test.ts.Each test constructs a patch object literal inside the test and then asserts
Object.keys(patch)equals a hand-written list of the same keys. No production module is imported or invoked in the block —settings.tsexports no per-screen field-set definition — so the assertion is true by construction and no production regression can make it fail.Why these tests cannot detect a regression
./settings(or anywhere else). The object under assertion and the expected key list both live in the test body, so the only way the assertion changes is by editing the test itself.@kilocode/app-shared.Surviving coverage
The remaining tests in
settings.test.tsstill protect the real contracts in this module:isSecurityConfigPatchDirty— scalar vs array patch comparison (lines 32–42)parseDayCount/isValidDayCount— 1–365 whole-day parsing and validation (lines 105–137)getSettingsDirtyState— clean / dirty-valid / dirty-invalid classification (lines 64–89)getSettingsBackGuardOptions— save/discard/keep-editing back-guard options (lines 91–103)Verification
vitest runfor the package: 348 passed (17 files) (was 351 before removal)tsgo --noEmit(package typecheck): cleanoxlinton the changed file: 0 warnings, 0 errors