Repository navigation
Test the Bootstrap Agents Handoff and Move the Root Probe to host_capability - #3044
Conversation
…ability Cover bootstrap.sh's report handoff to the agent tools step (gate, root skip, failure line) and both loaders' agents install handoff (list parsing, all, refusals). Move the unprivileged-root probe into host_capability.py so it is cached once per process and test_bootstrap.py no longer imports a test module. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Assert the full step list for an agents install, that a refused list leaves the directory untouched, and an empty Windows list that survives the split. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Mark an argument holding a space so a names list passed as one word differs from the same names passed as separate arguments, skip the two report cases that assume a non-root run when the suite runs as root, and refresh the moved probe's docstrings. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configuration
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 |
|
A recorded local strict-review pass covers head |
There was a problem hiding this comment.
🟢 Approval recommended
The changes are confined to tests and a shared test probe, with no unresolved findings.
0 open findings
What changed in this PR
This PR expands bootstrap handoff tests and moves the unprivileged-root probe into the shared test capability module. The scripts under test are unchanged.
Changes:
- Add Linux report and agents-install handoff cases.
- Add PowerShell agents-install handoff cases.
- Share the cached unprivileged-root probe across tests.
| File | Description |
|---|---|
tests/test_skills_install.py |
Uses the shared root-capability decorator. |
tests/test_bootstrap.py |
Adds report and agents-install handoff tests. |
tests/host_capability.py |
Houses the cached root probe and skip decorator. |
🧠 Review effort: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #3044 +/- ##
========================================
Coverage 61.00% 61.00%
========================================
Files 17 17
Lines 9014 9014
========================================
Hits 5499 5499
Misses 3515 3515
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:
|
… Narrative Findings, and Bootstrap Handoff Tests to Main (#3051) - #3042 brings the agent-safety READMEs up to the write guard's #3023 and #3037 readings: `--prune` beside a pattern, `:`, `--all`, or a bare push, a `--mirror` push with no refspec, a `heads/` destination outside `refs/`, the full `@{push}` read, and a bare push denied when `git remote` cannot list the remotes - #3041 has `backlog-burndown` keep an abandoned group's claim comment until cleanup decides its release, say stopped on each path that sends a group to the maintainer, and name a branch no pull request has used when a claim comment first names it - #3044 tests `bootstrap.sh`'s `--report` handoff to the agent tools step, tests the `--agents` handoff on Linux and through `Invoke-AgentsInstall` under `pwsh`, and moves the unprivileged-root probe into `tests/host_capability.py` - #3045 makes `pr_review.py` read an `Open findings remain:` list in a Copilot review and count each entry no thread of the round accounts for, pairing by severity tier and file, so the count can only rise - #3049 makes `gh-write-guard` read a bare push's destination from `push.default` and `branch.<name>.merge`, read a persisted `remote.<name>.mirror`, deny when the `@{push}` read times out or cannot run, give a dash-named word after `--` or `--end-of-options` a reading as a remote or refspec, and judge a push moved into another checkout against that checkout's origin as well. A differential against the previous guard found no deny-to-allow flip. It addresses one item of #2943, which stays open - #3054 makes `gh-write-guard` answer unresolved, and so deny, when its `push.default` read times out or cannot run, a promotion fix for this pull request's first review - #3062 brings both agent-safety READMEs up to #3054: an unset `push.default` is read as `simple`, both destinations are read for a value git does not define or a read exiting with any other error, and a read that times out or cannot run is denied - #3059 bumps `actions/create-github-app-token` from 3.2.0 to 3.3.0 After this merges, the host-safety installer payload changes, so the maintainer runs the installer after promotion. Fixes #3021 Fixes #3026 Fixes #3027 Fixes #3039 Fixes #3033 Fixes #3038 Fixes #3034 Fixes #3031 Fixes #3019 Fixes #3020 Fixes #3029 Fixes #3036 Fixes #3052 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Adds tests for the bootstrap loaders' agent tools handoff and moves the unprivileged-root probe into the shared capability module. Test-side only: no script under test changed.
Closes on promotion: #3033, #3038, #3034
TestKeptTreeEndToEndgains--reportcases: all five steps run, a failing agent tools step still completes and prints the "did not report" line, and a root run (viaunshare -r) skips the step with its "Running as root" line.TestKeptTreeEndToEndgains--agentscases: a comma list hands off as--install <names>,allas--install --all, and an empty or missing list is refused before anything runs or any directory is created.TestPowerShellToolHandoffgainsInvoke-AgentsInstallcases run throughpwshon Linux against stub tools: comma list, separate words,allalone,allbeside other names refused, empty list refused. The comma split line is read frombootstrap.ps1itself.unprivileged_root_is_availablemoves totests/host_capability.pyas a cached probe with arequires_unprivileged_rootdecorator.test_bootstrap.pyno longer imports a test module.Each new test was shown to fail by breaking the matching behavior in a scratch copy of the loaders (gate dropped, info line dropped,
--allmapping, comma split, empty-list guard,allhandling).Unverified natively: the Windows cases run under
pwshon Linux, so they exercise the loader's functions and argument handoff but not a real Windows host (for example-Filecomma handling by the Windows PowerShell host). The WindowsTest-Elevatedbranch is stood in for, as in the existing cases. The Linux and Windows loaders differ onallbeside other names and on empty names in a list, filed as #3043.Local review: two adversarial passes. Fixed: unfiltered step assertions, directory-untouched assertion, argument boundaries in the stubs, root-run skips, stale docstrings. Declined: sentence-length hits on a docstring moved verbatim (pre-existing text), import-time probe (matches
requires_symlink),STUB_ARGS_TOOLduplication (a single stub would change step names other tests assert).🤖 Generated with Claude Code