fix(readme): restore README doctest coverage broken by PR2 (main red)#119
Merged
Conversation
PR2's README revamp turned main's README doctests red (3 failed | 874
passed on ci/check-test) by:
- changing the @netscript/sdk Usage fence from `ts` to `typescript`
and dropping the `json` fence (the doctest matches `ts`/`json`);
- removing the @netscript/service createService/auth code example.
Failing tests:
- packages/sdk/tests/readme-doctest_test.ts (ts + json fences)
- packages/service/tests/_fixtures/readme-examples_test.ts (lifecycle APIs)
README-only fix (no source/test changes):
- sdk: relabel the Usage fence `typescript` -> `ts` so the doctest
type-checks it against its prelude; add a `json` import-map fence.
- service: restore the proven createService().withAuthn().serve() and
defineService(..., { auth: {...} }) examples carrying the pinned
lifecycle substrings.
All 4 doctests pass locally; deno fmt --check clean.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014gW4zfhMMQU6txC828ijct
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix: main is red — README doctests broken by PR2 (#117)
PR2's README revamp (
f68fa916) turnedmainred onci / check-test(3 failed | 874 passed). The doctests that guard the package READMEs
were broken, not the package APIs:
packages/sdk/tests/readme-doctest_test.ts(TS fences)```ts→```typescript; the doctest only extractsts, so it found zero checkable fences.packages/sdk/tests/readme-doctest_test.ts(JSON fences)```jsonfence was dropped; the doctest requires ≥1 parseable JSON fence.packages/service/tests/_fixtures/readme-examples_test.tscreateService().withAuthn().serve()/defineService(..., { auth })example was removed, so the pinned lifecycle substrings were absent.Fix (README-only — no source or test changes)
@netscript/sdk— relabel the Usage fence back to```ts(it type-checks clean against the doctest prelude) and add a```jsonimport-map fence.@netscript/service— restore the proven fluent-builder + auth examples (createService(...).withAuthn({ authenticator }).serve()and thedefineService(..., { auth: {...} })preset opt-in), carrying the lifecycle substrings the fixture asserts.Validation
Scope is deliberately minimal so
maingoes green ahead of the JSRpublish; the PR3 root-README work is unaffected.
🤖 Generated with Claude Code