Repository navigation
Conversation
…1922) Settles #1913 as the maintainer decided it there: the hub is typed `python` with the `lint-only` profile, declares `.` in `python-directories`, and its unittest suite moves from `scripts/tests` to a root `tests/`. ## Changes - `registry/repos.json`: the hub gains the `python` type, `profiles.python: lint-only`, `pythonDirectories: ["."]`, and `CODECOV_TOKEN` in `requiredSecrets`. - `scripts/tests/` -> `tests/`: every test's path math is shifted one level, and every reference in docs, skills, the schema, and comments is repointed. - `.github/workflows/test-pull-request.yml` and `publish-release.yml` pass `python-directories: .` and `CODECOV_TOKEN`, so the validator's Python leg runs the suite under coverage and uploads to Codecov. - `.github/actions/validate/action.yml` drops its own unittest run and keeps only the self-tests that are not a unittest suite. - `pyproject.toml`: `tests` added to mypy `files` and pyright `include`, and `[tool.coverage.run] source` set to the tree the hook already measured. - `codecov.yml` and a lint-only `.vscode/tasks.json` clean-compile group, both owed by the python type. - The GOVERNANCE.md Repository Layout bullets and the README.md type sentence now describe the hub as it is. The `comments` label is needed because repointing a path inside existing comments counts as an edited comment line. ## Verification - `python3 -m unittest discover -s tests`: 1749 tests OK. The CI leg's exact command, `uvx coverage@latest run -m unittest discover -s tests`, writes `coverage.xml`. - ruff check and format, mypy (40 files), `spec/validate.py`, `repo_gate.py`, `prose_lint.py` whole tree, `build_dist.py --check`, the audit, workflow_reuse, and gh-write-guard self-tests, actionlint, markdownlint, and editorconfig all pass. - `spec/audit.py ProjectTemplate` with the new registry entry: the Python advisory is gone. What remains is the callers, which this branch fixes, `codecov.yml` and `.vscode/tasks.json`, which this branch adds, and `CODECOV_TOKEN` missing from both secret stores, which is the maintainer's to store. - Two local strict review passes. The second came back clean. ## Maintainer follow-ups - Store `CODECOV_TOKEN` in the hub's actions and dependabot secret stores. Until then the upload is best-effort and uploads nothing. - The workspace file lacks the Python extensions the Editor and Tasks section owes a Python repo. That edit is the maintainer's, per the rule against agents editing an active `.code-workspace`. Part of #1913. The closing reference goes on the promotion PR. 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Developer Tools** * Added VS Code tasks for Python formatting, linting, and type checking, with a combined default task. * Python validation now includes the repository’s test suite and reports coverage status for projects and patches. * **Documentation** * Updated testing instructions and repository guidance to reflect the current test locations and Python project configuration. * **Bug Fixes** * Corrected test and script references so local and automated checks use the appropriate repository paths. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: Repository: ptr727/ProjectTemplate/.coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
@coderabbitai review |
|
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
Changes appear consistent and mechanically correct across registry, workflows, tests, and documentation for the scripts/tests/ -> tests/ transition.
Review effort: Lite
Findings: None
What changed in this PR
Promotes develop to main with the hub now treated as a Python (lint-only) repository whose root tests/ suite is executed by the shared validate-task.yml workflow under coverage, with Codecov upload wired through callers.
Changes:
- Declare the hub as
python(lint-only) inregistry/repos.json, setpythonDirectories: ["."], and requireCODECOV_TOKEN. - Relocate/retarget hub unit tests to root
tests/and update all path references accordingly across docs, schema comments, and test harnesses. - Pass
python-directories: .andCODECOV_TOKENthrough the PR and release workflows; add Codecov configuration and VS Code Python tasks.
| File | Description |
|---|---|
| TODO.md | Updates roadmap prose to reference the new root tests/ location. |
| tests/test_tooling_encoding.py | Adjusts repo-root pathing and references to moved tests. |
| tests/test_spec_validate.py | Fixes sys.path insertion for spec/ after test relocation. |
| tests/test_skills_install.py | Points imports and wrapper paths at scripts//repo root from tests/. |
| tests/test_resolve_description.py | Fixes sys.path insertion for spec/ after test relocation. |
| tests/test_repo_gate.py | Updates action path and repo-root calculation for new test location. |
| tests/test_release_guards.py | Updates repo-root pathing after moving tests. |
| tests/test_python_directories.py | Updates action path import base for new test location. |
| tests/test_publish_plan.py | Updates repo-root pathing after moving tests. |
| tests/test_prose_lint.py | Updates prose-gate script path and repo-root calculation. |
| tests/test_pr_review.py | Updates scripts/ import base and repo-root calculation. |
| tests/test_local_review.py | Updates local_review.py script path to scripts/ from root tests. |
| tests/test_host_gate.py | Updates scripts/ import base after moving tests. |
| tests/test_handoff.py | Updates scripts/ import base after moving tests. |
| tests/test_docker_lint.py | Updates scripts/ import base after moving tests. |
| tests/test_configure_project.py | Updates repo-root pathing after moving tests. |
| tests/test_configure_environments.py | Updates configure script path after moving tests. |
| tests/test_configure_archived.py | Updates configure script path after moving tests. |
| tests/test_carry.py | Updates import path setup for scripts/ and spec/ after moving tests. |
| tests/test_canonical_review.py | Updates scripts/ import base after moving tests. |
| tests/test_build_dist.py | Updates scripts/ import base after moving tests. |
| tests/test_bootstrap.py | Updates repo-root pathing after moving tests. |
| spec/validate.py | Updates comment reference to the new test path. |
| spec/host-tools.json | Updates embedded note text to reference tests/test_bootstrap.py. |
| scripts/README.md | Updates documentation and example commands to use root tests/. |
| scripts/host_gate.py | Updates comment reference to the new test path. |
| registry/repos.schema.json | Updates $comment references to the new test path (schema-doc alignment). |
| registry/repos.json | Declares hub python type (lint-only), pythonDirectories: ["."], and CODECOV_TOKEN. |
| README.md | Updates operational description to reflect Python CI testing/coverage in the hub. |
| pyproject.toml | Adds tests to mypy/pyright scope and sets coverage source configuration. |
| OPERATIONS.md | Updates local coverage invocation to discover tests under root tests/. |
| host-setup/windows/README.md | Updates documentation links to tests/test_bootstrap.py. |
| host-setup/README.md | Updates documentation links to tests/test_bootstrap.py. |
| host-setup/linux/README.md | Updates documentation links to tests/test_bootstrap.py. |
| GOVERNANCE.md | Updates repository layout section for root tests/ and Python CI scope. |
| docs/token-efficiency-plan.md | Updates documentation references from scripts/tests/ to tests/. |
| docs/fleet-map.md | Updates documentation references from scripts/tests/ to tests/. |
| codecov.yml | Adds Codecov status configuration (informational project/patch). |
| .vscode/tasks.json | Adds lint-only Python editor tasks (ruff format/check + mypy) via uvx. |
| .github/workflows/test-pull-request.yml | Passes python-directories and CODECOV_TOKEN into shared validator. |
| .github/workflows/publish-release.yml | Passes python-directories and CODECOV_TOKEN into shared validator. |
| .github/skills/skill-lifecycle/SKILL.md | Updates generated skill text to reference the new test path. |
| .claude-plugin/fleet-skills/skills/skill-lifecycle/SKILL.md | Updates generated plugin skill text to reference the new test path. |
| .claude-plugin/fleet-skills/.source-digests/skill-lifecycle | Updates digest to match regenerated skill content. |
| .agents/skills/skill-lifecycle/SKILL.md | Updates authored skill source to reference the new test path. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Part of #1771. ## Problem Run from a downstream repo or from no checkout at all, the menu's "Install or update the fleet Skills" task ran `install-skills` from the hub clone the menu fetched into `$DIR/hub`. The installer registers the directory it runs from as the `projecttemplate-fleet` Claude Code marketplace, which Claude Code loads in place. The menu removes that clone on exit unless `--keep` is given, so every later session found a registration naming a missing directory and loaded no fleet skills. Observed on a Windows host: `skills_install.py --report` read `live.reason: the registered checkout does not exist, so this channel serves nothing`, with `%LOCALAPPDATA%\host-setup\` empty. ## Change - `menu.sh` and `menu.ps1`: when the hub is the menu's own fetched clone (`HUB_FETCHED`), the skills task runs that clone's `bootstrap.sh --skills --ref "$REF"` / `bootstrap.ps1 -Skills -Ref $REF`, whose kept `skills-tree` outlives the run, per #1773. A hub checkout the menu runs from still installs from itself. The menu's own `--dir` is not forwarded, since it is a cache for the clone and the bootstrap keeps its tree under its own directory. - The shared "run a script inside the hub" body is split out of `host_tool_locked` / `Invoke-HostTool` as `run_in_hub` / `Invoke-InHub`, so the skills task can target `host-setup/` as well as `host-setup/<platform>/`. - `host-setup/README.md` says why the task hands off, and names what that handoff needs: `curl` and `tar` on Linux, and `codeload.github.com` reachable (`api.github.com` only records the installed commit). - `scripts/tests/test_bootstrap.py`: `TestMenuSkillsInstall` sources `menu.sh`'s functions against stub scripts and asserts which installer runs, with which arguments, for a fetched clone and for a hub checkout. Out of scope: a host already carrying a dangling registration is not re-pointed by a later install, since `marketplace add` of a registered name is a no-op. That is #1769. The `comments` label covers one existing comment line in `menu.ps1` (the `Out-Host` note), moved unchanged with the body it explains into `Invoke-InHub`. ## Verification - `TestMenuSkillsInstall` (3) and `TestKeptTreeHandling` pass on Linux (python:3.12-slim container). The task against `develop`'s `menu.sh` fails (`install_skills_locked: command not found`). - `menu.ps1`'s `Invoke-SkillsInstall` and the refactored `Invoke-HostTool` driven under pwsh 7 on Windows against stub scripts: fetched clone -> `bootstrap.ps1 -Skills -Ref <ref> [-Yes]`, hub checkout -> `install-skills.ps1`, missing tool -> exit 1 with the existing message. - `docker_lint.py`: shellcheck, shfmt, PSScriptAnalyzer, markdownlint, editorconfig-checker all pass. ruff check/format, mypy, prose gate, and the eol gate pass. - Local strict review recorded over the final content (two README wording findings, both fixed, final pass clean). 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 5.5 <[email protected]>
There was a problem hiding this comment.
Copilot review overview
🔵 Needs a closer look
It modifies CI/workflow calling conventions and host bootstrap/menu execution paths, so it warrants a final human pass over the operational and release-critical surfaces.
Review effort: Lite
Findings: None
Summary
Promotes
developtomain, carrying two changes:pythontype with thelint-onlyprofile and.inpython-directories. Its unittest suite moves fromscripts/teststo a roottests/, which the shared validator's Python leg runs under coverage and uploads to Codecov. Both callers pass the input andCODECOV_TOKEN. The hub gainscodecov.ymland a lint-only.vscode/tasks.json, and the GOVERNANCE.md layout and README.md describe it as it now is.bootstrap.sh --skills/bootstrap.ps1 -Skills, whose kept tree outlives the run, and every path cmdlet inmenu.ps1reads its path literally.Closes #1913
Fixes #1771
Maintainer follow-ups
CODECOV_TOKENin the hub's actions and dependabot secret stores. Until then the audit reports it missing and the best-effort upload sends nothing..code-workspace.🤖 Generated with Claude Code