Repository navigation
Conversation
|
|
`invalid()` compresses every package and destination refusal into `INSTALL_OWNERSHIP_CONFLICT`. The shareable installer diagnostic prints only the step, the code and the I/O kind, so a machine whose install path contains a junction or symbolic link reports the same text as a genuine admitted-byte conflict and leaves no way to tell them apart. `regular()` is the single admission point for every destination and source, and it already refuses reparse-point and symlinked ancestors by design. Give that refusal its own code, and give the non-regular target case one as well, so `plan-installed-files` names the shape instead of the conflict. A common Windows layout triggers this: an account that keeps `~/.claude/skills` as a junction onto another drive cannot install, and every retry repeats the same ownership text. The Windows guide now says which destinations the transaction writes and how to inspect them before running the installer. Signed-off-by: esseener <28524448+esseener@users.noreply.github.com>
esseener
force-pushed
the
fix/specific-install-path-error-codes
branch
from
November 18, 2026 15:32
f7bde0e to
fac6d37
Compare
This branch has not been deployed
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.
What breaks
invalid()returnsINSTALL_OWNERSHIP_CONFLICTfor every package and destination refusal, not only ownership ones.regular()refuses a reparse point or symlink in any ancestor of a destination — it is the single admission point for every destination and every source read — but it reports that refusal with the ownership code.The installer diagnostic is the only thing a user sees, and it deliberately prints just the step, the shareable code and the I/O kind, because raw error text can carry paths or localized native text. So the report cannot distinguish:
All three read
Code: INSTALL_OWNERSHIP_CONFLICT,Operation: plan-installed-files,I/O kind: InvalidData.How it shows up
The transaction writes the Agent skill record under both
~/.agentsand~/.claude. An account that keeps~/.claude/skillsas a junction onto another drive — a common Windows layout — therefore cannot install at all, and every retry ends atplan-installed-fileswith the same ownership text. Nothing in the report points at a path, and renaming the installation directories, taking ownership of them, or rerunning the installer does not change the outcome.Change
Give the two path-shape refusals their own codes:
INSTALL_OWNERSHIP_CONFLICTINSTALL_PATH_REPARSE_UNSUPPORTEDINSTALL_OWNERSHIP_CONFLICTINSTALL_PATH_NOT_REGULAR_FILEBoth are added to the code list in
crates/cli/src/service/windows/install.rs, so the JSONcodecarries them instead of collapsing toINSTALL_FAILED.The security behaviour is unchanged: those paths are still refused,
invalid()still covers byte conflicts, and the error kind staysInvalidData. Only the shareable code changes.docs/standalone-windows.mdnow names the destinations the transaction writes, shows how to inspect them, and says what to do when one of them is a link.Testing
cargo fmt --all -- --check— clean.cargo test --locked -p hiroute-host-runtime --libon Windows 11 x64 — 61 passed, 0 failed.crates/host-runtime/src/standalone_install/files.rs: a symlinked ancestor and a non-regular target each keep their own code, and an absent path still admits. The two path-shape tests are#[cfg(unix)]because creating a junction in a test needs a privilege Windows CI does not have, so Linux CI is their first run.~/.claude/skillsas a junction,hiroute __windows-install --request-stdinstops atplan-installed-fileswithI/O kind: InvalidDataand the ownership text; with the junction replaced by a real directory the same package installs andservice doctorreports five of five checks healthy.Scope of verification: the
hirouteCLI binary does not build on this machine because its build script requirescmake, so I did not execute the post-change failure end to end. The unit tests coverregular(), and the code list change is a literal addition of the two strings the CLI matches against.