Repository navigation
chore: tests never read documentation - #530
Merged
Merged
Conversation
Docs explain how things work; they are not a spec for the implementation. Remove every test that reads a docs page, README, CLAUDE.md or .claude/ file, test MarkdownRepository against fixtures, and make it a hard rule in CLAUDE.md, .claude/testing.md and the PR review checklist. Delete the public RoadRunner state-leak audit page (an internal spike record listed under Packages, with stale verdicts) and fold its user-relevant points into the Stateful Singleton section of roadrunner.md. Closes #529 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HHxAV6dBdcdgA6Fm8j34Zn
The check read the real docs from inside the test suite. It now runs as bin/docs-lint.php (composer docs:lint) in the required CI Lint job and in composer ci, and also scans the repository README. It fails on an empty scan, resolves classes by PSR-4 file existence only, and takes ~0.5s. The scanner's own tests run against fixtures. Refs #529 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HHxAV6dBdcdgA6Fm8j34Zn
Anonymous Docker Hub pulls on shared runners hit `toomanyrequests` and failed the Tests and Integration jobs before a single test ran. public.ecr.aws/docker/library mirrors the same official images. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HHxAV6dBdcdgA6Fm8j34Zn
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.
Closes #529
Docs explain how things work for humans and AI; they are not a spec for the implementation. This removes every test that depends on documentation and makes that a hard rule.
Changes
RoadRunner docs
docs/packages/roadrunner-state-leaks.md. It was an internal discovery-spike record ("Task 005"), was listed under Packages because the sidebar builds that section from every file indocs/packages/, and still marked the Inertia andReadWriteConnectionleaks as open after both were fixed.roadrunner.md: admin sections live for the whole worker, custom casts must be stateless, login throttle counts persist on purpose, and workers need a restart after switching between MySQL and MariaDB. Remove the link to the deleted page.Tests that read docs
DocsTest, theauthentication,testingandclaude-pluginsReadmeTests, devaiDocsPageTestandReadmeStandardsTest, frameworkArchitectureDocTest, validationDocsTest, docs-markdownAiAssistedDocsTestandAstroPipelineTest, and rootReleaseSkillTestandReleaseDocumentationTest..claude/assertions from about 20 more files (package scaffolding and structure tests, rename-reference tests, the claude-plugins plugin tests, rootCiWorkflowTest,RemoveDemoDirectoryTestand the integrationHarnessTest).moduleSingletonIdentifiers()helper only they used. The behavioral harness tests are kept.MarkdownRepositoryTestnow runs againsttests/Fixtures/docs/instead of the real docs tree.Hard rule
CLAUDE.mdKey Conventions, a new section in.claude/testing.md, and the code-quality list and merge checklist in.claude/pr-review-process.md.Docs lint (
composer docs:lint)Marko\...class in a README or docs PHP example exists moved out of the test suite intobin/docs-lint.php. It now also scans the repositoryREADME.md.Lintjob on every PR (no paths filter), even when an earlier lint step failed, and incomposer ci. A wrong docs update fails a required check and can't be merged.packages/*/composer.json, nothing is autoloaded. Takes about 0.5s. Exits 1 withfile:linefor every missing class, and refuses to pass if it finds no Markdown to scan.CiWorkflowTestchecks that the Lint job andcomposer ciboth run it.CI service images
ci.ymlandnightly.ymlnow pull Redis, Postgres, MySQL and MariaDB frompublic.ecr.aws/docker/library/(AWS's mirror of the official Docker images). Anonymous Docker Hub pulls on shared runners were hittingtoomanyrequestsand failing Tests and Integration before any test ran.CiWorkflowTestnow fails if a workflow image points back at Docker Hub. Localtests/Integration/compose.ymlis unchanged.Verification
composer ci: 11,831 tests passed (333 skipped), phpcs, php-cs-fixer, PHPStan and docs:lint cleanMarko\Roadrunner\DoesNotExistinroadrunner.mdmakesdocs:lintfail with its file and linephpcsandphp-cs-fixer --dry-run: cleancomposer phpstan: no errors🤖 Generated with Claude Code
https://claude.ai/code/session_01HHxAV6dBdcdgA6Fm8j34Zn