Repository navigation
test(sections): drop the thin secret-family suites the scenarios already pin - #396
Merged
Merged
Conversation
…ady pin The agents, codespaces, and dependabot secrets suites pinned three facts per family through one shared helper: the label, noun, and route of the plan, the seal against the family's key, and the keep default with the delete under the knob. Five mutants of the shared factory and engine that redden those suites also fail the scenarios of all three families, so the scenarios own every fact. The shared helper in test/sections had no importer left, so it leaves in the same change. The thin files' stated reason, keeping the diff-aware CI selector mapped to the section, no longer holds: any file under a section directory selects it.
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
Existing unit and end-to-end scenarios retain coverage of the deleted assertions.
Review effort: Balanced
Findings: None
What changed in this PR
Removes redundant secret-family unit suites whose behavior is already covered by section-specific end-to-end scenarios and the shared Actions secrets suite.
Changes:
- Deletes three thin section test wrappers.
- Deletes their now-unused shared test helper.
| File | Description |
|---|---|
src/sections/agents_secrets/agents_secrets.test.ts |
Removes redundant Agents secrets tests. |
src/sections/codespaces_secrets/codespaces_secrets.test.ts |
Removes redundant Codespaces secrets tests. |
src/sections/dependabot_secrets/dependabot_secrets.test.ts |
Removes redundant Dependabot secrets tests. |
test/sections/secret-family.ts |
Removes the unused shared test helper. |
💡 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
src/sections/agents_secrets/agents_secrets.test.tssrc/sections/codespaces_secrets/codespaces_secrets.test.tssrc/sections/dependabot_secrets/dependabot_secrets.test.tstest/sections/secret-family.tsThe count is
test(andtest.each(lines; the three thin files ran the helper's three cases each, nine in all.How
Each thin file pinned three facts for its family: the label, noun, and route of the plan, the seal against the family's public key, and the keep default with the delete under the knob.
Five mutants of the shared factory and engine redden those cases and the family scenarios alike, with the source restored after each.
The scenarios are
bun run test:e2e --sections agents_secrets,codespaces_secrets,dependabot_secrets.src/sections/shared/repo-secrets.ts,undeclaredDefault: "keep"becomes"delete"repo-secrets.ts, the path segment becomes"actions"for every familyrepo-secrets.ts, the scope noun becomes"secret"repo-secrets.ts, the scope label becomes"secrets"src/sections/shared/secrets-engine.ts, the sealed body'skey_idbecomes a constantbun run knipnamestest/sections/secret-family.tsas an unused file..github/scripts/changed-sections.tsmaps any file under a section directory to its key, test or not.Proof
bun testis 4217 pass, 0 fail (nine cases fewer).bun run check(lint, arch lint, compat, typecheck, build:check) green;bun run knipgreen after the helper's deletion.bun run test:e2e --sections agents_secrets,codespaces_secrets,dependabot_secrets19/19 passed on the unmutated source.Kept
src/sections/actions_secrets/actions_secrets.test.tsstill pins the shared factory and engine through the actions family; nothing in it changes here.Technical details
git diff --numstat origin/main...HEADis 0 added, 144 deleted across four files: 13, 12, and 12 for the thin suites, 107 for the helper.git checkout -- srcbefore the next.test/e2e/mock/server.tsmentions "secret-family" in a comment about the PUT handlers unsealing synchronously; it does not import the deleted helper.src/sections/actions_secrets/actions_secrets.test.tsandtest/sections/secrets-engine.test.ts, not by scenarios.The e2e mock stores a digest and no scenario compares unsealed values for any family.
BEGIN_COMMIT_OVERRIDE
test(sections): drop the thin secret-family suites the scenarios already pin
END_COMMIT_OVERRIDE