Skip to content

Test the Bootstrap Agents Handoff and Move the Root Probe to host_capability - #3044

Merged
ptr727 merged 3 commits into
developfrom
feature/bootstrap-handoff-tests-3033
Oct 15, 2026
Merged

ptr727 merged 3 commits into
developfrom
feature/bootstrap-handoff-tests-3033

Conversation

@ptr727

@ptr727 ptr727 commented Oct 15, 2026

Copy link
Copy Markdown
Owner

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

  • TestKeptTreeEndToEnd gains --report cases: all five steps run, a failing agent tools step still completes and prints the "did not report" line, and a root run (via unshare -r) skips the step with its "Running as root" line.
  • TestKeptTreeEndToEnd gains --agents cases: a comma list hands off as --install <names>, all as --install --all, and an empty or missing list is refused before anything runs or any directory is created.
  • TestPowerShellToolHandoff gains Invoke-AgentsInstall cases run through pwsh on Linux against stub tools: comma list, separate words, all alone, all beside other names refused, empty list refused. The comma split line is read from bootstrap.ps1 itself.
  • unprivileged_root_is_available moves to tests/host_capability.py as a cached probe with a requires_unprivileged_root decorator. test_bootstrap.py no 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, --all mapping, comma split, empty-list guard, all handling).

Unverified natively: the Windows cases run under pwsh on Linux, so they exercise the loader's functions and argument handoff but not a real Windows host (for example -File comma handling by the Windows PowerShell host). The Windows Test-Elevated branch is stood in for, as in the existing cases. The Linux and Windows loaders differ on all beside 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_TOOL duplication (a single stub would change step names other tests assert).

🤖 Generated with Claude Code

ptr727 and others added 3 commits October 14, 2026 18:59
…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]>
Copilot AI lite review requested due to automatic review settings October 15, 2026 02:06
@coderabbitai

coderabbitai Bot commented Oct 15, 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: 6862d310-1202-4200-b987-cb9679447432
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

@ptr727

ptr727 commented Oct 15, 2026

Copy link
Copy Markdown
Owner Author

A recorded local strict-review pass covers head d2bd56f4465d9e13a5b60e0b005514e3ea01d41b, the content this pull request carries at that commit against develop, and it recorded 4 findings.

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.

🟢 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

codecov Bot commented Oct 15, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 61.00%. Comparing base (02f21a5) to head (d2bd56f).
⚠️ Report is 1 commits behind head on develop.

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           
Flag Coverage Δ
python-3.13 61.00% <ø> (ø)

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.

@ptr727
ptr727 merged commit 4849b99 into develop Oct 15, 2026
14 checks passed
@ptr727
ptr727 deleted the feature/bootstrap-handoff-tests-3033 branch October 15, 2026 02:16
ptr727 added a commit that referenced this pull request Oct 15, 2026
… 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)
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