Skip to content

Close the Installer Gaps Left After the Marketplace Re-Point Fix - #2192

Merged
ptr727 merged 3 commits into
developfrom
feature/installer-gaps-2019
Oct 1, 2026
Merged

ptr727 merged 3 commits into
developfrom
feature/installer-gaps-2019

Conversation

@ptr727

@ptr727 ptr727 commented Oct 1, 2026

Copy link
Copy Markdown
Owner

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 Settle Which Surface Owns the Skills Refresh Cadence and Which Flag Each Runs #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

Refs #2019. The closing keyword goes on the promotion PR.

🤖 Generated with Claude Code

ptr727 and others added 3 commits September 30, 2026 19:11
- git_in() now catches ValueError, so --report survives a registered path
  carrying a NUL byte instead of crashing in subprocess.run.
- The installer and --report now say the registered path "is not a
  directory" rather than that it no longer exists, which was wrong where a
  plain file sits there.
- The refresh cadence in docs/host-setup.md and its restatement in
  docs/fleet-map.md now say --snapshot-only, matching check-this-repo and
  skill-lifecycle.

Fixes #2019

Co-Authored-By: Claude Opus 5.5 <[email protected]>
- git_in() re-raises UnicodeDecodeError, which is a ValueError, so a
  porcelain status git did produce is never folded into "no answer" and
  stamped clean.
- The refresh cadence in docs/host-setup.md and check-this-repo now says a
  machine with no install, or a Claude Code channel unregistered or serving
  nothing, takes the full install, since --snapshot-only registers nothing.
- check-this-repo's safe-to-fix bullet routes that case to the maintainer,
  and docs/fleet-map.md points at the cadence rather than restating it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ording

The --snapshot-only cadence registers nothing, so it left a machine with no
install, or with a gone registration, without the Claude Code channel. The
full install the cadence already named is right for those, and harmless
otherwise, so the cadence surfaces return to their develop wording.

scripts/README.md now says the installer moves a registration whose path is
no longer a directory, matching the installer's own message.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Copilot AI balanced review requested due to automatic review settings October 1, 2026 02:21
@coderabbitai

coderabbitai Bot commented Oct 1, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: Repository: ptr727/ProjectTemplate/.coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: 55bdcbc8-3563-4876-b7f7-d0bee70ba3af

  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Autopilot is currently an internal CodeRabbit preview.


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@codecov

codecov Bot commented Oct 1, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 56.61%. Comparing base (15b7e6a) to head (2d81749).

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #2192      +/-   ##
===========================================
+ Coverage    56.60%   56.61%   +0.01%     
===========================================
  Files           16       16              
  Lines         7480     7482       +2     
===========================================
+ Hits          4234     4236       +2     
  Misses        3246     3246              
Flag Coverage Δ
python-3.13 56.61% <100.00%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🔵 Needs a closer look

The change edits shared hub-hosted installer tooling that the fleet carries, so final human review is warranted even though the diff is small, well-tested, and I found no defects.

Review effort: Balanced
Findings: None

What changed in this PR

This PR closes two of the three installer gaps tracked in the referenced issue for scripts/skills_install.py (the hub's Skills installer), deliberately deferring the third (the --snapshot-only refresh-cadence wording) to a separate decision issue. It hardens the Claude Code marketplace/live-channel reporting against malformed registered paths and corrects user-facing wording where a non-directory sits at the registered path.

Changes:

  • git_in() now catches ValueError (so --report survives a registered path carrying a NUL byte instead of crashing in subprocess.run) while explicitly re-raising UnicodeDecodeError so undecodable git output still fails loudly rather than being read as a clean tree.
  • The "gone" wording is corrected to "is not a directory" / "is no longer a directory" across the installer stderr line, the --report reason, and scripts/README.md, covering the case where a plain file (not a missing path) sits at the registered checkout.
  • Added tests: a NUL-byte registered path, a plain file at the registered path, the updated wording, and a GitInCase test asserting UnicodeDecodeError propagates rather than being swallowed.
File Description
scripts/​skills_install.py Adds ValueError to git_in's caught exceptions with an explicit UnicodeDecodeError re-raise; updates the registration stderr and live_channel reason wording to "not a directory".
tests/​test_skills_install.py Adds coverage for the NUL-byte path, a file at the registered path, the UnicodeDecodeError re-raise, and the new wording assertions.
scripts/​README.md Updates the prose describing when a registration is moved to say "whose path is no longer a directory".

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@ptr727
ptr727 merged commit 8679432 into develop Oct 1, 2026
11 checks passed
@ptr727
ptr727 deleted the feature/installer-gaps-2019 branch October 1, 2026 02:27
ptr727 added a commit that referenced this pull request Oct 1, 2026
…ills Installer Report (#2193)

## Summary

Promotes develop to main, carrying
[#2192](#2192).

- **#2192** stops `scripts/skills_install.py --report` from crashing on
a registered marketplace path that carries a NUL byte. `git_in()` now
catches `ValueError` and still re-raises `UnicodeDecodeError`, so
undecodable git output is never read as a clean tree. The installer's
message, `--report`'s reason, and `scripts/README.md` now say a
registered path that is gone, or that holds a plain file, "is not a
directory".
- **The issue's third item, the refresh cadence's `--snapshot-only`
wording, 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 #2191.

Fixes #2019

🤖 Generated with [Claude Code](https://claude.com/claude-code)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants