Files
member-console/scripts/deadcode-testonly.txt
T
cgalo5758 8cee42f2d3 Compare golden files and name a run's ids through one kit package
The server's golden helpers (the comparer, the -update flag and the
normaliser that turns a fixture's ids into names) move into
internal/testkit/golden, so any package's tests can compare output with a
file under testdata. Ordinals is new: it numbers the UUIDs and UTC times
an act makes by first appearance, for the ids a fixture cannot name.
Normalizer.Add replaces the one place a server test appended to the
normaliser's unexported pairs.

Eleven server test files use the package; the -update flag keeps its
name. docs/testing.md gains the kit row and a bullet, and the kit's import
guard and the dead-code list know the package.

No output changes. No production file changes, and no file under
internal/server/testdata is touched; every server golden test passes
without -update and git status is clean under testdata afterwards. The
names and results of ./internal/testkit/... and ./internal/server are
equal at the parent and at this commit (1452 and 1458 tests and
subtests), apart from the five new tests and the import guard's new
subtest for the package. No assertion changes, so no assertion map.

13 breaks: 12 caught by the new tests, and the one that renames the
normaliser's <today> pair is caught by the golden test at the parent and
at this commit.

Unprobed: that a name outranks a pair in the server's goldens (their ids
are UUIDs and their pairs a date and the suffix, which never start at one
position, so the order is invisible there; the kit test probes it); the
server copy of the comparer at the parent (a break that makes it pass
everything cannot fail the goldens it compares); a migration test that
defines its own update flag (a documented rule, not code).
2026-10-10 14:50:48 -05:00

54 lines
3.4 KiB
Plaintext

# Production functions that only tests reach, one per line:
#
# <package path>.<Func> # reason (owner)
#
# The package path is relative to the module path, as in
# internal/domains.WithEvidenceLookup. A method is <package path>.<Type>.<Method>.
# An entry ending in .* covers a whole package and names it a test-support
# package: scripts/sqlc-unused counts a query call from it as a test use. A
# function that is reachable from a program, or that no longer exists, fails
# scripts/deadcode.sh, so an entry leaves with the code it covers. The owner
# is the issue or step of #166 that removes the entry; "permanent" marks
# entries no change removes.
# Test-support packages, by design.
internal/integration/transporttest.* # fake transport for the integration contract's tests (permanent)
internal/stripetest.* # Stripe backend mock and its fixtures (permanent)
internal/integrations/discourse/discoursetest.* # fake Discourse server (permanent)
internal/testkit.* # helpers every test package shares (permanent)
internal/testkit/dbtest.* # helpers every database test shares (permanent)
internal/testkit/htmltest.* # HTML parsing and selection every render test shares (permanent)
internal/testkit/golden.* # golden files and the normaliser every golden test shares (permanent)
internal/testkit/world.* # the builder every fixture shares (permanent)
internal/testkit/authtest.* # signed-in sessions every handler test shares (permanent)
internal/integrations/fedwiki/fedwikitest.* # FedWiki's fixtures, shared by its three packages' tests (permanent)
test/e2e/browsertest.* # browser session helpers for the walkthroughs (permanent)
# By design.
internal/domains.WithEvidenceLookup # the test seam for DNS lookups (permanent)
internal/forms.FamilyFor # the form registry's checks, which tests run over every registered form (permanent)
internal/forms.CheckInvariants # same (permanent)
internal/forms.isFormMethod # same (permanent)
internal/forms.isSentence # same (permanent)
internal/forms.contentWords # same (permanent)
internal/forms.hintRestatesLabel # same (permanent)
internal/forms.All # same (permanent)
internal/forms.ActionTriggers # same (permanent)
internal/forms.Routes # same (permanent)
internal/lint.Routes # the route table the forms registry test reads (permanent)
internal/lint.Route.IsMutation # same (permanent)
# Owned: removed by the step or issue named in the parentheses.
internal/entitlements.RuleChangeCommit # the tests' entry point to the rule-change commit (#166 step 5)
internal/entitlements.DrainObligation # the tests' entry point to the obligation drain (#166 step 5)
internal/httplimit.IsTooLarge # no production caller yet (#146)
internal/integration.LifecycleAnswerKind.String # no production caller (#166 step 6)
internal/integration.LifecycleAnswer.Accepted # no production caller (#166 step 6)
internal/integration.LatestGenerations # no production caller (#166 step 6)
internal/integrations/fedwiki/workflows.DeleteWorkflowID # superseded by generation-suffixed ids and still built by tests (#165)
internal/integrations/fedwiki/workflows.SetStatusWorkflowID # same (#165)
internal/integrations/fedwiki/workflows.SwapWorkflowID # same (#165)
internal/server.MemberDomainsHandler.startClaimVerification # a copy of FedWiki's claim glue whose test helpers 14 server test files share (#165)
internal/server.MemberDomainsHandler.claimErrorMessage # same (#165)
internal/workflows/desiredstate.DeliveryStates # a reader with no page yet (#171)