docs(test): document local harness and act usage - #86
Merged
Conversation
Local runs failed spuriously three ways: MVP_TEMPLATE_LOCAL at a dirty working tree copies gitignored artifacts into the sandbox, the kg test asserts its Python deps rather than skipping, and act --bind both writes root-owned files into the checkout and leaks the same artifacts into the workflow run. The new .claude/rules/local-testing.md is template-development-only, so instantiate.sh strips it at instantiation like observe-the-failure.md.
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.
Documents how to run the test harness and the CI workflow locally without the spurious failures a template-development checkout produces, and adds the guidance as a dev-only Claude rule.
What
scripts/test/README.md: a Python-dependencies subsection (thekg-frontmatter-graphtest assertsyaml/rdflib/pyshaclrather than skipping), a warning against pointingMVP_TEMPLATE_LOCALat a working tree containing gitignored artifacts, and a "Running the CI workflow locally with act" section..claude/rules/local-testing.md: the same guidance in agent-facing form for template contributors.scripts/instantiate.sh: the new rule joinsobserve-the-failure.mdinDEV_ONLY_RULESso it never ships to derived projects.instantiate-strips-dev-rulessmoke test: precondition + strip assertions for the new rule.Why
Three local failure modes motivated this, all invisible in CI's clean checkouts:
MVP_TEMPLATE_LOCALat a dev checkout copies the dogfoodedwiki/<template>.wiki/into the sandbox viacp -R, andinit-wiki.shfails with "multiple wikis ... name is ambiguous".act --bindwrites root-ownedscripts/kg/build/andscripts/kg/.cache/into the host checkout (the kg pipeline writes into the repo, not the test sandbox) and leaks the same gitignored artifacts into the workflow'sMVP_TEMPLATE_LOCAL=$GITHUB_WORKSPACE. act's default copy mode avoids both, since--use-gitignoremakes the container see the equivalent of a clean checkout.Verification
DEV_ONLY_RULESchange (rule shipped and survived instantiation) and green after; a precondition assertion guards against a vacuous pass.act -j test --matrix os:ubuntu-latest --rmruns the workflow's ubuntu leg green with no writes to the host tree.