feat: Detect & Fill test_paths at Setup#450
Conversation
There was a problem hiding this comment.
Pull request overview
This PR makes the /git-pr impact breakdown’s impl/tests split work out-of-the-box by having setup infer test_paths from on-disk ecosystem markers and by adding a backfill migration for existing repos. It also updates the scaffold and documentation so the test_paths knob remains discoverable even after auto-filling.
Changes:
- Add non-interactive
test_pathsdetection to/fab-setup configcreate mode (marker→pattern table; union for multi-marker repos; visible note in output). - Update the config scaffold to include a persistent, annotated
test_pathsexample comment block plus a{TEST_PATHS}placeholder for substitution. - Add a
2.7.1-to-2.8.0migration and bumpsrc/kit/VERSIONto2.8.0, with doc/spec/memory mirrors updated accordingly.
Reviewed changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/kit/VERSION | Bumps kit version to 2.8.0 to align with the new migration. |
| src/kit/skills/fab-setup.md | Documents create-mode detection + {TEST_PATHS} substitution and output note behavior. |
| src/kit/scaffold/fab/project/config.yaml | Adds standing test_paths examples and {TEST_PATHS} placeholder in the scaffold template. |
| src/kit/migrations/2.7.1-to-2.8.0.md | Introduces a migration to refresh the comment block and backfill test_paths when empty/absent. |
| fab/changes/260626-5qf5-detect-fill-test-paths/plan.md | Captures requirements/tasks/acceptance for this feature change. |
| fab/changes/260626-5qf5-detect-fill-test-paths/intake.md | Records rationale and design decisions for anchored detection and migration behavior. |
| fab/changes/260626-5qf5-detect-fill-test-paths/.status.yaml | Tracks change metadata/progress for this fab change folder. |
| fab/changes/260626-5qf5-detect-fill-test-paths/.history.jsonl | Records stage transitions/events for this fab change folder. |
| docs/specs/skills/SPEC-fab-setup.md | SPEC mirror updates for the new detection + {TEST_PATHS} placeholder behavior. |
| docs/memory/distribution/setup.md | Memory updates describing create-mode auto-detect/fill of test_paths. |
| docs/memory/distribution/migrations.md | Memory updates cataloging the new 2.7.1-to-2.8.0 migration. |
| docs/memory/distribution/index.md | Index description updates reflecting the new setup/migration behavior. |
| docs/memory/_shared/configuration.md | Updates shared config docs to reflect setup-time test_paths detection and backfill migration. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| │ │ │ the marker→ecosystem table: go.mod→**/*_test.go, | ||
| │ │ │ pyproject.toml/pytest.ini→**/test_*.py+**/*_test.py, | ||
| │ │ │ jest/vitest→**/*.spec|test.ts|js, pom.xml/build.gradle→ | ||
| │ │ │ **/src/test/**, *.csproj→**/*Tests.cs+**/*Test.cs; |
There was a problem hiding this comment.
Fixed — replaced the ambiguous **/*.spec|test.ts|js with the four concrete patterns **/*.spec.ts+**/*.test.ts+**/*.spec.js+**/*.test.js, matching the canonical fab-setup.md marker table. (94065da)
Meta
5qf5excludes
fab/,docs/· generated by fab-kit v2.7.1Pipeline: intake ✓ → apply ✓ → review ✓ → hydrate ✓ → ship → review-pr
Summary
The
/git-primpact breakdown's test/impl split silently does nothing unless a project has manually settest_paths. Since the key ships commented-out with no default and setup never fills it, almost all fab-kit projects get a collapsed single-line breakdown — the richerimpl/teststaxonomy is invisible. This change makes setup detect the right anchored pattern from on-disk marker files (Go/Python/JS-TS/Java-Kotlin/.NET) and filltest_pathsautomatically, with a2.7.1-to-2.8.0migration that backfills existing repos and refreshes the scaffold comment block.Changes
src/kit/scaffold/fab/project/config.yaml): persistent annotated example comment block above the active key, with{TEST_PATHS}placeholder for create-mode substitutionsrc/kit/skills/fab-setup.md): non-interactive detection sub-step in create-mode — applies language→pattern table, fillstest_paths, surfaces a visible note; unrecognized stacks leave it emptysrc/kit/migrations/2.7.1-to-2.8.0.md): backfill detection + comment refresh for existing repos; idempotent (skips non-emptytest_paths, sentinel-guarded comment block);src/kit/VERSIONbumped 2.7.1 → 2.8.0docs/specs/skills/SPEC-fab-setup.md,docs/memory/distribution/setup.md,docs/memory/distribution/migrations.md,docs/memory/_shared/configuration.md