test(custom_properties): drop the case the contract tests already pin - #397
Merged
Merged
Conversation
The read-port shape case restates the endpoint table at runtime; the canonical read-port case in the contract tests pins the port's derivation for every section. The keep-note case stays: its note assertion is the only pin of the section's undeclared action wording. The convergence twin stays: its final-state assertion is the only pin that an unset property leaves the mock's value list. Test-only; no source changes.
Contributor
File size check0 over a hard cap (fails), 31 warning(s).
Split the file, wrap the line, shorten or exempt the comment, or list the path in 5 managed file(s) skipped; repo-platform owns them. |
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The deleted assertions are covered by the canonical contract and registry tests.
Review effort: Balanced
Findings: None
What changed in this PR
Removes a redundant custom-properties read-port test already covered by shared contract tests.
Changes:
- Deletes one duplicated test case and nine lines.
- Leaves production code and unique section behavior tests unchanged.
| File | Description |
|---|---|
src/sections/custom_properties/custom_properties.test.ts |
Removes the redundant read-port shape test. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
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.
Before
After
The three typed tables (
test.each<...>: normalizeValue, plans-nothing, validate issues) are not matched by that grep; all stay, so the file keeps seven cases.How
One case leaves
src/sections/custom_properties/custom_properties.test.ts.It was put under a mutant on today's main before it went: the mutant reddens the deleted case and its named pin together, so nothing the case held is lost.
The runtime assertion restates the endpoint table; the port's derivation is pinned once for every section by the canonical read-port case in
test/sections/contract.test.ts.Mutant:
src/sections/contract/plan.tsbinds every route into the port regardless of method.Red: this case and the branches read-port case that stays.
No source changes.
Proof
bun test src/sections/custom_properties17 pass;bun run typecheckandbun run knipgreen.bun run test:e2e --sections custom_properties8/8 passed.Line accounting
Test-only: 0 additions, 9 deletions in one file.
Kept
Two cases slated for deletion stay, each after its census came back green.
Mutant:
src/sections/custom_properties/index.tsspells the note's actionDELETE itinstead ofUNSET it.Red: only this case's note assertion.
Green: all eight custom_properties scenarios (
custom-properties-undeclared-keep-notematches the note throughto have applyonly), the owner-gate tests, and the engine snapshot tests.Mutant:
src/sections/custom_properties/mock.tskeeps an unset property in the value list with a null value instead of removing it.Red: only this case's final-state assertion.
Green: all eight custom_properties scenarios, including
custom-properties-apply-converges, and the mock tests.Every other case in the directory is untouched.
Reviewer note
BEGIN_COMMIT_OVERRIDE
test(custom_properties): drop the case the contract tests already pin
The read-port shape case restates the endpoint table at runtime; the canonical read-port case in the contract tests pins the port's derivation for every section.
The keep-note case stays: its note assertion is the only pin of the section's undeclared action wording.
The convergence twin stays: its final-state assertion is the only pin that an unset property leaves the mock's value list.
Test-only; no source changes.
END_COMMIT_OVERRIDE