Skip to content

docs+test: correctness pass — sync guides with implementation (#363) - #372

Merged
scttfrdmn merged 1 commit into
mainfrom
docs/363-correctness-pass
Jul 26, 2026
Merged

scttfrdmn merged 1 commit into
mainfrom
docs/363-correctness-pass

Conversation

@scttfrdmn

Copy link
Copy Markdown
Owner

First PR of the v0.76.0 documentation-reliability milestone, addressing the correctness tier from the external review.

The fix, in one line

The docs described an ergonomic TestServer API (ts.Store(), ts.Registry(), …) and cost/replay examples that never compiled against the current package emulator. Rather than degrade the docs to match a thinner API, I made the documented API real.

Code

  • New TestServer accessors: Store() *EventStore, StateManager(), TimeController(), Registry().
  • StartTestServer now enables the in-memory event store, so ts.Store().GetCostSummary(...) and recording/replay work out of the box.
  • New tests guard the accessors and the documented cost path.

Docs

  • Corrected the TestServer API description (was "two fields and one method").
  • Fixed the detached-store bug in both the cost and replay examples — they built a fresh NewEventStore disconnected from the server, so a copy-paste user got an empty cost summary and would conclude cost tracking was broken. Now they use ts.Store(). Also switched the account ID to 123456789012 (what the built-in test creds map to).
  • Replaced pinned stale v0.68.0 strings with neutral placeholders.
  • Reconciled the 63 plugins vs 37 services contradiction with an honest holding note (full fix = registry generation, docs: generate service reference (and counts) from the plugin registry + CI drift guard #364); live count is /ready.
  • Fixed the duplicated [profile substrate] block and the README "has needs" typo; added the "AI generation is the motivating use case, not a prerequisite" clarification.

Verification

Extracted the Getting Started S3 test into a throwaway module with a replace directive — it compiles and passes verbatim. Cost + replay snippets compile too. Full race suite + lint clean.

Closes #363. Part of the v0.76.0 milestone (remaining: #364 generate reference, #365 docs-CI, #366 Python CI, #367 examples, #368 contributor guide, #369 security doc, #370 restructure, #371 package-growth discussion).

…ocumented TestServer API real (#363)

The public docs had drifted from the implementation (found by an external
review). Rather than degrade the docs, make the documented ergonomic API real:

- Add TestServer accessors Store()/StateManager()/TimeController()/Registry()
  and enable the in-memory event store in StartTestServer, so the documented
  cost-summary and recording/replay examples work out of the box.
- Fix the Getting Started + Testing guides: correct the TestServer API
  description (was 'two fields and one method'), point cost/replay at the
  server's own store instead of a detached NewEventStore (the bug that gave
  copy-paste users an empty cost summary), and use the account ID the built-in
  test credentials map to.
- Replace pinned stale v0.68.0 version strings with neutral placeholders.
- Reconcile the 63-plugins-vs-37-services contradiction with an honest holding
  note pending registry-generated reference (#364); the live count is /ready.
- Fix duplicated [profile substrate] block and a README typo; add the
  'AI generation is the motivating use case, not a prerequisite' clarification.

New tests guard the accessors and the documented cost path. Verified the
Getting Started S3 snippet compiles and passes verbatim against the module.

Closes #363.
@codecov

codecov Bot commented Jul 26, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@scttfrdmn
scttfrdmn merged commit 3ab6571 into main Jul 26, 2026
10 checks passed
@scttfrdmn
scttfrdmn deleted the docs/363-correctness-pass branch July 26, 2026 06:04
scttfrdmn added a commit that referenced this pull request Jul 26, 2026
Local Claude Code permission config was accidentally swept into #372 via
git add -A. It is machine-local editor config (and contains AWS allowlists
for an unrelated project), not part of substrate. Remove from tracking and
add .claude/ to .gitignore.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

1 participant