Files
member-console/scripts/deadcode-testonly.txt
T
cgalo5758 e2f3b8aa44 Correct the docs that no longer match the code
docs/database-locks.md said recordObligationFailure records a failed
drain in a transaction that takes the rendezvous alone. It runs
MarkObligationFailed, which calls core.settle_obligation, and that
function locks the obligation row and then the pool row, the reverse
of the drain's order. The drain section now says so, and "Where the
paths differ" lists it with #196; the two entries above it gain #193
and #194.

docs/database-management.md described three schemas and three
migration sources. There are five of each: domains and discourse were
missing, with their ledgers and their place in the source order. Its
sqlc example ran `sqlc generate` in one directory, which leaves the
generated files without the SPDX headers `make sqlc-generate` restores;
the example now uses the make target and says why.

docs/testing.md:
- One list of the project lint's rules, by rule id, under the static
  checks; the "Lint and screens" entry, which repeated part of it,
  points there. The TL;DR's `make lint` comment no longer lists four
  of its five checks.
- The browser-test waits are described once, here; the copy in
  docs/go-conventions.md, which disagreed on which rod waits exist,
  is gone. rod's MustWait with a predicate, used by two walkthroughs,
  is named as allowed.
- MockBackend's description names the fields tests use and the three
  ways it fails a call, in place of three of its twenty fields.
- An example test that no longer exists is replaced by one that does,
  and a sentence fused with the next one in the screens entry is split.

test/AGENTS.md: the suite takes a few minutes, not 26 seconds; the
explicit-slug example runs from test/ like the rest of the page and
states the slug's rule; the stack scripts' refusal of unknown
arguments is described; and a link into one contributor's assistant
memory is removed.

The owner of a pinned lint exception or a test-only allowlist entry
is an issue; the comments in .golangci.yml, scripts/deadcode-testonly.txt
and docs/testing.md no longer offer a #166 step, since that issue is
closed and no entry names one.

golangci-lint, scripts/deadcode.sh and scripts/notebook-citations.sh
pass.
2026-10-15 20:38:17 -05:00

63 lines
3.8 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 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/replay.* # replaying and recording the Temporal histories every workflow package keeps (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.checkKindAndFamily # same (permanent)
internal/forms.checkFamilyScope # same (permanent)
internal/forms.checkRowsScope # same (permanent)
internal/forms.checkRoutes # same (permanent)
internal/forms.checkWayOut # same (permanent)
internal/forms.checkFieldOrder # same (permanent)
internal/forms.checkFieldStructure # same (permanent)
internal/forms.checkFieldPlacement # same (permanent)
internal/forms.checkFieldWidth # same (permanent)
internal/forms.checkFieldCopy # same (permanent)
internal/forms.checkEscapeHatch # same (permanent)
internal/forms.checkFieldDashes # same (permanent)
internal/forms.checkFormDashes # 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/httplimit.IsTooLarge # no production caller yet (#146)
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)