Skip to content

Add a macOS Bash 4.4 Floor With a Platform-Scoped Host Tool Entry - #4478

Merged
ptr727 merged 8 commits into
developfrom
burndown/macos-bash-floor
Nov 26, 2026
Merged

ptr727 merged 8 commits into
developfrom
burndown/macos-bash-floor

Conversation

@ptr727

@ptr727 ptr727 commented Nov 26, 2026 •

Copy link
Copy Markdown
Owner

Closes on promotion: #4408

What

lib/sh/secrets.sh splits a path with readarray -d in secret_state, and the -d option needs bash 4.4. Stock macOS ships bash 3.2. Per the maintainer's answer on #4408, the library keeps readarray -d and macOS gets a bash 4.4 floor instead.

  • spec/host-tools.schema.json and spec/host-tools-local.schema.json gain an optional platforms key, identical in both: a non-empty, duplicate-free list drawn from linux, macos, windows. Absent means every platform.
  • scripts/host_gate.py reads nothing for an entry whose platforms leaves out the running platform, and notes the skip. field_problems shape-checks the key on overlay entries, and contract_problems checks it on the merged set, so a bad hub value is caught at runtime too. The merge stays tighten-only: an overlay may widen platforms and may not narrow it. A malformed hub value reads as every platform, both in the merge and in the check.
  • spec/host-tools.json gains a bash entry: required, platforms: ["macos"], a measured 4.4 floor, Homebrew's bash as source, and brew install bash as remedy. install rather than upgrade, because the failing bash is the platform's own, per the spec note's rule. The probe reaches bash through PATH, which is the bash repo-config/configure.sh's #!/usr/bin/env bash runs.
  • tests/test_bootstrap.py: the installer coverage check and the remedy totality check skip a platform the entry's platforms leaves out. They read the key and add no NOT_MANAGED or REMEDY_NOT_APPLICABLE records. No other part of the file changes.
  • tests/test_host_gate.py covers the skip and its note, the check on the scoped platform, malformed values, widening and narrowing in the merge, the contract check with and without a floor, and the shipped bash entry against both a 3.2 and a 5.2 banner.
  • docs/host-setup.md gains a contract-table row for bash, a paragraph on the macOS floor and the PATH order it depends on, and the widening rule beside the other tighten-only rules.
  • scripts/README.md, the root host-tools.json note, and the STANDUP.md overlay paragraph state the widening rule beside the other tighten-only rules. scripts/README.md also names the bash floor beside the other measured floors and drops the stale count of them.

Verification

  • On Linux: python3 tests/test_host_gate.py, python3 tests/test_bootstrap.py, the full suite as uv run --no-project --with-requirements tests/requirements.txt python -m unittest discover -s tests (5092 tests after merging current develop, OK, 13 skipped), uv run --no-project --script spec/validate.py, ruff format and check, mypy, and the prose and EOL gates in the pre-commit hook. python3 scripts/host_gate.py on this Linux host notes the bash skip and passes.
  • Unverified on native macOS. No CI job runs on macOS and this host is Linux. The macOS cases are proven only by tests that set sys.platform to darwin. Still owed on a macOS host, per Make the Shell Secret Readers Run on macOS #3933:
    1. On stock bash 3.2, python3 scripts/host_gate.py reports bash 3.2.x is below the 4.4 floor with REMEDY: brew install bash.
    2. After brew install bash with Homebrew's bin ahead of /bin on PATH, the gate reports bash 5.x meets the 4.4 floor.
    3. repo-config/configure.sh then runs its secrets group past secret_state.

Local review

Five recorded local-strict-review passes. The introduced findings that stayed open past an edit budget are fixed by later pushes:

  • spec/host-tools.schema.json, platforms description: it said the installers "neither manage it nor owe it a remedy" on an unlisted platform, while install-tools.sh and install-tools.ps1 read an overlay's install metadata without reading platforms. It now says a hub entry owes no installer coverage or remedy there, which is what the two bootstrap checks enforce.
  • tests/test_host_gate.py: the malformed-hub-value merge test now covers widening to every platform as well as the narrowing rejection its docstring named.
  • STANDUP.md, the host-tools.json overlay paragraph: it restated the merge rule as a closed list without the platforms axis. The third push adds widening and narrowing there, the last restatement of that list.

Declined local findings

  • lib/sh/secrets.sh secret_shape_verdict uses GNU stat -c, which macOS's BSD stat rejects, so a Mac past this floor still has present secrets refused. This is the portable stat half of Make the Shell Secret Readers Run on macOS #3933, which that issue tracks and which is outside this change by its claim. This change's text claims only that the floor covers the readarray -d split, which stays true.
  • spec/validate.py does not check the hub's platforms value. contract_problems checks it on every gate run before any tool is read, and test_the_shipped_declaration_meets_its_own_contract runs it over the shipped spec/host-tools.json in CI, so a malformed hub value fails before merge. The host_gate.py comment naming spec/validate.py is about pattern compilation alone, which that file still checks.
  • tests/test_bootstrap.py reads tool.get("platforms", (platform,)) rather than host_gate.effective_platforms, so the two disagree on a malformed value. A malformed shipped value already fails CI through the contract test above, so the disagreement cannot reach a merged declaration. Reusing the helper would mean importing scripts/ into a file whose edit here is bounded to its two checks.

🤖 Generated with Claude Code

ptr727 and others added 5 commits November 25, 2026 20:31
lib/sh/secrets.sh splits a path with readarray -d, which needs bash 4.4,
and stock macOS ships bash 3.2. Per the maintainer's answer on #4408 the
library keeps readarray -d and macOS gets a floor instead.

A host tool entry may now list the platforms it applies on. The gate
reads nothing for it elsewhere and notes the skip, an overlay may widen
the list but never narrow it, and the bootstrap coverage and remedy
checks read the same key rather than recording exceptions. The bash
entry applies on macOS alone, with Homebrew's bash as source and
remedy.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e Platform Readers

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…Rules Are Restated

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI lite review requested due to automatic review settings November 26, 2026 04:53
@coderabbitai

coderabbitai Bot commented Nov 26, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You'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 10 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 9e766e2 and b46f353.

Files selected for processing: 10

  • STANDUP.md
  • docs/host-setup.md
  • host-tools.json
  • scripts/README.md
  • scripts/host_gate.py
  • spec/host-tools-local.schema.json
  • spec/host-tools.json
  • spec/host-tools.schema.json
  • tests/test_bootstrap.py
  • tests/test_host_gate.py
  • 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

@ptr727

ptr727 commented Nov 26, 2026

Copy link
Copy Markdown
Owner Author

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

…ed Hub Value

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

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.

🟡 Changes recommended

Active moderate and nit findings remain, including missing runtime rejection of duplicate platforms and mismatches between schema or test claims and actual installer and merge behavior.

3 open issues
What changed in this PR

This pull request adds platform-scoped host-tool requirements and introduces a macOS-only Bash 4.4 floor for the secrets workflow.

Changes:

  • Adds platform support to host-tool schemas, runtime validation, merging, and platform-specific checks.
  • Declares the macOS Bash 4.4 requirement with a Homebrew installation remedy.
  • Updates bootstrap checks, regression tests, and host-tool documentation for platform scoping and merge behavior.
File Description
tests/​test_host_gate.py Adds coverage for platform skips, validation, malformed values, merge behavior, and the macOS Bash declaration.
tests/​test_bootstrap.py Excludes tools outside the current platform from installer coverage and remedy checks.
spec/​host-tools.schema.json Defines the optional platform-scoping field for fleet host-tool entries.
spec/​host-tools.json Adds the required macOS Bash 4.4 host-tool declaration with a Homebrew remedy.
spec/​host-tools-local.schema.json Defines platform scoping for local host-tool overlays.
scripts/​README.md Documents platform scoping, overlay widening rules, and the Bash version floor.
scripts/​host_gate.py Implements platform filtering, declaration validation, and tighten-only platform merging.
host-tools.json Updates the repository overlay contract note with platform widening and narrowing rules.
docs/​host-setup.md Documents the Bash requirement, macOS PATH guidance, and platform merge rules.

Review effort: Lite

Comment thread scripts/host_gate.py Resolved
Comment thread spec/host-tools.schema.json Resolved
Comment thread tests/test_host_gate.py Resolved
@ptr727

ptr727 commented Nov 26, 2026

Copy link
Copy Markdown
Owner Author

A recorded local strict-review pass covers head 2b0507cfc02e10384ecb2c2b2282002f4df52960, the content this pull request carries at that commit against develop, and it recorded 1 finding.

@codecov

codecov Bot commented Nov 26, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 96.77419% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 79.00%. Comparing base (b38e084) to head (b46f353).
⚠️ Report is 363 commits behind head on develop.

Files with missing lines Patch % Lines
scripts/host_gate.py 96.77% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #4478      +/-   ##
===========================================
- Coverage    81.60%   79.00%   -2.61%     
===========================================
  Files           26       50      +24     
  Lines         9070    16795    +7725     
===========================================
+ Hits          7402    13269    +5867     
- Misses        1668     3526    +1858     
Flag Coverage Δ
python-3.13 79.00% <96.77%> (-2.61%) ⬇️

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 commented Nov 26, 2026

Copy link
Copy Markdown
Owner Author

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

@ptr727

ptr727 commented Nov 26, 2026

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@ptr727

ptr727 commented Nov 26, 2026

Copy link
Copy Markdown
Owner Author

/review

@coderabbitai

coderabbitai Bot commented Nov 26, 2026 •

Copy link
Copy Markdown
Action not completed

Review rate limited.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@ptr727
ptr727 merged commit 300f204 into develop Nov 26, 2026
14 checks passed
@ptr727
ptr727 deleted the burndown/macos-bash-floor branch November 26, 2026 06:02
ptr727 added a commit that referenced this pull request Nov 26, 2026
…s, Environment Secret Audit, and macOS Bash Floor (#4485)

Promotes the 26 pull requests that landed on develop since the last
promotion (#4428), from the away-mode backlog burndown run.

- #4447: Bump markdownlint-cli2-action from 25.0.0 to 25.1.0.
- #4449: Have the agent open and drive the promotion after an audit's
file fix merges.
- #4453: Pass over a signal handled as the prose gate's first handler
starts.
- #4456: Record a managed copy for claude and codex in install-agents
and report any other copy as a stray.
- #4457: Name the PowerShell suppression form and correct the Python CI
backstop text.
- #4458: Read the metrics report's reviewed heads from the gate's one
filter (part of #3880, completed by #4481).
- #4460: Cross-check Python directories against Dependabot's pip and uv
entries (items 2 and 3 of #2286, which stays open for item 1).
- #4461: Pin the Docker lint images by digest through a
Dependabot-tracked manifest.
- #4464: State the platform weighting and correct the hook-promotion
worked example.
- #4463: Key Qodo findings without links or commit hashes and ask
dismissal by title and location.
- #4465: Hand a caller's hook-input to the validate and resolve-upstream
hooks.
- #4466: Require an empty workflow-level permissions block on
entry-point callers.
- #4467: Remove the npm and bun upgrade paths no managed tool reaches.
- #4469: Add a hub-hosted script that enables a clone's hook framework
once.
- #4472: Select each repository's Python line from its root
`.python-version` (the part of #4187 needing no decision; #4187 stays
open).
- #4479: Report dotnet and powershell as unmanaged while Microsoft's
feed is unconfigured.
- #4477: Bound the shell trap's child wait and give the heading search a
file.
- #4480: Check deployment environment secret and variable names in the
audit.
- #4478: Add a macOS bash 4.4 floor with a platform-scoped host tool
entry.
- #4481: Build the gate's comment readers on one trusted-comment reader.
- #4484: Record the measured absence of a git floor for
`--end-of-options`.
- #4496: Narrow the Qodo acknowledgment key's normalization to a link
and a hash after `commit`.
- #4500: Pass over a signal handled as the hook enabler's first handler
starts.
- #4502: Pin the GitHub host for every `gh` child the hub's Python
scripts start.
- #4503: Write the Docker pull retry once, with one backoff schedule.
- #4505: Pin the repo gate's `gh` read and parse the Docker pin manifest
once.

## Release notes for callers

- #4472: A caller passing no `python-versions` input and carrying no
root `.python-version` moves from Python 3.13 to 3.14 for its
`unit-test` leg and its `lint` job's Python steps once its hub pin
reaches this change. Its nested check name moves from `Unit test job
(Python 3.13)` to `Unit test job (Python 3.14)`, and its Codecov flag
from `python-3.13` to `python-3.14`, so a `.codecov.yml` naming the old
flag stops matching. Its `lint` job warns on each run until it carries a
selector. A caller whose `requires-python` or locked dependencies
exclude 3.14 adds a `.python-version` before moving its pin. A
`.python-version` naming no `X.Y` line, or an explicit `python-versions`
whose first entry differs from the file's line, now fails validate.
- #4479: The Linux `install-tools.sh --json` report schema moves from 1
to 2, because a not-installed `dotnet` or `powershell` can now read
`unmanaged` with `installed: null`. A hand-installed amd64 `powershell`
with no Microsoft feed now reads `unmanaged`. The Windows `-Json` report
stays at schema 1.
- #4466: Each entry-point caller must declare an empty workflow-level
`permissions: {}` block. A site repository's `deploy-site.yml` carrying
only job-level blocks now reports this as drift, and the fix belongs to
that repository.
- #4461: Dependabot's docker ecosystem listing tags on mirror.gcr.io for
the shellcheck and shfmt lines is unconfirmed until its first docker run
for that directory.
- #4478: macOS now has a bash 4.4 floor, met by Homebrew's bash ahead of
the system bash on `PATH`. Not yet verified on a native macOS host.
- #4480: The audit gains the `secrets.environments` check. Registry
`environments[]` entries may now declare their secret and variable
names.
- #4463 and #4496: The Qodo acknowledgment key changed. A
`fleet-finding-ack` already posted on a still-open pull request stops
matching its finding once a caller's hub pin reaches this change. Post
it again, since `merge` refuses until then.
- #4502: Every `gh` child the Python scripts under the hub's `scripts/`
and `spec/` start now runs with `GH_HOST=github.com`, so an exported
`GH_HOST` no longer moves their reads and writes. #4505 pins the repo
gate's own `gh_read` the same way. The `gh-write-guard` hook (#4501) and
the shell and PowerShell scripts are unchanged.
- #4503: The `validate-task.yml` EditorConfig, shell, and PowerShell
lint steps now pull their images through `docker_lint.py --pull`, with
one retry schedule of 3 attempts waiting 15s, then 30s. The
`docker-lint-pins` action gains a `docker-lint` output naming that
script at the calling workflow's own ref. A caller pinned before this
change keeps its inline retry.
- #4505: The `docker-lint-pins` action now reads the pin manifest
through `docker_lint.py --pin` rather than `sed`, so its step runs
`python3`. It now refuses an empty tag or a stage named twice, which the
old `sed` accepted, and on a failure it writes no outputs and one
`::error::` annotation carrying the reason.
- A fleet resync is owed, because carried text changed: AGENTS.md,
GOVERNANCE.md, CODESTYLE.md, and several skills.

## Findings from the local strict review

The attested local pass on c25ec49 (`main...develop`) raised five
findings. Their outcomes:

- Tracked: the hub's own `dependabot.ecosystems` DRIFT on `/tests` is
the question #4459 holds, so it changes nothing here.
- Fixed by #4500: `scripts/enable_hooks.py` `on_signal` now passes over
a signal handled as its first handler starts.
- Fixed by #4503: the bounded Docker pull retry is now written once,
`scripts/docker_lint.py` `pull_image`, with one schedule.
- Fixed by #4502: `spec/audit_environments.py` `names()` is gone, and
both environment readers read through `spec/resolve_secrets.py`
`read_names`.
- Release note: the Qodo acknowledgment key change from #4463 and #4496
is stated under "Release notes for callers" above.

The attested local pass on f93f34a (`main...develop`) raised 57
findings. Their outcomes:

- Declined, 52 `prose_lint` `comment-added` lines: each comment was
added by a feature pull request carrying the `comments` label (#4456,
#4461, #4463, #4465, #4467, #4472, #4480), and the promotion re-carries
them without that label.
- Tracked: `spec/audit_dependabot.py:93`, the hub's own `/tests` pip
drift, is the question #4459 holds.
- Tracked: the nested-signal guard missing at
`scripts/docker_lint.py:416`, `scripts/backlog_metrics.py:1290`, and
`catalog/snippets/hub_fetch_run.py:193` is the class #4452 holds.
- Release note: the Qodo key change at
`scripts/pr_review_answers.py:158` is stated above.
- Fixed by #4505: `.github/actions/repo-gate/repo_gate.py` `gh_read` now
starts its `gh api` child under `gh_env()`, which pins
`GH_HOST=github.com`.
- Fixed by #4505: `scripts/docker_lint.py` `read_pins` is now the pin
manifest's one parser. The repo gate dropped `SHELLCHECK_PIN`, and the
`docker-lint-pins` action dropped its `sed` for `docker_lint.py --pin`.

The attested local pass on 3183644 (`main...develop`) raised 53
findings. Their outcomes:

- Declined, 51 `prose_lint` `comment-added` lines: the same comments the
pass on f93f34a named, less the `docker-lint-pins` `action.yml` line
#4505 removed, each added by a feature pull request carrying the
`comments` label.
- Tracked: the nested-signal guard missing at
`scripts/docker_lint.py:448`, `scripts/backlog_metrics.py:1290`,
`scripts/pr_review.py:2174`, and `catalog/snippets/hub_fetch_run.py:193`
is the class #4452 holds.
- `introduced`, design, `scripts/docker_lint.py:856`: `resolve_digest`
runs one more `docker image inspect` per linter to read a digest the pin
manifest's tag-and-digest reference already gives, since #4461 pins
every image, and it takes `RepoDigests[0]`, which can name another
repository holding the same image. Deferred to #4508 by the maintainer's
decision, which is this finding's outcomes.

Fixes #3468
Fixes #3880
Fixes #4408
Fixes #2070
Fixes #4473
Fixes #4474
Fixes #2594
Fixes #4327
Fixes #4450
Fixes #1783
Fixes #3325
Fixes #3917
Fixes #4448
Fixes #1164
Fixes #1613
Fixes #1727
Fixes #4403
Fixes #4407
Fixes #4158
Fixes #4210
Fixes #4429
Fixes #4406
Fixes #4488
Fixes #4498
Fixes #4489
Fixes #4499
Fixes #4504

🤖 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