Skip to content

test(custom_properties): drop the case the contract tests already pin - #397

Merged
Vivswan merged 1 commit into
mainfrom
wt/r2s-custom_properties
Sep 22, 2026
Merged

Vivswan merged 1 commit into
mainfrom
wt/r2s-custom_properties

Conversation

@Vivswan

@Vivswan Vivswan commented Sep 21, 2026 •

Copy link
Copy Markdown
Owner

Before

$ grep -cE '^\s*test(\.each)?\(' src/sections/custom_properties/*.test.ts
custom_properties.test.ts:5

After

$ grep -cE '^\s*test(\.each)?\(' src/sections/custom_properties/*.test.ts
custom_properties.test.ts:4

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 read port exposes the org probe in its absent posture and the values GET, never the PATCH.
    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.ts binds 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_properties 17 pass; bun run typecheck and bun run knip green.
  • bun run test:e2e --sections custom_properties 8/8 passed.
  • The full suite runs in this PR's CI.

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.

  • Under the keep default an undeclared live value is a note, beside the declared drift.
    Mutant: src/sections/custom_properties/index.ts spells the note's action DELETE it instead of UNSET it.
    Red: only this case's note assertion.
    Green: all eight custom_properties scenarios (custom-properties-undeclared-keep-note matches the note through to have apply only), the owner-gate tests, and the engine snapshot tests.
  • Executing the plan against the mock fragment converges: the re-plan is empty.
    Mutant: src/sections/custom_properties/mock.ts keeps 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
  • Landing order: this PR lands after the test/sections change that adds the canonical read-port case for every section.
  • Codex rounds: 1, converged with no findings.
  • Copilot: deletions only; a comment earns a change only if it names a concrete lost assertion with no other pin.

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

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.
Copilot AI balanced review requested due to automatic review settings September 21, 2026 23:51
@Vivswan Vivswan added the merge-when-green Owner approved: merge once every gate is green label Sep 21, 2026
@github-actions

Copy link
Copy Markdown
Contributor

File size check

0 over a hard cap (fails), 31 warning(s).

File Size Tier Cap
.github/scripts/release-pipeline.ts:6 156 chars warn 150
.github/scripts/release-pipeline.ts:468 151 chars warn 150
.github/scripts/release-pipeline.ts:1417 153 chars warn 150
.github/scripts/release-pipeline.ts:1 30 comment lines (header) warn 25
.github/scripts/release-pipeline.ts:464 14 comment lines warn 10
.github/workflows/post-green.yml:27 153 chars warn 150
.github/workflows/post-green.yml:140 16 comment lines warn 10
docs/upgrading/v2-to-v3.md 1257 lines warn 1040
src/engine/layers.ts:217 157 chars warn 150
src/flows/settings-write.ts:142 159 chars warn 150
src/flows/settings-write.ts:30 11 comment lines warn 10
src/flows/snapshot.ts:189 13 comment lines warn 10
src/github/secret-scan.ts:42 11 comment lines warn 10
src/schema.ts:186 153 chars warn 150
src/schema.ts:197 176 chars warn 150
src/sections/contract/errors.ts:14 14 comment lines warn 10
src/sections/contract/module.ts:963 185 chars warn 150
src/sections/contract/module.ts:627 12 comment lines warn 10
src/sections/contract/module.ts:897 12 comment lines warn 10
src/sections/secret_scanning_custom_patterns/compilable-form.ts:382 161 chars warn 150
src/sections/shared/roles.ts:43 13 comment lines warn 10
src/types.ts:16 156 chars warn 150
test/docs/guides.test.ts:451 155 chars warn 150
test/e2e/generators.ts 2639 lines warn 2560
test/e2e/generators.ts:1709 166 chars warn 150
test/e2e/generators.ts:1863 161 chars warn 150
test/e2e/generators.ts:1672 12 comment lines warn 10
test/engine/execute.test.ts:617 152 chars warn 150
test/flows/merge-parity.test.ts:63 164 chars warn 150
test/scripts/auto-fix-allowlist.test.ts:8 12 comment lines warn 10
test/scripts/gen-docs.test.ts:588 155 chars warn 150

Split the file, wrap the line, shorten or exempt the comment, or list the path in .file-size-allow.local with a # reason.

5 managed file(s) skipped; repo-platform owns them.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@Vivswan
Vivswan marked this pull request as ready for review September 22, 2026 00:38
@Vivswan
Vivswan merged commit 772931d into main Sep 22, 2026
35 checks passed
@Vivswan
Vivswan deleted the wt/r2s-custom_properties branch September 22, 2026 00:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-when-green Owner approved: merge once every gate is green

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants