Description
From the 2026-09-25 fleet test-signal audit (sampled read-only). Delete or consolidate tautological tests (restating the implementation) and change-detector tests (pinning incidental text, markup, counts or internals). Keep parsing, state-machine, retry, security/PII, wire-contract and incident regression tests. Re-verify each candidate before deleting it; the list below comes from a sample and is not exhaustive. Candidates: internal/app/statushtml/statushtml_test.go:24-40 (byte-exact CSS block against a design-doc fence); internal/portservice/portservice_test.go:48-53 TestTableSize (len >= 1000 sanity check). This suite was the strongest sampled (about 80% valuable), so the task is small.
Acceptance Criteria
- #1 Each listed candidate is deleted, consolidated or kept with a one-line reason in the notes
- #2 Other tests in the same pattern found during the work are handled the same way
- #3 The repo’s check recipe passes
Definition of Done
- #1 just check passes (the full gate; it is what CI enforces)
- #2 just gen leaves no diff (only if a generated artifact’s inputs changed)
- #3 just –fmt –check passes and every new recipe has a # doc comment and a [group(…)]
Implementation Notes
Deleted internal/portservice TestTableSize: TestLookupName_WellKnownPorts already proves the embedded table loads, and the scheduled IANA drift job diffs the whole CSV against upstream, so a truncated file is caught there. Kept internal/app/statushtml TestFamilyTokenBlockMatchesTheSpec: it is the deliberate cross-console design-token contract (palette changes must land in design/console-v2/implementation-spec.md and be copied to sibling consoles), not incidental markup. Same-pattern find: provider_batching_test.go asserted the OTEL_GO_X_METRIC_EXPORT_BATCH_SIZE env was restored; that env shim is gone with OTel 1.47 (sdkmetric.WithMaxExportBatchSize), so the assertion was removed alongside it.
Final Summary
Pruned one redundant change-detector test, kept the CSS token contract test with its reason, removed the obsolete env-restore assertion. Verified with just check (green) and go test ./internal/portservice ./internal/telemetry.