beads/engdocs
Jim Wordelman da89d21813
docs(testutil): document migration-0032 hang and Ryuk-disabled container-leak caveats (#6001)
* docs(testutil): document migration-0032 hang and container-leak caveats (refs be-r7j5x)

Adds a comment near DoltDockerImage documenting two known limitations
of the podman-rootless + testcontainers-go real-server test harness:

- Schema migration 0032 hangs indefinitely over the sql-server wire
  protocol in this harness only; not reachable on real GitHub Actions
  CI or a bare-host-process dolt sql-server (be-j3szz).
- Containers can leak because Ryuk is disabled for this harness, so
  there is no reap safety net if a test process skips its cleanup
  (be-5kkk6).

No production code changes.

* docs(testutil): fix Ryuk-disabled citation and causal claim (refs be-ohrc0)

Round-1 review (be-ohrc0) flagged that the container-leak bullet cited
be-hsa9t for the TESTCONTAINERS_RYUK_DISABLED=true rationale and claimed
it was a workaround for this host's broken dockerd/containerd. Neither
is accurate: be-hsa9t is an unrelated git-remote E2BIG fix that never
mentions Ryuk or dockerd/containerd.

Corrects the citation to be-w3n2m (open, undecided) and the causal claim
to match its actual finding: under rootless podman, Ryuk frequently
cannot start because it wants the runtime socket.

No production code changes.

* docs(testing): move the Dolt container caveats out of DoltDockerImage

Review #6001 asked for this to leave the source file, on three grounds
that all check out.

CONTRIBUTING_PR_GUIDELINES.md line 33 is explicit — "Minimize inline code
comments … let the commit message and PR description carry the why" — and
a 23-line comment-only diff is the shape it names. DoltDockerImage is also
the wrong hook: it is the image pin guarded by test/docsync/doltpin_test.go
and read by container_provider.go and testdoltserver.go, so harness
lifecycle lore attached to it reaches every caller including CI.

The Ryuk sentence was also wrong as written. It claimed Ryuk "is disabled
for this harness (TESTCONTAINERS_RYUK_DISABLED=true)". This repository sets
that variable nowhere — not in Go, scripts/, the Makefile, or
.github/workflows/; the only tracked occurrences are release-gates/*.md,
which are records of operators' local podman runs. CI therefore runs with
Ryuk enabled, and the original text described a local shell as if it were
the repo's harness. Reworded to say what is true: the podman-rootless flow
generally requires disabling Ryuk by hand, and doing so is what removes the
safety net.

Both caveats now live in engdocs/TESTING.md as a sibling of "Test
Environment and Readiness", the section that already covers
BEADS_TEST_SKIP=dolt and BEADS_TEST_ENV_RUN_DOLT. Content is otherwise
preserved, including the be-j3szz / be-w3n2m / be-5kkk6 evidence chain, plus
a stray-container check and a pointer to testMainInner in beads_test.go.
engdocs/TESTING.md is not in check-doc-freshness.sh's DOCS list, so this
needs no inventory or freshness marker.

internal/testutil/testdoltcommon.go is now byte-identical to main.

Addresses the doc half of #6171. Refs be-8n9ns.

* docs(testing): scope the Dolt caveats to podman-rootless and fix the repro

Maintainer review fixes for PR #6001 (adopt-pr review iterations 1 and 2).
All edits are phrase-level and confined to engdocs/TESTING.md.

- Scope the causal claim to the podman-rootless path. CI runs the same
  containerized wire path green on every risk-tier PR -- pr-risk.yml's
  test-server-storage* jobs pull the pinned image precisely to defeat the
  self-skip and run with no BEADS_TEST_SKIP=dolt -- so "the container
  port-forwarding path" as a general cause is refuted by the repo's own CI,
  and as written invited a Docker developer to dismiss a real 0032/initSchema
  hang as a known harness limitation. Softened "Neither is reachable ... on
  GitHub Actions" to "Neither failure mode manifests ...", which is what is
  actually true.

- State every way a suite reaches a real dolt sql-server. The entry condition
  named one mechanism (testcontainers-go) and one fallback (self-skip), but
  the uow package the section uses as its repro also has suites that call
  testutil.RequireDoltBinary and start a server from the local dolt CLI
  (proxy.BackendLocalServer) with no container involved, and lanes that set
  BEADS_TEST_REQUIRE_DOLT_CONTAINER=1 fail rather than skip. The sentence now
  covers all three and scopes the two limitations to the containerized path.
  The testcontainers leg says "by default" so it stays true once main's
  BEADS_TEST_DOLT_SERVER=local backend section merges above it, without
  forward-referencing a section this branch does not have.

- Attribute the two failure shapes separately. The fenced banner could not be
  produced by the repro printed beside it: the uow entry points pass
  context.Background(), so context deadline exceeded has no producer there;
  the only 60s in the uow package is bo.MaxElapsedTime, a backoff budget that
  backoff.Retry consults only between attempts and which therefore cannot
  bound a hang inside one. The banner's only producer is store.go's
  "failed to initialize schema: %w" inside newServerMode, the server-mode
  store open, which runs initSchema with the caller's context -- so the doc
  names that path. (Iteration 1 labelled it the embedded-store open, which
  contradicted the section's own statement that the embedded/CLI engine does
  not hang.) Kept the uow "sits until the package timeout" sentence (the
  accurate half), dropped the unverifiable ~60s figure, and dropped the
  "failed to create embedded DoltStore: " prefix, which has zero occurrences
  in the tree, so the quoted line is greppable.

- Make the stray-container check runnable under the flow the section is about.
  A bare docker ps talks to the CLI's default endpoint and returns a false
  all-clear on exactly the leaked-container incident the paragraph cites; it
  now carries DOCKER_HOST=unix:///run/user/$(id -u)/podman/podman.sock, the
  form all six in-repo records of this flow use.

- Close the image-pin duplication without touching the guard, and make the
  read fail loudly. The command read the tag from a hand-copy outside
  test/docsync/doltpin_test.go's reach; it now reads it from
  internal/testutil/testdoltcommon.go, resolved from the repository root with
  git rev-parse --show-toplevel so it works from any directory in the tree.
  An empty read would reproduce the false all-clear (docker ps --filter
  ancestor= exits 0 listing nothing), so the tag is expanded as
  ${dolt_image:?...}, which refuses to run docker without it. A trailing
  "[ -n ... ] || { ...; return 1; }" guard does not do that when pasted at an
  interactive prompt: a top-level return stops neither bash nor zsh, and the
  next line still runs docker with an empty filter. Deliberately NOT added to
  doltpin_test.go's scanned set: doltPinImageRE requires the assignment form
  DoltDockerImage = "..." which cannot appear in prose, and find() t.Fatalf's
  on a miss, so that would red a currently green test.

Validation: git diff --check clean; go test ./test/docsync/ 8 PASS / 0 FAIL /
0 SKIP with TestDoltVersionPinsAgree green; scripts/check-doc-freshness.sh
exit 0; the snippet extracted from the doc passes bash -n and zsh -n, resolves
dolthub/dolt-sql-server:2.2.0 from the repository root and from a
subdirectory in interactive bash and zsh, and outside a repository prints the
error without running docker (checked against a stub docker).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Gas City Adopt-PR <adopt-pr@gascity.local>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 20:17:56 -07:00
..
adr fix(init): refuse to silently recreate a missing server-side database as empty (#5791) 2026-09-30 20:07:49 -07:00
decisions docs(pipeline): pin the CLI docs to the released bd; repair main's broken CLI reference (#4876) 2026-07-17 18:03:28 -07:00
design perf(ready): answer the page and its total in one pass (#6731) 2026-09-24 23:50:09 -07:00
staged-for-removal docs: pin the Dolt version instead of steering users to releases/latest (ga-m0dlk) (#5899) 2026-08-20 22:41:24 -07:00
ADDING_AN_ISSUEOPS_ROLE.md feat(journalops): the mutation journal becomes the third facade namespace (#5552) 2026-08-10 10:58:05 -07:00
AGENT_SIGNING.md docs: move internal/maintainer docs from docs/ to engdocs/ 2026-07-12 10:37:07 -07:00
ATTRIBUTION.md docs: move internal/maintainer docs from docs/ to engdocs/ 2026-07-12 10:37:07 -07:00
BDP_BEAD_GRAPH_PLAN.md BDP bead-graph plan and W-arch design docs (P-1 rulings complete; docs-only) (#6154) 2026-09-28 22:12:19 -07:00
BDP_GRAPH_ARCHITECTURE.md BDP bead-graph plan and W-arch design docs (P-1 rulings complete; docs-only) (#6154) 2026-09-28 22:12:19 -07:00
BDP_GRAPH_CLI_AND_STORAGE_SPEC.md BDP bead-graph plan and W-arch design docs (P-1 rulings complete; docs-only) (#6154) 2026-09-28 22:12:19 -07:00
CI_CLEANUP_PLAN.md ci: give PR Risk's gate a distinct check name (#6939) 2026-09-28 22:31:43 -07:00
CI_REQUIRED_CHECK_TOPOLOGY.md ci(bazel): remote-execution Bazel lanes for allowlisted fork authors (advisory) (#6994) 2026-09-30 14:54:06 -07:00
CI_TEST_SURFACE_AUDIT.md ci: give PR Risk's gate a distinct check name (#6939) 2026-09-28 22:31:43 -07:00
CLAUDE.md docs(test): make TESTING.md canonical (bd-mrs20) (#5226) 2026-08-01 02:30:21 -07:00
COLLISION_MATH.md docs(ci): add Mintlify preview, docsync guard, and broken-links workflow 2026-07-12 10:37:07 -07:00
complexity-baseline.txt ci: add advisory cyclomatic complexity reporting (#6081) 2026-08-30 19:05:17 -07:00
COMPLEXITY_TRACKING.md ci: add advisory cyclomatic complexity reporting (#6081) 2026-08-30 19:05:17 -07:00
CONTRIBUTOR_NAMESPACE_ISOLATION.md docs(ci): add Mintlify preview, docsync guard, and broken-links workflow 2026-07-12 10:37:07 -07:00
DOC_INVENTORY.md fix(init): refuse to silently recreate a missing server-side database as empty (#5791) 2026-09-30 20:07:49 -07:00
ERROR_HANDLING.md docs: port user docs into the Mintlify site tree under docs/ 2026-07-12 10:37:07 -07:00
EXCLUSIVE_LOCK.md docs: move internal/maintainer docs from docs/ to engdocs/ 2026-07-12 10:37:07 -07:00
EXTENDING.md feat(storage): opt-in lite SELECT shape (Issue body columns deferred) (#3906) 2026-07-26 15:29:08 -07:00
ICU-POLICY.md docs(ci): add Mintlify preview, docsync guard, and broken-links workflow 2026-07-12 10:37:07 -07:00
INTEGRATION_CHARTER.md docs(ci): add Mintlify preview, docsync guard, and broken-links workflow 2026-07-12 10:37:07 -07:00
INTERNALS.md docs(ci): add Mintlify preview, docsync guard, and broken-links workflow 2026-07-12 10:37:07 -07:00
LINTING.md fix(lint): suppress two darwin-only gosec findings and cross-lint the darwin build in CI (#6243) 2026-09-28 15:44:52 -07:00
messaging.md fix(doctor): recommend 'bd prune' instead of nonexistent 'bd cleanup' (#5829) 2026-08-20 05:30:47 -07:00
PERFORMANCE_TESTING.md docs(engdocs): point storage test and bench references at the Dolt packages 2026-07-18 02:43:57 +00:00
PROJECT_CHARTER.md docs(ci): add Mintlify preview, docsync guard, and broken-links workflow 2026-07-12 10:37:07 -07:00
README_TESTING.md docs(test): make TESTING.md canonical (bd-mrs20) (#5226) 2026-08-01 02:30:21 -07:00
RELEASE-STABILITY-GATE.md docs: move internal/maintainer docs from docs/ to engdocs/ 2026-07-12 10:37:07 -07:00
RELEASING.md docs: move internal/maintainer docs from docs/ to engdocs/ 2026-07-12 10:37:07 -07:00
REPO_CONTEXT.md docs(ci): add Mintlify preview, docsync guard, and broken-links workflow 2026-07-12 10:37:07 -07:00
RULES_AUDIT_DESIGN.md docs: move internal/maintainer docs from docs/ to engdocs/ 2026-07-12 10:37:07 -07:00
SECURITY-DEPENDENCY-EXCEPTIONS.md Bump Go to 1.26.5 (#4942) 2026-07-23 18:54:32 -07:00
SERVE_RUNBOOK.md docs: the ext-api-store documentation tranche — post-#5516 auth sweep, wave doc coherence, role checklist refresh (#5545) 2026-08-10 08:05:07 -07:00
TESTING.md docs(testutil): document migration-0032 hang and Ryuk-disabled container-leak caveats (#6001) 2026-09-30 20:17:56 -07:00
TESTING_PHILOSOPHY.md docs(test): make TESTING.md canonical (bd-mrs20) (#5226) 2026-08-01 02:30:21 -07:00
UI_PHILOSOPHY.md docs: move internal/maintainer docs from docs/ to engdocs/ 2026-07-12 10:37:07 -07:00