test(webhooks): drop the case the contract tests already pin - #394
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 changed-url identity 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 the resolved secret lands in the stored hook config. 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 deletion removes duplicated coverage without changing runtime behavior or losing a uniquely tested assertion.
Review effort: Balanced
Findings: None
What changed in this PR
Removes a redundant webhooks read-port test already covered by contract-level tests.
Changes:
- Deletes one duplicated test case.
- Leaves production code and unique webhooks assertions unchanged.
| File | Description |
|---|---|
src/sections/webhooks/webhooks.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 two typed tables (
test.each<...>, the schema table and the plans-nothing table) are not matched by that grep; both stay.How
One case leaves
src/sections/webhooks/webhooks.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/webhooks15 pass;bun run typecheckandbun run knipgreen.bun run test:e2e --sections webhooks13/13 passed.Line accounting
Test-only: 0 additions, 11 deletions in one file.
Kept
Two cases slated for deletion as scenario twins stay, each after its census came back green.
Mutant:
src/sections/webhooks/index.tsspells the undeclared actionKEEP itinstead ofDELETE it.Red: only this case's note assertion.
Green: all thirteen webhooks scenarios (
webhooks-undeclared-keep-notematches the note throughto have applyonly) and every test undertest/sections.Mutant: the mock's stored hook config drops the secret (
storedHookConfigintest/e2e/mock/support.ts).Red: only this case's final-state assertion that both hooks store the resolved secret.
Green: all thirteen webhooks scenarios, including
webhooks-apply-converges, and the mock tests.Every other case in the directory is untouched.
Reviewer note
BEGIN_COMMIT_OVERRIDE
test(webhooks): 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 changed-url identity 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 the resolved secret lands in the stored hook config.
Test-only; no source changes.
END_COMMIT_OVERRIDE