Skip to content

docs: correctness pass — reconcile guides with the implementation (package rename, TestServer API, cost example, versions) #363

Closed

Description

@scttfrdmn

External project review (2026-07-26) found the public docs have drifted from the implementation. This is the correctness tier — factual bugs a reader hits immediately. All verified against main at v0.75.0.

Bugs (all confirmed present)

  1. Go snippets use the old package name. The library was renamed package substrate → package emulator (import github.com/scttfrdmn/substrate/emulator) in refactor: move package into emulator/ subdirectory (clean root) #310, but docs still write substrate.StartTestServer(t) and import scttfrdmn/substrate. Every documented Go snippet is uncompilable. (docs/getting-started.md, docs/testing-guide.md)
  2. TestServer API is fictional. Docs call ts.Store(), ts.StateManager(), ts.TimeController(), ts.Registry() (getting-started.md:285-288, 322). The real type (emulator/testing.go) exposes only ResetState, AdvanceTime, SetTime, SetScale, SeedSSMParameter(s) and fields URL/Port. No Store() exists.
  3. Testing-guide cost example is detached. docs/testing-guide.md:311 builds a fresh NewEventStore and queries that, not the server under test → a copy-paste user gets an empty cost summary and concludes cost tracking is broken.
  4. "two fields and one method" description of TestServer (testing-guide.md:62) is wrong for the real type.
  5. Service count contradiction. README + docs/index.md say 63 plugins; docs/services.md says 37 services and is named the authoritative source. Table has exactly 37 rows. (Full reconciliation/generation is a separate issue; this one just removes the contradiction with a holding note.)
  6. Stale version strings — v0.68.0 in README.md:305, getting-started.md:58, endpoint-configuration.md:186 (repo is at v0.75.0).
  7. Duplicate [profile substrate] header in docs/endpoint-configuration.md:55 & :59.
  8. README typo — README.md:46 "A generate-and-verify loop has needs a human-paced workflow doesn't have".

Acceptance criteria

  • All Go snippets compile against package emulator / the real public API.
  • TestServer documentation matches emulator/testing.go exactly (methods, fields, cost-summary access path).
  • Cost example queries the server-under-test's store, not a detached one.
  • Version strings no longer pin a specific stale release (use a neutral placeholder or generate at build).
  • 37-vs-63 contradiction removed (holding note pending generated reference in the follow-up issue).
  • Duplicate profile header and README typo fixed.

Part of the v0.76.0 documentation-reliability milestone.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions