Repository navigation
Stop the PowerShell Install on a Refusal and Fail a Tool With No Microsoft Feed - #4352
Conversation
…ft Feed, Reword the Unmanaged Log The non-apt pwsh path check ran in a process substitution, so its refusal was printed and ignored. It is now read into a variable and ends the run. A host Microsoft publishes no feed for fails the dotnet or powershell tool and the run carries on. An unmanaged gh or op in install mode says the repository is configured and --upgrade moves it. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…e Architecture Skip Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 58 minutes. View limit details
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. |
|
A recorded local strict-review pass covers head |
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues are reported, and the change is supported by targeted regression tests and updated documentation covering the affected installer behaviors.
No open issues 🎉
What changed in this PR
This PR updates the Linux host-tool installer so PowerShell refusals remain fatal, missing Microsoft feeds fail only the affected tool, and unmanaged repository behavior is clearer.
Changes:
- Preserves PowerShell non-APT path-check failures.
- Collects missing Microsoft feed failures for .NET and PowerShell while continuing the run.
- Clarifies unmanaged
ghandoplogging. - Adds regression tests for refusal, feed, architecture, and upgrade branches.
| File | Description |
|---|---|
| tests/test_install_tools.py | Adds Linux installer regression tests covering refusal, feed failure, architecture, continuation, and unmanaged-tool paths. |
| host-setup/linux/README.md | Documents Microsoft feed failures, refusal behavior, and unmanaged repository handling. |
| host-setup/linux/install-tools.sh | Adjusts refusal propagation, Microsoft feed failure handling, architecture outcomes, and unmanaged-tool logging. |
Review effort: Lite
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #4352 +/- ##
===========================================
- Coverage 81.60% 79.57% -2.04%
===========================================
Files 26 45 +19
Lines 9070 15937 +6867
===========================================
+ Hits 7402 12682 +5280
- Misses 1668 3255 +1587
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:
|
|
@coderabbitai review |
|
/review |
Action not completed
|
…ix the PowerShell Feed Comment (#4357) Fixes the three blockers on promotion PR #4356: its lint failure and two Copilot threads. It also reduces #1615's remaining `paste-safe` instances. Closes on promotion: none ## Changes - `docs/repo-config.md` and `repo-config/README.md`: every `paste-safe` instance (11 and 8 left by #4353) is quoted per `GOVERNANCE.md` "Copy-and-Run Commands". Placeholders are quoted, and each `release|operational` alternation is the common value `release` with the other named in a parenthetical or, in the shell fence, a trailing comment. `prose_lint.py --check paste-safe` reports zero on both files. - `host-setup/linux/install-tools.sh`: the two comment lines above `run_root dpkg -i` said a failed feed goes on to remove a working `pwsh`. Since #4352, `powershell_install` stops at `microsoft_feed || return 1` before `powershell_remove_non_apt`, so the comment now says both callers stop on a failed feed and only a failed `dpkg -i` ends the run. Comments only, so this PR carries the `comments` label. ## Copilot finding on `validate-task.yml` (Setup uv step `hashFiles`), declined, no change - GitHub's reuse-workflows article: "Subdirectories of the `workflows` directory are not supported." https://docs.github.com/en/actions/how-tos/reuse-automations/reuse-workflows . The workflow syntax article adds that workflow files must be stored in `.github/workflows`. A nested file is neither a caller nor a callee, so the `.github/workflows/*.yml` glob covers every file GitHub runs. ## Pre-existing findings, not filed - `.github/actions/repo-gate/repo_gate.py:56`, `WORKFLOW = re.compile(r"workflows/.*\.ya?ml$")`, class `pre-existing`: `workflow-inputs` (and sha-pin) scan nested and any `*/workflows/*.yml` path, which GitHub never runs. Harmless over-scan, so repo_gate.py is not changed here. - `repo-config/README.md:102`, `gh api PATCH /repos/{owner}/{repo}` in a parenthetical is not valid gh syntax and is not a command to paste, class `pre-existing`. ## Verification Full unittest suite, prose gate on the diff (`--allow-comments`), `paste-safe` on both files, shellcheck and shfmt on install-tools.sh. Local strict review recorded, 0 findings. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 5.5 <[email protected]>
…afe Commands, and Workflow Input Check (#4368) Promotes the eleven pull requests that landed on develop since the last promotion. - #4348: Say where a reviewer's clean pass leaves its record. `pr-review-conduct` "Silence is not evidence" now states that a clean pass can leave an empty-bodied review or, for CodeRabbit, only a summary comment line. - #4351: Count a CodeRabbit clean pass its summary alone records. `side_answered` and `side_rounds` read the summary comment, so `wait` stops re-requesting a head CodeRabbit already passed. - #4346: Detect and report a one-off rather than correct it by code, and let a rollback carry a `Reopens on promotion:` line (operational repositories). `add-host-tool` now reports a shadowing copy instead of removing it. - #4349: Declare a `publicInteraction` policy per repository in the registry and apply and check it from `repo-config/configure.sh` (GitHub interaction limit, Discussions off by default). - #4352: The PowerShell install stops on a refusal, a tool with no Microsoft feed fails alone while the run continues, and an unmanaged `gh` or `op` in install mode says `--upgrade` moves it. - #4353: Copy-and-run commands in Markdown are paste-safe, with a new "Copy-and-Run Commands" rule, a generated include in `comment-and-doc-style`, and a default `paste-safe` prose gate rule. - #4350: Register every Claude Code hook the host-safety kit installs in exec form on all platforms, and rewrite shell-form registrations. This edits the agent's own guard. - #4354: A new repo-gate check, `workflow-inputs`, compares each reusable-workflow call's `with:` keys against the callee at the caller's pin. - #4357: Quote the remaining paste-safe commands in the repo-config docs and update the stale PowerShell feed comment, the fix for the promotion's own lint failure and Copilot thread. - #4358: Keep the tilde outside the quotes in the base-clone placeholders and keep the probe executable and arguments as separate tokens, the fix for the five Copilot findings on this promotion, plus the AUDIT.md interaction-check coverage and the repo-gate docstring wrap. - #4359: Keep the tilde outside the quotes in the remaining base-clone placeholders, the sibling sweep of the same defect. ## Owed by the maintainer before rollout From #4349: - Run the live `repo-config/configure.sh apply` on each repository. Until it runs, `configure.sh check` and the audit flag the public repositories. - Confirm that Copilot, CodeRabbit, Qodo and Dependabot still work under the interaction limit. - Update other repositories' README links to Discussions, since Discussions go off by default. From #4353: it changed carried text, so a fleet resync is owed. ## Local-pass findings Class and disposition for the four findings the recorded local pass raised on the earlier head: - `host-setup/linux/install-tools.sh` removal code (`powershell_remove_non_apt`, `remove_unowned_command`, `op_remove_download`, docker and shadow removals) against the one-off rule, class `introduced`: tracked by #4347, not this pull request. - `Reopens on promotion:` exists for operational repositories only, class `introduced`: declined under the maintainer's answer on #4175, which places the rule in "Operational Repositories". - `AUDIT.md` does not list the interaction-limit check, class `introduced`: fixed in #4358. - `repo_gate.py` `check_workflow_inputs` docstring lines over the line length, class `introduced`: fixed in #4358. Fixes #4170 Fixes #4175 Fixes #4329 Fixes #4172 Fixes #4124 Fixes #2596 Fixes #4040 Fixes #2822 Fixes #3896 Supersedes #4356 because of the `.github/workflows/validate-task.yml` Dependabot conflict (the `astral-sh/setup-uv` pin bump on main beside the `if:` condition #4354 changed on develop), resolved from develop's side as a strict superset of main's. The merged tree equals develop's. This also carries #4365, #4366 and #4367, the fixes for findings raised on #4356; none of them closes an issue. ## Findings on this promotion's head Local pass over the whole `main` diff (four findings) and the Copilot round (two threads): - `configure.sh` `publicInteraction` lookup matches the registry name exactly while apply's guard matches case-insensitively, class `introduced` (#4349): declined with evidence. A name differing only in letter case makes `spec/resolve_description.py` exit 1 at `configure.sh` line 331, before `cmd_apply` or any `gh api --method` call, so no limit is written on the wrong value. Checked by running the lookup on sample JSON, and no write is reachable. - The ungrammatical `hook the host keeps of its own` phrase (Copilot thread), class `introduced` (#4350): fixed in #4369 into develop. - Copilot's README Discussions thread: declined with evidence, the canonical-link list names a link when present and does not require it, and #4349 turned Discussions off. - `Reopens on promotion:` scoped to operational repositories, class `introduced`: declined under the maintainer's answer on #4175, which places the rule in "Operational Repositories". - `add-host-tool` detect-and-report against the installer's removal code, class `introduced` (#4352 and #4346): tracked by #4347, not this pull request. - The interaction-limit precondition is not enforced by `apply`: tracked by #4364. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Summary
dotnetorpowershelltool and the run carries on, so the Changed and Failed summary prints.ghoropin install mode now says the repository is configured by the install and--upgrademoves it, per the maintainer's answer on the issue. Nothing moves or removes the tool.tests/test_install_tools.pyhold each branch.Closes on promotion: #4172, #4124, #2596
Dropped findings:
host-setup/linux/install-tools.shcomment above thedpkg -idie inmicrosoft_feed: its reason mentions a caller that goes on, wording on text this change did not touch (style).🤖 Generated with Claude Code