test(autolinks): drop the case the contract tests already pin - #395
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 duplicate-prefix validate case stays: it is the only pin that identical prefixes raise the duplicate issue alone, without an overlapping-prefix issue beside it. The convergence twin stays: its final-state assertion is the only pin that a declared false flag wins over a live true one on the recreate. 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 focused test deletion preserves coverage through existing contract and read-port tests.
Review effort: Balanced
Findings: None
What changed in this PR
Removes a redundant autolinks read-port test, relying on the shared contract coverage specified in the landing order.
Changes:
- Deletes one section-specific read-port shape test.
- Leaves runtime source code unchanged.
| File | Description |
|---|---|
src/sections/autolinks/autolinks.test.ts |
Removes the redundant read-port contract case. |
💡 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 typed schema table (
test.each<...>) is not matched by that grep; it stays, so the file keeps eight cases.How
One case leaves
src/sections/autolinks/autolinks.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/autolinks11 pass;bun run typecheckandbun run knipgreen.bun run test:e2e --sections autolinks9/9 passed.Line accounting
Test-only: 0 additions, 11 deletions in one file.
Kept
Two cases slated for deletion stay, each after its census came back green.
Mutant:
src/sections/autolinks/index.tsdrops the identical-prefix guard from the overlapping-prefix rule, so a duplicate also raises an overlap issue.Red: only this case (it asserts exactly one issue).
Green: the validate-hook census (it accepts any number of issues at the later entry's path), the list-section tests, the engine validate tests, and all nine autolinks scenarios.
Mutant:
src/sections/autolinks/index.tsspreads the live flag after the declared write on the recreate, so a live true flag survives a declared false.Red: only this case's final-state assertion (declared false, live true).
Green: all nine autolinks scenarios (every one declares the flag true) and the list-section tests.
Every other case in the directory is untouched.
Reviewer note
BEGIN_COMMIT_OVERRIDE
test(autolinks): 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 duplicate-prefix validate case stays: it is the only pin that identical prefixes raise the duplicate issue alone, without an overlapping-prefix issue beside it.
The convergence twin stays: its final-state assertion is the only pin that a declared false flag wins over a live true one on the recreate.
Test-only; no source changes.
END_COMMIT_OVERRIDE