Correct README claims contradicted by the code - #4
Merged
Conversation
- js/README.md: "Validated when the client is built - the only place this
package throws" is wrong. js/src/client.ts's `requirePath` throws
`github-docs: ... is not a published document` from `webUrl` and `rawUrl`
when the target is not in the catalogue. Verified against the built package:
`createDocsClient({repo:'acme-guild/handbook', documents:['handbook/rules.md']})
.webUrl('nope')` throws, while `.fetchMarkdown('nope')` returns
`{status:'not-listed'}`.
- python/README.md and the root README: `python3 -m unittest discover -s tests -v`
could not work as written from a fresh clone -- nothing puts python/src on
sys.path, so discovery collects one error instead of 31 tests. CI installs the
package first (.github/workflows/ci.yml: `python -m pip install .`). Added
PYTHONPATH=src; 31 tests pass.
- Root README: both development lines were written to run from the repo root,
but `cd python` after `cd js` resolves to js/python. Wrapped each in a
subshell; both verified from the repo root.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019KfUfNYTjPUrGcJnS5Ha23
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.
Three documentation claims were checked against the code and found to be contradicted by it. Only the documentation was changed; no source file was touched.
The audit was carried out by Claude. Both suites were run locally to ground the findings — 65 vitest tests and 31
unittesttests, plusnpm run typecheckandnpm run build, all green — and every TypeScript example in the two READMEs was extracted and type-checked againstjs/src/index.tsunder--strict. All examples compile as written, so none was changed.js/README.md, Configuration:repois "Validated when the client is built — the only place this package throws"requirePathinjs/src/client.tsthrowsgithub-docs: … is not a published documentand is called by bothwebUrlandrawUrl. Confirmed against the built package: withdocuments: ['handbook/rules.md', 'handbook/getting-started.md'],docs.webUrl('nope')anddocs.rawUrl('nope')both throw, whiledocs.fetchMarkdown('nope')returns{status: 'not-listed'}. The same over-claim appears in therequireRepoSlugdocstring injs/src/repo.ts; that is source, so it was left alone.webUrl/rawUrlas the other throw sites, contrasted withfetchMarkdown'snot-listed.python/README.md, Development:python3 -m unittest discover -s tests -vpython/in a fresh clone this collects one error rather than 31 tests, because nothing putspython/srconsys.path. CI installs the package before discovering —.github/workflows/ci.yml:python -m pip install .thenpython -m unittest discover -s tests -v.PYTHONPATH=srcprepended, with a comment namingpip install -e .as the alternative. Verified: 31 tests, OK.cd js && …followed bycd python && …cd pythonresolves tojs/pythonand fails. The Python line also carries thesys.pathproblem above.PYTHONPATH=src. Both were run from the repo root exactly as written and both pass.Claims that were checked and found accurate, and therefore left alone: the package names against
js/package.jsonnameandpython/pyproject.tomlname; Node 18+ and ESM againstengines.node,"type": "module"and the CI matrix (18,20,22); Python 3.9+ againstrequires-pythonand the CI matrix (3.9–3.13); every documented npm script againstpackage.jsonscripts; every name in the js README's API listing against the re-exports injs/src/index.ts(all 28 present); the wholeDocsClientConfigdefaults table againstcreateDocsClient(refHEAD, transportapi-with-token /raw-without,timeoutMs5000,maxDocumentBytes1048576,apiBase,fetchImpl, and the unset-vs-emptydocumentsdistinction); theMarkdownFetchunion againstclient.ts; theresolveLinkworked example, which was executed and returns exactly the URL the README prints; the wholeGitHubDocsConfigtable against the dataclass defaults inpython/src/github_docs/client.py, including all three message templates verbatim; every method in the Python API listing against the class; the four numbered steps of "What a save actually does" againstsave_file; thedocs-edit/<slugified-path>branch name againstbranch_name_forandslugify_path; and the "standard library only" claim,dependenciesbeing empty inpyproject.tomland the only HTTP import beingurllib.drafted by Claude on behalf of Daniel Stephenson
🤖 Generated with Claude Code
https://claude.ai/code/session_019KfUfNYTjPUrGcJnS5Ha23