Repository navigation
Conversation
## Summary Closes the installer gaps #2019 names, apart from its third item. - **`git_in()` catches `ValueError`**, so `--report` survives a registered marketplace path carrying a NUL byte instead of crashing in `subprocess.run`. It re-raises `UnicodeDecodeError`, a `ValueError` subclass, so undecodable git output still raises as before rather than reading as "no answer", which would let a dirty tree be stamped clean. - **The "gone" wording now says "is not a directory".** The installer's stderr line, `--report`'s reason, and `scripts/README.md` all say that instead of "no longer exists" / "does not exist", which was wrong where a plain file sits at the registered path. - **The third item, the refresh cadence's `--snapshot-only` wording, is not changed here.** A local review showed that `--snapshot-only` registers nothing, so the issue's proposed wording would leave a machine with no install, or a gone registration, without the Claude Code channel. Two rounds of carve-outs did not converge, so this branch reverts to the develop wording. The ownership question moves to #2191 (`decision`). ## Tests - New `LiveChannelCase` tests cover a NUL-byte registered path (with no subprocess mock, since subprocess itself refuses the path) and a plain file at the registered path. - A new `GitInCase` test checks that `UnicodeDecodeError` is raised, not swallowed. - With each fix reverted, its test fails: the NUL test errors with `ValueError: embedded null byte`, and the decode test fails. - `python3 -m unittest tests.test_skills_install`: 74 tests, OK. - The pre-commit gates (ruff, mypy, prose, eol), `build_dist.py --check`, `spec/validate.py`, and `docker_lint.py` all pass. ## Known, not fixed here - The `git_in` docstring's "None on any failure" was already untrue for `UnicodeDecodeError` before this change. - `source_ref()` reads a `None` status as clean. That is #1869. Refs #2019. The closing keyword goes on the promotion PR. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 5.5 <[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 |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2193 +/- ##
==========================================
+ Coverage 56.60% 56.61% +0.01%
==========================================
Files 16 16
Lines 7480 7482 +2
==========================================
+ Hits 4234 4236 +2
Misses 3246 3246
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The carried fix is small, self-contained, logically correct per verification of the exception ordering, and fully covered by new tests with consistent wording across code, tests, and docs.
Review effort: Balanced
Findings: None
What changed in this PR
This promotion PR merges develop into main, carrying a single hardening fix to the fleet Skills installer (scripts/skills_install.py). It stops skills_install.py --report from crashing when the registered Claude Code marketplace path carries a NUL byte, while ensuring undecodable git output is still surfaced rather than silently read as a clean tree. It also corrects user-facing wording for the "gone registration" case from "no longer exists" to "is/no longer a directory", which is accurate when a plain file sits at the registered path.
Changes:
git_in()now swallowsValueError(alongsideOSError/TimeoutExpired) so a NUL-byte registered path is reported instead of crashing, but explicitly re-raisesUnicodeDecodeErrorso undecodable output is never read as "no answer".- Updated the installer message,
--reportreason, andscripts/README.mdto say the registered path "is not / is no longer a directory". - Added tests covering a NUL-byte registered path, a plain file at the registered path, and the
UnicodeDecodeErrorre-raise.
| File | Description |
|---|---|
| scripts/skills_install.py | Hardens git_in() exception handling and updates the two "gone registration" messages to directory-based wording. |
| tests/test_skills_install.py | Adds tests for NUL-byte path, file-at-path, and decode re-raise; updates assertions to new wording. |
| scripts/README.md | Aligns the installer's documented re-point behavior wording with the code change. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Summary
Promotes develop to main, carrying #2192.
scripts/skills_install.py --reportfrom crashing on a registered marketplace path that carries a NUL byte.git_in()now catchesValueErrorand still re-raisesUnicodeDecodeError, so undecodable git output is never read as a clean tree. The installer's message,--report's reason, andscripts/README.mdnow say a registered path that is gone, or that holds a plain file, "is not a directory".--snapshot-onlywording, is not carried here. That flag registers nothing, so the proposed wording would strand a machine with no install. Which surface owns the cadence is now decision Settle Which Surface Owns the Skills Refresh Cadence and Which Flag Each Runs #2191.Fixes #2019
🤖 Generated with Claude Code