test(secret_scanning_custom_patterns): drop the read-port case the contract tests already pin - #398
Merged
Merged
Conversation
Contributor
File size check0 over a hard cap (fails), 30 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
🟡 Changes recommended
The deleted validation test was the only assertion of the section-specific duplicate-error wording.
Get a fresh assessment by requesting another Copilot review.
Review effort: Balanced
Findings: 1
Open (1)
What changed in this PR
Removes section-level tests considered redundant with contract and end-to-end coverage.
Changes:
- Deletes four duplicate test cases.
- Removes unused test helpers and mock imports.
| File | Description |
|---|---|
src/sections/secret_scanning_custom_patterns/secret_scanning_custom_patterns.test.ts |
Reduces overlapping validation, planning, port, and snapshot tests. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Vivswan
force-pushed
the
wt/r2s-secret_scanning_custom_patterns
branch
from
September 22, 2026 00:11
823288d to
82d073d
Compare
…ntract 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 convergence case stays: a mutant that skips start_delimiter in the update filter reddens only it, so the stored delimiter has no other pin. The verbatim snapshot table stays: a mutant that appends a note for every translated pattern reddens only its three PCRE rows, so the empty detail has no other pin. The duplicate-name validate case stays: its message assertion is the only pin of the section's resource name in the duplicate issue. Test-only; no source changes.
Vivswan
force-pushed
the
wt/r2s-secret_scanning_custom_patterns
branch
from
September 22, 2026 00:55
82d073d to
aff917f
Compare
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 tables (
test.each<...>, four in the section file and six in the compilable-form file) are not matched by that grep; all stay, so the section file keeps fourteen cases.How
One case leaves
src/sections/secret_scanning_custom_patterns/secret_scanning_custom_patterns.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/secret_scanning_custom_patternson the merge result with main: 161 pass;bun run typecheckgreen.Line accounting
Test-only: 0 additions, 13 deletions in one file.
Kept
Slated as a twin of the
secret-scanning-custom-patterns-apply-convergesscenario, which asserts the write order and the fixpoint, never the stored delimiter.Mutant:
index.tsskipsstart_delimiterin the update filter, so a declared delimiter drift is never PATCHed.Red: only this case (the stored
"\\b"is lost).Green: every other case in the section directory.
Slated as pinned by the
secret-scanning-patterns-snapshot-hyperscan-formsscenario, which asserts required substrings, never an empty detail.Mutant:
index.tsappends a snapshot note for every string pattern a plain RegExp refuses (every translated form).Red: only the three PCRE rows (
detail: []gains the note).Green: the plain control row and every other case in the section directory.
Slated as a duplicate-entry case the validate-hook census covers; kept after its census came back green.
Mutant:
index.tsnames the resourcepatterninstead ofcustom patternin the duplicate issue.Red: only this case's message assertion.
Green: the validate-hook census, the list-section and engine validate tests, and all eleven scenarios.
compilable-form.test.ts.Reviewer note
BEGIN_COMMIT_OVERRIDE
test(secret_scanning_custom_patterns): drop the read-port 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 convergence case stays: a mutant that skips start_delimiter in the update filter reddens only it, so the stored delimiter has no other pin.
The verbatim snapshot table stays: a mutant that appends a note for every translated pattern reddens only its three PCRE rows, so the empty detail has no other pin.
The duplicate-name validate case stays: its message assertion is the only pin of the section's resource name in the duplicate issue.
Test-only; no source changes.
END_COMMIT_OVERRIDE