Commit Graph
233 Commits
Author SHA1 Message Date
dependabot[bot]andJerrettDavis d0bc4c8ebb ci: bump actions/setup-python from 6.3.0 to 7.1.0 (#4806)
Bumps [actions/setup-python](https://github.com/actions/setup-python)
from 6.3.0 to 7.1.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/actions/setup-python/releases">actions/setup-python's
releases</a>.</em></p>
<blockquote>
<h2>v7.1.0</h2>
<h2>What's Changed</h2>
<h3>Enhancements</h3>
<ul>
<li>Add <code>mirror</code> and <code>mirror-token</code> inputs for
custom Python distribution sources by <a
href="https://github.com/luhenry"><code>@​luhenry</code></a> in <a
href="https://redirect.github.com/actions/setup-python/pull/1302">actions/setup-python#1302</a></li>
<li>Improve error message clarity by <a
href="https://github.com/v-lmvysakh"><code>@​v-lmvysakh</code></a> in <a
href="https://redirect.github.com/actions/setup-python/pull/1351">actions/setup-python#1351</a></li>
</ul>
<h3>Dependency Upgrade</h3>
<ul>
<li>Upgrade browserslist from 4.28.2 to 4.28.9 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/actions/setup-python/pull/1353">actions/setup-python#1353</a></li>
<li>Upgrade <code>@​typescript-eslint/parser</code> from 8.62.0 to
8.70.0 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/actions/setup-python/pull/1343">actions/setup-python#1343</a></li>
<li>Upgrade eslint-plugin-jest from 29.15.2 to 29.16.6 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/actions/setup-python/pull/1342">actions/setup-python#1342</a></li>
<li>Upgrade <code>@​vercel/ncc</code> from 0.44.0 to 0.45.0 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/actions/setup-python/pull/1357">actions/setup-python#1357</a></li>
<li>Upgrade <code>@​types/semver</code> from 7.7.1 to 7.8.0 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/actions/setup-python/pull/1359">actions/setup-python#1359</a></li>
<li>Upgrade undici from 6.28.0 to 6.29.0 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/actions/setup-python/pull/1364">actions/setup-python#1364</a></li>
<li>Upgrade ts-jest from 29.4.11 to 29.4.14 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/actions/setup-python/pull/1361">actions/setup-python#1361</a></li>
<li>Upgrade brace-expansion from 5.0.9 to 5.0.12 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/actions/setup-python/pull/1365">actions/setup-python#1365</a></li>
<li>Upgrade prettier from 3.8.4 to 3.9.9 and package.json from 7.0.0 to
7.1.0 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/actions/setup-python/pull/1363">actions/setup-python#1363</a></li>
<li>Upgrade <code>@​typescript-eslint/eslint-plugin</code> from 8.62.0
to 8.71.1 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/actions/setup-python/pull/1369">actions/setup-python#1369</a></li>
<li>Upgrade actions/checkout from 7.0.0 to 7.0.1 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/actions/setup-python/pull/1345">actions/setup-python#1345</a></li>
<li>Upgrade cache to 6.3.0 by <a
href="https://github.com/v-HarithaVattikuti"><code>@​v-HarithaVattikuti</code></a>
in <a
href="https://redirect.github.com/actions/setup-python/pull/1370">actions/setup-python#1370</a></li>
<li>Resolve Basic Validation audit failures by <a
href="https://github.com/v-HarithaVattikuti"><code>@​v-HarithaVattikuti</code></a>
in <a
href="https://redirect.github.com/actions/setup-python/pull/1347">actions/setup-python#1347</a></li>
<li>Resolve npm audit failures by <a
href="https://github.com/v-HarithaVattikuti"><code>@​v-HarithaVattikuti</code></a>
in <a
href="https://redirect.github.com/actions/setup-python/pull/1350">actions/setup-python#1350</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a href="https://github.com/luhenry"><code>@​luhenry</code></a> made
their first contribution in <a
href="https://redirect.github.com/actions/setup-python/pull/1302">actions/setup-python#1302</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/actions/setup-python/compare/v7.0.0...v7.1.0">https://github.com/actions/setup-python/compare/v7.0.0...v7.1.0</a></p>
<h2>v7.0.0</h2>
<h2>What's Changed</h2>
<h3>Enhancements</h3>
<ul>
<li>Migrate to ESM and upgrade dependencies by <a
href="https://github.com/priyagupta108"><code>@​priyagupta108</code></a>
in <a
href="https://redirect.github.com/actions/setup-python/pull/1330">actions/setup-python#1330</a></li>
<li>Pin SHA commits and update docs with latest versions by <a
href="https://github.com/HarithaVattikuti"><code>@​HarithaVattikuti</code></a>
in <a
href="https://redirect.github.com/actions/setup-python/pull/1338">actions/setup-python#1338</a></li>
<li>Remove the pip-install input by <a
href="https://github.com/gowridurgad"><code>@​gowridurgad</code></a> in
<a
href="https://redirect.github.com/actions/setup-python/pull/1336">actions/setup-python#1336</a></li>
</ul>
<h3>Bug Fix</h3>
<ul>
<li>Fix to Classify stderr warning messages as warnings instead of
errors in annotations by <a
href="https://github.com/lmvysakh"><code>@​lmvysakh</code></a> in <a
href="https://redirect.github.com/actions/setup-python/pull/1335">actions/setup-python#1335</a></li>
<li>Validate and retry manifest fetch to prevent silent failures by <a
href="https://github.com/priyagupta108"><code>@​priyagupta108</code></a>
in <a
href="https://redirect.github.com/actions/setup-python/pull/1332">actions/setup-python#1332</a></li>
</ul>
<h3>Dependency Upgrade</h3>
<ul>
<li>Bump certifi from 2020.6.20 to 2024.7.4 in
/<strong>tests</strong>/data by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/actions/setup-python/pull/1328">actions/setup-python#1328</a></li>
<li>Remove EOL Python versions and Bumps numpy text fixture by <a
href="https://github.com/priya-kinthali"><code>@​priya-kinthali</code></a>
in <a
href="https://redirect.github.com/actions/setup-python/pull/1333">actions/setup-python#1333</a></li>
<li>Upgrade <code>@​actions/cache</code> to 6.2.0 by <a
href="https://github.com/philip-gai"><code>@​philip-gai</code></a> in <a
href="https://redirect.github.com/actions/setup-python/pull/1337">actions/setup-python#1337</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a href="https://github.com/lmvysakh"><code>@​lmvysakh</code></a>
made their first contribution in <a
href="https://redirect.github.com/actions/setup-python/pull/1335">actions/setup-python#1335</a></li>
<li><a
href="https://github.com/philip-gai"><code>@​philip-gai</code></a> made
their first contribution in <a
href="https://redirect.github.com/actions/setup-python/pull/1337">actions/setup-python#1337</a></li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/actions/setup-python/commit/6d4fd22b20465ccc0f7354476588e8df7c9ca0e0"><code>6d4fd22</code></a>
Cache upgrade to 6.3.0 (<a
href="https://redirect.github.com/actions/setup-python/issues/1370">#1370</a>)</li>
<li><a
href="https://github.com/actions/setup-python/commit/ec52d0af729a7c50ced4261d17a07916f43f5b8e"><code>ec52d0a</code></a>
Bump <code>@​typescript-eslint/eslint-plugin</code> from 8.62.0 to
8.71.1 (<a
href="https://redirect.github.com/actions/setup-python/issues/1369">#1369</a>)</li>
<li><a
href="https://github.com/actions/setup-python/commit/ff73b2463e2f3baa703f830da214b8dfeeaeccf8"><code>ff73b24</code></a>
Bump prettier from 3.8.4 to 3.9.9 and package.json from 7.0.0 to 7.1.0
(<a
href="https://redirect.github.com/actions/setup-python/issues/1363">#1363</a>)</li>
<li><a
href="https://github.com/actions/setup-python/commit/0e40890053525508c059c61932a6b8614f9e95db"><code>0e40890</code></a>
Bump brace-expansion from 5.0.9 to 5.0.12 (<a
href="https://redirect.github.com/actions/setup-python/issues/1365">#1365</a>)</li>
<li><a
href="https://github.com/actions/setup-python/commit/3892123fbe74688ccc83ec7c465dc688359e5199"><code>3892123</code></a>
Bump ts-jest from 29.4.11 to 29.4.14 (<a
href="https://redirect.github.com/actions/setup-python/issues/1361">#1361</a>)</li>
<li><a
href="https://github.com/actions/setup-python/commit/660965736c4aecc62797ea07d351a3c259f14660"><code>6609657</code></a>
Bump undici from 6.28.0 to 6.29.0 (<a
href="https://redirect.github.com/actions/setup-python/issues/1364">#1364</a>)</li>
<li><a
href="https://github.com/actions/setup-python/commit/e1be392b26fb1917a7b2c455817e4b4dad6544ce"><code>e1be392</code></a>
Bump <code>@​types/semver</code> from 7.7.1 to 7.8.0 (<a
href="https://redirect.github.com/actions/setup-python/issues/1359">#1359</a>)</li>
<li><a
href="https://github.com/actions/setup-python/commit/06da6279cdbca41027908073e81a4544dc79c06b"><code>06da627</code></a>
Bump <code>@​vercel/ncc</code> from 0.44.0 to 0.45.0 (<a
href="https://redirect.github.com/actions/setup-python/issues/1357">#1357</a>)</li>
<li><a
href="https://github.com/actions/setup-python/commit/af9bcc7548695e66d75709de6f29e337624b8de8"><code>af9bcc7</code></a>
Bump eslint-plugin-jest from 29.15.2 to 29.16.6 (<a
href="https://redirect.github.com/actions/setup-python/issues/1342">#1342</a>)</li>
<li><a
href="https://github.com/actions/setup-python/commit/7aeabeba5501120d873c50398519dbfd0657031c"><code>7aeabeb</code></a>
Bump <code>@​typescript-eslint/parser</code> from 8.62.0 to 8.70.0 (<a
href="https://redirect.github.com/actions/setup-python/issues/1343">#1343</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/actions/setup-python/compare/v6.3.0...6d4fd22b20465ccc0f7354476588e8df7c9ca0e0">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=actions/setup-python&package-manager=github_actions&previous-version=6.3.0&new-version=7.1.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>
<!-- devin-review-badge-begin -->

---

<a href="https://app.devin.ai/review/headroomlabs-ai/headroom/pull/4806"
target="_blank"><picture><source media="(prefers-color-scheme: dark)"
srcset="https://static.devin.ai/assets/gh-devin-review-dark.svg?v=4"><img
src="https://static.devin.ai/assets/gh-devin-review-light.svg?v=4"
alt="Devin Review"></picture></a>
<!-- devin-review-badge-end -->

## Real Behavior Proof

- Observed on this PR head: CI `test-macos` job ran
`actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0`
(v7.1.0): "Successfully set up CPython 3.12.10"; test jobs green.
- Not tested: non-default modes (toolcache restore, uv path) — workflow
uses defaults.

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: JerrettDavis <mxjerrett@gmail.com>
2026-11-14 13:31:55 -06:00
dependabot[bot]andJerrettDavis fcf5890e33 ci: bump taiki-e/install-action from 2.90.1 to 2.90.3 in the actions-minor-patch group (#4805)
Bumps the actions-minor-patch group with 1 update:
[taiki-e/install-action](https://github.com/taiki-e/install-action).

Updates `taiki-e/install-action` from 2.90.1 to 2.90.3
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/taiki-e/install-action/releases">taiki-e/install-action's
releases</a>.</em></p>
<blockquote>
<h2>2.90.3</h2>
<ul>
<li>
<p>Update <code>yq@latest</code> to 4.54.2.</p>
</li>
<li>
<p>Update <code>vacuum@latest</code> to 0.39.3.</p>
</li>
<li>
<p>Update <code>syft@latest</code> to 1.57.0.</p>
</li>
<li>
<p>Update <code>rclone@latest</code> to 1.76.0.</p>
</li>
<li>
<p>Update <code>protoc-gen-connect-openapi@latest</code> to 0.30.0.</p>
</li>
<li>
<p>Update <code>mise@latest</code> to 2026.11.3.</p>
</li>
<li>
<p>Update <code>kingfisher@latest</code> to 2.17.0.</p>
</li>
<li>
<p>Update <code>biome@latest</code> to 2.6.6.</p>
</li>
</ul>
<h2>2.90.2</h2>
<ul>
<li>
<p>Update <code>trivy@latest</code> to 0.76.2.</p>
</li>
<li>
<p>Update <code>tombi@latest</code> to 1.10.0.</p>
</li>
<li>
<p>Update <code>prek@latest</code> to 0.5.10.</p>
</li>
<li>
<p>Update <code>mise@latest</code> to 2026.11.2.</p>
</li>
<li>
<p>Update <code>mdbook-d2@latest</code> to 0.3.10.</p>
</li>
<li>
<p>Update <code>cargo-zigbuild@latest</code> to 0.24.1.</p>
</li>
<li>
<p>Update <code>cargo-tarpaulin@latest</code> to 0.37.6.</p>
</li>
<li>
<p>Update <code>biome@latest</code> to 2.6.5.</p>
</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/taiki-e/install-action/blob/main/CHANGELOG.md">taiki-e/install-action's
changelog</a>.</em></p>
<blockquote>
<h1>Changelog</h1>
<p>All notable changes to this project will be documented in this
file.</p>
<p>This project adheres to <a href="https://semver.org">Semantic
Versioning</a>.</p>
<!-- raw HTML omitted -->
<h2>[Unreleased]</h2>
<h2>[2.90.3] - 2026-11-08</h2>
<ul>
<li>
<p>Update <code>yq@latest</code> to 4.54.2.</p>
</li>
<li>
<p>Update <code>vacuum@latest</code> to 0.39.3.</p>
</li>
<li>
<p>Update <code>syft@latest</code> to 1.57.0.</p>
</li>
<li>
<p>Update <code>rclone@latest</code> to 1.76.0.</p>
</li>
<li>
<p>Update <code>protoc-gen-connect-openapi@latest</code> to 0.30.0.</p>
</li>
<li>
<p>Update <code>mise@latest</code> to 2026.11.3.</p>
</li>
<li>
<p>Update <code>kingfisher@latest</code> to 2.17.0.</p>
</li>
<li>
<p>Update <code>biome@latest</code> to 2.6.6.</p>
</li>
</ul>
<h2>[2.90.2] - 2026-11-06</h2>
<ul>
<li>
<p>Update <code>trivy@latest</code> to 0.76.2.</p>
</li>
<li>
<p>Update <code>tombi@latest</code> to 1.10.0.</p>
</li>
<li>
<p>Update <code>prek@latest</code> to 0.5.10.</p>
</li>
<li>
<p>Update <code>mise@latest</code> to 2026.11.2.</p>
</li>
<li>
<p>Update <code>mdbook-d2@latest</code> to 0.3.10.</p>
</li>
<li>
<p>Update <code>cargo-zigbuild@latest</code> to 0.24.1.</p>
</li>
<li>
<p>Update <code>cargo-tarpaulin@latest</code> to 0.37.6.</p>
</li>
<li>
<p>Update <code>biome@latest</code> to 2.6.5.</p>
</li>
</ul>
<h2>[2.90.1] - 2026-11-04</h2>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/taiki-e/install-action/commit/cfdb7ed4ccc7c7dce37759eae89dc5674b469b39"><code>cfdb7ed</code></a>
Release 2.90.3</li>
<li><a
href="https://github.com/taiki-e/install-action/commit/0a7121930a2b50a86493394ff371be5944d87f42"><code>0a71219</code></a>
Update <code>yq@latest</code> to 4.54.2</li>
<li><a
href="https://github.com/taiki-e/install-action/commit/4072c983d74b307847287f7220fce7a9c141b992"><code>4072c98</code></a>
Update <code>vacuum@latest</code> to 0.39.3</li>
<li><a
href="https://github.com/taiki-e/install-action/commit/d429e9b8ea70b66f46e73feb606ddc9ee0f4efde"><code>d429e9b</code></a>
Update <code>syft@latest</code> to 1.57.0</li>
<li><a
href="https://github.com/taiki-e/install-action/commit/24c26286aac008b9637a57b31fe0b3ddb2bd4ded"><code>24c2628</code></a>
Update <code>rclone@latest</code> to 1.76.0</li>
<li><a
href="https://github.com/taiki-e/install-action/commit/ab9bbc83facfaf93b4b8c40d6b13ddc1bb0169a3"><code>ab9bbc8</code></a>
Update <code>protoc-gen-connect-openapi@latest</code> to 0.30.0</li>
<li><a
href="https://github.com/taiki-e/install-action/commit/4bff33fa4dd584dfccaa7582398a2b31ddd8f0cb"><code>4bff33f</code></a>
Update <code>mise@latest</code> to 2026.11.3</li>
<li><a
href="https://github.com/taiki-e/install-action/commit/cdf8dc3a14f3d788d3da291c51381dd2849ae5cf"><code>cdf8dc3</code></a>
Update <code>kingfisher@latest</code> to 2.17.0</li>
<li><a
href="https://github.com/taiki-e/install-action/commit/b8b14a4959fcb616bab58d718dcffcc06ecc6bdb"><code>b8b14a4</code></a>
Update <code>biome@latest</code> to 2.6.6</li>
<li><a
href="https://github.com/taiki-e/install-action/commit/3a3daafd3b7f23b8f65d9f5ba2db203fb59b79e2"><code>3a3daaf</code></a>
Release 2.90.2</li>
<li>Additional commits viewable in <a
href="https://github.com/taiki-e/install-action/compare/c509219cf42fba86913069efd0ade2458c59337b...cfdb7ed4ccc7c7dce37759eae89dc5674b469b39">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=taiki-e/install-action&package-manager=github_actions&previous-version=2.90.1&new-version=2.90.3)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore <dependency name> major version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's major version (unless you unignore this specific
dependency's major version or upgrade to it yourself)
- `@dependabot ignore <dependency name> minor version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's minor version (unless you unignore this specific
dependency's minor version or upgrade to it yourself)
- `@dependabot ignore <dependency name>` will close this group update PR
and stop Dependabot creating any more for the specific dependency
(unless you unignore this specific dependency or upgrade to it yourself)
- `@dependabot unignore <dependency name>` will remove all of the ignore
conditions of the specified dependency
- `@dependabot unignore <dependency name> <ignore condition>` will
remove the ignore condition of the specified dependency and ignore
conditions


</details>
<!-- devin-review-badge-begin -->

---

<a href="https://app.devin.ai/review/headroomlabs-ai/headroom/pull/4805"
target="_blank"><picture><source media="(prefers-color-scheme: dark)"
srcset="https://static.devin.ai/assets/gh-devin-review-dark.svg?v=4"><img
src="https://static.devin.ai/assets/gh-devin-review-light.svg?v=4"
alt="Devin Review"></picture></a>
<!-- devin-review-badge-end -->

## Real Behavior Proof

- Observed on this PR head: Security workflow `cargo-audit`/`cargo-deny`
jobs ran
`taiki-e/install-action@cfdb7ed4ccc7c7dce37759eae89dc5674b469b39`
(v2.90.3), downloading and checksum-verifying `cargo-audit` 0.22.2 and
`cargo-deny` 0.20.2. Both jobs green.
- Not tested: other tools installable via this action (workflow only
exercises cargo-audit/cargo-deny).

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: JerrettDavis <mxjerrett@gmail.com>
2026-11-14 13:31:44 -06:00
dependabot[bot]andJerrettDavis 1a51b4f6ce ci: bump actions/github-script from 7.1.0 to 9.0.0 (#4809)
Bumps [actions/github-script](https://github.com/actions/github-script)
from 7.1.0 to 9.0.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/actions/github-script/releases">actions/github-script's
releases</a>.</em></p>
<blockquote>
<h2>v9.0.0</h2>
<p><strong>New features:</strong></p>
<ul>
<li><strong><code>getOctokit</code> factory function</strong> —
Available directly in the script context. Create additional
authenticated Octokit clients with different tokens for multi-token
workflows, GitHub App tokens, and cross-org access. See <a
href="https://github.com/actions/github-script#creating-additional-clients-with-getoctokit">Creating
additional clients with <code>getOctokit</code></a> for details and
examples.</li>
<li><strong>Orchestration ID in user-agent</strong> — The
<code>ACTIONS_ORCHESTRATION_ID</code> environment variable is
automatically appended to the user-agent string for request
tracing.</li>
</ul>
<p><strong>Breaking changes:</strong></p>
<ul>
<li><strong><code>require('@actions/github')</code> no longer works in
scripts.</strong> The upgrade to <code>@actions/github</code> v9
(ESM-only) means <code>require('@actions/github')</code> will fail at
runtime. If you previously used patterns like <code>const { getOctokit }
= require('@actions/github')</code> to create secondary clients, use the
new injected <code>getOctokit</code> function instead — it's available
directly in the script context with no imports needed.</li>
<li><code>getOctokit</code> is now an injected function parameter.
Scripts that declare <code>const getOctokit = ...</code> or <code>let
getOctokit = ...</code> will get a <code>SyntaxError</code> because
JavaScript does not allow <code>const</code>/<code>let</code>
redeclaration of function parameters. Use the injected
<code>getOctokit</code> directly, or use <code>var getOctokit =
...</code> if you need to redeclare it.</li>
<li>If your script accesses other <code>@actions/github</code> internals
beyond the standard <code>github</code>/<code>octokit</code> client, you
may need to update those references for v9 compatibility.</li>
</ul>
<h2>What's Changed</h2>
<ul>
<li>Add ACTIONS_ORCHESTRATION_ID to user-agent string by <a
href="https://github.com/Copilot"><code>@​Copilot</code></a> in <a
href="https://redirect.github.com/actions/github-script/pull/695">actions/github-script#695</a></li>
<li>ci: use deployment: false for integration test environments by <a
href="https://github.com/salmanmkc"><code>@​salmanmkc</code></a> in <a
href="https://redirect.github.com/actions/github-script/pull/712">actions/github-script#712</a></li>
<li>feat!: add getOctokit to script context, upgrade
<code>@​actions/github</code> v9, <code>@​octokit/core</code> v7, and
related packages by <a
href="https://github.com/salmanmkc"><code>@​salmanmkc</code></a> in <a
href="https://redirect.github.com/actions/github-script/pull/700">actions/github-script#700</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a href="https://github.com/Copilot"><code>@​Copilot</code></a> made
their first contribution in <a
href="https://redirect.github.com/actions/github-script/pull/695">actions/github-script#695</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/actions/github-script/compare/v8.0.0...v9.0.0">https://github.com/actions/github-script/compare/v8.0.0...v9.0.0</a></p>
<h2>v8.0.0</h2>
<h2>What's Changed</h2>
<ul>
<li>Update Node.js version support to 24.x by <a
href="https://github.com/salmanmkc"><code>@​salmanmkc</code></a> in <a
href="https://redirect.github.com/actions/github-script/pull/637">actions/github-script#637</a></li>
<li>README for updating actions/github-script from v7 to v8 by <a
href="https://github.com/sneha-krip"><code>@​sneha-krip</code></a> in <a
href="https://redirect.github.com/actions/github-script/pull/653">actions/github-script#653</a></li>
</ul>
<h2>⚠️ Minimum Compatible Runner Version</h2>
<p><strong>v2.327.1</strong><br />
<a
href="https://github.com/actions/runner/releases/tag/v2.327.1">Release
Notes</a></p>
<p>Make sure your runner is updated to this version or newer to use this
release.</p>
<h2>New Contributors</h2>
<ul>
<li><a href="https://github.com/salmanmkc"><code>@​salmanmkc</code></a>
made their first contribution in <a
href="https://redirect.github.com/actions/github-script/pull/637">actions/github-script#637</a></li>
<li><a
href="https://github.com/sneha-krip"><code>@​sneha-krip</code></a> made
their first contribution in <a
href="https://redirect.github.com/actions/github-script/pull/653">actions/github-script#653</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/actions/github-script/compare/v7.1.0...v8.0.0">https://github.com/actions/github-script/compare/v7.1.0...v8.0.0</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/actions/github-script/commit/3a2844b7e9c422d3c10d287c895573f7108da1b3"><code>3a2844b</code></a>
Merge pull request <a
href="https://redirect.github.com/actions/github-script/issues/700">#700</a>
from actions/salmanmkc/expose-getoctokit + prepare re...</li>
<li><a
href="https://github.com/actions/github-script/commit/ca10bbdd1a7739de09e99a200c7a59f5d73a4079"><code>ca10bbd</code></a>
fix: use <code>@​octokit/core/</code>types import for v7
compatibility</li>
<li><a
href="https://github.com/actions/github-script/commit/86e48e20ac85c970ed1f96e718fd068173948b7b"><code>86e48e2</code></a>
merge: incorporate main branch changes</li>
<li><a
href="https://github.com/actions/github-script/commit/c1084728b5b935ec4ddc1e4cee877b01797b3ff9"><code>c108472</code></a>
chore: rebuild dist for v9 upgrade and getOctokit factory</li>
<li><a
href="https://github.com/actions/github-script/commit/afff112e4f8b57c718168af75b89ce00bc8d091d"><code>afff112</code></a>
Merge pull request <a
href="https://redirect.github.com/actions/github-script/issues/712">#712</a>
from actions/salmanmkc/deployment-false + fix user-ag...</li>
<li><a
href="https://github.com/actions/github-script/commit/ff8117e5b78c415f814f39ad6998f424fee7b817"><code>ff8117e</code></a>
ci: fix user-agent test to handle orchestration ID</li>
<li><a
href="https://github.com/actions/github-script/commit/81c6b7876079abe10ff715951c9fc7b3e1ab389d"><code>81c6b78</code></a>
ci: use deployment: false to suppress deployment noise from integration
tests</li>
<li><a
href="https://github.com/actions/github-script/commit/3953caf8858d318f37b6cc53a9f5708859b5a7b7"><code>3953caf</code></a>
docs: update README examples from <a
href="https://github.com/v8"><code>@​v8</code></a> to <a
href="https://github.com/v9"><code>@​v9</code></a>, add getOctokit docs
and v9 brea...</li>
<li><a
href="https://github.com/actions/github-script/commit/c17d55b90dcdb3d554d0027a6c180a7adc2daf78"><code>c17d55b</code></a>
ci: add getOctokit integration test job</li>
<li><a
href="https://github.com/actions/github-script/commit/a047196d9a02fe92098771cafbb98c2f1814e408"><code>a047196</code></a>
test: add getOctokit integration tests via callAsyncFunction</li>
<li>Additional commits viewable in <a
href="https://github.com/actions/github-script/compare/f28e40c7f34bde8b3046d885e986cb6290c5673b...3a2844b7e9c422d3c10d287c895573f7108da1b3">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=actions/github-script&package-manager=github_actions&previous-version=7.1.0&new-version=9.0.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>
<!-- devin-review-badge-begin -->

---

<a href="https://app.devin.ai/review/headroomlabs-ai/headroom/pull/4809"
target="_blank"><picture><source media="(prefers-color-scheme: dark)"
srcset="https://static.devin.ai/assets/gh-devin-review-dark.svg?v=4"><img
src="https://static.devin.ai/assets/gh-devin-review-light.svg?v=4"
alt="Devin Review"></picture></a>
<!-- devin-review-badge-end -->

## Real Behavior Proof

- Isolated execution (pr-health is `pull_request_target`, so the base
workflow runs for this PR and it cannot self-prove on-PR):
https://github.com/JerrettDavis/headroom/actions/runs/43560582844 job
`github-script-v9` ran
`actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3`
(v9.0.0) executing `github.paginate(github.rest.issues.listLabels, ...)`
against this repo — job succeeded.
- Not tested: the full governance step body (unchanged logic; only the
action major/runtime moved).

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: JerrettDavis <mxjerrett@gmail.com>
2026-11-14 12:50:16 -06:00
dependabot[bot]andJerrettDavis 92dff1469a ci: bump sigstore/cosign-installer from 3.9.1 to 4.1.3 (#4808)
Bumps
[sigstore/cosign-installer](https://github.com/sigstore/cosign-installer)
from 3.9.1 to 4.1.3.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/sigstore/cosign-installer/releases">sigstore/cosign-installer's
releases</a>.</em></p>
<blockquote>
<h2>v4.1.3</h2>
<h2>What's Changed</h2>
<ul>
<li>Bump Cosign to v3.1.4 (latest release) in <a
href="https://redirect.github.com/sigstore/cosign-installer/pull/257">sigstore/cosign-installer#257</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/sigstore/cosign-installer/compare/v4.1.2...v4.1.3">https://github.com/sigstore/cosign-installer/compare/v4.1.2...v4.1.3</a></p>
<h2>v4.1.2</h2>
<h2>What's Changed</h2>
<ul>
<li>Bump cosign to 3.0.6 in <a
href="https://redirect.github.com/sigstore/cosign-installer/pull/232">sigstore/cosign-installer#232</a></li>
</ul>
<h2>v4.1.1</h2>
<h2>What's Changed</h2>
<ul>
<li>chore: update default cosign-release to v3.0.5 in <a
href="https://redirect.github.com/sigstore/cosign-installer/pull/223">sigstore/cosign-installer#223</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/sigstore/cosign-installer/compare/v4.1.0...v4.1.1">https://github.com/sigstore/cosign-installer/compare/v4.1.0...v4.1.1</a></p>
<h2>v4.1.0</h2>
<h2>What's Changed</h2>
<p>We recommend updating as soon as possible as this includes bug fixes
for Cosign. We also recommend removing <code>with: cosign-release</code>
and strongly discourage using <code>cosign-release</code> unless you
have a specific reason to use an older version of Cosign.</p>
<ul>
<li>Bump cosign to 3.0.5 in <a
href="https://redirect.github.com/sigstore/cosign-installer/pull/220">sigstore/cosign-installer#220</a></li>
<li>fix: add retry to curl downloads for transient network failures in
<a
href="https://redirect.github.com/sigstore/cosign-installer/pull/210">sigstore/cosign-installer#210</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/sigstore/cosign-installer/compare/v4.0.0...v4.1.0">https://github.com/sigstore/cosign-installer/compare/v4.0.0...v4.1.0</a></p>
<h2>v4.0.0</h2>
<h2>What's Changed?</h2>
<p><strong>Note:</strong> You must upgrade to cosign-installer v4 if you
want to install <a
href="https://blog.sigstore.dev/cosign-3-0-available/">Cosign v3+</a>.
You may still install Cosign v2.x with cosign-installer v4.</p>
<p>In version v3+, using <code>cosign sign-blob</code> requires adding
the <code>--bundle</code> flag which may require you to update your
signing command.</p>
<ul>
<li>Add support for Cosign v3 releases (<a
href="https://redirect.github.com/sigstore/cosign-installer/issues/201">#201</a>)</li>
</ul>
<h2>v3.10.1</h2>
<h2>What's Changed?</h2>
<p><strong>Note:</strong> cosign-installer v3.x cannot be used to
install <a href="https://blog.sigstore.dev/cosign-3-0-available/">Cosign
v3.x</a>. You must upgrade to cosign-installer v4 in order to use Cosign
v3.</p>
<p><strong>Note:</strong> This is planned to be the final release of
Cosign v2, though we will cut new releases for any critical security or
bug fixes. We recommend transitioning to <a
href="https://blog.sigstore.dev/cosign-3-0-available/">Cosign
v3</a>.</p>
<ul>
<li>Bump default Cosign to v2.6.1 (<a
href="https://redirect.github.com/sigstore/cosign-installer/issues/203">#203</a>)</li>
</ul>
<h2>v3.10.0</h2>
<h2>What's Changed</h2>
<ul>
<li>Bump default Cosign to v2.6.0 in <a
href="https://redirect.github.com/sigstore/cosign-installer/pull/200">sigstore/cosign-installer#200</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/sigstore/cosign-installer/compare/v3.9.2...v3.10.0">https://github.com/sigstore/cosign-installer/compare/v3.9.2...v3.10.0</a></p>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/sigstore/cosign-installer/commit/756fe2d284c7292c4e9b62c8a28f1e5629c59532"><code>756fe2d</code></a>
Bump Cosign to v3.1.4 (latest release) (<a
href="https://redirect.github.com/sigstore/cosign-installer/issues/257">#257</a>)</li>
<li><a
href="https://github.com/sigstore/cosign-installer/commit/b9c35392b7c1401bcc77d30c9b07cf4b1c7a7b07"><code>b9c3539</code></a>
Bump actions/setup-go from 6.4.0 to 7.0.0 (<a
href="https://redirect.github.com/sigstore/cosign-installer/issues/249">#249</a>)</li>
<li><a
href="https://github.com/sigstore/cosign-installer/commit/84205a0ae0aa7e3c3263e83062bb19d7cee28ad4"><code>84205a0</code></a>
close race on windows due to reusing filename (<a
href="https://redirect.github.com/sigstore/cosign-installer/issues/253">#253</a>)</li>
<li><a
href="https://github.com/sigstore/cosign-installer/commit/af595e623eec1ede52d6322f53b635d5def0a95a"><code>af595e6</code></a>
Bump cosign to 3.1.3 (<a
href="https://redirect.github.com/sigstore/cosign-installer/issues/252">#252</a>)</li>
<li><a
href="https://github.com/sigstore/cosign-installer/commit/828df1e55de306ba29db814d6057ddae71883cda"><code>828df1e</code></a>
fix: harden curl download retries against transient GitHub CDN 504s (<a
href="https://redirect.github.com/sigstore/cosign-installer/issues/240">#240</a>)</li>
<li><a
href="https://github.com/sigstore/cosign-installer/commit/874852de93c66509b01dc7cd80f7a5385182d017"><code>874852d</code></a>
Bump actions/checkout from 6.0.2 to 7.0.1 (<a
href="https://redirect.github.com/sigstore/cosign-installer/issues/250">#250</a>)</li>
<li><a
href="https://github.com/sigstore/cosign-installer/commit/3094a48ba06382e0e6cfa5a4af4fcc55fc6942b9"><code>3094a48</code></a>
wrap path in quotes for powershell (<a
href="https://redirect.github.com/sigstore/cosign-installer/issues/246">#246</a>)</li>
<li><a
href="https://github.com/sigstore/cosign-installer/commit/e246ae36201d24185fc8a2ffed4a58af6656f9a8"><code>e246ae3</code></a>
test minimum of 1.26 given cosign requirement (<a
href="https://redirect.github.com/sigstore/cosign-installer/issues/247">#247</a>)</li>
<li><a
href="https://github.com/sigstore/cosign-installer/commit/6f9f17788090df1f26f669e9d70d6ae9567deba6"><code>6f9f177</code></a>
Bump cosign to 3.0.6 (<a
href="https://redirect.github.com/sigstore/cosign-installer/issues/232">#232</a>)</li>
<li><a
href="https://github.com/sigstore/cosign-installer/commit/b5e753ae2d39589c7b38850b463739151fc67f07"><code>b5e753a</code></a>
Bump actions/github-script from 8.0.0 to 9.0.0 (<a
href="https://redirect.github.com/sigstore/cosign-installer/issues/230">#230</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/sigstore/cosign-installer/compare/398d4b0eeef1380460a10c8013a76f728fb906ac...756fe2d284c7292c4e9b62c8a28f1e5629c59532">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=sigstore/cosign-installer&package-manager=github_actions&previous-version=3.9.1&new-version=4.1.3)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>
<!-- devin-review-badge-begin -->

---

<a href="https://app.devin.ai/review/headroomlabs-ai/headroom/pull/4808"
target="_blank"><picture><source media="(prefers-color-scheme: dark)"
srcset="https://static.devin.ai/assets/gh-devin-review-dark.svg?v=4"><img
src="https://static.devin.ai/assets/gh-devin-review-light.svg?v=4"
alt="Devin Review"></picture></a>
<!-- devin-review-badge-end -->

## Real Behavior Proof

- Isolated execution (docker.yml has no PR trigger, so it cannot
self-prove on-PR):
https://github.com/JerrettDavis/headroom/actions/runs/43560582844 ran
`sigstore/cosign-installer@756fe2d284c7292c4e9b62c8a28f1e5629c59532`
(v4.1.3) — installed cosign v3.1.4 with signature verification; `cosign
version` succeeded.
- Not tested: end-to-end keyless signing of a GHCR image (requires a
real release push).

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: JerrettDavis <mxjerrett@gmail.com>
2026-11-14 12:50:06 -06:00
dependabot[bot]andJerrettDavis d4e0ccf8a1 ci: bump codecov/codecov-action from 5.5.5 to 7.1.1 (#4807)
Bumps
[codecov/codecov-action](https://github.com/codecov/codecov-action) from
5.5.5 to 7.1.1.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/codecov/codecov-action/releases">codecov/codecov-action's
releases</a>.</em></p>
<blockquote>
<h2>v7.1.1</h2>
<h2>What's Changed</h2>
<ul>
<li>chore(release): 7.1.1 by <a
href="https://github.com/thomasrockhu-codecov"><code>@​thomasrockhu-codecov</code></a>
in <a
href="https://redirect.github.com/codecov/codecov-action/pull/1973">codecov/codecov-action#1973</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/codecov/codecov-action/compare/v7.1.0...v7.1.1">https://github.com/codecov/codecov-action/compare/v7.1.0...v7.1.1</a></p>
<h2>v7.1.0</h2>
<h2>What's Changed</h2>
<ul>
<li>chore(release): 7.1.0 by <a
href="https://github.com/thomasrockhu-codecov"><code>@​thomasrockhu-codecov</code></a>
in <a
href="https://redirect.github.com/codecov/codecov-action/pull/1971">codecov/codecov-action#1971</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/codecov/codecov-action/compare/v7.0.0...v7.1.0">https://github.com/codecov/codecov-action/compare/v7.0.0...v7.1.0</a></p>
<h2>v7.0.0</h2>
<p>⚠️ Due to migration issues with keybase, we are unable to update our
keys under the <code>codecovsecurity</code> account. We have deleted the
account and are using <code>codecovsecops</code> with the original gpg
key</p>
<h2>What's Changed</h2>
<ul>
<li>ci: remove Enforce License Compliance workflow by <a
href="https://github.com/thomasrockhu-codecov"><code>@​thomasrockhu-codecov</code></a>
in <a
href="https://redirect.github.com/codecov/codecov-action/pull/1950">codecov/codecov-action#1950</a></li>
<li>chore(release): 7.0.0 by <a
href="https://github.com/thomasrockhu-codecov"><code>@​thomasrockhu-codecov</code></a>
in <a
href="https://redirect.github.com/codecov/codecov-action/pull/1957">codecov/codecov-action#1957</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/codecov/codecov-action/compare/v6.0.1...v7.0.0">https://github.com/codecov/codecov-action/compare/v6.0.1...v7.0.0</a></p>
<h2>v6.0.2</h2>
<p>This is a copy of the <code>v7.0.0</code> release to make updates
easier</p>
<h2>What's Changed</h2>
<ul>
<li>ci: remove Enforce License Compliance workflow by <a
href="https://github.com/thomasrockhu-codecov"><code>@​thomasrockhu-codecov</code></a>
in <a
href="https://redirect.github.com/codecov/codecov-action/pull/1950">codecov/codecov-action#1950</a></li>
<li>chore(release): 7.0.0 by <a
href="https://github.com/thomasrockhu-codecov"><code>@​thomasrockhu-codecov</code></a>
in <a
href="https://redirect.github.com/codecov/codecov-action/pull/1957">codecov/codecov-action#1957</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/codecov/codecov-action/compare/v6.0.1...v6.0.2">https://github.com/codecov/codecov-action/compare/v6.0.1...v6.0.2</a></p>
<h2>v6.0.1</h2>
<h2>What's Changed</h2>
<ul>
<li>fix: prevent template injection in run: steps (VULN-1652) by <a
href="https://github.com/thomasrockhu-codecov"><code>@​thomasrockhu-codecov</code></a>
in <a
href="https://redirect.github.com/codecov/codecov-action/pull/1947">codecov/codecov-action#1947</a></li>
<li>chore(release): 6.0.1 by <a
href="https://github.com/thomasrockhu-codecov"><code>@​thomasrockhu-codecov</code></a>
in <a
href="https://redirect.github.com/codecov/codecov-action/pull/1949">codecov/codecov-action#1949</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/codecov/codecov-action/compare/v6.0.0...v6.0.1">https://github.com/codecov/codecov-action/compare/v6.0.0...v6.0.1</a></p>
<h2>v6.0.0</h2>
<h2>⚠️ This version introduces support for node24 which make cause
breaking changes for systems that do not currently support node24.
⚠️</h2>
<h2>What's Changed</h2>
<ul>
<li>Revert &quot;Revert &quot;build(deps): bump actions/github-script
from 7.0.1 to 8.0.0&quot;&quot; by <a
href="https://github.com/thomasrockhu-codecov"><code>@​thomasrockhu-codecov</code></a>
in <a
href="https://redirect.github.com/codecov/codecov-action/pull/1929">codecov/codecov-action#1929</a></li>
<li>Th/6.0.0 by <a
href="https://github.com/thomasrockhu-codecov"><code>@​thomasrockhu-codecov</code></a>
in <a
href="https://redirect.github.com/codecov/codecov-action/pull/1928">codecov/codecov-action#1928</a></li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/codecov/codecov-action/commit/303a32d7a59b442fa8d48b6a1cc6825c09c847a5"><code>303a32d</code></a>
chore(release): 7.1.1 (<a
href="https://redirect.github.com/codecov/codecov-action/issues/1973">#1973</a>)</li>
<li><a
href="https://github.com/codecov/codecov-action/commit/0b35c9ecc4f0529d0eb674914510c22f85b196b4"><code>0b35c9e</code></a>
chore(release): 7.1.0 (<a
href="https://redirect.github.com/codecov/codecov-action/issues/1971">#1971</a>)</li>
<li><a
href="https://github.com/codecov/codecov-action/commit/fb8b3582c8e4def4969c97caa2f19720cb33a72f"><code>fb8b358</code></a>
chore(release): 7.0.0 (<a
href="https://redirect.github.com/codecov/codecov-action/issues/1957">#1957</a>)</li>
<li><a
href="https://github.com/codecov/codecov-action/commit/ca0a928a4cb3911011e868128a5cd90437c12db1"><code>ca0a928</code></a>
ci: remove Enforce License Compliance workflow (<a
href="https://redirect.github.com/codecov/codecov-action/issues/1950">#1950</a>)</li>
<li><a
href="https://github.com/codecov/codecov-action/commit/e79a6962e0d4c0c17b229090214935d2e33f8354"><code>e79a696</code></a>
chore(release): 6.0.1 (<a
href="https://redirect.github.com/codecov/codecov-action/issues/1949">#1949</a>)</li>
<li><a
href="https://github.com/codecov/codecov-action/commit/51e64229ac331acb0d7f7b17c67423995f991c79"><code>51e6422</code></a>
fix: prevent template injection in run: steps (VULN-1652) (<a
href="https://redirect.github.com/codecov/codecov-action/issues/1947">#1947</a>)</li>
<li><a
href="https://github.com/codecov/codecov-action/commit/57e3a136b779b570ffcdbf80b3bdc90e7fab3de2"><code>57e3a13</code></a>
Th/6.0.0 (<a
href="https://redirect.github.com/codecov/codecov-action/issues/1928">#1928</a>)</li>
<li><a
href="https://github.com/codecov/codecov-action/commit/f67d33dda8a42b51c42a8318a1f66468119e898b"><code>f67d33d</code></a>
Revert &quot;Revert &quot;build(deps): bump actions/github-script from
7.0.1 to 8.0.0&quot;&quot;...</li>
<li>See full diff in <a
href="https://github.com/codecov/codecov-action/compare/0fb7174895f61a3b6b78fc075e0cd60383518dac...303a32d7a59b442fa8d48b6a1cc6825c09c847a5">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=codecov/codecov-action&package-manager=github_actions&previous-version=5.5.5&new-version=7.1.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>
<!-- devin-review-badge-begin -->

---

<a href="https://app.devin.ai/review/headroomlabs-ai/headroom/pull/4807"
target="_blank"><picture><source media="(prefers-color-scheme: dark)"
srcset="https://static.devin.ai/assets/gh-devin-review-dark.svg?v=4"><img
src="https://static.devin.ai/assets/gh-devin-review-light.svg?v=4"
alt="Devin Review"></picture></a>
<!-- devin-review-badge-end -->

## Real Behavior Proof

- Observed on this PR head: CI `test (1)` job ran
`codecov/codecov-action@303a32d7a59b442fa8d48b6a1cc6825c09c847a5`
(v7.1.1); uploader downloaded+signature-verified, "Upload queued for
processing complete".
- Not tested: codecov-side processing; other workflows' shards already
green.

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: JerrettDavis <mxjerrett@gmail.com>
2026-11-14 12:49:57 -06:00
JD DavisandJerrett Davis b235bc2d27 fix(ci): verify installer provenance in build workflows (#4677)
## Current maintainer status (2026-11-10, current-main refresh)

Published head: `db4bdd71e7ddc1a72316445ef0d16a7d90b62951`, containing
upstream main `a385ea8e60a14c1511d82b21d518421af35deab2` through a clean
mechanical merge. All 13 remediation files are byte-identical to
reviewed head `81ff3ed384afbd404c48fd79d6bed41e8d647a99`; no installer,
action metadata, or checksum selection changed.

Fresh focused Windows checks: 61 passed and 23 platform skips. Fresh WSL
offline bootstrap/hook fixtures: 23 passed, with one pytest
configuration warning. These local checks use fixtures and do not claim
live vendor, provider, or native GUI execution.

Exact-head CI, including Docker-native, and the Init, Wrap, Rust,
governance, changelog, and merge-conflict workflows succeeded. Security
remains FAILURE: the OpenCode npm audit reports two moderate findings
through Effect advisory GHSA-chp3-j5qr-2vfr. The security workflow and
affected OpenCode package manifest/lock are byte-identical to current
main, establishing an inherited dependency finding. This is not an
all-green result or a fresh audit of main. No workflow rerun, dependency
downgrade, or advisory override was performed on this branch.

Independent human review and integration remain required. No
self-approval or merge was performed. Other branch publication and
execution holds remain active. All older qualification below belongs to
its recorded historical heads.

---



## Description

Build validation jobs fetched mutable installer scripts, and the pinned
commitlint action still declared a mutable Docker image tag. This pins
that image digest, verifies workflow-tool archives and cached binaries,
and replaces the Docker bootstrap scripts with pinned, verified sources.


## Type of Change

- [x] Bug fix



## Changes Made

- Preserve Rust 1.95.0, minimal/rustfmt/clippy options, Node 24, npm
12.2.1, and OpenCode 1.17.8.
- Preserve Debian userland architecture detection, Rustup ARM fallback,
and OpenCode x64 AVX2/baseline selection.
- Use an official Node image pinned by manifest digest; retain
npm/corepack trees and explicit runtime libraries.
- Add offline bootstrap tests for failed downloads, corrupt bytes,
unsupported targets, symlinks, and option forwarding.


## Testing

- [x] Offline bootstrap tests pass (stdlib unittest, 16 cases).

- [x] Ruff lint/format pass for the two new test files; shell syntax and
whitespace checks pass.
- [x] Exact-head hosted CI passed, including platform tests and
Docker-native, Init, and Wrap build/container checks.


### Test Output

```text

python3 -m unittest discover -s tests/test_install -p 'test_*bootstrap.py'

................

Ran 16 tests in 0.770s

OK

```



## Real Behavior Proof

- Environment: Ubuntu 24.04 under WSL, exact candidate
4ee38e8619.
- Exact command / steps: Run the unittest discovery command above.
Separately stream the recorded release archives and official Node image
layer through SHA-256 and inspect their tar headers.
- Observed result: Invalid bytes stop before extraction/execution;
fixture platform and CPU cases select the intended archives. Actual
workflow-tool/OpenCode archives and the Node layer match published
digests. The Rustup x64 binary matches its vendor checksum; all nine
embedded target checksums match vendor records.
- Not tested: No live model/provider behavior or unexercised
architecture is claimed. Local bootstrap fixtures use mocks; the hosted
Docker/build checks below exercised the actual pinned installation
paths.


## Runtime Rollout Safety

- Rollout-managed feature(s): None; CI/build bootstrap only.

- Minimum rollout channel: Not applicable.

- Stable/default behavior changed: Build inputs become pinned; proxy
defaults, Rust 1.95.0/components, npm 12.2.1 and OpenCode 1.17.8 stay
unchanged. Node remains on the 24 LTS line with a fixed image digest.
- Kill switch / disable path: Revert the maintenance change through
review; do not bypass checksum failures.
- Unsafe override required: None for this exact reviewed candidate.

- Qualification impact: The exact-head hosted checks below passed.
Existing PR heads retain their separate security/qualification holds
until main is remediated and their own gates are refreshed.
- Rollback path: Revert this maintenance PR if build compatibility
regresses.


## Review Readiness

- [x] I performed a self-review.

- [x] This PR is ready for human review.



## Checklist

- [x] New security regression tests are included.

- [x] CHANGELOG.md is unchanged.



## Additional Notes

Static independent code review found no defects. No merge or
self-approval is requested. Completed historical CI evidence is retained
within its original scope; this change qualifies future installer
execution separately.


Initial hosted validation of b2592de8d stopped at rustup filename
dispatch. Follow-up 4ee38e861 retains the required rustup-init basename
in a private directory and adds the reproducing regression test. All
nine latest applicable hosted workflows passed on the corrected head.


### Hosted validation on 4ee38e861

- [CI: platform tests and Docker-native
build/install/compose/wrap/init](https://github.com/headroomlabs-ai/headroom/actions/runs/42352878789):
success.
- [Wrap
E2E](https://github.com/headroomlabs-ai/headroom/actions/runs/42352878762),
[Init
E2E](https://github.com/headroomlabs-ai/headroom/actions/runs/42352878760),
[Init Native
E2E](https://github.com/headroomlabs-ai/headroom/actions/runs/42352878767),
and
[Security](https://github.com/headroomlabs-ai/headroom/actions/runs/42352878768):
success.
- Governance, changelog, Rust and merge-conflict checks also passed. The
older cancelled governance duplicate was superseded by a successful run.


Independent human review is required. No self-approval or merge has been
performed.




### Local-action metadata coverage follow-up



`38337d8be` adds `.github/actions/**` to both code and workflow filters.
The normal pytest suite now checks the vendored commitlint metadata
structure and immutable Docker digest; this is separate from actionlint
workflow parsing. Six focused CI regression tests pass, including a
filter regression that failed before the fix. Independent delta review
found no issues. `38337d8be` now has successful latest applicable CI,
Wrap E2E, Init E2E, Init Native E2E, Security, Rust, Changelog Guard,
Merge Conflicts, and PR Governance runs. The successful runs above
remain historical evidence for `4ee38e861`.




Current-head
[CI](https://github.com/headroomlabs-ai/headroom/actions/runs/42360858297),
[Wrap](https://github.com/headroomlabs-ai/headroom/actions/runs/42360858271),
[Init](https://github.com/headroomlabs-ai/headroom/actions/runs/42360858296),
[Init
Native](https://github.com/headroomlabs-ai/headroom/actions/runs/42360858178),
and
[Security](https://github.com/headroomlabs-ai/headroom/actions/runs/42360858352)
passed. Independent human review remains required; no self-approval or
merge.


<!-- maintainer-current-main-qualification -->

## Current-main qualification



Published head `9381378ffb07e466acef6a57eb39322aa84d4582` includes
upstream main `bb8d18a56abb07ca7e811235c86ea6b626eb1f8b` and is
mergeable. All nine exact-head workflows succeeded; all 53 jobs are
terminal success or explicit skips, including CI Docker-native,
wrap/init and native-init validation. Local metadata/release checks: 61
passed; 16 Linux-only bootstrap tests skipped on Windows. Remediation
installer/action sources are unchanged by the clean main integration.


Independent human review and merge are required. No self-approval or
merge performed. This PR does not lift the inherited
execution-provenance hold on main or other branches before human
integration.
<!-- /maintainer-current-main-qualification -->



### Maintainer current-main refresh (a2bcbd101)

Published `a20f072a238a1f8de422adf6a25d3f9d664151e4` incorporates
upstream main `a2bcbd101b1391debfd218ec8c63cb72d2bc240a` through a clean
merge. All 13 previously screened CI provenance remediation files are
byte-identical to prior published head
`9381378ffb07e466acef6a57eb39322aa84d4582`; no
installer/action/remediation logic was rewritten. Fresh focused checks:
61 passed, 23 platform-specific shell cases skipped on Windows. No
vendor installer, Docker image or downloaded binary was executed
locally. Earlier Linux bootstrap and hosted evidence retain their
original scope.

Fresh exact-head hosted validation completed successfully: all 10
observed workflow runs succeeded; all 56 checks are terminal successful
or explicitly skipped. Ready for independent human review on this
head/current main. This remediation branch alone is permitted to run its
screened checks; inherited execution/publication holds on main and other
PRs remain until independent human integration. Independent review is
required; no self-approval, merge or release publication.

---------

Co-authored-by: Jerrett Davis <JerrettDavis@users.noreply.github.com>
2026-11-10 21:02:42 -06:00
HetCreepandClaude Opus 5.5 8f6366cf66 fix(ci): keep the npm publish token out of install and build steps (#4690)
## Description

In `.github/workflows/release.yml`, job `publish-npm`, each package's
publish step set `NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}` for the
whole step, and the same step ran `npm ci` and `npm run build` before
`npm publish`. `npm ci` runs the install lifecycle scripts of every
dependency, so those scripts could read the publish token. This PR
splits each of the three packages (SDK, openclaw, opencode) into a
Prepare step with no token and a Publish step that carries the token and
runs only `npm publish`.

Fixes #4688

## Type of Change

- [x] Bug fix (non-breaking change that fixes an issue)
- [ ] New feature (non-breaking change that adds functionality)
- [ ] Breaking change (fix or feature that would cause existing
functionality to change)
- [ ] Documentation update
- [ ] Performance improvement
- [ ] Code refactoring (no functional changes)

## Changes Made

- `release.yml`: new `Prepare ... for npmjs.org` step per package (no
`env`): the "already published" `npm view` check, `cd`, `npm ci`, `npm
run build`, `npm version`, and for openclaw/opencode the dependency
rewrite and (openclaw) `node prepare-dist.mjs`. Same commands, same
order as before.
- `release.yml`: the existing `Publish ... to npmjs.org` step (same name
and id) now has `working-directory`, keeps `NODE_AUTH_TOKEN`, and runs
only `npm publish --access public`.
- The skip for an already-published version is passed between the two
steps with a step output (`skip=true` in `$GITHUB_OUTPUT`), and each
Publish step has `if: steps.<id>-prepare.outputs.skip != 'true'`.
Re-running after a partial release behaves as before.
- `tests/test_release_workflows.py`: new
`test_publish_npm_token_is_only_in_whoami_and_publish_steps`; the two
existing order tests now start at the Prepare step, where `npm version`
and the dependency rewrite now live.
- No `package.json` of the three packages has a `prepublishOnly`,
`prepack` or `prepare` script, so nothing needed at publish time was
moved out of the token step. I did not add `--ignore-scripts` to `npm
publish`.

## Testing

- [x] Unit tests pass (`pytest`)
- [x] Linting passes (`ruff check .`)
- [ ] Type checking passes (`mypy headroom`)
- [x] New tests added for new functionality
- [x] Manual testing performed

### Test Output

Fail before (new test only, on the unmodified workflow):

```text
FAILED tests/test_release_workflows.py::test_publish_npm_token_is_only_in_whoami_and_publish_steps
E   assert ('npm ci' not in 'version="${...ess public\n'
E     'npm ci' is contained here:
E       npm ci
E       npm run build
E       npm version "$version" --no-git-tag-version --allow-same-version
E       npm publish --access public)
1 failed, 4 passed, 54 deselected
```

Pass after (whole file):

```text
tests/test_release_workflows.py .................ss..................... [ 67%]
...................                                                      [100%]
57 passed, 2 skipped in 277.72s (0:04:37)
```

Lint (touched test file): `ruff check` "All checks passed!", `ruff
format --check` "1 file already formatted". `mypy` is not relevant (no
`headroom` code changed).

Step-by-step env keys of the `publish-npm` job, parsed with PyYAML,
before:

```text
 2 Verify npm publishing authentication       env=['NODE_AUTH_TOKEN'] cmds=['npm whoami']
 3 Publish ... (TypeScript SDK) to npmjs.org  env=['NODE_AUTH_TOKEN'] cmds=['npm ci', 'npm run build', 'npm publish']
 4 Publish ... openclaw to npmjs.org          env=['NODE_AUTH_TOKEN'] cmds=['npm ci', 'npm run build', 'npm publish']
 5 Publish ... opencode to npmjs.org          env=['NODE_AUTH_TOKEN'] cmds=['npm ci', 'npm run build', 'npm publish']
```

after:

```text
 2 Verify npm publishing authentication       env=['NODE_AUTH_TOKEN'] cmds=['npm whoami']
 3 Prepare ... (TypeScript SDK)               env=[] cmds=['npm ci', 'npm run build']
 4 Publish ... (TypeScript SDK)               env=['NODE_AUTH_TOKEN'] wd=sdk/typescript cmds=['npm publish']
 5 Prepare ... openclaw                       env=[] cmds=['npm ci', 'npm run build']
 6 Publish ... openclaw                       env=['NODE_AUTH_TOKEN'] wd=plugins/openclaw cmds=['npm publish']
 7 Prepare ... opencode                       env=[] cmds=['npm ci', 'npm run build']
 8 Publish ... opencode                       env=['NODE_AUTH_TOKEN'] wd=plugins/opencode cmds=['npm publish']
```

## Real Behavior Proof

- Environment: Windows 11 host, workflow parsed in WSL Ubuntu with
PyYAML and pytest from the repo's test venv, against a clone at
`12864fc8` plus this change.
- Exact command / steps: parsed `.github/workflows/release.yml` with
`yaml.safe_load` and printed every `publish-npm` step's env keys,
working directory, `if` and npm commands before and after (output
above); ran `pytest tests/test_release_workflows.py`.
- Observed result: before, all three install+build+publish steps carry
`NODE_AUTH_TOKEN`; after, the token is only on `npm whoami` and the
three `npm publish` steps, and `npm ci`/`npm run build` steps have no
env. The whole workflow test file passes.
- Not tested: an actual GitHub Actions run (the workflow only publishes
on a release and needs `NPM_TOKEN`; I did not run it or publish
anything). `actionlint` is not installed here, so
`scripts/validate-workflows.sh` was not run. I did not check that
setup-node's `.npmrc` placeholder `NODE_AUTH_TOKEN` lets the token-less
`npm view` and `npm ci` run as before; the `npm view` of a public
package should not need auth, but a maintainer should confirm on the
first release.

## Runtime Rollout Safety

- Rollout-managed feature(s): none (release workflow only).
- Minimum rollout channel: n/a.
- Stable/default behavior changed: No product behavior. The release
workflow publishes the same packages with the same commands; only the
step boundaries and which steps see the token changed.
- Kill switch / disable path: n/a; the existing `publish-npm` gating of
the workflow is unchanged.
- Unsafe override required: No.
- Qualification impact: None.
- Rollback path: revert this commit.

## Review Readiness

- [x] I have performed a self-review
- [x] This PR is ready for human review

## Checklist

- [x] My code follows the project's style guidelines
- [x] I have performed a self-review of my code
- [x] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [x] I have added tests that prove my fix is effective or that my
feature works
- [x] New and existing unit tests pass locally with my changes
- [x] I did **not** edit `CHANGELOG.md` — it is generated by
release-please from my Conventional Commit PR title (a CI guard enforces
this)

## Additional Notes

- Not changed, left for a maintainer: npm trusted publishing (OIDC,
`--provenance`) as suggested in the issue, which would remove the stored
`NPM_TOKEN`; and the same split in the `publish-github-packages` job,
which has the same shape with `GITHUB_TOKEN`.
- Documentation checkbox is N/A (no user-facing docs describe the
workflow steps).

Produced with AI assistance (Claude Code) operated by me (HetCreep); the
tests and proof above were run on my machine against a clone of the
repository.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

<!-- devin-review-badge-begin -->

---

<a href="https://app.devin.ai/review/headroomlabs-ai/headroom/pull/4690"
target="_blank"><picture><source media="(prefers-color-scheme: dark)"
srcset="https://static.devin.ai/assets/gh-devin-review-dark.svg?v=4"><img
src="https://static.devin.ai/assets/gh-devin-review-light.svg?v=4"
alt="Devin Review"></picture></a>
<!-- devin-review-badge-end -->

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-07 20:38:05 -06:00
Mansurshakh JaparovandJerrettDavis cde584d7fe fix(langchain): check optional integration availability (#4042)
## Description

Closes #4039.

The optional integration uses the existing LANGCHAIN_AVAILABLE guard;
installed LangChain binding precedence remains intact. Current head:
`ac9e49af43501d2b3bbb6d0a21cb07fe94030bc9`, normally updated onto main
`f1bc`.

## Type of Change

- [x] Bug fix (non-breaking change that fixes an issue)
- [x] Documentation update

## Changes Made

- Install langchain-core in the existing CI lint job, with the
optional-extra version range, so the normal mypy invocation covers the
integration. Remove the pytest-launched mypy subprocess.
- Keep our nested unwrap-precedence regression (sync and async) and two
real loopback HTTP cases: bind_tools and nested caller-overrides. Remove
the vendor tool-response/usage-parsing matrix, as requested by the
maintainer.
- Replace the private LiteLLM cache invalidator with the public
register_model API; preserve the independent cost_per_token billing
oracle and fixture/catalog restoration.
- Correct the compatibility doc numbering and document the normal typing
path in CONTRIBUTING.
- Preserve the published startup SDK/provider module and parent-package
restoration fixes.

## Testing

- [ ] Unit tests pass (pytest) — no whole-project suite pass claimed.
- [ ] Linting passes (ruff check .) — changed-file Ruff passed; no new
whole-repository Ruff claim.
- [x] Type checking passes (mypy headroom)
- [x] Manual testing performed

### Test Output

Current published head, Python 3.13.14, installed langchain-core 1.6.10,
langchain-openai 1.7.1, LiteLLM 1.105.0 and a fresh native build:

`python -m pytest tests/test_integrations/langchain/test_binding_http.py
tests/test_integrations/langchain/test_langchain_1x_compat.py
tests/test_startup_log_noise.py tests/test_xai_cache_economics.py -q`

```text
28 passed, 1 skipped in 14.73s
```

The skip is optional trafilatura unavailable. A SQLite ResourceWarning
was emitted at interpreter teardown; it is not suppressed or claimed
fixed.

Normal mypy command in an isolated lint environment with mypy 1.20.2 and
installed langchain-core: success, no issues in 569 source files. This
local lint environment uses Python 3.14; the runtime consumer suite uses
Python 3.13.14. Existing untyped-body/unused-ignore notes remain.

Ordinary push gates: Rust workspace tests, fresh native extension build,
181 critical Python tests, and commitlint passed. Two prior normal
publication attempts failed seven native parity cases; neither was
bypassed or repinned. Publication passed with a separate clean Cargo
target. This establishes the successful isolated build, not a proven
root cause for the earlier build discrepancy.

## Real Behavior Proof

- Environment: installed SDKs, actual localhost HTTP server, no
provider-network or billing requests.
- Exact command / steps: an independent runtime driver invoked
HeadroomChatModel with bind_tools and nested RunnableBinding objects
against the real local ChatOpenAI transport; the retained HTTP
regressions exercised both cases again on the published head.
- Observed result: two actual requests; bind_tools sent lookup; nested
caller temperature 0.3 won, and inner top_p 0.8 survived. The sync/async
unwrap regression retains the real RunnableBinding precedence check. The
pricing oracle and startup teardown regressions passed.
- Not tested: live provider invoices, paid requests, remote production
deployment, or current-head hosted CI completion. Historical CI/approval
is not attributed to this new head.

## Runtime Rollout Safety

- Rollout-managed feature(s): none; optional integration guard and test
isolation.
- Minimum rollout channel: N/A.
- Stable/default behavior changed: no binding precedence, runtime
defaults, authentication or serialization changes; CI lint now
explicitly installs the existing optional typing dependency.
- Kill switch / disable path: existing optional extra remains optional;
no new runtime switch.
- Unsafe override required: no.
- Qualification impact: optional-extra typing and real binding consumers
are exercised; normal local native/critical gates passed.
- Rollback path: revert the bounded guard/CI/test edits; no
persistent-state migration.

## Review Readiness

- [x] I have performed a self-review
- [x] This PR is ready for human review

## Checklist

- [x] My code follows the project's style guidelines
- [x] I have performed a self-review of my code
- [x] I have made corresponding changes to the documentation
- [x] I did not edit CHANGELOG.md — release-please owns it

## Additional Notes

AI-assisted without subagents. No force push, skipped hook, new approval
or merge. The reduced HTTP scope follows the maintainer's explicit
request:
https://github.com/headroomlabs-ai/headroom/pull/4042#issuecomment-6157529674
.


### Maintainer current-main requalification

Exact head `ff329f3e487940f85d56ba0b35bd9994afadb506`, upstream main
`c01cf07d943d816cfd9d97e6838ed4e38f1ff9a4`.

Requalified against upstream main
c01cf07d94. The only merge conflict
combined main's Python 3.11 minimum with the contributor's
optional-integration typing guidance; both retained. No contributor
availability/binding policy rewritten. Current author/chopratejas/Devin
discussion reviewed, including the intentional removal of vendor-owned
response-parsing coverage. Nested binding precedence, real loopback HTTP
controls, public LiteLLM register_model isolation, independent billing
oracle and parent-module restoration remain covered.

Fresh focused tests: 29 passed with installed langchain-core 1.4.2 and
langchain-openai 1.2.2. Full mypy against the Linux CI target checked
580 source files: PR reports 22 errors; an actual detached current-main
run with the same environment reports those same 22 plus a
RunnableBinding truthy-function error that this PR removes. The 22
shared errors are in unrelated unchanged prefix-tracker, optional
memory/MCP and CrewAI modules; they are not contributor blockers and
this is not a clean full-mypy claim. Five changed Python files pass Ruff
lint/format and main-relative whitespace checks. Current-main DLL
supports local startup, without a branch-specific native-build or live
model-provider claim. No new source blocker; approval awaits exact-head
hosted qualification. Nothing merged.


Exact-head hosted checks are being handled by maintainers. No new
finding in the reviewed scope; formal approval awaits exact-head hosted
qualification; nothing merged.

---------

Co-authored-by: JerrettDavis <mxjerrett@gmail.com>
2026-11-06 09:24:06 -06:00
lorenzozaneandJerrettDavis a8905214d9 fix(packaging)!: keep PyTorch extras out of all (#4067)
<!-- maintainer-current-main -->
## Maintainer latest-main checkpoint
Published `fb146c0663b30488da0a49cfb33624ee82862074` contains current
upstream main `e4a60ed72f6ef5b28569f8bfbe2163cfda32c948`. 22
dependency/Gemini tests and lock check passed. Earlier live behavior
proofs below retain their commit/platform scope; contributor runtime
logic is unchanged.

The common shard-2 failure was independently confirmed on main's hosted
job 127069149772 and locally (four failures, six passes): the Gemini
memory fixture mocked an unused body reader and provided no request
stream. The maintainer test-only follow-up now constructs a real
FastAPI/ASGI Request carrying JSON bytes and exercises the actual body
reader. All six test-function ASTs/assertions are unchanged, and all 10
parameterized Gemini cases pass. Touched-file Ruff/format and whitespace
checks pass. This fixes the inherited fixture instead of asking
contributors to run CI or weakening the memory/content assertions. Fresh
exact-head hosted qualification is requested. Nothing merged.
<!-- /maintainer-current-main -->

## Description



On Linux, installing `headroom-ai[all]` resolved PyTorch and NVIDIA CUDA
packages even for users who only needed the CLI/proxy profile. The
locked dependency graph included those packages through `ml`, `memory`,
`evals`, and `voice`.



This keeps those PyTorch-backed extras available for explicit
installation while removing them from `[all]`. Image support and the
other CLI/proxy dependencies remain included; dependency metadata cannot
detect installed GPU hardware.



Closes #3339



## Type of Change



- [ ] Bug fix (non-breaking change that fixes an issue)

- [ ] New feature (non-breaking change that adds functionality)

- [x] Breaking change (fix or feature that would cause existing
functionality to change)

- [ ] Documentation update

- [ ] Performance improvement

- [ ] Code refactoring (no functional changes)



## Changes Made



- Remove `ml`, `memory`, `evals`, and `voice` from the `[all]` extra
while keeping each separately installable.

- Retain `image` and the other default CLI/proxy capabilities.

- Update README and installation docs to describe the opt-in extras and
CUDA package implications.

- Add a dependency contract assertion for the `[all]` extra.



## Testing



- [ ] Unit tests pass (`pytest`)

- [ ] Linting passes (`ruff check .`)

- [ ] Type checking passes (`mypy headroom`)

- [ ] New tests added for new functionality

- [x] Manual testing performed



### Test Output



```text

Focused dependency contract tests: 3 passed, 5 deselected.

Python 3.13 locked `uv export` exited 0; the fixed export omits torch, CUDA, NVIDIA, sentence-transformers, and datasets. The baseline export contained them.

`uv lock --check`, scoped Ruff check/format, and `git diff --check` exited 0.

The broader dependency test module had 3 passed and 5 import failures because `opentelemetry` is absent from the local environment.

```



## Real Behavior Proof



- Environment: Linux, Python 3.13, locked uv dependency resolution.

- Exact command / steps: `UV_PYTHON_DOWNLOADS=never uv export --python
3.13 --extra all --no-dev --locked --no-hashes --no-emit-project`.

- Observed result: exit 0; the resolved export no longer contains torch,
CUDA, NVIDIA, sentence-transformers, or datasets, all of which were
present in the baseline export.

- Not tested: a full environment install and GPU runtime behavior.



## Runtime Rollout Safety



- Rollout-managed feature(s): None.

- Minimum rollout channel: Stable package release.

- Stable/default behavior changed: Yes; `[all]` no longer installs the
four PyTorch-backed extras.

- Kill switch / disable path: Not applicable; install the desired extras
explicitly.

- Unsafe override required: No.

- Qualification impact: Users of those capabilities must add the
corresponding extras.

- Rollback path: Restore the extras to `[all]` and regenerate `uv.lock`.



## Review Readiness



- [x] I have performed a self-review

- [x] This PR is ready for human review



## Checklist



- [x] My code follows the project's style guidelines

- [x] I have performed a self-review of my code

- [ ] I have commented my code, particularly in hard-to-understand areas

- [x] I have made corresponding changes to the documentation

- [ ] My changes generate no new warnings

- [x] I have added tests that prove my fix is effective or that my
feature works

- [ ] New and existing unit tests pass locally with my changes

- [x] I did **not** edit `CHANGELOG.md` — it is generated by
release-please from my Conventional Commit PR title (a CI guard enforces
this)



## Screenshots (if applicable)



Not applicable to this dependency-resolution change.



## Additional Notes



The `[all]` install profile intentionally no longer includes
PyTorch-backed optional capabilities; each remains available through its
named extra. The focused regression and locked resolver proof passed,
but the full dependency test module and a full install were not verified
locally.





## Maintainer integration qualification

Published head `3229690b613810d496f015cedd086ca1d7421843` includes
current upstream main `31dcaf41`. The merge preserves main's `lean`
dependency profile and deprecated `sandbox` alias alongside the
contributor's opt-in `[all]` policy. No optional-feature runtime logic
was changed.



- Reconciled the existing macOS dependency test with the declared
policy, retaining the transitive exclusion check and independently
verifying explicit `ml`/`voice` opt-ins on Intel macOS and Linux. All 12
tests across `tests/test_onnx_dependency_contract.py` and
`tests/test_optional_dependencies.py` pass on Windows/Python 3.12.13.

- Evaluation workflow installs now explicitly request `evals`, and the
model-allowed weekly job also requests `ml`, preserving its previous
intended dependencies. The evaluation guide and AI install index
identify those opt-ins. These address the existing Devin workflow/docs
findings.

- `uv lock --check`, touched Python Ruff/format and whitespace checks
pass. All 253 locked package versions are unchanged; only the root
`[all]` dependency metadata/flattened list changes.

- Real resolver commands from this checkout: `uv export --extra all
--no-dev --locked --no-hashes --no-emit-project` and `uv export --extra
all --extra ml --extra voice --extra evals --no-dev --locked --no-hashes
--no-emit-project`. Evaluating their actual requirement markers for
Python 3.12/3.13/3.14 on Linux x86_64, Windows AMD64, macOS arm64 and
macOS x86_64 shows `[all]` excludes torch, sentence-transformers,
datasets and CUDA/NVIDIA packages in all 12 environments. Explicit
opt-ins retain datasets and torch where supported; Intel macOS still
excludes torch.

- Not tested: a fresh full environment install, GPU runtime, live paid
evaluations or a fresh native build. Hosted CI must qualify the
published final head separately.



### Maintainer current-main requalification

Exact head `f1ed1e0019037e7b53ff9ef548843449c3c7a16f`, upstream main
`c01cf07d943d816cfd9d97e6838ed4e38f1ff9a4`.

Current-main integration against upstream
c01cf07d94. The sole conflict was the
inherited Gemini fixture: adopted main's streamed-body helper after
verifying all six test-function ASTs unchanged. No contributor
dependency policy rewritten. The declared breaking change keeps
Torch-backed ml/memory/evals/voice opt-in while preserving the default
CLI/proxy bundle, image capability and main's lean profile. Evaluation
workflows and guides explicitly request removed extras; current
author/Devin discussion considered.

Fresh verification: 25 dependency/Gemini tests pass; offline uv lock
check resolves 253 packages; changed Python lint/format and
main-relative whitespace pass. Actual locked exports evaluated over 12
OS/Python marker environments (Linux/Windows/macOS, Python 3.10–3.13):
all excludes Torch/NVIDIA dependencies, explicit
all+ml+memory+evals+voice retains Torch. This is resolver/export proof,
not a fresh full installation or GPU runtime claim. No new source
blocker found; formal approval awaits exact-head hosted checks. Nothing
merged.


Exact-head hosted checks are being handled by maintainers. No new
finding in the reviewed scope; formal approval awaits exact-head hosted
qualification; nothing merged.

---------

Co-authored-by: JerrettDavis <mxjerrett@gmail.com>
2026-11-06 09:23:03 -06:00
2973ca593d ci: pin every GitHub Action to a commit SHA (#4671)
## Description

Every third-party action in `.github/` ran from a version tag like
`actions/checkout@v7`. A tag can be moved to other code at any time.
That is how `tj-actions/changed-files` leaked CI secrets from ~23,000
repos in March 2025.

Here a moved tag would run with the release job's PyPI OIDC token
(`id-token: write`) and the Docker job's `packages: write` token.
Pinning to a commit SHA closes that, and a new test keeps it closed.

Closes #

## Type of Change

- [ ] Bug fix (non-breaking change that fixes an issue)
- [ ] New feature (non-breaking change that adds functionality)
- [ ] Breaking change (fix or feature that would cause existing
functionality to change)
- [ ] Documentation update
- [ ] Performance improvement
- [x] Code refactoring (no functional changes)

## Changes Made

- All 195 third-party `uses:` refs in 25 files now name the commit their
tag points to today, with the version as a comment:
`actions/checkout@3d3c42e5... # v7.0.1`. No action version changes.
- Dependabot's existing `github-actions` config updates SHA pins and
their version comments, so the pins stay current.
- Pin dtolnay/rust-toolchain stable and 1.95.0 branches to their
existing commit heads. The stable action retains its runtime toolchain
input/default; the 1.95.0 action embeds toolchain: 1.95.0. This
preserves each call site's existing toolchain selection.
- New `test_every_action_is_pinned_to_a_commit_sha` in
`scripts/tests/test_ci_workflow.py` fails on any tag-pinned action and
lists each one.
- Three tests in `tests/test_release_workflows.py` matched the old tag
text (`setup-buildx-action@v4`, `gh-action-pypi-publish@vX.Y.Z`,
`release-please-action@v4/v5`). They now match the SHA pin and its
version comment.

## Testing

- [x] Unit tests pass (`pytest`)
- [x] Linting passes (`ruff check .`)
- [ ] Type checking passes (`mypy headroom`)
- [x] New tests added for new functionality
- [x] Manual testing performed

### Test Output

```text
$ uv run --frozen --extra dev pytest -q scripts/tests/test_ci_workflow.py scripts/tests/test_pr_health_workflow.py scripts/tests/test_normalize_release_pr_bodies.py tests/test_release_workflows.py
87 passed in 0.87s

$ uv run --frozen --extra dev pytest -q scripts/tests/test_pr_health_labels.py scripts/tests/test_version_sync.py tests/test_cli/test_wrap_copilot.py tests/test_learn/test_subagent_scanning.py tests/test_plugin_manifests.py tests/test_pr208_changes.py
114 passed in 1.32s

$ uvx ruff check scripts/tests/test_ci_workflow.py tests/test_release_workflows.py && uvx ruff format --check <same>
All checks passed!
```

## Real Behavior Proof

- Environment: macOS, Python 3.12 via `uv run --frozen --extra dev`,
branch cut from `main` at c01cf07d.
- Exact command / steps: resolved each tag with `git ls-remote --tags
--heads https://github.com/<owner>/<repo>` (peeled for annotated tags),
rewrote only the `uses:` lines, then ran the test files above and a
`yaml.safe_load` over every file in `.github/`.
- Observed result: 195 lines changed, 195 removed, no other line touched
(mixed LF/CRLF in `pr-health.yml` kept). All 201 tests pass. On `main`
the new test fails and lists the unpinned refs.
- Not tested: `scripts/validate-workflows.sh` (actionlint plus act dry
runs) was not run locally. The `workflow-validation` job runs it on this
PR.

## Runtime Rollout Safety

- Rollout-managed feature(s): None. CI workflow files and their tests
only.
- Minimum rollout channel: N/A, no runtime code changes.
- Stable/default behavior changed: No. Each SHA is the commit its tag
points to today.
- Kill switch / disable path: N/A, revert the commit.
- Unsafe override required: No.
- Qualification impact: None.
- Rollback path: Revert this PR.

## Review Readiness

- [x] I have performed a self-review
- [x] This PR is ready for human review

## Checklist

- [x] My code follows the project's style guidelines
- [x] I have performed a self-review of my code
- [x] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [x] I have added tests that prove my fix is effective or that my
feature works
- [x] New and existing unit tests pass locally with my changes
- [x] I did **not** edit `CHANGELOG.md` — it is generated by
release-please from my Conventional Commit PR title (a CI guard enforces
this)

## Screenshots (if applicable)

N/A, no UI change.

## Additional Notes

- mypy and docs are N/A: no `headroom/` code or documented behavior
changes.
- Dependabot does not bump branch pins, so the two
`dtolnay/rust-toolchain` pins stay on today's branch head until someone
moves them. That action rarely changes.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

<!-- devin-review-badge-begin -->

---

<a href="https://app.devin.ai/review/headroomlabs-ai/headroom/pull/4671"
target="_blank"><picture><source media="(prefers-color-scheme: dark)"
srcset="https://static.devin.ai/assets/gh-devin-review-dark.svg?v=4"><img
src="https://static.devin.ai/assets/gh-devin-review-light.svg?v=4"
alt="Devin Review"></picture></a>
<!-- devin-review-badge-end -->

### Maintainer current-main requalification

Exact head `57b7edd8d05b6dc5e3bc4eac1dff55f21519afe8`, upstream main
`c01cf07d943d816cfd9d97e6838ed4e38f1ff9a4`.

Reviewed the27-file delta and existing discussion/Devin no-issues result
against current upstream main c01cf07d94,
already included in the contributor head. Independent full-workflow
comparison proves only uses refs/comments change across the25
workflow/action files. All195 replaced refs resolve exactly to their
original upstream tag/branch commits (29 unique pins across26
repositories), with annotated tags peeled; no mismatches. Pinned dtolnay
action source independently confirms stable runtime default versus
embedded1.95.0 branch behavior, preserving toolchain selection.87
workflow/release tests and113 adjacent tests pass,1skip; changed Python
lint/format passes. Maintainer fix only removes CRLF endings on two
edited pr-health lines to clear whitespace; provenance reverified
afterward. No contributor workflow logic altered. Description is
corrected to explain embedded1.95.0 semantics. No publish/release
workflow execution claimed; full hosted qualification must run on this
new mechanical-fix head. Maintainers handle CI. Nothing merged.


Exact-head hosted checks are being handled by maintainers. No new
finding in the reviewed scope; formal approval awaits exact-head hosted
qualification; nothing merged.

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: JerrettDavis <mxjerrett@gmail.com>
2026-11-06 09:16:15 -06:00
dependabot[bot]andJerrettDavis ea59ac3eef deps: update click requirement from >=8.3.3 to >=8.5.0 (#4655)
Updates the requirements on [click](https://github.com/pallets/click) to
permit the latest version.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/pallets/click/releases">click's
releases</a>.</em></p>
<blockquote>
<h2>8.5.0</h2>
<p>This is the Click 8.5.0 feature release. A feature release may
include new features, remove previously deprecated code, add new
deprecation, or introduce potentially breaking changes.</p>
<p>We encourage everyone to upgrade. You can read more about our <a
href="https://palletsprojects.com/versions">Version Support Policy</a>
on our website.</p>
<p>PyPI: <a
href="https://pypi.org/project/click/8.5.0/">https://pypi.org/project/click/8.5.0/</a>
Changes: <a
href="https://click.palletsprojects.com/page/changes/#version-8-5-0">https://click.palletsprojects.com/page/changes/#version-8-5-0</a>
Milestone <a
href="https://github.com/pallets/click/milestone/33">https://github.com/pallets/click/milestone/33</a></p>
<ul>
<li>Add built-in shell completion support for PowerShell (Windows
PowerShell
5.1+ and pwsh 7+) alongside the existing <code>bash</code>,
<code>zsh</code>, and <code>fish</code>
completers. Use <code>_FOO_BAR_COMPLETE=powershell_source foo-bar</code>
to generate
the completion script. <a
href="https://redirect.github.com/pallets/click/issues/2672">#2672</a>
<a
href="https://redirect.github.com/pallets/click/issues/3637">#3637</a></li>
<li>Supported versions of Windows enable ANSI terminal styles by
default.
Colorama is no longer a dependency and is not used. <a
href="https://redirect.github.com/pallets/click/issues/2986">#2986</a>
<a
href="https://redirect.github.com/pallets/click/issues/3505">#3505</a></li>
<li>{class}<code>Argument</code> accepts a <code>help</code> parameter,
and help output includes
a <code>Positional arguments</code> section when argument help is
available. <a
href="https://redirect.github.com/pallets/click/issues/2983">#2983</a>
<a
href="https://redirect.github.com/pallets/click/issues/3473">#3473</a></li>
<li><code>confirm()</code> and <code>prompt()</code> strip ANSI color
and style codes from the
prompt when the output stream does not support them, matching
<code>echo()</code>.
This stripping was lost in <code>8.4.0</code> when <a
href="https://redirect.github.com/pallets/click/issues/2969">#2969</a>
began writing the
prompt with <code>input()</code> directly. <a
href="https://redirect.github.com/pallets/click/issues/3572">#3572</a>
<a
href="https://redirect.github.com/pallets/click/issues/3653">#3653</a></li>
<li>{class}<code>Path</code> with <code>allow_dash=True</code> no longer
triggers a <code>BytesWarning</code>,
an error under <code>python -bb</code>, when checking a value against
the <code>-</code>
convention. <a
href="https://redirect.github.com/pallets/click/issues/2877">#2877</a>
<a
href="https://redirect.github.com/pallets/click/issues/3642">#3642</a></li>
<li>Add {func}<code>custom_version_option</code>, a
<code>--version</code> option whose output is
produced by a callback, covering cases {func}<code>version_option</code>
intentionally
does not. The feature set of {func}<code>version_option</code> is now
frozen; see
[discussion <a
href="https://redirect.github.com/pallets/click/issues/3527">#3527</a>](<a
href="https://github.com/pallets/click/discussions/3527">https://github.com/pallets/click/discussions/3527</a>).
<a
href="https://redirect.github.com/pallets/click/issues/3581">#3581</a></li>
<li><code>style()</code> and <code>secho()</code> no longer silently
drop the 256-color index <code>0</code>
(black) passed as <code>fg</code> or <code>bg</code>, and now validate
color arguments. Invalid
colors raise a <code>ValueError</code> instead of a
<code>TypeError</code>. <a
href="https://redirect.github.com/pallets/click/issues/3677">#3677</a></li>
<li>The automatic help option stores its value under the reserved name
<code>_click_default_help</code> instead of <code>help</code>, so a
parameter named <code>help</code> no
longer breaks parsing. The new name is visible in
{meth}<code>Command.to_info_dict</code> output. Parameters that
overwrite each other's
value trigger a warning: an argument sharing its name with another
parameter, or any parameter claiming the reserved name. Options may
still
share a name to compete for the same value (feature switches).
<a
href="https://redirect.github.com/pallets/click/issues/2819">#2819</a>
<a
href="https://redirect.github.com/pallets/click/issues/3678">#3678</a></li>
<li><code>unstyle</code> and the ANSI handling behind help-text wrapping
now strip the full
CSI escape-sequence grammar. <a
href="https://redirect.github.com/pallets/click/issues/3681">#3681</a></li>
<li>Streamline <code>Option</code> flag handling: the flag-kind, type,
lazy-default and
validation steps in <code>Option.__init__</code> move into focused
helpers, and
<code>flag_value</code> and <code>default</code> keep their unset
sentinel at construction
(resolved lazily on read) so <code>is UNSET</code> reliably tells a
user-supplied value
from an auto-derived one. Runtime behavior is unchanged, but
{meth}<code>Parameter.to_info_dict</code> now resolves
<code>default=True</code> on a feature
switch to its <code>flag_value</code>, matching what the function
receives at call</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/pallets/click/blob/main/CHANGES.md">click's
changelog</a>.</em></p>
<blockquote>
<h2>Version 8.5.0</h2>
<p>Released 2026-08-24</p>
<ul>
<li>Add built-in shell completion support for PowerShell (Windows
PowerShell
5.1+ and pwsh 7+) alongside the existing <code>bash</code>,
<code>zsh</code>, and <code>fish</code>
completers. Use <code>_FOO_BAR_COMPLETE=powershell_source foo-bar</code>
to generate
the completion script. {issue}<code>2672</code>
{pr}<code>3637</code></li>
<li>Supported versions of Windows enable ANSI terminal styles by
default.
Colorama is no longer a dependency and is not used.
{issue}<code>2986</code> {pr}<code>3505</code></li>
<li>{class}<code>Argument</code> accepts a <code>help</code> parameter,
and help output includes
a <code>Positional arguments</code> section when argument help is
available. {issue}<code>2983</code> {pr}<code>3473</code></li>
<li><code>confirm()</code> and <code>prompt()</code> strip ANSI color
and style codes from the
prompt when the output stream does not support them, matching
<code>echo()</code>.
This stripping was lost in <code>8.4.0</code> when {pr}<code>2969</code>
began writing the
prompt with <code>input()</code> directly. {issue}<code>3572</code>
{pr}<code>3653</code></li>
<li>Fix test failures when using pytest &gt;= 9.1.
{pr}<code>3656</code></li>
<li>{class}<code>Path</code> with <code>allow_dash=True</code> no longer
triggers a <code>BytesWarning</code>,
an error under <code>python -bb</code>, when checking a value against
the <code>-</code>
convention. {issue}<code>2877</code> {pr}<code>3642</code></li>
<li>Add {func}<code>custom_version_option</code>, a
<code>--version</code> option whose output is
produced by a callback, covering cases {func}<code>version_option</code>
intentionally
does not. The feature set of {func}<code>version_option</code> is now
frozen; see
[discussion <a
href="https://redirect.github.com/pallets/click/issues/3527">#3527</a>](<a
href="https://github.com/pallets/click/discussions/3527">https://github.com/pallets/click/discussions/3527</a>).
{pr}<code>3581</code></li>
<li><code>style()</code> and <code>secho()</code> no longer silently
drop the 256-color index <code>0</code>
(black) passed as <code>fg</code> or <code>bg</code>, and now validate
color arguments. Invalid
colors raise a <code>ValueError</code> instead of a
<code>TypeError</code>. {pr}<code>3677</code></li>
<li>The automatic help option stores its value under the reserved name
<code>_click_default_help</code> instead of <code>help</code>, so a
parameter named <code>help</code> no
longer breaks parsing. The new name is visible in
{meth}<code>Command.to_info_dict</code> output. Parameters that
overwrite each other's
value trigger a warning: an argument sharing its name with another
parameter, or any parameter claiming the reserved name. Options may
still
share a name to compete for the same value (feature switches).
{issue}<code>2819</code> {pr}<code>3678</code></li>
<li><code>unstyle</code> and the ANSI handling behind help-text wrapping
now strip the full
CSI escape-sequence grammar. {pr}<code>3681</code></li>
<li>Streamline <code>Option</code> flag handling: the flag-kind, type,
lazy-default and
validation steps in <code>Option.__init__</code> move into focused
helpers, and
<code>flag_value</code> and <code>default</code> keep their unset
sentinel at construction
(resolved lazily on read) so <code>is UNSET</code> reliably tells a
user-supplied value
from an auto-derived one. Runtime behavior is unchanged, but
{meth}<code>Parameter.to_info_dict</code> now resolves
<code>default=True</code> on a feature
switch to its <code>flag_value</code>, matching what the function
receives at call
time. {pr}<code>3641</code></li>
<li>{func}<code>get_binary_stream</code> and
{func}<code>get_text_stream</code> are deprecated and
will be removed in Click 9.0. {issue}<code>3481</code>
{pr}<code>3695</code></li>
<li>The following <code>click.utils</code> names were never
intentionally public and are
now private (<code>_</code>-prefixed). The old names remain available
with a
<code>DeprecationWarning</code> until Click 9.0: <code>LazyFile</code>,
<code>KeepOpenFile</code>,</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/pallets/click/commit/8b19813f2bfca99f1018a587a8cf54fc959f2e5d"><code>8b19813</code></a>
Release version 8.5.0</li>
<li><a
href="https://github.com/pallets/click/commit/2c8cd3ac958a7eb316d67f2d316c27086c4c0369"><code>2c8cd3a</code></a>
Add FAQ entry about <code>UnicodeEncodeError</code> on Windows (<a
href="https://redirect.github.com/pallets/click/issues/3778">#3778</a>)</li>
<li><a
href="https://github.com/pallets/click/commit/131c86aadddfa5cb6dca8339c9d6294c4eacb8ac"><code>131c86a</code></a>
Add FAQ entry about <code>UnicodeEncodeError</code> on Windows</li>
<li><a
href="https://github.com/pallets/click/commit/e1fd5946ab26aaf372009eaff1acf947140b40fb"><code>e1fd594</code></a>
Add support of <code>pathlib.Path</code> to <code>edit</code> (<a
href="https://redirect.github.com/pallets/click/issues/3781">#3781</a>)</li>
<li><a
href="https://github.com/pallets/click/commit/a1d87858abd77fa8e3ffc204670ccd75b96c4781"><code>a1d8785</code></a>
Add support of <code>pathlib.Path</code> to <code>edit</code></li>
<li><a
href="https://github.com/pallets/click/commit/2103e157683c5e4cadc8ee1838df526a54bde9a4"><code>2103e15</code></a>
Forward all user's parameters set in <code>PAGER</code> and improve flag
detection (<a
href="https://redirect.github.com/pallets/click/issues/3777">#3777</a>)</li>
<li><a
href="https://github.com/pallets/click/commit/a6256bfb5971d5e58585fe7b6c656134e1ade5a4"><code>a6256bf</code></a>
Forwards all user's parameters set in <code>PAGER</code></li>
<li><a
href="https://github.com/pallets/click/commit/61b69e967e525bd502f5bf42def4d551e761fe0e"><code>61b69e9</code></a>
Resolve the pager command once, in <code>_pager_contextmanager</code>
(<a
href="https://redirect.github.com/pallets/click/issues/3776">#3776</a>)</li>
<li><a
href="https://github.com/pallets/click/commit/9835b0f7612d1b1ea180a975fd6d24cf16791ba8"><code>9835b0f</code></a>
Resolve the pager command once, in
<code>_pager_contextmanager</code></li>
<li><a
href="https://github.com/pallets/click/commit/f36d58bbd7f188178de2d4fe1d0292c510375ca7"><code>f36d58b</code></a>
Refactor pager stream handling (<a
href="https://redirect.github.com/pallets/click/issues/3767">#3767</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/pallets/click/compare/8.3.3...8.5.0">compare
view</a></li>
</ul>
</details>
<br />


Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

### Maintainer current-main requalification

Exact head `44cdfa89659155ae558110ce77abdbb0ebb59725`, upstream main
`f50db67006e2fe3f43b295542b759d90bb73e5a1`.

Maintainer remediation under the user's explicit directive to maintain
Dependabot updates and qualify them for approval. This is an authorized
routine-maintenance exception, not a claim that the previous Click floor
excluded8.5.0 or lacked the earlier click.edit security fix. Click is
the existing base CLI dependency; no new service, executable hook or
outbound network behavior is added.

Synchronized current main and repaired the frozen lock to Click8.5.0 and
the declared>=8.5.0 floor, preserving unrelated package metadata.
Offline lock consistency and whitespace checks pass. Installed the
actual8.5.0 pure-Python wheel in an isolated Python3.12 overlay and
verified module path/version. Port parsing/discovery, main help/version,
console entrypoint, proxy preflight, environment options and Claude
base-URL wrapper selection:249pass,6skip,one environment-only failure.
The failed installed-distribution metadata assertion independently fails
identically on clean current main: the shared installed console
entrypoint is stale (headroom.cli:main versus headroom.cli.main:main).
It is not attributed to Click or hidden as a passing test.

Existing native core supports startup; no fresh native build or macOS
runtime claim. All CLI runtime/code remains unchanged. Maintainers
handle exact-head hosted checks and final approval; no changes requested
from the bot and nothing merged.


Exact-head hosted checks are being handled by maintainers. No new
finding in the reviewed scope; formal approval awaits exact-head hosted
qualification; nothing merged.


### Maintainer current-main requalification

Exact head `510908d54ca652769ab981098518485af62174f0`, upstream main
`def4ef10099514d09188326852138a8b20c26237`.

Maintainer remediation under the user's explicit directive to maintain
Dependabot updates and qualify them for approval. This is an authorized
routine-maintenance exception, not a claim that the previous Click floor
excluded8.5.0 or lacked the earlier click.edit security fix. Click is
the existing base CLI dependency; no new service, executable hook or
outbound network behavior is added.

Synchronized current main and repaired the frozen lock to Click8.5.0 and
the declared>=8.5.0 floor, preserving unrelated package metadata.
Offline lock consistency and whitespace checks pass. Installed the
actual8.5.0 pure-Python wheel in an isolated Python3.12 overlay and
verified module path/version. Port parsing/discovery, main help/version,
console entrypoint, proxy preflight, environment options and Claude
base-URL wrapper selection:249pass,6skip,one environment-only failure.
The failed installed-distribution metadata assertion independently fails
identically on clean current main: the shared installed console
entrypoint is stale (headroom.cli:main versus headroom.cli.main:main).
It is not attributed to Click or hidden as a passing test.

Existing native core supports startup; no fresh native build or macOS
runtime claim. All CLI runtime/code remains unchanged. Maintainers
handle exact-head hosted checks and final approval; no changes requested
from the bot and nothing merged.


Post-merge requalification: main
def4ef1009 adds only the already approved
docs/package.json and npm lock update. The new integration changes no
Python/runtime/test or dependency inputs for this PR; prior
exact-version local results remain scoped to byte-identical inputs.
Offline lock consistency and whitespace pass again. New-head hosted
qualification remains pending; no redundant runtime run is claimed.


Exact-head hosted checks are being handled by maintainers. No new
finding in the reviewed scope; formal approval awaits exact-head hosted
qualification; nothing merged.


### Maintainer current-main requalification

Exact head `a551180102dfa3d1c5f98941040cb081f30a88fe`, upstream main
`7877241d84c93b3ec487e07324245838ddae85cc`.

Maintainer remediation under the user's explicit directive to maintain
Dependabot updates and qualify them for approval. This is an authorized
routine-maintenance exception, not a claim that the previous Click floor
excluded8.5.0 or lacked the earlier click.edit security fix. Click is
the existing base CLI dependency; no new service, executable hook or
outbound network behavior is added.

Synchronized current main and repaired the frozen lock to Click8.5.0 and
the declared>=8.5.0 floor, preserving unrelated package metadata.
Offline lock consistency and whitespace checks pass. Installed the
actual8.5.0 pure-Python wheel in an isolated Python3.12 overlay and
verified module path/version. Port parsing/discovery, main help/version,
console entrypoint, proxy preflight, environment options and Claude
base-URL wrapper selection:249pass,6skip,one environment-only failure.
The failed installed-distribution metadata assertion independently fails
identically on clean current main: the shared installed console
entrypoint is stale (headroom.cli:main versus headroom.cli.main:main).
It is not attributed to Click or hidden as a passing test.

Existing native core supports startup; no fresh native build or macOS
runtime claim. All CLI runtime/code remains unchanged. Maintainers
handle exact-head hosted checks and final approval; no changes requested
from the bot and nothing merged.


Post-merge requalification: main
def4ef1009 adds only the already approved
docs/package.json and npm lock update. The new integration changes no
Python/runtime/test or dependency inputs for this PR; prior
exact-version local results remain scoped to byte-identical inputs.
Offline lock consistency and whitespace pass again. New-head hosted
qualification remains pending; no redundant runtime run is claimed.


Landing qualification on
main7877241d84c93b3ec487e07324245838ddae85cc:296 latest
CLI/Hermes/port-discovery tests pass,6optional skips. The previously
baseline-reproduced stale installed console-script metadata assertion is
excluded from this focused local rerun (1deselected), not weakened in
committed tests. Added maintainer CI prerequisite fix: test-macos
explicitly installs pinnedRust1.95.0 with rustfmt/clippy, verifies
cargo/rustc, then performs editable pip install. This addresses the two
observed implicit rustup bootstrap failures before test execution.
Independent review confirmed action pin/components/order and no deletion
workaround; Actionlint and all58 release-workflow tests pass. No runtime
code or dependency behavior changed. User explicitly authorized landing
Dependabot PRs once green; merge remains gated by successful exact-head
checks and current-main integration.


Exact-head hosted checks are being handled by maintainers. No new
finding in the reviewed scope; formal approval awaits exact-head hosted
qualification; nothing merged.

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: JerrettDavis <mxjerrett@gmail.com>
2026-11-05 22:02:00 -06:00
05431b264f fix(install): make install status agree with doctor when the proxy is reachable (#3072) (#3141)
## Description

`headroom install status` could report `Status: stopped` next to
`Healthy: yes`, while `headroom doctor` reported the same proxy as
running (#3072, bug 2). The commands used independent process views:
`install status` trusted PID/container bookkeeping for `Status`, while
both commands used the live HTTP health endpoints to establish health.

This change treats a successful `/readyz` probe as authoritative
evidence that the deployment is running. If the proxy is not ready,
`runtime_status` still distinguishes a running-but-unhealthy process
from a stopped process.

The PR also adds a focused macOS pytest lane for CLI and install code,
closing the Darwin test-coverage gap described in #3065 without
duplicating the full four-shard Linux suite.

Bug 1 from #3072 (`HEADROOM_PORT` being ignored by `install apply` and
`deploy`) was already fixed on `main` by #3085 and is not reimplemented
here.

Closes #3072
Closes #3065

## Type of Change

- [x] Bug fix (non-breaking change that fixes an issue)
- [ ] New feature (non-breaking change that adds functionality)
- [ ] Breaking change (fix or feature that would cause existing
functionality to change)
- [ ] Documentation update
- [ ] Performance improvement
- [ ] Code refactoring (no functional changes)

## Changes Made

- Updated `headroom/cli/install.py` so `install_status` performs one
readiness probe and reports `Status: running` whenever `/readyz` is
healthy.
- Kept `runtime_status` as the fallback when the proxy is not ready,
preserving the distinction between running-but-unhealthy and stopped.
- Added regression coverage for the formerly contradictory `Status:
stopped` plus `Healthy: yes` output.
- Added regression coverage for the not-ready case where process status
must still come from `runtime_status`.
- Added a `test-macos` CI job that runs the CLI/install pytest subset on
`macos-latest`.

## Testing

- [x] Unit tests pass (`pytest`)
- [x] Linting passes (`ruff check .`)
- [x] Type checking passes (`mypy headroom`)
- [x] New tests added for new functionality
- [ ] Manual testing performed

### Test Output

```text
$ uv run --frozen --extra dev pytest tests/test_cli/test_install_cli.py -q
============================= test session starts ==============================
platform darwin -- Python 3.11.15, pytest-9.0.3, pluggy-1.6.0
collected 42 items

tests/test_cli/test_install_cli.py ..................................... [ 88%]
.....                                                                    [100%]

============================== 42 passed in 1.79s ==============================

$ uv run --frozen ruff check headroom/cli/install.py tests/test_cli/test_install_cli.py
All checks passed!

$ uv run --frozen ruff format --check headroom/cli/install.py tests/test_cli/test_install_cli.py
2 files already formatted

$ uv run --frozen mypy headroom/cli/install.py --ignore-missing-imports
Success: no issues found in 1 source file
```

## Real Behavior Proof

- Environment: macOS (Apple Silicon), CPython 3.11.15 via `uv`, pytest
9.0.3.
- Exact command / steps: ran `uv run --frozen --extra dev pytest
tests/test_cli/test_install_cli.py -q`. The new regression test invokes
`headroom install status` through Click's `CliRunner` with `/readyz`
returning healthy while PID/runtime bookkeeping returns `stopped`.
- Observed result: the command exits successfully and prints `Status:
running` with `Healthy: yes`; `Status: stopped` is absent. A second test
verifies that when readiness is false, a live runtime still prints
`Status: running` with `Healthy: no`.
- Not tested: an end-to-end persistent-service installation with a real
OS supervisor or Docker daemon. The new macOS CI job itself will be
exercised by GitHub Actions rather than locally.

## Runtime Rollout Safety

- Rollout-managed feature(s): none; this changes diagnostic display
logic and CI coverage only.
- Minimum rollout channel: stable/default patch release.
- Stable/default behavior changed: yes; `install status` now reports a
ready deployment as running even if PID/container bookkeeping says
stopped. Unready deployments retain the existing runtime-status
behavior.
- Kill switch / disable path: no runtime flag; revert this PR if the
readiness precedence causes an unforeseen regression.
- Unsafe override required: none.
- Qualification impact: `tests/test_cli/test_install_cli.py` and the new
`test-macos` CI job must remain green.
- Rollback path: revert commit `f3ae269b`; no persisted state, schema,
manifest, or configuration migration is involved.

## Review Readiness

- [x] I have performed a self-review
- [x] This PR is ready for human review

## Checklist

- [x] My code follows the project's style guidelines
- [x] I have performed a self-review of my code
- [x] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [x] I have added tests that prove my fix is effective or that my
feature works
- [x] New and existing unit tests pass locally with my changes
- [x] I did **not** edit `CHANGELOG.md` — it is generated by
release-please from my Conventional Commit PR title (a CI guard enforces
this)

## Screenshots (if applicable)

Not applicable; this is terminal status output and CI configuration.

## Additional Notes

- Documentation was not changed because no command, option,
configuration contract, or documented workflow changed; this corrects
contradictory diagnostic output.
- #2787 was also reviewed as an urgent author-reported issue, but it
already has active implementation PR #2992. This PR deliberately avoids
duplicating or conflicting with that work.

<!-- devin-review-badge-begin -->

---

<a href="https://app.devin.ai/review/headroomlabs-ai/headroom/pull/3141"
target="_blank"><picture><source media="(prefers-color-scheme: dark)"
srcset="https://static.devin.ai/assets/gh-devin-review-dark.svg?v=4"><img
src="https://static.devin.ai/assets/gh-devin-review-light.svg?v=4"
alt="Devin Review"></picture></a>
<!-- devin-review-badge-end -->

### Maintainer current-main requalification

Exact head `f550bf1d05873b20b773d935aa7cb93025b63262`, upstream main
`2d3ee51846435ef5b320eea4806af14e602b0d8c`.

Re-reviewed latest integration head 3c11d4a96 and current discussion;
clean integration with upstream/main
2d3ee51846. Install status still treats a
ready reachable proxy as running, preserving runtime-status fallback
when unhealthy. All 160 install-status/release/version/MCP tests pass;
no PR-specific production-code blocker found in scope.

Downloaded the latest failing native macOS job 126368233730 from run
41765101507: four persistent-wrap recovery tests still failed because
_Manifest/TaskManifest lacked runtime_kind. Repaired test doubles with
the Python runtime declaration and explicitly mocked the readiness
boundary those tests control through health probes; real ownership
classification remains exercised. Parametrized the four affected
recovery cases across Darwin/Linux/Windows by replacing only runtime
module's sys reference, without global platform emulation. All 83
persistent-wrap tests pass, preserving matching deployment recovery,
bound-socket recovery, healthy reuse, and task warning coverage. No
production recovery logic changed.

Changed-file Ruff check/format and whitespace pass. These local platform
variants are not native macOS validation; exact-head hosted macOS lane
must qualify before approval. Existing native extension supports Python
startup, not a fresh native build. Maintainers handle CI; nothing
merged.


Exact-head hosted checks are being handled by maintainers. No new
finding in the reviewed scope; formal approval awaits exact-head hosted
qualification; nothing merged.

---------

Co-authored-by: vishal veerareddy <vishalveera.reddy@servicenow.com>
Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
Co-authored-by: JerrettDavis <mxjerrett@gmail.com>
2026-11-05 21:09:29 -06:00
JD Davis 917edc6223 fix(release): normalize damaged release PR envelopes before detection (#4664)
## Description

Merging release PR #4643 did not create `v0.43.0` because its body
contained repeated carriage returns (`CRCRLF`). Release Please removes
one CRLF layer and then looks for exact `---` delimiter lines; the
leftover CR prevents release detection. The merge-triggered
[run](https://github.com/headroomlabs-ai/headroom/actions/runs/42065983322)
succeeded while logging `Pull request body did not match` and `could not
parse pull request body as a release PR`, leaving #4643 labeled
`autorelease: pending` and opening #4661 from the old release baseline.

Normalize only the damaged envelope before Release Please reads pending
merged releases. Eligibility requires a merged bot PR, a main base, a
release-please main branch in this repository, the pending label, and
repeated-CR damage. Ordinary CRLF, open PRs, human PRs, forks and
unrelated historical bodies are untouched. The normalized body must
still have a valid release-note envelope. JSON is sent through stdin,
avoiding another Windows text-file conversion.

The malformed body came from Windows text-mode maintainer tooling, not
contributor runtime code. That local writer has separately been
corrected to preserve LF.

## Type of Change

- [x] Bug fix (release automation)

## Changes Made

- Add a narrow, default-read-only body normalizer and tests.
- Run it with the workflow's existing release credential before release
detection.
- Allowlist the checked-in helper in `.gitignore`.

## Testing

- `pytest scripts/tests/test_normalize_release_pr_bodies.py
tests/test_release_workflows.py -q`: **75 passed**.
- Ruff 0.17.3 check/format and `git diff --check`: pass.
- `actionlint .github/workflows/release-please.yml`: pass.
- Regression tests demonstrate the old exact-delimiter parser fails on
CRCRLF, then verify repaired delimiters, eligibility exclusions, dry-run
no writes, JSON-stdin transport and workflow ordering.

## Real Behavior Proof

- Environment: Windows, Python 3.12.13, gh CLI; current main
`8d3e9e5ca`.
- Exact command: `python scripts/normalize_release_pr_bodies.py --repo
headroomlabs-ai/headroom` (default read-only).
- Observed result: `Would normalize release PR #4643`, exit 0. Other
historical pending PR formats were not edited. Current GitHub has no
`v0.43.0` tag/release; the exact merge-triggered log identifies the
failed body parse above.
- Not tested: deliberately did not run `--apply`, repair the live body,
create a tag/release, dispatch a release workflow, or publish packages.
No hosted release recovery is claimed.

## Runtime Rollout Safety

- Rollout-managed feature(s): none; trusted main release automation
only.
- Stable/default behavior changed: on the next normal main push after
this fix merges, the workflow can normalize #4643's damaged body and let
Release Please create its pending release. This is the intended
recovery; review this effect before merging.
- Disable/rollback: revert the normalization step. The helper defaults
to read-only when invoked manually without `--apply`.
- No package versions, notes, labels, tags or releases are directly
changed by the helper; Release Please retains those responsibilities.

## Review Readiness

- [ ] This PR is ready for human merge review (draft pending independent
review/hosted checks).

## Additional Notes

Do not manually remove repeated generated entries from #4661. Once
0.43.0 is recovered, release notes should be regenerated from that
proper baseline. This PR does not perform that recovery or change
generated `CHANGELOG.md` itself.
2026-11-05 12:36:23 -06:00
dependabot[bot]andJerrettDavis 8364ebbfab ci: bump astral-sh/setup-uv from 10.3.2 to 10.3.3 in the actions-minor-patch group (#4659)
Bumps the actions-minor-patch group with 1 update:
[astral-sh/setup-uv](https://github.com/astral-sh/setup-uv).

Updates `astral-sh/setup-uv` from 10.3.2 to 10.3.3
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/astral-sh/setup-uv/releases">astral-sh/setup-uv's
releases</a>.</em></p>
<blockquote>
<h2>v10.3.3 🌈 Use Astral mirror for version manifests with GitHub
fallback</h2>
<h2>Changes</h2>
<p>This release contains something that should have been included a very
long time ago. Sorry for sleeping on that.</p>
<p>This action now retrieves the release manifest that contains the
available versions, their download links and checksums from the Astral
mirror, rather than trying GitHub first. This should present much more
stable.
(Known checksums are still checked, so the security impact does not
change)</p>
<p>Also a big thank you to <a
href="https://github.com/soujasK"><code>@​soujasK</code></a> for a set
of bugfixes 👏</p>
<h2>🐛 Bug fixes</h2>
<ul>
<li>Use Astral mirror for version manifests with GitHub fallback <a
href="https://github.com/eifinger"><code>@​eifinger</code></a> (<a
href="https://redirect.github.com/astral-sh/setup-uv/issues/1119">#1119</a>)</li>
<li>fix: allow whitespace in uv requirement specifiers <a
href="https://github.com/soujasK"><code>@​soujasK</code></a> (<a
href="https://redirect.github.com/astral-sh/setup-uv/issues/1112">#1112</a>)</li>
<li>fix: resolve ~= specifiers with PEP 440 semantics <a
href="https://github.com/soujasK"><code>@​soujasK</code></a> (<a
href="https://redirect.github.com/astral-sh/setup-uv/issues/1111">#1111</a>)</li>
<li>fix: only report a saved cache when saving succeeded <a
href="https://github.com/soujasK"><code>@​soujasK</code></a> (<a
href="https://redirect.github.com/astral-sh/setup-uv/issues/1110">#1110</a>)</li>
</ul>
<h2>🧰 Maintenance</h2>
<ul>
<li>chore: update known checksums for 0.13.6 @<a
href="https://github.com/apps/github-actions">github-actions[bot]</a>
(<a
href="https://redirect.github.com/astral-sh/setup-uv/issues/1117">#1117</a>)</li>
</ul>
<h2>📚 Documentation</h2>
<ul>
<li>docs: use JSDoc for compatible release specifier comment <a
href="https://github.com/eifinger"><code>@​eifinger</code></a> (<a
href="https://redirect.github.com/astral-sh/setup-uv/issues/1113">#1113</a>)</li>
<li>docs: update version references to v10.3.2 @<a
href="https://github.com/apps/github-actions">github-actions[bot]</a>
(<a
href="https://redirect.github.com/astral-sh/setup-uv/issues/1104">#1104</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/astral-sh/setup-uv/commit/68559e99cc807c1eb7e9238fd43a15bba460eec2"><code>68559e9</code></a>
Use Astral mirror for version manifests with GitHub fallback (<a
href="https://redirect.github.com/astral-sh/setup-uv/issues/1119">#1119</a>)</li>
<li><a
href="https://github.com/astral-sh/setup-uv/commit/0192b6951893e558e24cfbd971d641a8cd336a95"><code>0192b69</code></a>
chore: update known checksums for 0.13.6 (<a
href="https://redirect.github.com/astral-sh/setup-uv/issues/1117">#1117</a>)</li>
<li><a
href="https://github.com/astral-sh/setup-uv/commit/2f29784424ba0f5755e2d0bbc18227082a5daff1"><code>2f29784</code></a>
docs: use JSDoc for compatible release specifier comment (<a
href="https://redirect.github.com/astral-sh/setup-uv/issues/1113">#1113</a>)</li>
<li><a
href="https://github.com/astral-sh/setup-uv/commit/9c7332190cf7291329c770bedb2ba1b3e441b37c"><code>9c73321</code></a>
fix: allow whitespace in uv requirement specifiers (<a
href="https://redirect.github.com/astral-sh/setup-uv/issues/1112">#1112</a>)</li>
<li><a
href="https://github.com/astral-sh/setup-uv/commit/80fbe0140ccf08d50eff5eeb98dff9021c415a21"><code>80fbe01</code></a>
fix: resolve ~= specifiers with PEP 440 semantics (<a
href="https://redirect.github.com/astral-sh/setup-uv/issues/1111">#1111</a>)</li>
<li><a
href="https://github.com/astral-sh/setup-uv/commit/36b7b57007634b5d947fd73fcd85c7b44863efec"><code>36b7b57</code></a>
fix: only report a saved cache when saving succeeded (<a
href="https://redirect.github.com/astral-sh/setup-uv/issues/1110">#1110</a>)</li>
<li><a
href="https://github.com/astral-sh/setup-uv/commit/56618cab7a58e3efc9b282dd3de75bbf1075db9b"><code>56618ca</code></a>
docs: update version references to v10.3.2 (<a
href="https://redirect.github.com/astral-sh/setup-uv/issues/1104">#1104</a>)</li>
<li>See full diff in <a
href="https://github.com/astral-sh/setup-uv/compare/v10.3.2...v10.3.3">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=astral-sh/setup-uv&package-manager=github_actions&previous-version=10.3.2&new-version=10.3.3)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore <dependency name> major version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's major version (unless you unignore this specific
dependency's major version or upgrade to it yourself)
- `@dependabot ignore <dependency name> minor version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's minor version (unless you unignore this specific
dependency's minor version or upgrade to it yourself)
- `@dependabot ignore <dependency name>` will close this group update PR
and stop Dependabot creating any more for the specific dependency
(unless you unignore this specific dependency or upgrade to it yourself)
- `@dependabot unignore <dependency name>` will remove all of the ignore
conditions of the specified dependency
- `@dependabot unignore <dependency name> <ignore condition>` will
remove the ignore condition of the specified dependency and ignore
conditions


</details>
<!-- devin-review-badge-begin -->

---

<a href="https://app.devin.ai/review/headroomlabs-ai/headroom/pull/4659"
target="_blank"><picture><source media="(prefers-color-scheme: dark)"
srcset="https://static.devin.ai/assets/gh-devin-review-dark.svg?v=4"><img
src="https://static.devin.ai/assets/gh-devin-review-light.svg?v=4"
alt="Devin Review"></picture></a>
<!-- devin-review-badge-end -->

### Maintainer qualification

Reviewed both setup-uv references and the upstream v10.3.3 release
notes. The action patch switches version-manifest retrieval to the
Astral mirror with GitHub fallback while retaining checksum validation,
and fixes requirement/cache handling. Workflow permissions, conditions,
export/audit commands, and inputs are unchanged. The only maintainer
commit is the shared Gemini streamed-request test fixture from #4644 for
independently demonstrated main failures; all ten fixture tests pass.
Exact-head hosted workflow execution is being checked; no production
source was changed and nothing merged.


### Maintainer action pin hardening

Both setup-uv references are pinned to
`68559e99cc807c1eb7e9238fd43a15bba460eec2`, the commit independently
resolved from the official `v10.3.3` tag. This addresses the two CodeQL
mutable-action-tag findings without changing the selected release. YAML
parses, and a source comparison verifies that only the two references
changed from the preceding qualified head. New exact-head hosted checks
are pending; permissions, conditions, and audit commands are unchanged.

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: JerrettDavis <mxjerrett@gmail.com>
2026-11-05 07:28:54 -06:00
0a9aa66bff test(onnx): fix magika idle-thread test on macOS with ORT 1.31 (#4194)
## Description

`tests/magika_idle_threads.rs` (added in #4189) fails on macOS with ONNX
Runtime 1.31. Building the magika session leaves 8 extra threads against
a fixed allowance of 2.

The cause is not a thread pool. ORT 1.31 registers Core ML as a built-in
EP that claims the Apple NPU/GPU (microsoft/onnxruntime#31975). The
`ort` 2.0.0-rc.12 crate sets the `MAX_EFFICIENCY` (= `PREFER_NPU`) EP
selection policy on every `SessionBuilder::new()`. So magika's session
now runs on Core ML / Apple Neural Engine (ANE), and building it starts
5–7 ANE service threads that are idle, not spinning. The fixed allowance
of 2 can't account for that.

The test now builds a pool-free control session
(`magika::Session::builder().with_intra_threads(1)`) first and uses the
threads it adds as the allowance. The control goes through the same EP
selection, so whatever the EP starts cancels out, while a reintroduced
intra-op pool still shows up on top.

As a precaution, Rust CI now also runs `cargo test` on `macos-26`. It
only ran on Ubuntu, which is why this slipped through.

Closes #4191

## Type of Change

- [x] Bug fix (non-breaking change that fixes an issue)
- [ ] New feature (non-breaking change that adds functionality)
- [ ] Breaking change (fix or feature that would cause existing
functionality to change)
- [ ] Documentation update
- [ ] Performance improvement
- [ ] Code refactoring (no functional changes)

## Changes Made

- `crates/headroom-core/tests/magika_idle_threads.rs`: measure the
allowance against a pool-free control session instead of a fixed `2`,
with comments explaining the ORT 1.31 Core ML/ANE cause. Test-only; no
production code changes.
- `.github/workflows/rust.yml`: turn the `test` job into a matrix with
`ubuntu-latest` and `macos-26`, using the same ONNX Runtime setup step.
Ubuntu keeps its `test (ubuntu)` check name and runs the same steps as
before. macOS runs only `cargo test`; `cargo fmt` and `cargo clippy`
stay on Ubuntu. `fail-fast: false`, so one OS failing doesn't cancel the
other.

## Testing

<!-- Check what you actually ran, then paste the real command output
below. -->

- [x] Rust: `cargo fmt --all -- --check`, `cargo clippy --workspace --
-D warnings`, `cargo test --workspace` with `ORT_DYLIB_PATH` set so the
magika tests actually run
- [ ] Unit tests pass (`pytest`): only the pre-push `ci-precheck-python`
subset was run (177 passed, 4 skipped); the full suite was not
- [x] Linting passes (`ruff check .`): no Python files changed;
pre-commit hooks passed
- [ ] Type checking passes (`mypy headroom`): N/A, no Python changes
- [x] New tests added for new functionality (updated regression test)
- [x] Manual testing performed (see Real Behavior Proof)

### Test Output

`cargo test -p headroom-core --test magika_idle_threads`, with the #4187
fix (`with_intra_threads(1)`) in place and with it temporarily reverted:

```text
# macOS arm64, ORT 1.31.0, before this PR (fixed allowance of 2)
magika session left 8 extra OS thread(s) running ... FAILED
# macOS arm64, ORT 1.31.0, this branch
test result: ok. 1 passed; 0 failed      (6/6 repeat runs)
# macOS arm64, ORT 1.29.0, this branch
test result: ok. 1 passed; 0 failed

# #4187 fix reverted, this branch: the test still catches the pool
macOS, ORT 1.31:                      12 extra vs 9 allowed -> FAILED
macOS, ORT 1.29:                       7 extra vs 2 allowed -> FAILED
Linux (Docker aarch64), ORT 1.31:      7 extra vs 1 allowed -> FAILED
```

Full Rust suite on macOS with ORT 1.31.0 (the same command the new
`macos-26` job runs):

```text
ORT_DYLIB_PATH=.../libonnxruntime.1.31.0.dylib cargo test --workspace
68 suites, 1658 passed, 0 failed
```

Pre-push `make ci-precheck` on this branch:

```text
ci-precheck-python: 177 passed, 4 skipped
✅ ci-precheck PASSED — safe to push.
```

## Real Behavior Proof

- Environment: macOS 26 arm64 (16 cores), Rust 1.95, `pip install
onnxruntime==1.31.0` and 1.29.0 dylibs via `ORT_DYLIB_PATH`; Linux via
Docker `rust:1.95` (aarch64) with pip onnxruntime 1.31.0.
- Exact command / steps: the reporter's repro from #4191 (`pip install
'onnxruntime==1.31.0'`, `export
ORT_DYLIB_PATH=<capi/libonnxruntime.*.dylib>`, `cargo test -p
headroom-core --test magika_idle_threads`), on `main` and on this
branch; then the same test with the #4187 `with_intra_threads(1)` fix
temporarily reverted, on macOS 1.31, macOS 1.29 and Linux 1.31. To find
the cause, a raw `ort` probe built the magika model with
`intra_threads=1` under the default policy and under
`with_auto_device(PreferCPU)`, counting threads with `ps -M` and listing
the EP devices.
- Observed result: fails on `main` with ORT 1.31 (8 extra vs 2) and
passes on this branch, including the reporter's exact steps. With the
#4187 fix reverted it fails on all three setups (12 vs 9, 7 vs 2, 7 vs
1), so it still guards #4187. Probe: EP devices are CPU, CoreML/NPU and
CoreML/GPU. The default policy adds 6–7 threads and takes ~420 ms to
build; `PreferCPU` adds 0 and takes ~12 ms.
- Not tested: the new `macos-26` CI job on GitHub runners (it runs on
this PR), ORT 1.30.0 at runtime, x86_64 Linux, Intel macOS, and low-core
macOS hosts. Details:
- ORT 1.30.0: the 1.30 vs 1.31 difference comes from the ORT source diff
and release notes, plus the reporter's data.
- Low-core macOS hosts: with only 2–4 cores the control allowance can
absorb a small pool, so the guard is weaker there.

## Runtime Rollout Safety

- Rollout-managed feature(s): none.
- Minimum rollout channel: N/A
- Stable/default behavior changed: no. The PR changes only the test and
CI; runtime code is untouched.
- Kill switch / disable path: N/A
- Unsafe override required: no.
- Qualification impact: adds one macOS CI job (only when Rust paths
change).
- Rollback path: revert this PR.

## Review Readiness

- [x] I have performed a self-review
- [x] This PR is ready for human review

## Checklist

- [x] My code follows the project's style guidelines
- [x] I have performed a self-review of my code
- [x] I have commented my code, particularly in hard-to-understand areas
- [x] I have made corresponding changes to the documentation (none
needed)
- [x] My changes generate no new warnings
- [x] I have added tests that prove my fix is effective or that my
feature works
- [x] New and existing unit tests pass locally with my changes
- [x] I did **not** edit `CHANGELOG.md` — it is generated by
release-please from my Conventional Commit PR title (a CI guard enforces
this)

## Screenshots (if applicable)

N/A

## Additional Notes

- Not fixed here: on macOS with ORT ≥ 1.31, headroom's magika detection
runs through Core ML on the ANE instead of the CPU EP. That comes from
`ort`'s default policy; nobody chose it. Visible cost: a one-off ~400 ms
session build plus 5–7 idle threads. Per-call latency and output parity
were not measured. Pinning it to CPU needs
`with_auto_device(PreferCPU)`, which magika 1.1.0's `Builder` doesn't
expose. An environment-level CPU EP does not override the policy. This
is raised on #4191 as a possible follow-up issue on the `magika` crate.
- Option 1 from the issue (count CPU-burning threads instead) was
rejected: the #4187 pool only spun briefly after each inference, so idle
CPU was ~0% with or without it and the check wouldn't catch a
regression.
- This change was developed with GitHub Copilot CLI assistance; all
measurements above were run locally by me.

<!-- devin-review-badge-begin -->

---

<a href="https://app.devin.ai/review/headroomlabs-ai/headroom/pull/4194"
target="_blank"><picture><source media="(prefers-color-scheme: dark)"
srcset="https://static.devin.ai/assets/gh-devin-review-dark.svg?v=4"><img
src="https://static.devin.ai/assets/gh-devin-review-light.svg?v=4"
alt="Devin Review"></picture></a>
<!-- devin-review-badge-end -->

---------

Co-authored-by: Romin Parekh <rominparekh@users.noreply.github.com>
Co-authored-by: JD Davis <mxjerrett@gmail.com>
2026-11-04 08:31:23 -06:00
r3bb1tandJD Davis 87a4394d49 ci: run eval smoke test on Rust compressor changes (#2948)
## Description

`eval.yml`'s `pull_request` trigger watches only
`headroom/transforms/**`, `headroom/evals/**`, and
`headroom/compress.py`. But the eval smoke test installs the package
with `pip install -e ".[all]"`, which compiles the Rust workspace into
`headroom._core` and imports `SmartCrusher` from it — so the eval suite
exercises Rust compressor code, yet a PR that changes only `crates/**`
never runs it. This PR adds `crates/**`, `Cargo.toml`, and `Cargo.lock`
to the paths filter so Rust compressor changes get the same zero-cost
eval gate as their Python callers.

Related to #2949.

## Type of Change

- [ ] Bug fix (non-breaking change that fixes an issue)
- [ ] New feature (non-breaking change that adds functionality)
- [ ] Breaking change (fix or feature that would cause existing
functionality to change)
- [ ] Documentation update
- [ ] Performance improvement
- [ ] Code refactoring (no functional changes)
- [x] CI/workflow change (no runtime code affected)

## Changes Made

- `.github/workflows/eval.yml`: added `crates/**`, `Cargo.toml`,
`Cargo.lock` to `pull_request.paths` (+3 lines; nothing else touched).

## Testing

- [ ] Unit tests pass (`pytest`)
- [ ] Linting passes (`ruff check .`)
- [ ] Type checking passes (`mypy headroom`)
- [ ] New tests added for new functionality
- [x] Manual testing performed

### Test Output

```text
$ python -c "import yaml; yaml.safe_load(open('.github/workflows/eval.yml')); print('YAML is valid')"
YAML is valid

Trigger proof (fork): crates-only PR creates the "Evaluation Suite" check run
with this patch applied — https://github.com/r3bb1t/headroom/actions/runs/31614601951
```

## Real Behavior Proof

- Environment: Fork `r3bb1t/headroom` with GitHub Actions enabled;
Windows 11 host for git operations; upstream base `main`.
- Exact command / steps: Pushed this branch to the fork; created a
scratch branch on top adding one comment line to
`crates/headroom-core/src/lib.rs`; opened a draft PR on the fork
(crates-only diff) and observed which workflows were created.
- Observed result: The crates-only PR created the `Evaluation Suite`
check run (run 31614601951, link in Test Output) alongside the `rust`
workflow; under the pre-change filter the identical diff creates no
Evaluation Suite run.
- Not tested: The `weekly-suite` job (schedule/dispatch-only; path
filters do not affect it) and the live-eval steps requiring
`OPENAI_API_KEY` (skipped with a warning on forks without the secret, by
design).

## Review Readiness

- [x] I have performed a self-review
- [x] This PR is ready for human review

## Checklist

- [x] My code follows the project's style guidelines
- [x] I have performed a self-review of my code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my
feature works
- [ ] New and existing unit tests pass locally with my changes
- [x] I did **not** edit `CHANGELOG.md` — it is generated by
release-please from my Conventional Commit PR title (a CI guard enforces
this)

## Screenshots (if applicable)

N/A — workflows-only change.

## Additional Notes

Unchecked checklist items are N/A for a 3-line workflows-only diff:
there is no code to comment, no docs impact, and no unit-testable
surface — the fork trigger-proof above is the behavioral test.
Branch-protection caveat (same one `rust.yml` documents in its header):
`eval.yml` uses a workflow-level `paths:` filter, so on non-matching PRs
the check run is never created (rather than created-then-skipped). If
`Evaluation Suite / smoke-test` is ever made a required check, the
filter should move to a `dorny/paths-filter` job-level gate like
`rust.yml`'s — out of scope here; happy to follow up if wanted.

<!-- devin-review-badge-begin -->

---

<a href="https://app.devin.ai/review/headroomlabs-ai/headroom/pull/2948"
target="_blank"><picture><source media="(prefers-color-scheme: dark)"
srcset="https://static.devin.ai/assets/gh-devin-review-dark.svg?v=4"><img
src="https://static.devin.ai/assets/gh-devin-review-light.svg?v=4"
alt="Devin Review"></picture></a>
<!-- devin-review-badge-end -->

Co-authored-by: JD Davis <mxjerrett@gmail.com>
2026-11-03 22:30:53 -06:00
9bb4b130ff fix(relevance): load the Rust default embedder from Python's pinned snapshot (#4190)
## Description

Parent status: #4152 has merged. The pinned-loader and batch-cap merge
resolution was reviewed at e3a495cbc5. The
original split/stack history is retained below.

**Rebased onto main (`7e0094d6`), 2026-11-03.** The branch is now four
linear commits on top of main, with no merge commits:

- `bfae4ade` fix(relevance): load the Rust default embedder from
Python's pinned snapshot
- `6fbae380` fix(relevance): look up and download the Rust embedder in
one HF cache dir
- `70afece8` fix(relevance): expand ~ and $VAR in the Rust HF cache path
like huggingface_hub
- `62b792f0` fix(relevance): keep an empty HF cache variable, as
huggingface_hub does

What the rebase changed:

- The #4152 commit (`cb1c3a33`) is gone from the branch: main already
has it as `f380692b`. Its files matched main; the only difference was
`uv.lock`, where main's later `filelock>=4.2.1` entry was kept.
- The six main-sync merges (`185dc9b7`, `052977b9`, `029c72ac`,
`4405b12c`, `8b0a10e8`, and the reviewed `e3a495cb`) are linearized
away, so those SHAs are no longer on the branch.
- `embedding.rs` conflicted again with main's batch-size cap (#4507). I
resolved it to the same content as the reviewed merge: every file this
PR touches is byte-identical between `e3a495cb` and the new head
`62b792f0` (`git diff e3a495cb 62b792f0 -- <files changed vs main>` is
empty). The review and qualification below still apply to the content;
only the history and SHAs changed.

Rust `EmbeddingScorer::try_new` used `EmbeddingModel::BGESmallENV15`.
fastembed-rs maps that to a different repo and file from what Python
runs: `Xenova/bge-small-en-v1.5` `onnx/model.onnx` (fp32), always on
`main`. So the two languages never ran the same ONNX file, and the
"byte-equal across languages" claim in both modules was wrong.

This PR makes `try_new` load the same pinned
`Qdrant/bge-small-en-v1.5-onnx-Q` snapshot that #4152 makes Python load.
It adds a cross-language parity fixture checked from both sides, and
replaces the parity claim with measured numbers.

Nothing in production calls `EmbeddingScorer::try_new` today:
`create_scorer` and `HybridScorer` use `default()`, which never loads a
model. This keeps the Rust scorer correct and pinned for when it is
wired in.

No linked issue.

## Type of Change

- [x] Bug fix (non-breaking change that fixes an issue)
- [ ] New feature (non-breaking change that adds functionality)
- [ ] Breaking change (fix or feature that would cause existing
functionality to change)
- [x] Documentation update
- [ ] Performance improvement
- [ ] Code refactoring (no functional changes)

## Changes Made

(This PR's own commits only.)

- `crates/headroom-core/src/relevance/embedding.rs`:
- `try_new` loads the snapshot through
`TextEmbedding::try_new_from_user_defined`, with CLS pooling and static
quantization, which is what fastembed-rs uses for `BGESmallENV15Q`.
- It uses exactly one hub cache directory, resolved like Python's
`huggingface_hub.constants.HF_HUB_CACHE`: `HF_HUB_CACHE` →
`HUGGINGFACE_HUB_CACHE` → `HF_HOME/hub` →
`XDG_CACHE_HOME/huggingface/hub` → `~/.cache/huggingface/hub`, with a
leading `~` expanded. It looks up and downloads only there, so a stale
snapshot in a lower-priority cache is never used. The home directory
comes from `std::env::home_dir`, which falls back to the user database
when `HOME` is unset, as Python's `expanduser` does.
- It finds the snapshot as `snapshots/<sha>` in that directory.
`hf_hub::Cache` resolves through `refs/<rev>`, which Python's
`huggingface_hub` doesn't write for a commit SHA.
- On a miss it downloads with `Repo::with_revision`. `guard_egress` sits
in front of the Hub client and runs only on a cache miss, so a
pre-seeded air-gapped host now loads; previously Rust refused even with
a warm cache.
- `HEADROOM_HF_PIN=off` floats it on `main`, with the same values as
Python's `_resolve_revision`.
  - `try_new_with_model` is unchanged.
- Parity fixture: `tests/parity/record_embedding.py` and
`tests/parity/fixtures/embedding/bge_small_en_v15_pinned.json` (6 texts
× 384 dims, recorded on ORT 1.31.0). The fixture is written one
embedding row per line, so it's 22 lines. Python checks it in CI
(`test-extras` sets `RUN_FASTEMBED_TESTS=1`); Rust checks it under
`RUN_FASTEMBED_TESTS=1`.
- `tests/test_fastembed_pinned_snapshot.py`: the Rust constants name the
same repo, SHA and files as Python; the fixture was recorded at the pin;
plus the gated Python parity check.
- 10 new Rust unit tests in `embedding.rs`: the lookup ignores other
commits and needs every file; the download URL requests the pinned
revision; the offline guard applies on a miss only;
`HEADROOM_HF_PIN=off` floats; the cache directory follows
`huggingface_hub`'s order variable by variable (including an empty
variable and `~`); with no `HOME` it still resolves through the user
database; and the review case: an empty explicit `HF_HUB_CACHE` next to
a complete pinned snapshot and an older `refs/main` under `HOME` finds
neither, for the pinned revision or `main`, while both are found once
`HF_HUB_CACHE` is unset.
- `tests/test_offline_egress_chokepoint.py`: the Rust sweep's regex now
also matches `ApiBuilder::from_cache` / `from_env`. It missed the new
download client, which is guarded; it flags nothing else in `crates/`.
The user-defined model load, which only reads bytes already on disk, is
allowlisted as `cache-only`.
- Docs: the "byte-equal" wording in both embedder modules,
`pyproject.toml` and `onnx_runtime.py` is replaced with measured numbers
and the cross-language keep-equal notes.

## Testing

- [x] Unit tests pass (`pytest`)
- [x] Linting passes (`ruff check .`)
- [x] Type checking passes (`mypy headroom`)
- [x] New tests added for new functionality
- [x] Manual testing performed

### Test Output

After the rebase, on `62b792f0` (macOS arm64, no `ORT_DYLIB_PATH`, so
the gated model tests skip):

```text
$ cargo test -p headroom-core --lib
test result: ok. 991 passed; 0 failed; 1 ignored
$ cargo clippy -p headroom-core --all-targets -- -D warnings                  # clean
$ cargo clippy -p headroom-core --lib --no-default-features -- -D warnings    # clean
$ cargo fmt --all -- --check                                                  # clean
$ pytest -q tests/test_fastembed_pinned_snapshot.py tests/test_offline_egress_chokepoint.py tests/test_hf_revision_pinning.py
235 passed, 3 skipped
$ ruff check / ruff format --check on the PR's Python files (ruff 0.17.2)     # clean
```

The 7 offline-egress failures noted below no longer reproduce here.

Before the rebase:

```text
$ cargo test -p headroom-core --lib
test result: ok. 985 passed; 0 failed; 1 ignored      # see the note on #4151 below

$ cargo clippy -p headroom-core --all-targets -- -D warnings                  # clean
$ cargo clippy -p headroom-core --lib --no-default-features -- -D warnings    # clean
$ cargo fmt --all -- --check                                                  # clean

$ RUN_FASTEMBED_TESTS=1 ORT_DYLIB_PATH=<onnxruntime 1.31.0 dylib> cargo test -p headroom-core --lib relevance::embedding
test relevance::embedding::tests::fastembed_matches_parity_fixture ... ok
test result: ok. 24 passed; 0 failed

$ RUN_FASTEMBED_TESTS=1 pytest -q tests/test_fastembed_pinned_snapshot.py tests/test_relevance.py \
    tests/test_stateless_writers.py tests/test_hf_revision_pinning.py
71 passed

$ pytest -q tests/test_offline_egress_chokepoint.py
7 failed, 132 passed, 3 skipped
# The 7 are the OTel / Langfuse / Headroom Cloud offline tests, whose extras aren't in this venv;
# the same 7 fail on origin/main here. The Rust sweep tests pass.
```

**Note on #4151:** with `ORT_DYLIB_PATH` set on macOS, a full `cargo
test -p headroom-core --lib` fails
`tokenizer::hf_impl::tests::from_pretrained_invalid_repo_returns_hub_error`
most of the time (5/5 on `afdb60d3`, before the cache change too).
`a_cached_snapshot_is_not_refused_offline` holds `HEADROOM_OFFLINE=1`
under the env lock while ONNX Runtime loads, which is slow there, and
the tokenizer test reads the variable without the lock. That's the race
#4151 fixes; with its commit applied, 6/6 full runs pass. Linux CI
passes either way.

The cache-precedence test was checked against the bug: with the lookup
changed back to also scanning `~/.cache`, it fails on the first case
(pinned revision, empty `HF_HUB_CACHE`).

## Real Behavior Proof
- Exact command / steps: additional maintainer verification on the
main-synced head: cargo test -p headroom-core --locked hf_hub_cache_dir;
cargo test -p headroom-core --locked
expand_vars_matches_python_posixpath_and_ntpath; python -m pytest
tests/test_fastembed_pinned_snapshot.py -q; repeat its fixture cases
with huggingface-hub==2.2.0.
- Observed result: three Rust tests passed across both POSIX and Windows
expansion fixtures and cache-directory selection; Python passed 46 tests
with one gated skip using Hugging Face Hub 1.16.1, and all 36 shared
fixture cases passed separately with locked Hub 2.2.0.

- Environment: macOS arm64; Rust fastembed 5.17.3 with hf-hub 0.5.0;
repo `.venv` (fastembed 0.8.0, onnxruntime 1.23.2) and a second
interpreter on onnxruntime 1.31.0.
- A cold-cache Rust load with `HF_HUB_CACHE=<empty dir>` wrote
`snapshots/52398278…` plus `refs/52398278…` and passed the parity check.
Per-component max |Δ| against the fixture:
  - Rust vs Python on the same ORT (1.31.0): ≤ 1e-6.
  - Python on ORT 1.23.2 vs 1.31.0: ≤ 4.1e-4.
  - The fixture's tolerance is 1e-3.
- For reference, Xenova's fp32 export (what Rust used to load) is ≤
4.7e-4 from the fixture. The old cross-language gap was real but
numerically small, and this fixture bounds drift; it cannot tell the two
exports apart. Model identity is enforced by the pinned SHA and the unit
tests.
- The fixture's new one-row-per-line layout was re-emitted from the
recorded data, not re-recorded: the parsed JSON is identical.
- Not tested: Windows, and Linux outside CI. Rust's gated tests in CI
(they need the model and an ORT dylib, so they stay manual behind
`RUN_FASTEMBED_TESTS=1`). Rust `HybridScorer` thresholds against the
Qdrant export.

## Runtime Rollout Safety

- Rollout-managed feature(s): none.
- Minimum rollout channel: N/A.
- Stable/default behavior changed: no production path.
`EmbeddingScorer::try_new` loads the Qdrant export instead of Xenova's,
and now loads offline from a warm cache instead of refusing, but nothing
in production calls it today.
- Kill switch / disable path: `HEADROOM_HF_PIN=off` floats it on `main`.
- Unsafe override required: no.
- Qualification impact: none.
- Rollback path: revert this PR.

## Review Readiness

- [x] I have performed a self-review
- [x] This PR is ready for human review

## Checklist

- [x] My code follows the project's style guidelines
- [x] I have performed a self-review of my code
- [x] I have commented my code, particularly in hard-to-understand areas
- [x] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [x] I have added tests that prove my fix is effective or that my
feature works
- [x] New and existing unit tests pass locally with my changes
- [x] I did **not** edit `CHANGELOG.md` — it is generated by
release-please from my Conventional Commit PR title (a CI guard enforces
this)

## Screenshots (if applicable)

N/A.

## Additional Notes

- Follow-ups, not in this PR: Rust's Kompress and tokenizer Hub fetches
are still unpinned (there's no Rust `HEADROOM_HF_PIN`), and Rust's gated
embedding tests could get a CI job once one ships an ORT dylib.

<!-- devin-review-badge-begin -->

---

<a href="https://app.devin.ai/review/headroomlabs-ai/headroom/pull/4190"
target="_blank"><picture><source media="(prefers-color-scheme: dark)"
srcset="https://static.devin.ai/assets/gh-devin-review-dark.svg?v=4"><img
src="https://static.devin.ai/assets/gh-devin-review-light.svg?v=4"
alt="Devin Review"></picture></a>
<!-- devin-review-badge-end -->

## Maintainer qualification

The environment-reference mismatch from the previous review is
addressed. The shared corpus covers the reported explicit-cache case,
platform-specific variable syntax, and the two-stage home/hub expansion
ordering. The Rust test runs both POSIX and Windows expansion rules;
Python validates the same corpus against posixpath, ntpath, and fresh
huggingface_hub.constants imports.

A clean current-main sync was published as
052977b9e88ae3bbda96797615b64ee350a2f695; it does not change the
contributor's resolver or fixture files. Qualification used Windows,
Hugging Face Hub 1.16.1 and an isolated locked 2.2.0 target. No model
download or numerical embedding-parity result is claimed by these path
tests; the pre-existing gated numerical-parity test remained skipped.

Hosted checks on the pushed head must finish before approval. No
contributor CI action requested or PR merged.

---------

Co-authored-by: Kenneth Wong <17061293+KennethWKZ@users.noreply.github.com>
Co-authored-by: JD Davis <mxjerrett@gmail.com>
2026-11-03 21:31:59 -06:00
08ed419515 ci: Bump the actions-minor-patch group with 2 updates (#4557)
The PyPI publishing workflows use `pypa/gh-action-pypi-publish` v1.14.2,
which is affected by the critical Trusted Publishing / Sigstore CA
advisory
[GHSA-5xjx-3w67-w9x9](https://github.com/pypa/gh-action-pypi-publish/security/advisories/GHSA-5xjx-3w67-w9x9).
Upgrade both publish paths to v1.14.3 so the action's certificate
bundles exclude the compromised emSign root. Also update setup-uv in
both dependency-audit paths to v10.3.2, which includes corrected
cache-error classification and newer known tool checksums. The
synchronized branch carries the reviewed glob/minimatch remediation from
#4599.

## Dependency assessment

- **PyPI publish action:** existing PyPA-maintained release tool. The
advisory lists <=1.14.2 as affected and >=1.14.3 as patched; upstream
[fix #427](https://github.com/pypa/gh-action-pypi-publish/pull/427)
updates both Certifi and Sigstore, which also bundles certificate data.
[Release
v1.14.3](https://github.com/pypa/gh-action-pypi-publish/releases/tag/v1.14.3)
also adds hash-checked runtime dependency installation. This is a
security fix for Headroom's actual artifact-upload/attestation path.
- **setup-uv:** existing Astral-maintained installer.
[v10.3.1](https://github.com/astral-sh/setup-uv/releases/tag/v10.3.1),
included in v10.3.2, fixes duplicate-cache-save warnings caused by lost
error class names; the two security audit jobs share a lock-based tool
cache and can finish concurrently. V10.3.2 includes known checksums
through uv 0.13.5. The observed hosted installation selected newer uv
0.13.6; this proof does not claim it used a prebundled 0.13.6 checksum.
- **Execution/install surface:** PyPI publishing continues to execute
PyPA's Docker-based action, with Python/native TLS support, downloaded
hash-checked Python dependencies, and network access for package upload
and Trusted Publishing/attestations. The existing release
OIDC/credential boundary is unchanged; no permission or new secret was
added. Setup-uv runs its bundled Node action, downloads the uv native
binary, and reads/writes the existing Actions cache. These are
CI/release tools, not additions to the shipped Headroom application. The
upstream security advisory is explicitly considered; no claim is made
that these projects have never had vulnerabilities.
- **Carried audit remediation:** exact #4599 glob/minimatch fix;
existing bundled npm advisory exceptions remain exact-path/version and
expire November 15.

## Real behavior proof

On Windows with Linux Docker, clone PyPA's official v1.14.3 tag and
build its Dockerfile with `docker build --tag
headroom-qualification-pypi143 .`. No upload command, publishing
credential, or OIDC token is supplied.

Run the committed `scripts/verify_pypi_action_trust.py` inside that
image using a read-only bind mount and Python as the entrypoint. It
downloads the **data** in the old Certifi 2026.7.22 wheel, verifies its
PyPI SHA-256 digest, and compares its CA roots with the action's
installed Certifi trust store. It does not install or execute the old
wheel. Observed, exit 0:

```text
installed certifi=2026.10.19
roots: old=121, new=120
removed: emSign ECC Root CA - G3, serial 3CF607A968700EDA8B84
PASS: removed emSign root certificates are absent from the action trust store
```

This validates the concrete trust-store change in the built action.
Other healthy emSign roots remain; absence of every certificate whose
name contains emSign is not the acceptance criterion.

On branch head `078a77f2c6c938dc07033a14a5c124cabbaf9b4e`, the real
setup-uv v10.3.2 dependency-audit path ran on GitHub Ubuntu 24.04 /
Python 3.12.15, installed uv 0.13.6, restored the lock-keyed cache,
exported the project dependencies and passed pip-audit:
https://github.com/headroomlabs-ai/headroom/actions/runs/41568399206/job/125695327377
. The companion package-metadata dependency audit also passed. The
subsequent local proof-script commit does not alter those
workflow/action inputs; current-head hosted qualification is still
required.

`actionlint -shellcheck= -pyflakes= .github/workflows/publish.yml
.github/workflows/release.yml .github/workflows/security.yml`,
proof-script Ruff checks and `git diff --check` pass. The carried npm
inputs match the validated #4599 fix: 61 OpenCode tests, types/build,
zero OpenCode audit findings, three E2E regressions on Node 24, and only
eight preexisting bundled advisory/path entries accepted by the exact
workflow checker.

Untested: actual PyPI/TestPyPI upload, OIDC token exchange, PEP 740
attestation issuance, production signing identity, an injected
duplicate-cache race, or other runner platforms. No release was
published. The image/trust-store proof does not substitute for a
production release or claim that its credentials were exercised.

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: JerrettDavis <mxjerrett@gmail.com>
Co-authored-by: Kenneth Wong <17061293+KennethWKZ@users.noreply.github.com>
2026-11-02 21:46:35 -06:00
ddeb13dca7 ci: Bump actions/setup-python from 6 to 7 (#4558)
The Windows file-permission CI job depends on setup-python provisioning
the requested interpreter before testing real NTFS ACL behavior. Upgrade
that remaining setup-python v6 invocation to v7, which validates
downloaded interpreter manifests, retries transient/truncated responses,
and fails explicitly when sources are exhausted instead of silently
succeeding without setup. The synchronized branch also carries the
reviewed glob/minimatch audit remediation from #4599.

## Dependency assessment

- Existing GitHub-maintained `actions/setup-python`; no new action or
permission grant. Upstream v7 release:
https://github.com/actions/setup-python/releases/tag/v7.0.0. The
concrete robustness fix is
https://github.com/actions/setup-python/pull/1332 (related issue #1318).
This protects interpreter provisioning in the job that checks Headroom's
owner-only state files; it is not an application-runtime dependency
upgrade.
- GitHub's Actions team maintains the action; the v7 tag resolved to
`6d4fd22b20465ccc0f7354476588e8df7c9ca0e0`, dated October 22. This
review checks that release and its changed execution surface rather than
asserting a clean security history for all upstream versions.
- V7 executes its bundled ESM setup/cache code with the Node 24 action
runtime and updates the Actions cache toolkit. `windows-latest` supports
that runtime. It can download interpreter manifests/binaries and access
the Actions tool/cache services, as the existing setup action already
did. No application package, native library requirement, or new secret
is introduced. The removed `pip-install` input is not used here. This
one-line action change keeps the job's Python 3.12 configuration and
install/test commands.
- The copied #4599 fix retains the eight existing exact-path/version
bundled npm advisory exceptions and their November 15 expiry; it does
not expand the allowance.

## Real behavior proof

Exact branch head `109bd6b8aa5e7916336e1170008ed3a7e4bcc6b9`, GitHub
`windows-latest` runner:
https://github.com/headroomlabs-ai/headroom/actions/runs/41567861791/job/125693665445

The changed `Run actions/setup-python@v7` step completed successfully
and printed `Successfully set up CPython (3.12.10)`. The subsequent real
NTFS file-permission command, `python -m pytest
tests/test_cache_breakpoint_diagnostics.py
tests/test_private_state_files.py -v`, completed with **31 passed, 79
skipped**. The job finished successfully. The skip count is preserved
here; those skipped paths are not claimed as verified.

Locally, `actionlint -shellcheck= -pyflakes= .github/workflows/ci.yml`
and `git diff --check` passed. The carried npm manifests, locks,
regressions and exceptions match the separately validated #4599
remediation: 61 OpenCode tests plus types/build and zero audit findings,
three E2E dependency regressions on Node 24, and only eight existing
bundled advisory/path entries accepted by the workflow's exact checker.

Untested: injected malformed-manifest or network-exhaustion scenarios,
self-hosted runners, other Python versions in this changed job, and
production release execution. The hosted run proves actual interpreter
setup and the downstream Windows test path, not every new upstream
failure branch. Current-head overall CI readiness remains a separate
gate.

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: JerrettDavis <mxjerrett@gmail.com>
Co-authored-by: Kenneth Wong <17061293+KennethWKZ@users.noreply.github.com>
2026-11-02 21:17:27 -06:00
liuyongcheng0000andJerrett Davis 33f204406c fix(openclaw/release): ship responsive npm integrations (#1458)
## Description

Fixes #977 and #2353.

The v0.35.0 release built all three JavaScript packages successfully,
but npm rejected every publish with ENEEDAUTH. Because each publish step
used continue-on-error, the publish-npm job still concluded success. npm
therefore remains on headroom-ai 0.22.4 and headroom-openclaw 0.1.0,
while headroom-opencode is absent.

The checked-in OpenClaw source had already corrected the old
strict-schema mismatch and added a circuit breaker, but its assemble
hook still called compression for every tiny conversation and allowed a
30-second default wait. This PR completes both the runtime correction
and the delivery path instead of merely exposing one failure.

## Changes

### OpenClaw runtime

- Skip proxy compression below an 800-character context floor (roughly
200 tokens), avoiding synchronous HTTP work on short conversations that
cannot produce meaningful savings.
- Measure actual content, including tool-call arguments, so a single
large tool result remains eligible.
- Allow operators to disable the floor with minContextChars=0.
- Lower the interactive request ceiling from 30 seconds to 2 seconds.
- Pass that timeout into the SDK, whose AbortSignal cancels the HTTP
request, instead of racing a promise while the fetch continues in the
background.
- Preserve circuit-breaker fail-open behavior and document/schema the
new defaults.

### npm release integrity

- Authenticate with npm before publishing any package, so a missing or
invalid NPM_TOKEN fails before a partial release begins.
- Make SDK, OpenClaw, and OpenCode npm publish failures fatal when npm
publishing is enabled.
- Preserve NPM_SKIP=true as the explicit opt-out.
- Make retries safe after partial publication by skipping only the exact
package version already present, then continuing to missing packages.
- Remove the false-success notice path.

## Existing #977 corrections verified

- The current OpenClaw schema declares startupTimeoutMs,
routeCodexViaProxy, gatewayProviderIds, request timeout, and
circuit-breaker fields written/used by the installer and runtime.
- wrap defaults to the real published package name, headroom-openclaw.
- unwrap removes managed values while preserving unrelated user
configuration.
- The coding savings profile uses protect_recent=0 paired with
type-based recent-read protection, avoiding the old blanket
short-session protection without weakening tool-result fidelity.

## Testing

- 80 OpenClaw plugin tests pass.
- TypeScript typecheck and production build pass.
- 123 OpenClaw wrap/provider, savings-profile, compress endpoint, and
MCP contract tests pass.
- 47 release-workflow and MCP contract tests pass.
- The npm release asset builder installed/imported and verified the
actual 0.35.1 SDK and OpenClaw tarballs.
- Workflow YAML parses; Ruff, format, and git diff checks pass.

## Required repository action

A maintainer must replace or restore the npm publishing credential in
NPM_TOKEN, then rerun the v0.35.0 release workflow (or publish the next
version). This PR makes that failure visible and safely rerunnable;
repository code cannot provision the external npm credential.

Co-authored with @liuyongcheng0000, whose original PR identified the
masked npm failures.
<!-- devin-review-badge-begin -->

---

<a href="https://app.devin.ai/review/headroomlabs-ai/headroom/pull/1458"
target="_blank"><picture><source media="(prefers-color-scheme: dark)"
srcset="https://static.devin.ai/assets/gh-devin-review-dark.svg?v=4"><img
src="https://static.devin.ai/assets/gh-devin-review-light.svg?v=4"
alt="Devin Review"></picture></a>
<!-- devin-review-badge-end -->

---------

Co-authored-by: Jerrett Davis <mxjerrett@gmail.com>
2026-10-28 17:40:52 -05:00
09b7e8c1e4 fix(packaging): rename the sandbox extra to lean and correct SECURITY.md claims (#3727)
**Revised 2026-10-05 after review:** tests now patch the deployment root
directly (never HOME) and assert POSIX modes only where enforced, the
supported-versions test follows the latest-release policy, and runner
scripts are recreated rather than truncated so a key is never written at
an old 0755 mode.

## Description

Security-remediation item A-10 (P-21, P-22). Renames the misleading
`sandbox` extra to `lean` (keeping `sandbox` as a deprecated alias for
one release, so `pip install "headroom-ai[sandbox]"` keeps working; not
a breaking change), corrects SECURITY.md's credential claims, and makes
the `headroom install --env` credential-persistence path owner-only and
documented. Details below.

## Type of Change

- [x] Bug fix (non-breaking change that fixes an issue)
- [x] Documentation update

## Changes Made

- `pyproject.toml`: `sandbox` extra renamed to `lean`; `sandbox =
["headroom-ai[lean]"]` deprecated alias; `uv.lock` regenerated (`uv lock
--check` clean).
- CI `python-314-wheels`, `run-all-plugins.sh` and the installation
guide now use `[lean]`.
- SECURITY.md: latest-release support policy (from main); discloses the
Copilot OAuth token and the `install --env` persistence path with its
modes.
- `headroom/install/paths.py`: `chmod_owner_only` verifies and reports
the mode it set.
- `headroom/install/state.py`: profile dir 0700 / manifest 0600 on every
save; warns if the directory cannot be narrowed.
- `headroom/install/supervisors.py`: runner scripts 0700 (`.ps1` 0600),
created fresh (old file removed first, so `O_TRUNC` cannot keep a 0755
mode while secrets are written), fail closed on POSIX if the mode cannot
be set.
- Tests: deployment writes are routed through a monkeypatched deploy
root; POSIX-mode assertions are skipped where modes are not enforced
(Windows).

## Testing

- [x] Unit tests pass (`pytest`)
- [x] Linting passes (`ruff check .`)
- [ ] Type checking passes (`mypy headroom`)
- [x] New tests added for new functionality
- [x] Manual testing performed

### Test Output

```text
$ LITELLM_LOCAL_MODEL_COST_MAP=True uv run --frozen --extra dev --extra proxy pytest -q \
    tests/test_packaging_extras_and_security_docs.py tests/test_install/ tests/test_optional_dependencies.py
209 passed, 7 skipped
$ ruff check / ruff format --check (touched files)   -> clean
$ uv lock --check                                    -> Resolved 251 packages
```

Fail-before (2026-10-05 revision):

```text
test_rewriting_an_old_script_never_writes_secrets_at_its_old_mode   (fix reverted) FAILED assert 493 == 448 (0755 != 0700)
test_security_policy_supports_the_latest_release_without_a_version_number
                                                     (pinned 0.39.x table restored) FAILED
test_unrestrictable_profile_dir_warns_and_still_saves with Path.home() forced to ignore $HOME (as on Windows):
  previous version wrote <fake-home>/.headroom/deploy/default/manifest.json; new version writes nothing outside tmp_path
```

## Real Behavior Proof

- Environment: macOS (Darwin 25.6), CPython 3.14 via `uv run --frozen`,
branch head after merging main.
- Exact command / steps: with `HEADROOM_WORKSPACE_DIR` pointed at a temp
dir containing a pre-existing 0755 `deploy/default/` and 0755
`run-headroom.sh` (simulating a profile from an earlier version), ran
the real `build_manifest(..., extra_env={"ANTHROPIC_API_KEY": ...})` ->
`save_manifest` -> `render_runner_scripts`, then `stat` on every file.
- Observed result: `default/` 0700, `manifest.json` 0600,
`run-headroom.sh` 0700, `ensure-headroom.sh` 0700. `uv.lock` records
`headroom-ai[lean]` under marker `extra == 'sandbox'`, so the alias
resolves.
- Not tested: Windows end-to-end (ACL behaviour; mode assertions are
skipped there by design), a real `pip install "headroom-ai[sandbox]"`
from a published wheel, supervisor registration (launchd/systemd).

## Runtime Rollout Safety

- Rollout-managed feature(s): none.
- Minimum rollout channel: n/a (install-time file modes and packaging
metadata).
- Stable/default behavior changed: yes - deployment profile dirs and
runner scripts are owner-only after the next `headroom install apply`
(see release note below). `[sandbox]` keeps installing the same
dependencies.
- Kill switch / disable path: none; re-running an older version restores
old modes.
- Unsafe override required: no.
- Qualification impact: none.
- Rollback path: revert the PR; existing files keep their narrowed
modes, which is harmless.

## Review Readiness

- [x] I have performed a self-review
- [x] This PR is ready for human review

## Checklist

- [x] My code follows the project's style guidelines
- [x] I have performed a self-review of my code
- [x] I have commented my code, particularly in hard-to-understand areas
- [x] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [x] I have added tests that prove my fix is effective or that my
feature works
- [x] New and existing unit tests pass locally with my changes
- [x] I did **not** edit `CHANGELOG.md` — it is generated by
release-please from my Conventional Commit PR title (a CI guard enforces
this)

## Additional Notes

History of the change and the earlier review rounds follows.

---

Security-remediation item **A-10** (P-21, P-22). Two documentation
defects, each of which leads a reader to a false premise about the
product.

## 1. The `sandbox` extra promises isolation it does not provide

`headroom-ai[sandbox]` is a **dependency profile** — a torch-free subset
of `[all]`. It provides no isolation, no confinement and no privilege
reduction of any kind. The name invites exactly the wrong assumption,
and "we run it in the sandbox extra" is the kind of sentence that ends
up in someone's control narrative.

Renamed to **`lean`**, which describes what it actually is. `sandbox` is
kept as a deprecated alias forwarding to `[lean]` for one release,
because our own `python-314-wheels` CI job installs it
(`.github/workflows/ci.yml:218`) and so may customers. The alias
forwards rather than duplicating the dependency list, so the two cannot
drift.

## 2. SECURITY.md is stale and overclaims

- **Supported-versions table sat at 0.27.x** while the code ships 0.38.0
— four minor releases behind. A lagging table is worse than none: it
tells a reporter their release is unsupported when it is the current
one.
- **"No credential storage: We never store or log API keys"** is broader
than the code supports. `headroom/copilot_auth.py:646` persists the
GitHub Copilot OAuth refresh token to `~/.headroom/copilot_auth.json`.
It does so correctly — `chmod 0600` at `:648` — but it *is* stored, and
a blanket denial is the sort of claim a customer's security reviewer
checks.

The replacement says what is actually true: provider API keys are read
from the environment and forwarded without being written to disk; the
Copilot OAuth token is the one deliberate exception; and
request/response bodies may reach the runtime log when logging is
enabled, so that log is sensitive.

## Tests (original revision)

`tests/test_packaging_extras_and_security_docs.py` — four tests, all
failing before and passing after:

```
FAILED test_sandbox_alias_still_resolves_to_the_lean_profile
FAILED test_lean_profile_stays_torch_free
FAILED test_security_policy_supported_versions_match_the_shipped_version
FAILED test_security_policy_does_not_claim_blanket_no_credential_storage
4 failed  ->  4 passed
```

Method: commit, `git checkout origin/main -- pyproject.toml SECURITY.md`
(keeping the new tests), run, restore.

The version-table test is the one that matters most — main now documents
"latest release on PyPI" as the supported version, and the test (renamed
`test_security_policy_supports_the_latest_release_without_a_version_number`)
pins that and fails if a hard-coded version row returns, so **the table
cannot silently rot again**. That drift, not the wrong number, is the
actual defect.

`test_lean_profile_stays_torch_free` guards the profile's whole reason
for existing: adding a torch-pulling extra to it now fails the build by
name.

## Not done here

The backlog pairs this with a deprecation *warning* on the old extra
name. pip has no mechanism to warn on an extra at install time, so the
alias plus the comment is the available remedy; removal is noted for
after 0.39.x.

Ruff 0.16.7 `check` + `format --check` clean.

---

## Follow-up: the credential-persistence path (review of this PR)

@JerrettDavis blocked the first version because the SECURITY.md
*correction* was
itself inaccurate — it claimed provider API keys are not written to
disk, which
`headroom install --env KEY=VALUE` falsifies. Addressed in 3da8b955 by
disclosing the path accurately **and** narrowing its permissions.

What the trace found: `--env` values are merged into
`DeploymentManifest.base_env`
and persisted verbatim — into `manifest.json` *and*, as cleartext
`export` lines,
into the generated `run-headroom.sh` / `ensure-headroom.sh`. The
manifest was
already 0600, but only incidentally (via `mkstemp`), with nothing
pinning it. The
runner scripts were **0755** and the profile directory **0755** — a live
API key
in a world-readable file.

Persistence is kept: supervisors start from a bare environment, so
`--env` is the
only channel that reaches a supervised proxy. Redacting secret-valued
entries
would leave existing installs starting a proxy with no credential — a
silent 401
after upgrade. Instead: manifest 0600, runner scripts 0700 (0600 for the
`.ps1`),
profile directory 0700, applied on every save so pre-existing profiles
are
narrowed too; scripts created via `os.open(..., mode)` so no
world-readable window
exists between write and chmod.

SECURITY.md now names the files, the modes, that owner-only is not
encryption,
that rotation means re-running `install apply`, and that the Docker
runtime also
places the value in the container command line (`ps`-visible). The
`--env` help
text says the same.

The policy test now drives the real path — `build_manifest` →
`save_manifest` →
`render_runner_scripts` with a provider key against a fake `$HOME` —
asserts the
key really lands in both files, and **parses the documented octal modes
back out
of SECURITY.md** to compare against `stat()`, so the document and the
code cannot
drift apart again.

```
FAILED test_install_env_persists_a_provider_key_exactly_as_the_policy_describes
FAILED test_security_policy_discloses_the_persistent_install_credential_path
FAILED test_save_manifest_writes_owner_only
FAILED test_save_manifest_narrows_a_profile_directory_created_before_this_change
FAILED test_render_runner_scripts_are_owner_only_because_they_export_secrets
       (run-headroom.sh is 0755, exposing an API key)
FAILED test_render_unix_runner_narrows_a_script_written_by_an_earlier_version
6 failed  ->  315 passed
```

### ⚠️ Release note — behaviour change

Existing deployment profiles are **re-permissioned on the next `headroom
install
apply`**: `~/.headroom/deploy/<profile>/` and its runner scripts drop
group and
other bits (0755 -> 0700). Anyone reading or executing `run-headroom.sh`
as a
different, non-root user must now do so as the owner. No supported
supervisor
configuration does this — user scope runs as the installing user, system
scope as
root — but it changes the mode of files that already exist on customer
machines.
`--env` itself is unchanged: no value is dropped, redacted or relocated.

<!-- devin-review-badge-begin -->

---

<a href="https://app.devin.ai/review/headroomlabs-ai/headroom/pull/3727"
target="_blank"><picture><source media="(prefers-color-scheme: dark)"
srcset="https://static.devin.ai/assets/gh-devin-review-dark.svg?v=4"><img
src="https://static.devin.ai/assets/gh-devin-review-light.svg?v=4"
alt="Devin Review"></picture></a>
<!-- devin-review-badge-end -->

---------

Co-authored-by: JerrettDavis <mxjerrett@gmail.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-28 14:56:54 -07:00
Tejas ChopraandClaude Opus 5.5 4288fbd903 docs(teams): replace the 3-months-free perk with a talk-to-us pitch (#4524)
## Description

Removes the "3 months free with a 12-month plan" offer and every
headroom-perks.vercel.app link. Each place now says: not seeing the
savings you want? Headroom OSS is a framework built to show what's
possible, so it saves less; Headroom Enterprise saves more and adds more
cost savings, tokens secured, on premise deployment, deep attribution
and many more features. Teams and enterprises: talk to us at
hello@headroomlabs.ai or https://headroomlabs.ai.

## Type of Change

- [ ] Bug fix (non-breaking change that fixes an issue)
- [ ] New feature (non-breaking change that adds functionality)
- [ ] Breaking change (fix or feature that would cause existing
functionality to change)
- [x] Documentation update
- [ ] Performance improvement
- [ ] Code refactoring (no functional changes)

## Changes Made

- README banner (`.github/assets/enterprise-perk.svg`): redrawn simple,
in the `hero.svg` type scale (title 42/700, lead 14.5, eyebrow 10.5); no
animation or chips.
- README "Headroom for teams" section and docs Teams page: the
OSS-vs-Enterprise table is replaced by the pitch, feature list and
contact.
- Docs site banner (`docs/app/layout.tsx`): new copy and link; new
banner id so people who dismissed the old one see it.
- Local dashboard offer (unlicensed installs only): new copy and link;
new localStorage dismissal key (`headroom-teams-contact-dismissed`) so
people who dismissed the old offer see the new one.
- Release-notes footer (`release.yml`) and `llms.txt`: same pitch, email
and site.
- `tests/test_dashboard_teams_perk.py`: asserts the contact email
instead of the perks URL.

## Testing

- [x] Unit tests pass (`pytest`)
- [x] Linting passes (`ruff check .`)
- [ ] Type checking passes (`mypy headroom`) (no Python source changed)
- [ ] New tests added for new functionality
- [x] Manual testing performed

### Test Output

```text
$ pytest -q tests/test_dashboard_teams_perk.py -k "not route"
4 passed, 4 deselected in 0.49s
$ ruff check headroom/dashboard tests/test_dashboard_teams_perk.py
All checks passed!
```

The 4 `/dashboard` route tests fail locally with `CancelledError` at
proxy startup; they fail the same way on unmodified `main` in the same
venv, so CI is the judge for those.

## Real Behavior Proof

- Environment: macOS, Python venv of this repo, headless Chrome.
- Exact command / steps: rendered
`get_dashboard_html(licensed=False/True)` and checked the offer block;
rendered the banner with `Google Chrome --headless=new --screenshot
--window-size=900,220 file://.github/assets/enterprise-perk.svg`; `grep
-rn "headroom-perks\|3 months"` over README, docs, llms.txt, headroom/
and .github/.
- Observed result: unlicensed: offer shown, contact email present, no
perks link, new dismissal key. Licensed: offer removed. Banner renders
cleanly within 880×200 with text in the hero font. The grep finds
nothing.
- Not tested: the docs site build (`docs/`) and the release-notes footer
step (runs only on release).

## Runtime Rollout Safety

- Rollout-managed feature(s): none
- Minimum rollout channel: n/a
- Stable/default behavior changed: only the text and link of the
dashboard offer on unlicensed installs
- Kill switch / disable path: setting `HEADROOM_LICENSE` removes the
offer, as before
- Unsafe override required: no
- Qualification impact: none
- Rollback path: revert this PR

## Review Readiness

- [x] I have performed a self-review
- [x] This PR is ready for human review

## Checklist

- [x] My code follows the project's style guidelines
- [x] I have performed a self-review of my code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [x] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my
feature works
- [x] New and existing unit tests pass locally with my changes
- [x] I did **not** edit `CHANGELOG.md` — it is generated by
release-please from my Conventional Commit PR title (a CI guard enforces
this)

## Additional Notes

No test was added for the new dismissal key: it is browser localStorage
read by Alpine, which the Python tests do not run. Past release notes
still carry the old footer; editing them is a separate one-off.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-28 10:27:33 -07:00
Radhakrishnan PachyappanandJerrettDavis 125a703a65 fix(security): restrict the Windows runtime log via NTFS ACL, not just warn (#4135)
## Description

Windows never got the owner-only guarantee POSIX mode bits give the
proxy log, its rotated backups, and the JSONL request log — `os.chmod`
there only toggles the read-only attribute and leaves the real access
control (the ACL) untouched. The prior fix (#3728) correctly scoped that
gap and warned about it, but the warning text read as cryptic to at
least one user (reported here and on Discord), and closing the gap was
explicitly left as a follow-up pending a Windows CI runner to verify
against.

This implements that follow-up.

Closes #4058

## Type of Change

- [x] Bug fix (non-breaking change that fixes an issue)
- [x] Documentation update

## Changes Made

- `headroom/_fileperms_windows.py` (new): the NTFS ACL implementation
via `ctypes` (no `pywin32` dependency) — a DACL with exactly one entry,
the calling user with full control, built fresh rather than merged with
the inherited entries that made the file readable in the first place,
applied with `PROTECTED_DACL_SECURITY_INFORMATION` so those inherited
entries are dropped.
- `headroom/fileperms.py`:
`restrict_fd_to_owner`/`restrict_path_to_owner` go through the new
module on Windows instead of giving up immediately; added
`verify_owner_only(path)`, which re-reads the actual DACL rather than
trusting a static platform flag — the ACL call can fail for reasons
unrelated to this code (a non-NTFS volume, a missing privilege).
- `headroom/proxy/helpers.py`: the startup warning now fires only when
`verify_owner_only` reports failure (not unconditionally on Windows),
and the wording says plainly that other accounts may be able to read the
file instead of the more technical original phrasing.
- `tests/test_cache_breakpoint_diagnostics.py`: new Windows-specific
tests exercising the ACL path directly (mirroring the existing POSIX
mode-bit tests), plus updates to the two tests whose assumption
("Windows protection is impossible") this PR deliberately changes.
- `docs/content/docs/proxy.mdx`: updated the "Who can read the logs"
section to describe the ACL instead of "Headroom does not restrict the
log file."
- `.github/workflows/ci.yml`: added a `windows-file-permissions` job
(same lightweight pattern as the existing
`windows-tool-result-interceptors` job) so this is exercised on a real
Windows runner going forward, addressing the maintainer's own "I'd want
a Windows runner in CI first" from #3728's review thread.

Deliberately **not** extended to the sqlite-backed memory/CCR stores
(`ensure_private_file`/`connect_private_sqlite`) or `private_dir` —
those remain unenforced on Windows, same as before this change, to keep
this PR scoped to what #4058 is actually about.

## Testing

- [x] Unit tests pass (`pytest`)
- [x] Linting passes (`ruff check .`)
- [x] Type checking passes (`mypy headroom`)
- [x] New tests added for new functionality

### Test Output

```text
$ pytest tests/test_cache_breakpoint_diagnostics.py tests/test_private_state_files.py tests/test_proxy_handler_helpers.py -q
99 passed, 49 skipped in 13.50s

$ ruff check headroom/fileperms.py headroom/_fileperms_windows.py headroom/proxy/helpers.py tests/test_cache_breakpoint_diagnostics.py
All checks passed!

$ ruff format --check <same files>
4 files already formatted

$ mypy headroom/fileperms.py headroom/_fileperms_windows.py --ignore-missing-imports --platform linux
Found 1 error in 1 file (checked 2 source files)
# that 1 error is in headroom/providers/model_metadata.py, pre-existing and
# unrelated -- confirmed via `git stash` against main before these changes.

$ actionlint .github/workflows/ci.yml
# clean, no output
```

## Real Behavior Proof

- Environment: actual Windows 11 machine (not simulated/mocked) — this
is the one part of #3728 the original author explicitly could not do ("I
cannot execute or test on this machine")
- Exact command / steps: created a file, called the new
`restrict_handle`/`restrict_path`, then independently verified the
result with `icacls <path>` (a separate tool, not my own code checking
its own work)
- Observed result:
  ```
  C:\Users\...\Temp\acl_proto_test.txt LAPTOP-...\<user>:(F)
  Successfully processed 1 files; Failed processing 0 files
  ```
Exactly one ACE, granting the current user full control — no `Everyone`,
no `Users`, no leftover inherited entries. Also ran the full
`test_cache_breakpoint_diagnostics.py` suite on this same machine,
including the new Windows-specific tests
(`test_runtime_log_is_owner_only_via_acl_with_previews_off`,
`test_rotated_backups_are_owner_only_via_acl`) which were previously
impossible to exercise without a Windows box.
- Not tested: a non-NTFS volume or a locked-down-privilege environment
(the failure paths `verify_owner_only` is meant to catch) — those fall
back to the warning, covered by the existing simulated test, but I don't
have a non-NTFS Windows volume handy to exercise for real.

## Runtime Rollout Safety

- Rollout-managed feature(s): N/A
- Minimum rollout channel: N/A
- Stable/default behavior changed: Only on Windows — the runtime log is
now actually restricted instead of warned-about; POSIX behavior is
unchanged.
- Kill switch / disable path: None needed — this only adds protection
where there was none; a failure falls back to the pre-existing
warning-only behavior automatically via `verify_owner_only`.
- Unsafe override required: No
- Qualification impact: None
- Rollback path: Revert; Windows returns to warn-only, same as before
this PR.

## Review Readiness

- [x] I have performed a self-review
- [x] This PR is ready for human review

## Checklist

- [x] My code follows the project's style guidelines
- [x] I have performed a self-review of my code
- [x] I have commented my code, particularly in hard-to-understand areas
- [x] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [x] I have added tests that prove my fix is effective or that my
feature works
- [x] New and existing unit tests pass locally with my changes
- [x] I did **not** edit `CHANGELOG.md`

## Additional Notes

Scope boundary, stated explicitly rather than left implicit: this does
not touch `ensure_private_file`/`connect_private_sqlite`/`private_dir`,
which stay unenforced on Windows as before. Extending ACL protection
there would be a reasonable follow-up but is a separate, larger piece of
surface (sqlite main file + `-wal`/`-shm`/`-journal` sidecars) than what
#4058 asked about.
<!-- devin-review-badge-begin -->

---

<a href="https://app.devin.ai/review/headroomlabs-ai/headroom/pull/4135"
target="_blank"><picture><source media="(prefers-color-scheme: dark)"
srcset="https://static.devin.ai/assets/gh-devin-review-dark.svg?v=4"><img
src="https://static.devin.ai/assets/gh-devin-review-light.svg?v=4"
alt="Devin Review"></picture></a>
<!-- devin-review-badge-end -->

---------

Co-authored-by: JerrettDavis <mxjerrett@gmail.com>
2026-10-24 08:39:05 -07:00
1be699f68e fix(deps): patch OpenClaw Undici and narrow E2E audit exceptions (#4453)
## Description

Includes the approved #4358 as its prerequisite. This PR targets main so
the complete integration workflows qualify the combined repair; its diff
will shrink to this follow-up once #4358 lands. Replace OpenClaw's
affected Undici copy instead of excepting it, and reduce the E2E audit
exceptions from seven advisory/path pairs to three.

OpenClaw 2026.10.2 lists Undici in `bundleDependencies`. Version
2026.10.6 removes it from that bundle, allowing a targeted, same-major
override to install fixed Undici 8.12.3. npm 12.2.1 still bundles its
own affected copies; this PR retains only those existing, expiring
exceptions.

## Type of Change

- [x] Bug fix

## Changes Made

- Pin the existing E2E OpenClaw CLI to 2026.10.6 and override only its
Undici dependency to 8.12.3.
- Regenerate the E2E lockfile; keep Codex and the npm override
unchanged.
- Remove every OpenClaw exception and the now-stale advisory, preserving
the parent's exact bundled-version checks and 2026-11-15 expiry.
- Update the Dockerfile comment to the actual Node requirement: 24.22.1
in the Node 24 line. Its NodeSource installation already selects that
line.

## Dependency and install-surface assessment

This updates an existing upstream-maintained CLI for a security fix,
rather than adding a replacement package. The fixed Undici remains in
the same major line. The graph is used only by the Docker wrap E2E
harness and is not shipped in Headroom's wheel or SDK. Normal
installation runs OpenClaw's existing lifecycle scripts and fetches
packages from the registry; those scripts were inspected, then exercised
inside a fresh Linux container without host credentials. No application
compression or routing logic changes.

## Testing

- [x] Manual testing performed
- [x] Dependency installation and runtime resolution verified

### Test Output

```text
OpenClaw runtime resolves Undici 8.12.3
OpenClaw 2026.10.6 (fe06181)
Installed audit: only npm bundled copies remain
{ info: 0, low: 0, moderate: 1, high: 1, critical: 0, total: 2 }
parent: 9 audit-guard cases passed
child: 9 audit-guard cases passed
git diff --check: passed
```

The guard accepts the current scoped findings and rejects a new
advisory, wrong path, expired exception, stale exception, audit error,
changed version, non-bundled copy, and missing inherited-advisory entry.
A raw audit remains nonzero for npm's bundled dependencies; this PR does
not claim those packages are patched.

## Real Behavior Proof

- Environment: fresh Linux amd64 Docker container,
`node:24.22.1-bookworm-slim`, Node 24.22.1 / npm 11.19.1, normal `npm
ci` with lifecycle scripts enabled.
- Exact command / steps: copy the two committed package files into a
fresh container volume; run `npm ci --no-audit --no-fund`; resolve
`undici/package.json` using
`createRequire('/work/node_modules/openclaw/package.json')` and assert
version 8.12.3; run `node node_modules/openclaw/openclaw.mjs --version`
and `--help`; run `npm audit --json` and assert that every remaining
affected node is under `node_modules/npm/`.
- Observed result: installation, exact runtime-resolution assertion,
version, and help all succeeded. Both installed-tree and lockfile audits
leave only npm's bundled Undici 6.29.0 and ip-address 10.7.2. The parent
workflow's guard passes with the narrowed exceptions and rejects all
eight negative cases.
- Not tested: a billed provider request or live production deployment.
Hosted Docker agent/integration scenarios have now passed. Hosted
qualification on head 63c3abc5b3 is
complete: all reported checks are terminal with no failures or pending
checks, including the full Security, build, test, and Docker integration
workflows.

## Runtime Rollout Safety

- Rollout-managed feature(s): none; E2E dependency data only.
- Minimum rollout channel: existing E2E test environment.
- Stable/default behavior changed: this follow-up patches only the
harness CLI. The included parent retains its explicitly documented
affected-Pillow decoder guard.
- Kill switch / disable path: revert this dependency commit.
- Unsafe override required: none; the override selects a compatible
fixed Undici 8.x patch. The parent's existing, bounded npm exceptions
remain explicit.
- Qualification impact: package installation, CLI startup, runtime
dependency resolution, and audit guarding were verified in isolation.
- Rollback path: revert the four-file change.

## Review Readiness

- [x] I performed self-review
- [x] This PR is ready for human merge review; the complete hosted check
set passed

## Checklist

- [x] I did not edit CHANGELOG.md.
- [x] The exception scope is reduced, not expanded.
- [x] No contributor correctness logic was modified.

Python lint/type checks and new production unit tests are not applicable
to these dependency/data changes. Independent human approval is
required; this is an author-side qualification record.

---------

Co-authored-by: Tejas Chopra <chopratejas@gmail.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Tejas Chopra <tejas@headroomlabs.ai>
2026-10-23 23:11:35 -07:00
Kenneth WongandKenneth Wong f380692b46 fix(relevance): load the default embedder from one pinned snapshot (#4152)
## Description

The supply-chain pin on the default relevance embedder never took
effect. `EmbeddingScorer` passed `revision="52398278…"` to fastembed's
`TextEmbedding`, which accepts it and then drops it before
`snapshot_download` (fastembed 0.8.0 and 0.9.0:
`OnnxTextEmbedding.__init__` calls `download_model(...)` without
`**kwargs`). So the model floated on
`Qdrant/bge-small-en-v1.5-onnx-Q@main`, cached under the system temp
dir.

Today the floating `main` (`aa8f8b0`) differs from the pin only in
`README.md`, so no unreviewed weights have shipped. The pin just wasn't
protecting anything.

This PR makes the Python default model load the pinned snapshot and adds
tests that would have caught the dropped revision. The Rust
`EmbeddingScorer::try_new` change that was in this PR is now its own PR,
stacked on this one: #4190.

No linked issue.

## Type of Change

- [x] Bug fix (non-breaking change that fixes an issue)
- [ ] New feature (non-breaking change that adds functionality)
- [ ] Breaking change (fix or feature that would cause existing
functionality to change)
- [ ] Documentation update
- [ ] Performance improvement
- [ ] Code refactoring (no functional changes)

## Changes Made

- `headroom/onnx_runtime.py`: pin `Qdrant/bge-small-en-v1.5-onnx-Q` at
`52398278842ec682c6f32300af41344b1c0b0bb2` in `_PINNED_REVISIONS`, so
`HEADROOM_HF_PIN=off` applies to it like every other pinned repo.
- `headroom/relevance/embedding.py`:
- The default model resolves its 5 files through
`hf_hub_download_local_first`, which is pinned, cache-first and guarded
on a miss.
- fastembed then gets only the snapshot directory as
`specific_model_path`. That construction runs with the Hub forced
offline, so a future fastembed that ignored the path would fail instead
of downloading an unpinned copy.
  - Other catalog models keep the existing `_load_text_embedding` path.
- The air-gapped error for the default model names the exact snapshot
and the command that seeds it, and says a fastembed cache is no longer
read (details under Release note).
- The private `_DEFAULT_MODEL_PINNED_REVISION` / `_pinned_revision` are
removed.
- `_load_text_embedding` now types its kwargs `dict[str, Any]`, fixing 8
mypy errors that only appear with fastembed installed.
- `pyproject.toml` / `uv.lock`: `fastembed>=0.6.0`.
`specific_model_path` first appears in fastembed v0.6.0; it isn't in
v0.4.x or v0.5.x. The lock still resolves 0.8.0; only the
`requires-dist` specifier changes.
- `.github/workflows/ci.yml` (`test-extras`):
- The prefetch warms the pinned snapshot through the loader's own
resolver, and the cache entry's key carries the SHA. The old prefetch
warmed fastembed's own cache, which the offline relevance tests would
now miss: `conftest.py:199` turns that into silent skips.
- The job runs the new test file, and the unused `FASTEMBED_CACHE_PATH`
is gone.
- Tests:
  - New `tests/test_fastembed_pinned_snapshot.py`:
    - the pinned revision reaches every file download;
- fastembed gets only the snapshot directory, built with the Hub forced
offline;
    - `HEADROOM_HF_PIN=off` floats;
    - files resolved from two different snapshots are refused;
- a cold cache while offline degrades without a download, and the error
names `repo@sha` and `--revision <sha>`;
    - real fastembed skips the Hub when given `specific_model_path`.
- `tests/test_stateless_writers.py`: the three `_pinned_revision` tests
are removed with the helper; `tests/test_hf_revision_pinning.py` covers
`_resolve_revision`.
- `tests/test_offline_egress_chokepoint.py`: `relevance/embedding.py`'s
cache-only count goes from 1 to 2 for the `_load_default_model`
construction.

## Release note

> **relevance:** the default embedder (`BAAI/bge-small-en-v1.5`) now
loads from the pinned snapshot
`Qdrant/bge-small-en-v1.5-onnx-Q@52398278842ec682c6f32300af41344b1c0b0bb2`
in the HuggingFace hub cache (`HF_HUB_CACHE` / `HF_HOME/hub` /
`~/.cache/huggingface/hub`), not from fastembed's cache. Existing
installs download ~67 MB once. Air-gapped hosts that pre-seeded the
fastembed cache must re-seed, e.g. `hf download
Qdrant/bge-small-en-v1.5-onnx-Q model_optimized.onnx tokenizer.json
tokenizer_config.json special_tokens_map.json config.json --revision
52398278842ec682c6f32300af41344b1c0b0bb2`. Without that, relevance
scoring falls back to BM25, and the error message says how to re-seed.

`CHANGELOG.md` is generated from the PR title, so this text is here for
whoever writes the release notes.

## Dependency Change (`fastembed>=0.4.0` → `>=0.6.0`)

This raises the minimum version of an existing dependency; no package is
added. `uv.lock` still resolves `fastembed 0.8.0`. The only lock change
is the `requires-dist` specifier, so the locked install set is
byte-for-byte the same.

- **Why this package:** it's already the `relevance` extra's embedder
(since Stage 3c.1). This PR adds no package and swaps none.
- **Who maintains it:** Qdrant (`qdrant/fastembed`), Apache-2.0,
actively released (0.6.0 on 2025-02-26 through 0.9.0 on 2026-10-07). The
GitHub Advisory Database has no advisories for `fastembed` (pip).
- **Install surface:** unchanged for the locked install (0.8.0).
Installs that resolve their own versions lose access to 0.4.x/0.5.x.
Runtime network shrinks: given `specific_model_path`, fastembed makes no
Hub call, and the only download is Headroom's own pinned,
offline-guarded `hf_hub_download_local_first`.
- **Why this version:** `specific_model_path` on `TextEmbedding` first
appears in v0.6.0, and the pinned-snapshot load depends on it.

## Testing

- [x] Unit tests pass (`pytest`)
- [x] Linting passes (`ruff check .`)
- [x] Type checking passes (`mypy headroom`)
- [x] New tests added for new functionality
- [x] Manual testing performed

### Test Output

```text
$ HOME=$(mktemp -d) pytest -q tests/test_fastembed_pinned_snapshot.py tests/test_offline_egress_chokepoint.py \
    tests/test_relevance.py tests/test_relevance_extra.py tests/test_stateless_writers.py tests/test_hf_revision_pinning.py
7 failed, 209 passed, 3 skipped
# The 7 failures are TestOtlpExporterOffline / TestLangfuseExporterOffline / TestStartupRefusal /
# TestHeadroomCloudCompressionOffline: the OTel and Cloud extras aren't in this venv. The same 7 fail on
# origin/main (f1bc2609) here.

$ mypy headroom            # with fastembed 0.8.0 installed
Success: no issues found in 569 source files
$ ruff check .             # All checks passed!
$ ruff format --check .    # 1790 files already formatted
```

## Real Behavior Proof
- Exact command / steps: additional maintainer verification on
Windows/Python 3.12.13: python -m pytest
tests/test_fastembed_pinned_snapshot.py
tests/test_offline_egress_chokepoint.py tests/test_stateless_writers.py
-q.
- Observed result: the additional maintainer run passed all 160 selected
tests on b3eb7f349c, using the available
development native extension for startup; no fresh Rust implementation
qualification is claimed.

- Environment: macOS arm64, repo `.venv` (fastembed 0.8.0 = `uv.lock`),
rebased on `origin/main` `f1bc2609`.
- Default load: `EmbeddingScorer().score("authentication failed for user
admin", "login error")` loads from
`~/.cache/huggingface/hub/models--Qdrant--bge-small-en-v1.5-onnx-Q/snapshots/52398278842ec682c6f32300af41344b1c0b0bb2`
and scores 0.7389. `origin/main` loads
`<tmp>/fastembed_cache/…/snapshots/aa8f8b06…` (the floating `main`,
under `$TMPDIR`).
- Air-gapped re-seed, from an empty `HF_HOME`:
1. `HEADROOM_OFFLINE=1` gives `Embedding model 'BAAI/bge-small-en-v1.5'
is unavailable: HEADROOM_OFFLINE is set: … Pre-seed the HuggingFace hub
cache with Qdrant/bge-small-en-v1.5-onnx-Q@52398278… (`hf download …
--revision 52398278…`), or use the BM25-only scorer. A fastembed cache
seeded for an older Headroom is not read for this model.`
  2. I ran the `hf download` command from that message as printed.
  3. `HEADROOM_OFFLINE=1 HF_HUB_OFFLINE=1` then loads and scores 0.7389.
4. With `HEADROOM_HF_PIN=off`, the message names `@main` and `--revision
main` instead.
- Not tested: Windows, and Linux outside CI. fastembed 0.6.x/0.7.x at
runtime (the 0.6.0 floor comes from reading the v0.6.0 tag's source).

## Runtime Rollout Safety

- Rollout-managed feature(s): none.
- Minimum rollout channel: N/A. This is the default code path, with no
flag.
- Stable/default behavior changed: yes. The default relevance model
loads the pinned snapshot from the standard HF hub cache, not
fastembed's temp-dir cache, so existing installs download ~67 MB once.
The model files are byte-identical to what `main` served; only
`README.md` differs.
- Kill switch / disable path: `HEADROOM_HF_PIN=off` floats it on `main`.
Air-gapped hosts re-seed as described in the Release note.
- Unsafe override required: no.
- Qualification impact: none expected. Same weights and tokenizer as the
current floating `main`.
- Rollback path: revert this PR. Nothing persistent changes beyond an
extra snapshot in the HF cache.

## Review Readiness

- [x] I have performed a self-review
- [x] This PR is ready for human review

## Checklist

- [x] My code follows the project's style guidelines
- [x] I have performed a self-review of my code
- [x] I have commented my code, particularly in hard-to-understand areas
- [x] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [x] I have added tests that prove my fix is effective or that my
feature works
- [x] New and existing unit tests pass locally with my changes
- [x] I did **not** edit `CHANGELOG.md` — it is generated by
release-please from my Conventional Commit PR title (a CI guard enforces
this)

## Screenshots (if applicable)

N/A.

## Additional Notes

- `_load_text_embedding` was typed `kwargs: dict[str, str]`, which made
mypy report 8 `arg-type` errors on `TextEmbedding(**kwargs)` whenever
fastembed is installed in the type-checking environment. CI's mypy run
doesn't install fastembed, so it never saw them.
- Follow-ups, not in this PR: Rust's Kompress and tokenizer Hub fetches
are still unpinned (there's no Rust `HEADROOM_HF_PIN`).

Co-authored-by: Kenneth Wong <17061293+KennethWKZ@users.noreply.github.com>
2026-10-20 19:45:26 -05:00
dependabot[bot]andJD Davis 4ff608975f ci: Bump actions/setup-python from 6 to 7 (#4221)
## Description

Qualify setup-python v7 on the Windows interceptor job and exclude the
vulnerable MCP SDK from shipping extras.

## Type of Change

- [x] Bug fix / dependency security and qualification

## Changes Made

Synced with upstream `main`
(`486afaac7426fa1d6735fe2ce6ae37630d9d11ae`). No contributor
implementation logic changed. Tested head:
`5300d0417e55667957359a3a1bce549955cb3eae`. Includes the reviewed
dependency-floor fix from #4239 because the vulnerable version was still
permitted by shipping extras.

## Dependency assessment

GitHub maintains actions/setup-python. v7 updates its action
runtime/dependencies to ESM; this job does not use the removed
pip-install input. The action installs Python on the hosted Windows
runner; it adds no Python runtime package to Headroom. This branch also
incorporates the reviewed MCP CVE-2026-59951 fix, preserving the SDK v1
API cap.

## Testing

Shared MCP HTTP/server checks: 25 passed, 2 skipped on #4221. Branch
dependency contract: 1 passed. uv lock --check: passed. Shipping
proxy+mcp dependency audit: no known vulnerabilities. Windows action
execution is verified by hosted CI, not locally.

### Test Output

```text
Shared MCP HTTP/server checks: 25 passed, 2 skipped on #4221. Branch dependency contract: 1 passed. uv lock --check: passed. Shipping proxy+mcp dependency audit: no known vulnerabilities. Windows action execution is verified by hosted CI, not locally.
```

## Real Behavior Proof

- Environment: Windows, PowerShell; installed Python/uv, Node/npm/Bun
and Rust tooling as applicable. No live provider/model used.
- Exact commands / steps:

```text
uv run --frozen --extra dev pytest -q tests/test_ccr_mcp_http.py tests/test_ccr_mcp_server.py tests/test_mcp_dependency_contract.py
uv lock --check
python -m pytest -q tests/test_mcp_dependency_contract.py
git diff --check
```

- Observed result: Shared MCP HTTP/server checks: 25 passed, 2 skipped
on #4221. Branch dependency contract: 1 passed. uv lock --check: passed.
Shipping proxy+mcp dependency audit: no known vulnerabilities. Windows
action execution is verified by hosted CI, not locally.
- Not tested: live model/provider traffic and full Docker E2E locally;
hosted cross-platform checks are running on the pushed head. Read hosted
results before merging. Focused checks are not a claim of complete
platform qualification.

## Runtime Rollout Safety

- Rollout-managed features: none added or enabled.
- Minimum rollout channel: unchanged.
- Stable/default behavior changed: dependency versions/ranges and
associated install metadata only; no feature rollout defaults changed.
- Kill switch / disable path: existing optional extras and plugin opt-in
paths remain available.
- Unsafe override required: no runtime qualification bypass. Security
dependency override is documented above where applicable.
- Qualification impact: hosted checks and the focused evidence above
must pass; no existing gate is removed.
- Rollback path: revert this dependency change and restore its prior
lockfiles together; retain the patched MCP minimum or another reviewed
security remediation.

## Review Readiness

- [x] Maintainer self-review and focused verification performed.
- [x] All hosted checks passed on the reviewed head. Ready for final
human merge review.

## Checklist

- [x] No contributor implementation logic rewritten.
- [x] Committed lockfiles checked against the changed manifests.
- [x] No manual CHANGELOG.md changes.
- [x] Known limitations recorded above.

## Original Dependabot update

Bumps [actions/setup-python](https://github.com/actions/setup-python)
from 6 to 7.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/actions/setup-python/releases">actions/setup-python's
releases</a>.</em></p>
<blockquote>
<h2>v7.0.0</h2>
<h2>What's Changed</h2>
<h3>Enhancements</h3>
<ul>
<li>Migrate to ESM and upgrade dependencies by <a
href="https://github.com/priyagupta108"><code>@​priyagupta108</code></a>
in <a
href="https://redirect.github.com/actions/setup-python/pull/1330">actions/setup-python#1330</a></li>
<li>Pin SHA commits and update docs with latest versions by <a
href="https://github.com/HarithaVattikuti"><code>@​HarithaVattikuti</code></a>
in <a
href="https://redirect.github.com/actions/setup-python/pull/1338">actions/setup-python#1338</a></li>
<li>Remove the pip-install input by <a
href="https://github.com/gowridurgad"><code>@​gowridurgad</code></a> in
<a
href="https://redirect.github.com/actions/setup-python/pull/1336">actions/setup-python#1336</a></li>
</ul>
<h3>Bug Fix</h3>
<ul>
<li>Fix to Classify stderr warning messages as warnings instead of
errors in annotations by <a
href="https://github.com/lmvysakh"><code>@​lmvysakh</code></a> in <a
href="https://redirect.github.com/actions/setup-python/pull/1335">actions/setup-python#1335</a></li>
<li>Validate and retry manifest fetch to prevent silent failures by <a
href="https://github.com/priyagupta108"><code>@​priyagupta108</code></a>
in <a
href="https://redirect.github.com/actions/setup-python/pull/1332">actions/setup-python#1332</a></li>
</ul>
<h3>Dependency Upgrade</h3>
<ul>
<li>Bump certifi from 2020.6.20 to 2024.7.4 in
/<strong>tests</strong>/data by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/actions/setup-python/pull/1328">actions/setup-python#1328</a></li>
<li>Remove EOL Python versions and Bumps numpy text fixture by <a
href="https://github.com/priya-kinthali"><code>@​priya-kinthali</code></a>
in <a
href="https://redirect.github.com/actions/setup-python/pull/1333">actions/setup-python#1333</a></li>
<li>Upgrade <code>@​actions/cache</code> to 6.2.0 by <a
href="https://github.com/philip-gai"><code>@​philip-gai</code></a> in <a
href="https://redirect.github.com/actions/setup-python/pull/1337">actions/setup-python#1337</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a href="https://github.com/lmvysakh"><code>@​lmvysakh</code></a>
made their first contribution in <a
href="https://redirect.github.com/actions/setup-python/pull/1335">actions/setup-python#1335</a></li>
<li><a
href="https://github.com/philip-gai"><code>@​philip-gai</code></a> made
their first contribution in <a
href="https://redirect.github.com/actions/setup-python/pull/1337">actions/setup-python#1337</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/actions/setup-python/compare/v6...v7.0.0">https://github.com/actions/setup-python/compare/v6...v7.0.0</a></p>
<h2>v6.3.0</h2>
<h2>What's Changed</h2>
<h3>Enhancement</h3>
<ul>
<li>Add RHEL support and include Linux distro in cache keys by <a
href="https://github.com/priyagupta108"><code>@​priyagupta108</code></a>
in <a
href="https://redirect.github.com/actions/setup-python/pull/1323">actions/setup-python#1323</a></li>
<li>Fix pip cache error handling on Windows by <a
href="https://github.com/priyagupta108"><code>@​priyagupta108</code></a>
in <a
href="https://redirect.github.com/actions/setup-python/pull/1040">actions/setup-python#1040</a></li>
</ul>
<h3>Dependency update</h3>
<ul>
<li>Upgrade minimatch from 3.1.2 to 3.1.5 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/actions/setup-python/pull/1281">actions/setup-python#1281</a></li>
<li>Upgrade actions dependencies by <a
href="https://github.com/gowridurgad"><code>@​gowridurgad</code></a>
with <a href="https://github.com/Copilot"><code>@​Copilot</code></a> in
<a
href="https://redirect.github.com/actions/setup-python/pull/1303">actions/setup-python#1303</a></li>
<li>Upgrade <code>@​actions/cache</code> to 5.1.0, log cache write
denied by <a
href="https://github.com/jasongin"><code>@​jasongin</code></a> in <a
href="https://redirect.github.com/actions/setup-python/pull/1324">actions/setup-python#1324</a></li>
<li>Upgrade dependency versions and test workflow configuration by <a
href="https://github.com/HarithaVattikuti"><code>@​HarithaVattikuti</code></a>
in <a
href="https://redirect.github.com/actions/setup-python/pull/1322">actions/setup-python#1322</a></li>
</ul>
<h3>Documentation</h3>
<ul>
<li>Update advanced-usage.md by <a
href="https://github.com/Dunky-Z"><code>@​Dunky-Z</code></a> in <a
href="https://redirect.github.com/actions/setup-python/pull/811">actions/setup-python#811</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a
href="https://github.com/gowridurgad"><code>@​gowridurgad</code></a>
with <a href="https://github.com/Copilot"><code>@​Copilot</code></a>
made their first contribution in <a
href="https://redirect.github.com/actions/setup-python/pull/1303">actions/setup-python#1303</a></li>
<li><a href="https://github.com/jasongin"><code>@​jasongin</code></a>
made their first contribution in <a
href="https://redirect.github.com/actions/setup-python/pull/1324">actions/setup-python#1324</a></li>
<li><a href="https://github.com/Dunky-Z"><code>@​Dunky-Z</code></a> made
their first contribution in <a
href="https://redirect.github.com/actions/setup-python/pull/811">actions/setup-python#811</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/actions/setup-python/compare/v6.2.0...v6.3.0">https://github.com/actions/setup-python/compare/v6.2.0...v6.3.0</a></p>
<h2>v6.2.0</h2>
<h2>What's Changed</h2>
<h3>Dependency Upgrades</h3>
<ul>
<li>Upgrade dependencies to Node 24 compatible versions by <a
href="https://github.com/salmanmkc"><code>@​salmanmkc</code></a> in <a
href="https://redirect.github.com/actions/setup-python/pull/1259">actions/setup-python#1259</a></li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/actions/setup-python/commit/5fda3b95a4ea91299a34e894583c3862153e4b97"><code>5fda3b9</code></a>
Pin SHA commits and update docs with latest versions (<a
href="https://redirect.github.com/actions/setup-python/issues/1338">#1338</a>)</li>
<li><a
href="https://github.com/actions/setup-python/commit/4ab7e95f05e168b4356aebde89dd84f59c283d8e"><code>4ab7e95</code></a>
Merge pull request <a
href="https://redirect.github.com/actions/setup-python/issues/1337">#1337</a>
from actions/philip-gai/bump-actions-cache-6-2-0</li>
<li><a
href="https://github.com/actions/setup-python/commit/0f3a009f475dbea83c0371cd85d099690fee8c5c"><code>0f3a009</code></a>
Remove the pip-install input (<a
href="https://redirect.github.com/actions/setup-python/issues/1336">#1336</a>)</li>
<li><a
href="https://github.com/actions/setup-python/commit/f8cf4291c8b8e273ddd26e569454615c7315d932"><code>f8cf429</code></a>
Migrate to ESM and upgrade dependencies (<a
href="https://redirect.github.com/actions/setup-python/issues/1330">#1330</a>)</li>
<li><a
href="https://github.com/actions/setup-python/commit/54baeea5b34417d10a7479663a23cca53ea209b5"><code>54baeea</code></a>
Validate and retry manifest fetch to prevent silent failures (<a
href="https://redirect.github.com/actions/setup-python/issues/1332">#1332</a>)</li>
<li><a
href="https://github.com/actions/setup-python/commit/c7092773a316760f4ecfe498e4af668a4dafeac5"><code>c709277</code></a>
Annotation code fix (<a
href="https://redirect.github.com/actions/setup-python/issues/1335">#1335</a>)</li>
<li><a
href="https://github.com/actions/setup-python/commit/6849080452e69b330395e8a6d23cf90f56d76a1a"><code>6849080</code></a>
remove EOL Python versions and Bumps numpy text fixture (<a
href="https://redirect.github.com/actions/setup-python/issues/1333">#1333</a>)</li>
<li><a
href="https://github.com/actions/setup-python/commit/0903b469fbf4441aadfe4f4b249dc5b1fba3a73e"><code>0903b46</code></a>
Bump certifi from 2020.6.20 to 2024.7.4 in /<strong>tests</strong>/data
(<a
href="https://redirect.github.com/actions/setup-python/issues/1328">#1328</a>)</li>
<li>See full diff in <a
href="https://github.com/actions/setup-python/compare/v6...v7">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=actions/setup-python&package-manager=github_actions&previous-version=6&new-version=7)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>
<!-- devin-review-badge-begin -->

---

<a href="https://app.devin.ai/review/headroomlabs-ai/headroom/pull/4221"
target="_blank"><picture><source media="(prefers-color-scheme: dark)"
srcset="https://static.devin.ai/assets/gh-devin-review-dark.svg?v=4"><img
src="https://static.devin.ai/assets/gh-devin-review-light.svg?v=4"
alt="Devin Review"></picture></a>
<!-- devin-review-badge-end -->

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: JD Davis <mxjerrett@gmail.com>
2026-10-15 23:00:24 -05:00
dependabot[bot]andJD Davis e51f6b35e4 ci: Bump astral-sh/setup-uv from 10.2.0 to 10.3.0 in the actions-minor-patch group (#4220)
## Description

Qualify setup-uv v10.3.0 in the shipping dependency-audit job and
exclude vulnerable MCP SDK versions.

## Type of Change

- [x] Bug fix / dependency security and qualification

## Changes Made

Synced with upstream `main`
(`486afaac7426fa1d6735fe2ce6ae37630d9d11ae`). No contributor
implementation logic changed. Tested head:
`85e8f27185ce8b5b99a3d32b8a2575fe3787d108`. Includes the reviewed
dependency-floor fix from #4239 because the vulnerable version was still
permitted by shipping extras.

## Dependency assessment

Astral maintains setup-uv and uv. v10.3.0 adds Python architecture
support and known checksums for uv 0.13.0; the audit job installs
current uv, so maintaining verified installer support matters to its
supply-chain gate. This action downloads uv on the runner; it adds no
package to the shipped Python runtime. The reviewed MCP CVE-2026-59951
prerequisite is included without lifting the SDK v1 cap.

## Testing

Branch dependency contract: 1 passed. uv lock --check: passed.
Equivalent shipping proxy+mcp export audited on #4221: no known
vulnerabilities. Hosted dependency-audit exercises the updated action.

### Test Output

```text
Branch dependency contract: 1 passed. uv lock --check: passed. Equivalent shipping proxy+mcp export audited on #4221: no known vulnerabilities. Hosted dependency-audit exercises the updated action.
```

## Real Behavior Proof

- Environment: Windows, PowerShell; installed Python/uv, Node/npm/Bun
and Rust tooling as applicable. No live provider/model used.
- Exact commands / steps:

```text
uv export --frozen --no-dev --extra proxy --extra mcp --no-emit-project --format requirements-txt
uvx pip-audit --no-deps --disable-pip -r <exported requirements>
uv lock --check
python -m pytest -q tests/test_mcp_dependency_contract.py
git diff --check
```

- Observed result: Branch dependency contract: 1 passed. uv lock
--check: passed. Equivalent shipping proxy+mcp export audited on #4221:
no known vulnerabilities. Hosted dependency-audit exercises the updated
action.
- Not tested: live model/provider traffic and full Docker E2E locally;
hosted cross-platform checks are running on the pushed head. Read hosted
results before merging. Focused checks are not a claim of complete
platform qualification.

## Runtime Rollout Safety

- Rollout-managed features: none added or enabled.
- Minimum rollout channel: unchanged.
- Stable/default behavior changed: dependency versions/ranges and
associated install metadata only; no feature rollout defaults changed.
- Kill switch / disable path: existing optional extras and plugin opt-in
paths remain available.
- Unsafe override required: no runtime qualification bypass. Security
dependency override is documented above where applicable.
- Qualification impact: hosted checks and the focused evidence above
must pass; no existing gate is removed.
- Rollback path: revert this dependency change and restore its prior
lockfiles together; retain the patched MCP minimum or another reviewed
security remediation.

## Review Readiness

- [x] Maintainer self-review and focused verification performed.
- [x] All hosted checks passed on the reviewed head. Ready for final
human merge review.

## Checklist

- [x] No contributor implementation logic rewritten.
- [x] Committed lockfiles checked against the changed manifests.
- [x] No manual CHANGELOG.md changes.
- [x] Known limitations recorded above.

## Original Dependabot update

Bumps the actions-minor-patch group with 1 update:
[astral-sh/setup-uv](https://github.com/astral-sh/setup-uv).

Updates `astral-sh/setup-uv` from 10.2.0 to 10.3.0
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/astral-sh/setup-uv/releases">astral-sh/setup-uv's
releases</a>.</em></p>
<blockquote>
<h2>v10.3.0 🌈 Add Python architecture selection</h2>
<h2>Changes</h2>
<p>This release adds the <code>python-arch</code> input to select a
Python architecture independently of the Python version. With
<code>uv</code> 0.13.0 or later, set <code>python-arch: x86_64</code> to
use x64 Python on Windows ARM64 runners.</p>
<p>It also includes embedded checksums for <code>uv</code> releases
through 0.13.0.</p>
<ul>
<li>Use macOS 15 runners for tests <a
href="https://github.com/charliermarsh"><code>@​charliermarsh</code></a>
(<a
href="https://redirect.github.com/astral-sh/setup-uv/issues/1081">#1081</a>)</li>
</ul>
<h2>🚀 Enhancements</h2>
<ul>
<li>Add <code>python-arch</code> support <a
href="https://github.com/zanieb"><code>@​zanieb</code></a> (<a
href="https://redirect.github.com/astral-sh/setup-uv/issues/1079">#1079</a>)</li>
</ul>
<h2>🧰 Maintenance</h2>
<ul>
<li>chore: update known checksums for 0.13.0 @<a
href="https://github.com/apps/github-actions">github-actions[bot]</a>
(<a
href="https://redirect.github.com/astral-sh/setup-uv/issues/1089">#1089</a>)</li>
<li>chore: update known checksums for 0.12.24 @<a
href="https://github.com/apps/github-actions">github-actions[bot]</a>
(<a
href="https://redirect.github.com/astral-sh/setup-uv/issues/1084">#1084</a>)</li>
<li>chore: update known checksums for 0.12.23 @<a
href="https://github.com/apps/github-actions">github-actions[bot]</a>
(<a
href="https://redirect.github.com/astral-sh/setup-uv/issues/1082">#1082</a>)</li>
<li>chore: update known checksums for 0.12.22 @<a
href="https://github.com/apps/github-actions">github-actions[bot]</a>
(<a
href="https://redirect.github.com/astral-sh/setup-uv/issues/1080">#1080</a>)</li>
<li>chore: update known checksums for 0.12.21 @<a
href="https://github.com/apps/github-actions">github-actions[bot]</a>
(<a
href="https://redirect.github.com/astral-sh/setup-uv/issues/1078">#1078</a>)</li>
<li>chore: update known checksums for 0.12.20 @<a
href="https://github.com/apps/github-actions">github-actions[bot]</a>
(<a
href="https://redirect.github.com/astral-sh/setup-uv/issues/1076">#1076</a>)</li>
<li>chore: update known checksums for 0.12.19 @<a
href="https://github.com/apps/github-actions">github-actions[bot]</a>
(<a
href="https://redirect.github.com/astral-sh/setup-uv/issues/1068">#1068</a>)</li>
<li>chore: update known checksums for 0.12.18 @<a
href="https://github.com/apps/github-actions">github-actions[bot]</a>
(<a
href="https://redirect.github.com/astral-sh/setup-uv/issues/1065">#1065</a>)</li>
</ul>
<h2>⬆️ Dependency updates</h2>
<ul>
<li>chore(deps): bump zizmorcore/zizmor-action from 0.6.2 to 0.6.3 @<a
href="https://github.com/apps/dependabot">dependabot[bot]</a> (<a
href="https://redirect.github.com/astral-sh/setup-uv/issues/1077">#1077</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/astral-sh/setup-uv/commit/1c37ad07a6a961277cf70c0d37d6f313000f5884"><code>1c37ad0</code></a>
chore: update known checksums for 0.13.0 (<a
href="https://redirect.github.com/astral-sh/setup-uv/issues/1089">#1089</a>)</li>
<li><a
href="https://github.com/astral-sh/setup-uv/commit/b3c9b5fc56ebc90760c43b1ac9552c0d1705d3ca"><code>b3c9b5f</code></a>
chore: update known checksums for 0.12.24 (<a
href="https://redirect.github.com/astral-sh/setup-uv/issues/1084">#1084</a>)</li>
<li><a
href="https://github.com/astral-sh/setup-uv/commit/b06acff4b6a41bdd9cdac56507ead0bd7734e757"><code>b06acff</code></a>
Add <code>python-arch</code> support (<a
href="https://redirect.github.com/astral-sh/setup-uv/issues/1079">#1079</a>)</li>
<li><a
href="https://github.com/astral-sh/setup-uv/commit/c84232ca4fde9b022e20a930bfbbecd386b56fdf"><code>c84232c</code></a>
chore: update known checksums for 0.12.23 (<a
href="https://redirect.github.com/astral-sh/setup-uv/issues/1082">#1082</a>)</li>
<li><a
href="https://github.com/astral-sh/setup-uv/commit/51fdd265d38a27ffcbca0da885510bc6fcc0ff55"><code>51fdd26</code></a>
Use macOS 15 runners for tests (<a
href="https://redirect.github.com/astral-sh/setup-uv/issues/1081">#1081</a>)</li>
<li><a
href="https://github.com/astral-sh/setup-uv/commit/a96208bed1fb5efb8da349c9bcc6cc58af9e7d74"><code>a96208b</code></a>
chore: update known checksums for 0.12.22 (<a
href="https://redirect.github.com/astral-sh/setup-uv/issues/1080">#1080</a>)</li>
<li><a
href="https://github.com/astral-sh/setup-uv/commit/0e3884b860e20d3f4d5daa2347130beb51ccde47"><code>0e3884b</code></a>
chore: update known checksums for 0.12.21 (<a
href="https://redirect.github.com/astral-sh/setup-uv/issues/1078">#1078</a>)</li>
<li><a
href="https://github.com/astral-sh/setup-uv/commit/bcf05803b55ef01a5ec6368521ee1b42f97bc438"><code>bcf0580</code></a>
chore: update known checksums for 0.12.20 (<a
href="https://redirect.github.com/astral-sh/setup-uv/issues/1076">#1076</a>)</li>
<li><a
href="https://github.com/astral-sh/setup-uv/commit/b92a892142bde7280cd163c2abff341413314f9f"><code>b92a892</code></a>
chore(deps): bump zizmorcore/zizmor-action from 0.6.2 to 0.6.3 (<a
href="https://redirect.github.com/astral-sh/setup-uv/issues/1077">#1077</a>)</li>
<li><a
href="https://github.com/astral-sh/setup-uv/commit/227a0f6bea25cde3444f52decccf4a18de6635f4"><code>227a0f6</code></a>
chore: update known checksums for 0.12.19 (<a
href="https://redirect.github.com/astral-sh/setup-uv/issues/1068">#1068</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/astral-sh/setup-uv/compare/v10.2.0...v10.3.0">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=astral-sh/setup-uv&package-manager=github_actions&previous-version=10.2.0&new-version=10.3.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore <dependency name> major version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's major version (unless you unignore this specific
dependency's major version or upgrade to it yourself)
- `@dependabot ignore <dependency name> minor version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's minor version (unless you unignore this specific
dependency's minor version or upgrade to it yourself)
- `@dependabot ignore <dependency name>` will close this group update PR
and stop Dependabot creating any more for the specific dependency
(unless you unignore this specific dependency or upgrade to it yourself)
- `@dependabot unignore <dependency name>` will remove all of the ignore
conditions of the specified dependency
- `@dependabot unignore <dependency name> <ignore condition>` will
remove the ignore condition of the specified dependency and ignore
conditions


</details>
<!-- devin-review-badge-begin -->

---

<a href="https://app.devin.ai/review/headroomlabs-ai/headroom/pull/4220"
target="_blank"><picture><source media="(prefers-color-scheme: dark)"
srcset="https://static.devin.ai/assets/gh-devin-review-dark.svg?v=4"><img
src="https://static.devin.ai/assets/gh-devin-review-light.svg?v=4"
alt="Devin Review"></picture></a>
<!-- devin-review-badge-end -->

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: JD Davis <mxjerrett@gmail.com>
2026-10-15 21:46:32 -05:00
5698e91b2a chore(security): beacon rate limit, dev environment, weekly CodeQL triage (#4008)
SOC 2 follow-ups from the 2026-10-06 firewall review (R3, R4) and
incident INC-2026-001.

## Beacon rate limit (R3)
`deploy/beacon/wrangler.toml` said a WAF rule limited `/v1/logs` to 60
req/min/IP. That rule could not exist: headroomlabs.ai is not a
Cloudflare zone, so the Worker is only on `workers.dev`. This adds a
[Workers rate-limit
binding](https://developers.cloudflare.com/workers/runtime-apis/bindings/rate-limit/)
checked in `fetch()` **before** the body is read.

- Keyed on one constant, not the IP: the Worker still never reads
`cf-connecting-ip` (privacy promise in the file header). Trade-off: a
flood also sheds real events for that minute.
- 3000 req/min **per Cloudflare location** (~10x today's ~300/min
total).
- Returns 429, which the client does **not** treat as a gzip refusal
(`_GZIP_REFUSED_STATUSES` is 400/415), so rate-limited clients keep
compressing.
- Fails open if the binding is absent **or the limiter itself errors**
(review fix): a rate-limit service outage lets beacons through rather
than dropping all of them. `node deploy/beacon/test-rollup.mjs` covers
429 over the limit, fail-open on outage and when unbound, and the single
shared key.

## Dev environment (R4)
`[env.dev]` deploys `headroom-beacon-dev` bound to the new
`headroom-telemetry-dev` bucket (600/min limit). Already deployed and
tested: a sample event returns 204, and a 2,500-request burst got 384 ×
429.

## Weekly CodeQL triage
`.github/workflows/codeql-triage.yml` opens an issue every Monday,
assigned to @chopratejas (tejas@headroomlabs.ai), listing open
critical/high alerts with checkboxes. Alert #63 sat unowned for five
months; this gives alerts an owner and leaves an audit trail.

**One issue per week, however often it runs (review fix).** The logic is
in `scripts/codeql_triage.sh`:
- It keys the issue on the ISO week, using a hidden marker in the body.
- It finds the existing issue by listing security-labelled issues,
closed ones included. It uses a listing, not search, so an issue created
seconds earlier is not missed.
- It reuses that issue and never edits, reopens or retitles it, so
ticked boxes and closure stand. Alerts opened since then are added once,
as a comment.
- The jq programs live in quoted heredocs, which clears ShellCheck
SC2016 without any shell expansion.
- `tests/test_codeql_triage_script.py` runs the real script against a
fake `gh`. It covers same-day re-runs, a Friday dispatch on a closed
issue with ticked boxes, the next week, and the ISO year boundary
(2027-01-01 is in 2026-W53).

### Test output

```text
$ pytest -q tests/test_codeql_triage_script.py
6 passed
$ node deploy/beacon/test-rollup.mjs
rate limit: 429 over, fail-open on outage and when unbound
ok
$ shellcheck scripts/codeql_triage.sh && actionlint .github/workflows/codeql-triage.yml
(clean)
```

## ⚠️ Before deploying production
The live `headroom-beacon` Worker predates #3253 (gzip inflate, schema
v2 allowlist). `wrangler deploy` from main will ship that too, not just
this change.

🤖 Generated with [Claude Code](https://claude.com/claude-code)
<!-- devin-review-badge-begin -->

---

<a href="https://app.devin.ai/review/headroomlabs-ai/headroom/pull/4008"
target="_blank"><picture><source media="(prefers-color-scheme: dark)"
srcset="https://static.devin.ai/assets/gh-devin-review-dark.svg?v=4"><img
src="https://static.devin.ai/assets/gh-devin-review-light.svg?v=4"
alt="Devin Review"></picture></a>
<!-- devin-review-badge-end -->

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: JerrettDavis <mxjerrett@gmail.com>
2026-10-12 11:18:47 -07:00
Tejas ChopraandClaude Opus 5.5 a88e2d5145 fix(security): resolve 23 open CodeQL alerts (#4045)
## Description

CodeQL had 43 open alerts on `headroom` (19 high, 24 medium). We need 0
for SOC 2 (risk R-10: developers introduce vulnerabilities). This PR
fixes the 23 that are real problems in code we ship or run. The 16 in
`tests/` are handled by #4047. 11 were dismissed in GitHub with written
reasons: 7 stale alerts from the retired default-setup scan, and 4 false
positives (#21, #105, #109, #135).

**In plain words:**
1. **Error replies no longer include internal error text.** When a
request body couldn't be read, the proxy sent back Python's raw error
message. It now sends a fixed message that still says what kind of
problem it was.
2. **A benchmark no longer logs a possible API key.** `--model_args` is
shown as `<redacted>` in the log, but `lm_eval` still receives the real
value.
3. **A test no longer prints part of the Gemini API key.**
4. **Five workflows declare read-only permissions**, and CodeQL scans
GitHub Actions workflows again.
5. **The npm release scripts no longer pass arguments through Windows
`cmd.exe`**, which reinterprets `&` and `|` inside arguments, file paths
included.

Closes CodeQL alerts #20, #23, #24, #25, #26, #27, #28, #29, #31, #33,
#193 (stack-trace exposure), #177, #51, #145, #146, #147. The
workflow-permission fixes correspond to the dismissed #2, #7, #67, #85,
#86, #87, #125.

## Type of Change

- [x] Bug fix (non-breaking change that fixes an issue)
- [ ] New feature (non-breaking change that adds functionality)
- [ ] Breaking change (fix or feature that would cause existing
functionality to change)
- [ ] Documentation update
- [ ] Performance improvement
- [ ] Code refactoring (no functional changes)

## Changes Made

- `headroom/proxy/helpers.py`:
- New `invalid_request_body_message(exc)` returns a fixed string per
error type and logs the type:
    - `…: malformed JSON`
    - `…: not valid UTF-8 (possibly compressed?)`
    - `…: must be a JSON object`
    - `…: too large`
    - plain `Invalid request body` for anything else
- New `RequestBodyNotObject(ValueError)` replaces a bare `ValueError`,
so every existing `except ValueError` still catches it.
- `headroom/proxy/handlers/{anthropic,openai,gemini,batch}.py`:
  - All 10 `f"Invalid request body: {e!s}"` replies now use the helper.
- The Google batch forwarder's 500 reply drops the exception text; it
was already logged on the line above.
- `headroom/evals/comprehensive_benchmark.py`: `--model_args` is
appended after the command is logged, and the log line shows it as
`<redacted>`.
- `tests/test_google_multimodal_e2e.py`: stops printing the first 10
characters of the API key.
-
`.github/workflows/{devcontainers,eval,init-e2e,init-native-e2e,wrap-e2e}.yml`:
top-level `permissions: contents: read`. None of these jobs write to the
repo; caching and artifact upload don't use the repo token.
- `.github/workflows/security.yml`: CodeQL matrix adds `actions`.
- `scripts/{build,verify}_npm_release_assets.mjs`:
- On Windows, npm runs as `node <npm-cli.js> …` instead of `cmd.exe /c
npm.cmd …`.
- `npm-cli.js` is found via `npm_execpath`, then next to node, then
beside each `npm.cmd` on PATH. This handles node and npm in different
directories, per Devin's review.
  - If none is found, it fails listing every path searched.
- New tests:
  - `tests/test_invalid_request_body_message.py`
- `tests/test_evals/test_comprehensive_benchmark_log_redaction.py`, per
Devanshi's review.

## Testing

- [x] Unit tests pass (`pytest`)
- [x] Linting passes (`ruff check .`)
- [x] Type checking passes (`mypy headroom`): one error remains, the
same one `main` has, in an untouched file. See notes.
- [x] New tests added for new functionality
- [x] Manual testing performed

### Test Output

```text
$ pytest -q tests/test_release_workflows.py tests/test_invalid_request_body_message.py \
    tests/test_evals/test_comprehensive_benchmark_log_redaction.py
============================== 62 passed in 3.10s ==============================

# The redaction test against the pre-fix comprehensive_benchmark.py (origin/main):
========================= 1 failed, 1 passed in 0.50s ==========================
# With the fix:
============================== 2 passed in 0.57s ===============================

$ pytest -q (proxy/handler/batch/eval/request-body files, run one file at a time)
187 files: 182 OK; the 5 below fail or hang identically on unchanged origin/main:
  tests/test_proxy_uds.py                          11 failed  (macOS 104-byte sun_path limit)
  tests/test_anthropic_buffered_ccr_usage.py        6 failed
  tests/test_proxy_copilot_auth_hooks.py            2 failed
  tests/gateway/test_parity_proxy_vs_gateway.py     2 failed
  tests/test_cli_proxy_improvements.py             hangs >300s

$ ruff check . -q                      -> clean
$ ruff format --check headroom tests   -> clean
$ mypy headroom
headroom/integrations/langchain/chat_model.py:394: error: Function "RunnableBinding" could always be true in boolean context  [truthy-function]
Found 1 error in 1 file (checked 566 source files)   # identical on origin/main

$ node --check scripts/build_npm_release_assets.mjs && node --check scripts/verify_npm_release_assets.mjs  -> ok
```

CI: the `test (3)` failures (`tests/test_onnx_dependency_contract.py`, 5
tests) and `test (4)` failures (`tests/test_xai_cache_economics.py`, 5
tests) also fail on `main`'s latest CI run (run 37806990929), so they're
unrelated to this PR.

## Real Behavior Proof

- Environment: macOS 26 (arm64), Python 3.12.13, Node 24, npm 11.19.0.
Worktree of `origin/main` at 87e05b68 plus this branch.
- Exact command / steps: the three checks below.
1. **Error replies:** `invalid_request_body_message` was exercised with
each exception type, including a `JSONDecodeError` whose document is
`"secret-doc"`. Each case asserts the reply names the category and
contains neither the exception text nor the document.
2. **Benchmark:**
`run_lm_eval(model_args="model=gpt-4o-mini,api_key=sk-test-FAKE-…")` was
called with the subprocess call mocked. The log shows `--model_args
<redacted>` and not the fake key, while the mocked call received
`model=gpt-4o-mini,api_key=sk-test-FAKE-…,base_url=http://localhost:8787/v1`.
3. **Windows npm lookup:** `findNpmCli()` was extracted from each script
and run against a temporary layout reproducing Devin's case: node shim
in `dev/bin`, `npm.cmd` plus `node_modules/npm/bin/npm-cli.js` in
`Program Files/nodejs`, both on PATH.
- Observed result: all three Windows npm lookup cases pass in both
scripts (output below); checks 1 and 2 pass as shown in Test Output.
  ```text
  == scripts/build_npm_release_assets.mjs
  separate node/npm dirs -> found npm-cli.js beside npm.cmd on PATH
  npm_execpath set       -> uses npm_execpath
  missing npm            -> clear error: true
  == scripts/verify_npm_release_assets.mjs
  separate node/npm dirs -> found npm-cli.js beside npm.cmd on PATH
  npm_execpath set       -> uses npm_execpath
  missing npm            -> clear error: true
  ```
- Not tested: the two items below.
- A real Windows run of the release scripts. No Windows machine was
available, and CI runs these scripts on Ubuntu, where the code path is
unchanged (`npm` spawned directly, no shell).
- The new CodeQL `actions` scan. It runs on this PR's CI and on `main`
after merge.

### Maintainer verification at `128f271f` (2026-10-08)

- Environment: actual Windows 11, Python 3.12.13, Node 22.22.0, npm
10.9.4. Contributor logic unchanged; this head contains current `main`.
- Commands: the focused `test_invalid_request_body_message.py`,
`test_comprehensive_benchmark_log_redaction.py`, and
`test_release_workflows.py` suites; the existing Windows npm lookup
probe against both checked-in scripts; and a two-process-boundary
loopback uvicorn/httpx malformed-body probe against this head.
- Observed: **62 focused tests passed**. Both npm scripts invoked the
real npm CLI under Node with `shell:false`, including Node copied into a
separate `G:/tmp/headroom-review/resume49-node shim & literal` directory
while npm remained under `C:/Program Files/nodejs`; `npm_execpath` was
unset, so PATH lookup found the separate npm installation. npm reported
10.9.4 and a cache argument containing spaces and `&` was preserved
literally. **36 actual TCP requests** (four malformed-body categories
across nine endpoints) returned the expected fixed 400 messages, with no
private marker disclosed and no upstream requests. Only outbound
provider requests were replaced with a fail-if-called boundary; HTTP
parsing and proxy handlers were real.
- Hosted qualification at this exact head: **67 passed, 11 skipped**,
including all three CodeQL languages. Evidence is retained in the
maintainer review artifacts. The earlier simulated Windows-layout proof
remains below as historical author evidence.

## Runtime Rollout Safety

- Rollout-managed feature(s): none.
- Minimum rollout channel: n/a.
- Stable/default behavior changed: yes, the text of 400 replies for
unreadable request bodies. It was `Invalid request body: <python
exception text>` and is now a fixed category message. Status codes,
error `type`/`code` fields and response shape are unchanged. Clients
that parse the free-text message, rather than the status and type, would
see different text.
- Kill switch / disable path: none needed; this is message text only.
- Unsafe override required: no.
- Qualification impact: none.
- Rollback path: revert this PR.

## Review Readiness

- [x] I have performed a self-review
- [x] This PR is ready for human review

## Checklist

- [x] My code follows the project's style guidelines
- [x] I have performed a self-review of my code
- [x] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation (none
needed)
- [x] My changes generate no new warnings
- [x] I have added tests that prove my fix is effective or that my
feature works
- [x] New and existing unit tests pass locally with my changes
- [x] I did **not** edit `CHANGELOG.md`

## Additional Notes

- Review feedback addressed in 921de19b: 
- Devin: Windows npm lookup when node and npm are in different
directories.
  - Devanshi: benchmark redaction test.
- **#21 (`security_block` reply in `anthropic.py`) is left as is.** It
returns the security plugin's deliberate, user-facing reason for
blocking a request. It was dismissed as a false positive with that
reason.
- The `mypy` error is pre-existing: the same `truthy-function` error
appears on `origin/main`, in a file this PR doesn't touch.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 22:40:04 -05:00
Tejas ChopraandClaude Opus 5.5 c7a223dac0 ci(codeql): exclude tests/ from CodeQL scanning (#4047)
## Description

**In plain words:** 17 of our open CodeQL alerts are in `tests/`. 16 are
normal test code that CodeQL misreads, and **1 was a real problem, fixed
in this PR before the exclusion takes effect**:
- **15** are tests checking that a URL appears in some output, e.g.
`assert "https://…" in output`. CodeQL reads that as a weak URL security
check.
- **1** is a fake test server listening on all network interfaces
(`tests/gateway/fake_provider.py`).
- **1 is real:** `tests/test_google_multimodal_e2e.py` printed the first
10 characters of the runner's real `GOOGLE_API_KEY` (alert 51). This PR
removes that print (`dc01e95c`). It is the same one-line change as in
#4045, so the two merge cleanly in either order.

Once that print is gone, what remains under `tests/` is noise that
buries real findings: test code never ships to users. Excluding `tests/`
is standard practice, and production code (`headroom/`, `scripts/`,
plugins, workflows) is still scanned.

Part of getting CodeQL to 0 open alerts for SOC 2 (risk R-10). Companion
to #4045.

## Type of Change

- [ ] Bug fix (non-breaking change that fixes an issue)
- [ ] New feature (non-breaking change that adds functionality)
- [ ] Breaking change (fix or feature that would cause existing
functionality to change)
- [ ] Documentation update
- [ ] Performance improvement
- [x] Code refactoring (no functional changes): CI configuration only

## Changes Made

- `.github/workflows/security.yml`: the CodeQL `init` step gets
  ```yaml
  config: |
    paths-ignore:
      - tests
  ```
plus a comment explaining why. Nothing else changes: same languages,
same `security-extended` query suite, same triggers.
- `tests/test_google_multimodal_e2e.py`: `print(f"Using API key:
{api_key[:10]}...")` becomes `print("Using API key from environment")`.

## Testing

- [ ] Unit tests pass (`pytest`): not applicable; the only Python change
is one `print` in a manual e2e script, checked with `py_compile`
- [x] Linting passes (`ruff check .`)
- [ ] Type checking passes (`mypy headroom`): not applicable
- [ ] New tests added for new functionality
- [x] Manual testing performed

### Test Output

```text
$ python -c "import yaml; d=yaml.safe_load(open('.github/workflows/security.yml')); \
    print([s['with'] for s in d['jobs']['codeql']['steps'] if s.get('name')=='Initialize CodeQL'])"
[{'languages': '${{ matrix.language }}', 'queries': 'security-extended', 'config': 'paths-ignore:\n  - tests\n'}]

# Open CodeQL alerts on main before this PR, by location:
$ gh api 'repos/headroomlabs-ai/headroom/code-scanning/alerts?ref=refs/heads/main&state=open' ...
     15 code
     17 tests/
```

CI on this PR: `test (3)` (`tests/test_onnx_dependency_contract.py`) and
`test (4)` (`tests/test_xai_cache_economics.py`) fail identically on
`main`'s latest CI run (run 37806990929). This PR changes no Python.

## Real Behavior Proof

- Environment: GitHub Actions CodeQL (`github/codeql-action@v4`),
`security.yml` on `main`.
- Exact command / steps: the YAML parses, and the `config` block reaches
the CodeQL `init` step as shown above. The CodeQL scans on this PR
completed successfully for `python` and `javascript-typescript`.
- Observed result: before merge, `main` has 17 open alerts under
`tests/`.
- Not tested: the closure of those 17 alerts can only be observed after
merge. On pull requests, CodeQL reports only alerts on changed lines, so
this PR's own scan can't show it. After merge, the push-triggered scan
of `main` should close all 17. I'll confirm the count on `main` and post
it here.

## Runtime Rollout Safety

- Rollout-managed feature(s): none.
- Minimum rollout channel: n/a.
- Stable/default behavior changed: no product behavior changes. CodeQL
stops analysing files under `tests/`.
- Kill switch / disable path: remove the `config` block.
- Unsafe override required: no.
- Qualification impact: none.
- Rollback path: revert this PR. The next scan of `main` will re-report
test-code alerts.

## Review Readiness

- [x] I have performed a self-review
- [x] This PR is ready for human review

## Checklist

- [x] My code follows the project's style guidelines
- [x] I have performed a self-review of my code
- [x] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation (none
needed)
- [x] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my
feature works (CI config only; verified after merge as described above)
- [x] New and existing unit tests pass locally with my changes
- [x] I did **not** edit `CHANGELOG.md`

## Additional Notes

- Trade-off: a real vulnerability inside test code would no longer be
flagged. Test code doesn't ship, and the alternative was dismissing 17
alerts one by one as "used in tests" and repeating that for every new
one.
- **Devin's review asked for runtime proof.** See "Not tested" above:
the proof is the post-merge scan of `main`, which I'll post as a
comment.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 22:38:47 -05:00
1fb4cbaea0 fix(proxy): astgrep disk verify truncation (#3192)
## Description

`_detect_truncation()` currently relies on client-specific truncation
banners in `tool_result` text. This works for clients that emit a
recognizable line-count banner, but not for clients such as Cursor
(byte-based, direction-reversed truncation) and OpenCode (placeholder +
external file pointer).

Because `headroom proxy` runs alongside the client it wraps, it can
optionally verify the returned content against the actual file on disk.
If the `tool_result` is a strict prefix of the file, we can identify
truncation without depending on client-specific output formatting.

This adds disk verification as an opt-in fallback: the existing
banner-based detection always runs first, and disk verification is only
attempted when no banner is found. All disk-verification failures or
ambiguous cases return `UNKNOWN` rather than guessing.

Following review, the verifier is also constrained to a trusted,
confined workspace root rather than trusting caller-supplied input
directly — see the last four bullets under Changes Made.

**Current scope:** the session-token workspace binding this fallback
requires is wired for `headroom wrap claude` and plugin-loaded `headroom
wrap opencode` only. Cursor remains unsupported/not tested — it has no
header-injection surface today to transmit an authoritative session
token, so disk verification stays `UNKNOWN` for it; extending Cursor
support needs a separate, safe transport design.

Related to #2430
Closes #2421

## Type of Change

- [x] Bug fix (non-breaking change that fixes an issue)
- [x] New feature (non-breaking change that adds functionality)
- [ ] Breaking change (fix or feature that would cause existing
functionality to change)
- [ ] Documentation update
- [ ] Performance improvement
- [ ] Code refactoring (no functional changes)

## Changes Made
- Added optional disk-based Read truncation verification behind
`HEADROOM_VERIFY_TRUNCATION_ON_DISK`.
- Disk verification compares the visible `tool_result` against the file
on disk and distinguishes `COMPLETE`, `TRUNCATED`, and `UNKNOWN`.
- Disk verification only runs when the existing `_detect_truncation()`
banner check finds no truncation marker, avoiding unnecessary file I/O
when the client already provides a signal.
- Added a `current_cwd` contextvar populated from `x-headroom-cwd` so
relative Read paths can be resolved against the client's working
directory.
- Registered `HEADROOM_VERIFY_TRUNCATION_ON_DISK` as a hot-reloadable
runtime setting.
- Gated verification on a new `is_current_request_trusted` contextvar,
set from `is_loopback_host(request.client.host)` — a server-observed
fact, not the caller-supplied header — so `x-headroom-cwd` is never
sufficient authority on its own.
- Confined all path resolution strictly under the canonicalized `cwd`
(`.resolve()` + `relative_to()`), rejecting `..` traversal,
absolute-path escapes, and post-resolution symlink escapes.
- Required the resolved target to be a regular file and under a byte cap
(new `HEADROOM_VERIFY_TRUNCATION_MAX_BYTES` knob, default 5MB), both
checked via `fstat` on the open fd before any read.
- Opened with `O_NONBLOCK` so a non-regular/special file can't park the
read indefinitely; disk I/O already runs off the event loop via the
existing compression thread pool.
- Added unit and integration tests covering successful verification,
missing/unreadable paths, relative paths, content races, feature gating,
banner precedence, and the adversarial cases below.

## Testing

- [x] Unit tests pass (`pytest`)
- [x] Linting passes (`ruff check .`)
- [x] Type checking passes (`mypy headroom`)
- [x] New tests added for new functionality
- [x] Manual testing performed

### Test Output

```text
$ pytest tests/test_tool_result_interceptors.py -v
51 passed in 2.21s
(includes TestVerifyReadAgainstDisk::* [14 cases, incl. absolute-path escape, `..`
traversal, symlink escape, sibling-prefix boundary, non-regular file, oversized
file, and untrusted-request-touches-no-disk], plus the end-to-end disk-verification
and banner-precedence cases)

$ pytest tests/test_proxy_loopback_gating.py -k trusted
16 passed
(includes test_record_headroom_stack_binds_trusted_true_for_loopback_client and
..._false_for_non_loopback_client — proves a spoofed x-headroom-cwd from a
non-loopback peer does not bind trust)

$ ruff check headroom/proxy/interceptors/astgrep.py headroom/proxy/project_context.py \
    headroom/proxy/server.py headroom/proxy/runtime_env.py \
    tests/test_tool_result_interceptors.py tests/test_proxy_loopback_gating.py
All checks passed!

$ mypy headroom/proxy/interceptors/astgrep.py headroom/proxy/project_context.py \
    headroom/proxy/server.py headroom/proxy/runtime_env.py
Success: no issues found in 4 source files
```

## Real Behavior Proof

- Environment: Mac OS local dev machine, no live proxy/network involved.
Exercised the real interceptor pipeline (`apply_to_messages`) directly
against an actual file on disk, using the same fixture and cwd-binding
path a live proxy request would use.
- Exact command / steps: wrote a 9-function Python fixture to a temp
file, built a client-truncated `tool_result` (first 8 functions, cut
mid-file, **no truncation banner text anywhere**), bound
`x-headroom-cwd` to the temp directory via `set_current_cwd()`, then
called `apply_to_messages()` once with
`HEADROOM_VERIFY_TRUNCATION_ON_DISK` unset and once with it set to `1`.
- Observed result: With disk verification disabled, the existing
ast-grep interceptor produced its normal header without indicating that
the input was truncated. With HEADROOM_VERIFY_TRUNCATION_ON_DISK=1, disk
verification detected that the 50-line tool_result was a strict prefix
of the 59-line file and produced:
 ```text
=== HEADROOM_VERIFY_TRUNCATION_ON_DISK unset (default) ===
[headroom: outlined by ast-grep — 8 definition(s); bodies elided.
Re-read the file with a line range to see a specific body.]

=== HEADROOM_VERIFY_TRUNCATION_ON_DISK=1, x-headroom-cwd bound to the
real directory ===
[headroom: outlined by ast-grep — 8 definition(s) in the visible
portion; input was truncated upstream (showing through line 50 of 59
total). Bodies elided. Re-read remaining lines to see more.]
```

**Trust-gate behavior:** same fixture and disk layout, `HEADROOM_VERIFY_TRUNCATION_ON_DISK=1`, but the request context's trust flag left at its default (`False`, simulating a non-loopback caller) instead of being marked trusted.

```text
=== trusted context (loopback) ===
[headroom: outlined by ast-grep — 8 definition(s) in the visible
portion; input was truncated upstream ...]

=== untrusted context (non-loopback) — same file, same cwd header, same
tool_result ===
[headroom: outlined by ast-grep — 8 definition(s); bodies elided.
Re-read the file with a line range to see a specific body.]
(no disk read attempted — verified via a call-recording wrapper around
os.open asserting zero invocations)
```
Also verified at the HTTP-middleware level with `TestClient(..., client=("100.90.0.5", 12345))`: a request carrying a spoofed `x-headroom-cwd` header from a non-loopback client IP does not bind trust, regardless of header content.

- Not tested: a live `headroom proxy` session with a real coding-agent client; the WebSocket/Codex responses-WS path.

## Runtime Rollout Safety

- Rollout-managed feature(s): None. The feature is gated by `HEADROOM_VERIFY_TRUNCATION_ON_DISK`
- Minimum rollout channel: N/A. `--intercept-tool-results` must already be enabled for the ast-grep interceptor to run.
- Stable/default behavior changed: no
- Kill switch / disable path: Unset `HEADROOM_VERIFY_TRUNCATION_ON_DISK`; the setting is hot-reloadable and does not require a restart.
- Unsafe override required: no
- Qualification impact: none
- Rollback path: revert the commit, or unset the env var on a running proxy (takes effect immediately, no restart).

## Review Readiness

- [x] I have performed a self-review
- [x] This PR is ready for human review

## Checklist

- [x] My code follows the project's style guidelines
- [x] I have performed a self-review of my code
- [x] I have commented my code, particularly in hard-to-understand areas
- [x] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [x] I have added tests that prove my fix is effective or that my feature works
- [x] New and existing unit tests pass locally with my changes
- [x] I did **not** edit `CHANGELOG.md` — it is generated by release-please from my Conventional Commit PR title (a CI guard enforces this)

## Additional Notes

this branch is based on `fix/astgrep-truncation-marker` #2430 not main


<!-- devin-review-badge-begin -->

---

<a href="https://app.devin.ai/review/headroomlabs-ai/headroom/pull/3192" target="_blank"><picture><source media="(prefers-color-scheme: dark)" srcset="https://static.devin.ai/assets/gh-devin-review-dark.svg?v=4"><img src="https://static.devin.ai/assets/gh-devin-review-light.svg?v=4" alt="Devin Review"></picture></a>
<!-- devin-review-badge-end -->

---------

Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
Co-authored-by: JerrettDavis <mxjerrett@gmail.com>
2026-10-08 10:52:09 -05:00
877f9ced23 ci(security): run cargo audit on every PR, re-enable PyPI attestations (#3858)
## Why

- **`cargo audit` did not run for three weeks.** The job lived in
`rust.yml` behind the `rust-changes` path filter, so pushes that touched
no Rust path reported it as skipped. `rust.yml`'s own weekday schedule
stopped firing after 2026-09-08. From then until 2026-09-29 no Rust
advisory scan ran.
- **PyPI attestations are off.** `release.yml` had `attestations:
false`, so nothing on PyPI carries PEP 740 provenance.

## What changes

- `security.yml` gets a `cargo-audit` job ("Rust advisories (cargo
audit)"). It runs on every PR, every push to `main`, the existing weekly
schedule and on demand, whatever paths changed.
- It is blocking. Accepted advisories stay in `.cargo/audit.toml` with a
written reason; the existing exception is kept.
- `cargo deny check licenses` moves with it and stays
`continue-on-error`.
  - No toolchain build: `cargo audit` reads only `Cargo.lock`.
- `rust.yml` drops its `audit` job and leaves a pointer comment. Nothing
`needs:` that job and it is not a required check.
- `.cargo/audit.toml`: the header comment points at the new job.
- `release.yml`: `attestations: true`. The publish job already uses
trusted publishing with `id-token: write`, which is all attestations
need. They were turned off in #2405 with no recorded root cause. If a
release fails on them, revert this one line.

## Behaviour change

- CI: the Rust advisory scan now gates every PR, including PRs that
touch no Rust. A newly disclosed advisory in a Rust dependency turns
unrelated PRs red until it is fixed or accepted in `.cargo/audit.toml`.
That is intended.
- Releases: wheels and sdists on PyPI carry PEP 740 attestations again.

## Tests

- `actionlint` passes on the three edited workflows.
- The new job runs on this PR and passes on the current `Cargo.lock`.
- Not tested: a real PyPI publish with attestations on. That only
happens on a release from `main`, so watch the first release after
merge.

## Not in this PR

- `SECURITY.md` changes are in #3727.
- Pinning every action to a digest is a separate, larger change.
- `security.yml` itself has not run on `main` since 2026-09-07, the same
"scheduled or push workflow not firing" pattern as `rust.yml`. That
needs a separate look; this PR makes the scan run on every PR
regardless.

Revised 2026-10-01 after self-review: attestations are now a plain
`attestations: true` instead of a repository-variable switch.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

<!-- devin-review-badge-begin -->

---

<a href="https://app.devin.ai/review/headroomlabs-ai/headroom/pull/3858"
target="_blank"><picture><source media="(prefers-color-scheme: dark)"
srcset="https://static.devin.ai/assets/gh-devin-review-dark.svg?v=4"><img
src="https://static.devin.ai/assets/gh-devin-review-light.svg?v=4"
alt="Devin Review"></picture></a>
<!-- devin-review-badge-end -->

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: JerrettDavis <mxjerrett@gmail.com>
2026-10-07 21:00:11 -05:00
Shubham SrivastavaandJD Davis d8294a4ed1 ci(sdk): run the TypeScript SDK test suite, typecheck and build on SDK changes (#3950)
## Description

Nothing in CI runs `sdk/typescript`'s vitest suite, typecheck or build
(`opencode-plugin.yml` covers `plugins/opencode`; `security.yml` only
runs `npm audit`). Two consequences in one week:

- #3424 and #3370 were each green and merged seven minutes apart;
together they left `npm test` red on `main` (repaired in #3796).
- Dependabot's #3910 bumped `ai` to 7.0.119 and broke three Vercel
adapter tests; the PR merged green and nobody saw it until the next
local run (repaired in #3949).

This adds a standalone, path-gated workflow,
`.github/workflows/sdk-typescript.yml`, that runs `npm ci`, `npm test`,
`npm run typecheck` and `npm run build` in `sdk/typescript` whenever the
SDK or the workflow changes. It mirrors `opencode-plugin.yml` as it is
on current `main` (`1cf49661`, lines 36–39: `actions/checkout@v7`,
`actions/setup-node@v7`, `node-version: ">=24.16.0 <25"`;
`actions/setup-node` was bumped to v7 repo-wide in #3302), with the same
triggers, `permissions: contents: read` and `timeout-minutes: 15`, so
there is one pattern for the repo's Node packages. Every workflow on
`main` pins `checkout@v7`; the only Node 20 pin is `devcontainers.yml`.
A separate file rather than a job in `ci.yml` keeps it out of the six
open PRs that touch `ci.yml`.

**Stacked on #3949:** that PR's two commits (`cc9f1a9c`, `08ee363e` —
the type-checked fixtures requested in its review) are included here so
the new job is green on this PR (on `main` as-is it would fail on
exactly the three tests #3949 repairs — which is the point). Once #3949
merges, this PR's diff is the workflow file alone.

## Type of Change

- [ ] Bug fix (non-breaking change that fixes an issue)
- [x] New feature (non-breaking change that adds functionality) — CI
gate only
- [ ] Breaking change (fix or feature that would cause existing
functionality to change)
- [ ] Documentation update
- [ ] Performance improvement
- [ ] Code refactoring (no functional changes)

## Changes Made

- **`.github/workflows/sdk-typescript.yml`** (new, 46 lines) —
`pull_request` and `push` to `main`, gated on `sdk/typescript/**` and
the workflow itself; one job `test + typecheck + build` on
`ubuntu-latest` with `defaults.run.working-directory: sdk/typescript`;
steps: checkout, setup-node (`>=24.16.0 <25`, npm cache keyed on
`sdk/typescript/package-lock.json`), `npm ci`, `npm test`, `npm run
typecheck`, `npm run build`. A header comment records why the gate
exists.
- No change to `ci.yml`, to the SDK, or to any other workflow.

## Testing

- [x] Unit tests pass (`npm test` — the same command the job runs)
- [x] Type checking passes (`npm run typecheck`)
- [x] Build passes (`npm run build`)
- [ ] New tests added for new functionality (CI configuration)
- [x] Manual testing performed

### Test Output

```text
# The job's own run on this PR is the hosted proof — check "SDK (TypeScript) / test + typecheck + build"
# in this PR's checks: https://github.com/headroomlabs-ai/headroom/actions/runs/37201607741 (success).

# Local equivalent of the four steps, on this branch:
$ cd sdk/typescript && npm ci && npm test
 Test Files  19 passed | 5 skipped (24)
      Tests  350 passed | 33 skipped (383)
Type Errors  no errors
$ npm run typecheck   # tsc --noEmit
(clean, no errors)
$ npm run build       # tsup
CJS / ESM / DTS Build success

# YAML parses; the action pins are identical to opencode-plugin.yml.
```

## Real Behavior Proof

- Environment: GitHub-hosted `ubuntu-latest` via this PR's own run of
the new workflow; locally macOS, Node v22.16.0 for the equivalent
commands.
- Exact command / steps: open this PR (the workflow file in a PR is used
for that PR's `pull_request` run) and read the `SDK (TypeScript) / test
+ typecheck + build` check; locally `cd sdk/typescript && npm ci && npm
test && npm run typecheck && npm run build`.
- Observed result: the job ran on this PR (re-run on the rebased head
`bd35e804`) and finished **success** —
https://github.com/headroomlabs-ai/headroom/actions/runs/37201607741
(steps `npm ci`, `npm test`, `npm run typecheck`, `npm run build` all
green). Locally all four steps pass (350 passed | 33 skipped). On `main`
without #3949 the same `npm test` fails 3 tests, which this job would
have flagged on #3910.
- Not tested: the `push` to `main` trigger (it fires after merge; same
job, same paths).

## Runtime Rollout Safety

- Rollout-managed feature(s): None. CI configuration only; no runtime,
SDK or proxy code changes.
- Minimum rollout channel: N/A.
- Stable/default behavior changed: No runtime behavior. A new
required-only-if-you-make-it-required check appears on SDK PRs.
- Kill switch / disable path: Disable or delete the workflow file;
nothing else depends on it.
- Unsafe override required: No.
- Qualification impact: SDK changes gain a hosted test/typecheck/build
gate; non-SDK PRs are untouched (path filter).
- Rollback path: Revert this PR.

## Review Readiness

- [x] I have performed a self-review
- [x] This PR is ready for human review

## Checklist

- [x] My code follows the project's style guidelines
- [x] I have performed a self-review of my code
- [x] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my
feature works (CI configuration; its own run is the proof)
- [x] New and existing unit tests pass locally with my changes
- [x] I did **not** edit `CHANGELOG.md` — it is generated by
release-please from my Conventional Commit PR title (a CI guard enforces
this)

## Screenshots (if applicable)

N/A

## Additional Notes

- `node-version: ">=24.16.0 <25"` matches `opencode-plugin.yml`; the
SDK's `engines` is `>=18`, so a matrix could be added later if older
Node coverage is wanted (YAGNI for now).
- No `concurrency` block, matching the sibling workflow; add one if
superseded SDK runs become noisy.
- CHANGELOG left untouched — the `no-manual-changelog` CI guard owns it.

---------

Co-authored-by: JD Davis <mxjerrett@gmail.com>
2026-10-07 20:54:18 -05:00
1d4b357ca7 feat(opencode): support the OpenCode 2.x plugin API (#3999)
## Description

Takeover of #3719 by @laurence-diack-pk, who has been unavailable since
Sep 23 and whose branch was left conflicted with `main`. The original
commit is preserved and @laurence-diack-pk remains its author; this
branch adds follow-up commits addressing @JerrettDavis's review and the
findings from live OpenCode 2.x testing.

It makes the OpenCode plugin and `headroom wrap opencode` work on both
OpenCode 1.x and 2.x. On 2.x the 1.x function plugin was silently
dropped (the loader requires a `{ id, setup }` default export loaded
from a directory), and Effect's `FetchHttpClient` keeps its own `fetch`
reference from before plugins load — so `wrap opencode` loaded no plugin
and routed nothing.

Closes #3669. Supersedes #3719.

## Type of Change

- [x] Bug fix (non-breaking change that fixes an issue)
- [x] New feature (non-breaking change that adds functionality)

## Changes Made

Carried from #3719:
- One plugin for both versions: default export `{ id: "headroom",
server, setup }`; 1.x calls `server`, 2.x calls `setup`.
- 2.x `setup`: registers `headroom_retrieve` via `ctx.tool.transform`
(`codemode: false`), sets `HEADROOM_*` shell env through the
`create.before` hook, and returns a cleanup that releases the refcounted
transport so hot reloads do not stack interceptors.
- 2.x model routing: `ctx.model.transform` points remote OpenAI-wire
models at the proxy with `x-headroom-base-url` /
`x-headroom-original-path` headers, since 2.x keeps its own `fetch`
reference and the transport patch alone misses model traffic.
- Wheel ships the bundle as `_dist/index.js`;
`headroom_opencode_plugin_path()` returns the directory; `wrap opencode`
adds `--standalone` on 2.x so the private server sees
`OPENCODE_CONFIG_CONTENT`.

Follow-up commits (review from #3719 + live testing):
- Rebased on current `main` (0.40.0). Fixed the routing-contract
conflict: replaced `routesThroughProxy` (TS2554 against `shouldRoute`'s
3-arg signature) with `modelBaseRoutesThroughProxy`, a deliberate
model-base eligibility check that keeps the shared protocol / loopback /
proxy-origin / excluded-host contract but drops the endpoint-suffix
requirement, since 2.x hands us model base URLs (e.g. `/v1`), not
inference endpoints.
- `setup` now resolves the effective `excludeHosts` once (option over
`HEADROOM_OPENCODE_EXCLUDE_HOSTS`) and applies it to both the transport
install and the model rewrite, with new tests for both paths.
- Fixed `test_build_launch_env_with_project` to decode
`OPENCODE_CONFIG_CONTENT` instead of substring-matching the raw path,
which JSON backslash escaping makes impossible on Windows.
- `opencode_major_version` now reads the `v2` channel marker in dev
builds (`opencode v0.0.0-v2-<stamp>`), which previously parsed as major
0, so `wrap` skips `--standalone` and the private server never loads
Headroom's config.
- Rebuilt `_dist/index.js` and `hook-shim/handler.js`; drift check
clean.

## Testing

- [x] Unit tests pass (`pytest`)
- [x] Linting passes (`ruff check .` — run on the changed paths)
- [x] Type checking passes (`mypy headroom` — run on the changed paths)
- [x] New tests added for new functionality
- [x] Manual testing performed

### Test Output

```text
# plugins/opencode
$ npm ci && npm run typecheck && npm run build:standalone && npm test
tsc: clean (no TS2554)
vitest: Test Files 3 passed (3) | Tests 45 passed (45)
$ cmp dist-standalone/index.js ../../headroom/providers/opencode/_dist/index.js          # identical
$ cmp dist-standalone/hook-shim/handler.js ../../headroom/providers/opencode/hook-shim/handler.js  # identical

# focused Python suites (same set as #3719, plus the 2.x dev-build version case)
$ pytest tests/test_providers_opencode_plugin_path.py tests/test_providers_opencode_config.py \
    tests/test_providers_opencode_install.py tests/test_cli/test_wrap_opencode.py \
    tests/test_mcp_registry_opencode.py tests/test_learn/test_opencode_scanner.py -q
193 passed in 1.10s

$ ruff check / ruff format --check on changed paths: clean
$ mypy headroom/providers/opencode headroom/cli/wrap.py: Success: no issues found
```

## Real Behavior Proof

- Environment: macOS arm64, Node v26.10.0, Python 3.13, headroom from
this branch (0.41.0-dev). Tested against two real OpenCode 2.x clients,
each in throwaway XDG dirs with its own proxy port:
  - `opencode 2.0.19` (official 2.x binary);
- OpenCode 2.x head built from `anomalyco/opencode@v2`
(`0.0.0-v2-202610061051`, Bun 1.4.2, `bun run script/build.ts --single`
in `packages/cli`).
- Exact command / steps: throwaway XDG dirs and a dedicated proxy port;
fake key first (routing proof), then the real key (end-to-end proof):
  ```bash
  # fake key first (routing proof), then the real key (end-to-end proof)
OPENCODE_API_KEY=<key> headroom wrap opencode --port 8799 --no-serena --
\
run -m opencode-go/deepseek-v4.1-flash "reply with the single word ok"
  # exclusion check
HEADROOM_OPENCODE_EXCLUDE_HOSTS=opencode.ai OPENCODE_API_KEY=<key>
headroom wrap opencode ...
  ```
(`opencode-go` declares `OPENCODE_API_KEY` as its env credential in the
catalog, so no interactive login is needed.)
- Observed result: routed 401 with the fake key and 200 with the real
key through the proxy, `--standalone` added automatically, exclusion
honored — details:
- **Fake key** — proxy log: `proxy_inbound_request POST
/v1/chat/completions` with `user-agent: opencode/latest/2.0.19/cli` (and
`opencode/v2/0.0.0-v2-202610061051/cli` for the head), headers
`x-headroom-base-url: https://opencode.ai` and
`x-headroom-original-path: /zen/go/v1/chat/completions`; forwarded
upstream, `401` from the fake key — routed through Headroom.
- **Real key** — the model answered `ok`; proxy `status=200` with
upstream `https://opencode.ai/inference/go/openai/v1/chat/completions`.
- `wrap` added `--standalone` automatically on 2.0.19, and again on the
v2 head after the dev-build version fix (explicit `--standalone` also
works, per the kill-switch path).
- **Exclusion** — with `HEADROOM_OPENCODE_EXCLUDE_HOSTS=opencode.ai` the
model still answered while the proxy saw **zero** new chat requests: the
2.x model transform honors the exclusion list.
- Not tested: Windows; OpenAI "responses"-wire against a live 2.x
server; Anthropic-wire custom providers on 2.x; loading the plugin by
npm name (`headroom-opencode`), which needs a published release;
OpenCode 1.x older than 1.2.20.

## Runtime Rollout Safety

- Rollout-managed feature(s): none
- Minimum rollout channel: n/a
- Stable/default behavior changed: on OpenCode 2.x, `wrap opencode`
launches with `--standalone` (a private server per session); on 1.x
behaviour is unchanged apart from the plugin path now being a directory.
- Kill switch / disable path: pass `--server <url>` or `--standalone`
explicitly; `HEADROOM_OPENCODE_PLUGIN_PATH` still overrides the plugin
location.
- Unsafe override required: no
- Qualification impact: none
- Rollback path: revert this PR; the wheel bundle and plugin path revert
with it.

## Review Readiness

- [x] I have performed a self-review
- [x] This PR is ready for human review

## Checklist

- [x] My code follows the project's style guidelines
- [x] I have performed a self-review of my code
- [x] I have commented my code, particularly in hard-to-understand areas
- [x] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [x] I have added tests that prove my fix is effective or that my
feature works
- [x] New and existing unit tests pass locally with my changes
- [x] I did **not** edit `CHANGELOG.md` — it is generated by
release-please from my Conventional Commit PR title (a CI guard enforces
this)

## Additional Notes

@laurence-diack-pk — thank you for the original implementation; the
commit is preserved verbatim at the base of this branch. @JerrettDavis —
this addresses the routing-contract conflict you described in #3719 (the
missing `excludeHosts` argument and the model-base vs endpoint
mismatch), the Windows assertion, and a dev-build version-detection gap
found while validating on macOS. Live 2.x validation is done on both
2.0.19 and today's `v2` head; details above.

---------

Co-authored-by: laurence <laurence.diack@peekrobotics.co.nz>
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-authored-by: JerrettDavis <mxjerrett@gmail.com>
2026-10-07 20:52:53 -05:00
1ad92f0cbc feat: show the Headroom for Teams offer in the dashboard, docs, llms.txt and release notes (#3991)
## Description

This PR puts the Headroom for Teams offer (3 months of Enterprise free
with a 12-month plan) in the places people go after the README (#3990):
the dashboard, the docs site, `llms.txt` and the release notes. Each
link carries its own `utm_source`/`utm_medium`, so we can see which
surface converts.

No linked issue.

## Type of Change

- [ ] Bug fix (non-breaking change that fixes an issue)
- [x] New feature (non-breaking change that adds functionality)
- [ ] Breaking change (fix or feature that would cause existing
functionality to change)
- [x] Documentation update
- [ ] Performance improvement
- [ ] Code refactoring (no functional changes)

## Changes Made

- **Dashboard:** a slim, dismissible banner under the header. It shows
the user's savings when they are $1 or more. It is a plain link, so
nothing is fetched or reported.
- The banner is removed server-side on any **licensed** proxy, using the
running proxy's effective licence: `ProxyConfig.license_key`,
`HEADROOM_LICENSE`, or the deprecated `HEADROOM_LICENSE_KEY`.
`create_app` resolves the licence once and passes it to
`get_dashboard_html(licensed=...)`. This is a review fix: before, only
`HEADROOM_LICENSE` was checked.
- This only hides a promotion. OSS still needs no licence and checks
none; licences belong to the Enterprise plugins.
- **Docs site:** a dismissible top banner, a sidebar link and a new
`/docs/teams` page.
- The page's Open source vs Enterprise table now states what OSS already
ships (tool search on Anthropic requests; opt-in, rule-based model
routing) and what Enterprise adds. This is a review fix.
- **`llms.txt`:** a Headroom for Teams section, with the same accuracy
fix.
- **Release notes:** a `release.yml` step appends one footer line under
the changelog. It is keyed on its own marker, `<!--
headroom-teams-footer -->`, rather than on the perks link, so a
changelog entry that mentions the link no longer suppresses the footer.
This is a review fix.
- **Telemetry opt-out:** `llms.txt` and `docs/content/docs/proxy.mdx`
named a `--offline` flag that does not exist. The switch is
`HEADROOM_OFFLINE=1`.

## Testing

- [x] Unit tests pass (`pytest`)
- [x] Linting passes (`ruff check .`)
- [x] Type checking passes (`mypy headroom`)
- [x] New tests added for new functionality
- [x] Manual testing performed

### Test Output

```text
$ pytest -q tests/test_dashboard_teams_perk.py tests/test_dashboard_static_assets.py
============================= 17 passed in 18.40s ==============================
# test_dashboard_teams_perk.py: renderer, with and without each licence env var and with an explicit flag;
# /dashboard route, unlicensed, with ProxyConfig.license_key, with HEADROOM_LICENSE, with HEADROOM_LICENSE_KEY

$ pytest -q tests -k "dashboard or release or license"
4 failed, 305 passed, 1 skipped
# the 4 failures are tests/test_dashboard/test_live_feed.py (Playwright browser tests). They fail identically
# on this branch without the review commit; it is this machine's browser setup.

$ ruff check headroom/dashboard/__init__.py headroom/proxy/server.py tests/test_dashboard_teams_perk.py
All checks passed!
$ mypy headroom/dashboard/__init__.py --ignore-missing-imports
Success: no issues found in 1 source file

# release footer step, simulated twice on notes that already link the perks page:
appended
skipped        # re-run is a no-op; footer present exactly once
```

## Real Behavior Proof

- Environment: macOS 26.6 (arm64), Python 3.12.13, FastAPI `TestClient`
against `create_app`.
- Exact command / steps: `pytest -q tests/test_dashboard_teams_perk.py`.
The release step's shell was run twice against a notes file that already
mentions `headroom-perks.vercel.app`.
- Observed result: the `/dashboard` route serves the banner unlicensed,
and strips it for each of the three licence sources while leaving the
rest of the page intact. The footer is appended once and is not
duplicated on a re-run.
- Not tested: the release step against a real GitHub release (it runs on
the next release), and the docs `next build` after this commit (only
Markdown/MDX text changed).

## Runtime Rollout Safety

- Rollout-managed feature(s): none.
- Minimum rollout channel: stable.
- Stable/default behavior changed: yes. Unlicensed dashboards show a
dismissible banner, and the docs site shows a dismissible banner.
- Kill switch / disable path: set any licence token to hide the
dashboard banner. It is a plain link, with no network calls.
- Unsafe override required: no.
- Qualification impact: none.
- Rollback path: revert this PR.

## Review Readiness

- [x] I have performed a self-review
- [x] This PR is ready for human review

## Checklist

- [x] My code follows the project's style guidelines
- [x] I have performed a self-review of my code
- [x] I have commented my code, particularly in hard-to-understand areas
- [x] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [x] I have added tests that prove my fix is effective or that my
feature works
- [x] New and existing unit tests pass locally with my changes
- [x] I did **not** edit `CHANGELOG.md` — it is generated by
release-please from my Conventional Commit PR title (a CI guard enforces
this)

## Screenshots (if applicable)

N/A

## Additional Notes

- **Review fixes are in `eeb0008a`:** @JerrettDavis's two points (the
effective licence source, and the OSS routing row) and Devin's
footer-marker and `--offline` findings.
- **Not changed:** Devin's suggestion to show sub-dollar savings. The $1
floor is deliberate, because "you saved $0.40" weakens the offer, and
the cost card still shows the exact amount.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: JD Davis <mxjerrett@gmail.com>
2026-10-07 10:59:41 -05:00
JD Davis 67ce7d0f31 fix(ci): clear dependency audit and gate Docker publishing (#3984)
This maintainer-requested corrective PR fixes red-main CI failures. The
task explicitly asks for the main-CI fix, providing the exception
context for CONTRIBUTING.md's CI-only restriction. Maintainers retain
the merge decision.

Docker manifest publishing previously used `always()` and ran after
cancelled builds, then failed downloading missing digest artifacts (main
Docker run 37372683144). Require `success()` for the complete build
matrix before publishing. Update the existing release regression test
while retaining signing order and root-only latest-promotion assertions.

The production dependency audit identified CVE-2026-104851 in fsspec
2025.10.0 and CVE-2026-104874 in multidict 6.7.1. Update only those lock
entries to the reported fixed versions, 2026.6.0 and 6.9.1.

## Real behavior proof

- Setup: Windows, Python 3.13.3, uv; workflow regression tests do not
use an LLM provider or credentials. Hosted CI uses its existing Linux
matrix.
- Before fix: hosted test shard 4 failed with `KeyError: 'if'`. The
updated success-gate regression failed locally before adding the
explicit gate: 1 failed, 53 passed. Hosted production audit reproduced
the fsspec vulnerability; a subsequent local audit reproduced the
multidict vulnerability.
- After fix: `uv run --no-project --with pytest --with pyyaml pytest
tests/test_release_workflows.py -q --noconftest` reports 54 passed.
`--noconftest` isolates these YAML regression tests from unrelated
application fixtures.
- `uv lock --check`, `actionlint .github/workflows/docker.yml`, and `git
diff --check` pass.
- Exported CI's production scope with `uv export --frozen --no-dev
--no-emit-project --no-hashes --extra all --format requirements-txt
--output-file <requirements>`; `uvx pip-audit --no-deps --disable-pip -r
<requirements>` reports no known vulnerabilities after both updates.
- Not tested locally: actual Docker image publication/signing, the full
application test suite, or remote-provider calls. Hosted validation
completed successfully on head fa17211215:
all 57 executed checks passed; 11 conditional jobs were skipped. CI run
37395070441 concluded success, including all four test shards, dashboard
tests, and Docker native end-to-end. All Devin review threads are
addressed and resolved. GitHub runner availability remains an
infrastructure limitation.

## Dependencies and supply chain

Both are existing transitive dependencies; this adds no package or
optional feature. These are security patches, not cosmetic upgrades or
replacements with a new library.

fsspec is maintained by the [fsspec
project](https://github.com/fsspec/filesystem_spec), an active
BSD-3-Clause repository (observed upstream push 2026-10-02). PyPI
reports 2026.6.0 released 2026-06-16; pip-audit identifies it as the
fixed version for CVE-2026-104851. Its wheel is `py3-none-any`, with no
unconditional dependencies or native code; optional backend extras are
not enabled by this update. Existing backend network behavior remains
dependent on the selected filesystem. Python >=3.10 matches this
project.

multidict is maintained by
[aio-libs](https://github.com/aio-libs/multidict), an active Apache-2.0
repository (observed upstream push 2026-10-05). PyPI reports 6.9.1
released 2026-09-21; pip-audit identifies it as the fixed version for
CVE-2026-104874. It retains its existing native-extension
wheel/source-build surface and conditional typing-extensions dependency
on Python <3.11; Python >=3.10 matches this project. Installation
fetches existing distributions from PyPI, and the library adds no
runtime network service. The lock contains updated upstream artifact
hashes; all other package versions are unchanged.

The previous CO2 dashboard failure is already fixed by merged #3320, and
dashboard tests passed on main CI run 37372683239 attempt 2.
2026-10-05 20:08:36 -05:00
0d841feb89 ci: move Apple Silicon jobs off the retiring macos-14 runner (#3953)
## Description

GitHub retires the `macos-14` runner image on **2026-11-02**. Before
that, jobs on it fail during scheduled brownouts, the first being
**2026-10-05 14:00 UTC - 2026-10-06 00:00 UTC**, then Oct 12, 16, 19,
23, 26, 29 and 30 (same hours).

Three jobs still use it, all on the Apple Silicon path:

- `release.yml` `build-wheels` (the `aarch64-apple-darwin` wheel)
- `release.yml` `smoke-import-wheels` (the macOS native smoke gate,
which `publish-pypi` waits on)
- `rust.yml` wheel build

A release cut during a brownout fails, and after Nov 2 no
`aarch64-apple-darwin` wheel can be built.

This moves all three to `macos-26`, the newest arm64 GA image. I pinned
it explicitly instead of using `macos-latest`, so the next image
rotation is a reviewed change and not a silent toolchain jump.
`macos-15-intel` is unaffected and left alone.

## Type of Change

- [x] Bug fix (non-breaking change that fixes an issue)

## Changes Made

- `release.yml`: `macos-14` -> `macos-26` in the `build-wheels` matrix
and the `smoke-import-wheels` matrix row. The row's `wheel_artifact`
changes with it (`wheels-macos-26-aarch64-apple-darwin`), because the
build job uploads as `wheels-${{ matrix.os }}-${{ matrix.target }}`.
- `release.yml`: the smoke-step comment no longer names an image
version.
- `rust.yml`: `macos-14` -> `macos-26`.
- `tests/test_release_workflows.py`: the required smoke-matrix entry is
now `runner: macos-26`.

## Testing

- [x] Unit tests pass (`pytest`)

```text
$ uv run --frozen --extra dev pytest tests/test_release_workflows.py -q
54 passed in 2.16s
```

## Real Behavior Proof

- Environment: GitHub-hosted `macos-26` arm64 runners, via this PR's own
CI. The PR touches `release.yml`, so its path filter triggers the
release dry-run (full wheel matrix plus `smoke-import-wheels`, publish
jobs skipped).
- Exact command / steps: push this branch; CI ran `Release` run
[37109226385](https://github.com/headroomlabs-ai/headroom/actions/runs/37109226385)
and `rust` run
[37109226215](https://github.com/headroomlabs-ai/headroom/actions/runs/37109226215)
on the new runner.
- Observed result: the macOS arm64 wheel builds on `macos-26`, keeps the
`macosx_11_0_arm64` tag, and passes the smoke-import gate. Per job:
- [`build-wheels (macos-26,
aarch64-apple-darwin)`](https://github.com/headroomlabs-ai/headroom/actions/runs/37109226385/job/111163877183):
success. It built `headroom_ai-1.0.0-cp310-abi3-macosx_11_0_arm64.whl`,
the same `macosx_11_0_arm64` platform tag the `macos-14` builds
published, so the minimum supported macOS is unchanged.
- [`smoke-import-wheels (macos-26, 3.13, aarch64-apple-darwin,
...)`](https://github.com/headroomlabs-ai/headroom/actions/runs/37109226385/job/111165038700):
success. The wheel installs into a fresh `python3.13` venv on the runner
and passes the staged smoke-import script.
- [`rust / wheels
(aarch64-apple-darwin)`](https://github.com/headroomlabs-ai/headroom/actions/runs/37109226215/job/111163758381):
success.
- Every other platform row in both runs also passed. The new toolchain
(Xcode 26.6, clang 21, up from Xcode 15.4, clang 15) builds and links
the Rust extension and ORT.
- Compatibility, checked against the `actions/runner-images` readmes
(macos-14-arm64 20260831, macos-26-arm64 20260907): both images ship the
same Python toolcache (3.11.9, 3.12.10, 3.13.15, 3.14.7), so the smoke
step's `python3.13` and the build's `--interpreter` list resolve the
same way.
- Not tested: an actual `release: published` run. The dry-run covers the
same build and smoke jobs; only the publish steps differ.

## Runtime Rollout Safety

- Rollout-managed feature(s): none. CI runner labels only; no runtime
code or `FEATURES` entry changes.
- Minimum rollout channel: N/A (no runtime behavior; nothing ships to
users except a wheel with the same platform tag).
- Stable/default behavior changed: no.
- Kill switch / disable path: N/A at runtime. In CI, revert this PR (or
set the three runner labels to `macos-15`, also a supported arm64
image).
- Unsafe override required: no.
- Qualification impact: none. The published macOS arm64 wheel keeps its
`macosx_11_0_arm64` tag and passed the same smoke-import gate.
- Rollback path: revert this PR. After 2026-11-02 a revert to `macos-14`
no longer runs, so roll back to `macos-15` instead.

## Review Readiness

- [x] I have performed a self-review
- [x] This PR is ready for human review

## Checklist

- [x] I have performed a self-review of my code
- [x] New and existing unit tests pass locally with my changes
- [x] I did **not** edit `CHANGELOG.md`

## Additional Notes

The two red checks, `test (2)`
(`test_section_lifecycle.py::test_category_losing_its_last_pattern_drops_its_heading`)
and `test-dashboard-ui`
(`test_dashboard_co2_playwright.py::test_co2_card_renders_estimated_savings`,
`_open_dashboard() missing 1 required positional argument: 'lifetime'`),
fail identically on `main` ([run
37100184603](https://github.com/headroomlabs-ai/headroom/actions/runs/37100184603))
and are unrelated to this change.

`macos-15` would also work. I picked `macos-26` because it has the
longest runway and the same Python toolcache, so the larger Xcode jump
is the only extra risk, and this PR's dry-run exercises it. Happy to
switch to `macos-15` if you'd rather take the smaller toolchain step.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

<!-- devin-review-badge-begin -->

---

<a href="https://app.devin.ai/review/headroomlabs-ai/headroom/pull/3953"
target="_blank"><picture><source media="(prefers-color-scheme: dark)"
srcset="https://static.devin.ai/assets/gh-devin-review-dark.svg?v=4"><img
src="https://static.devin.ai/assets/gh-devin-review-light.svg?v=4"
alt="Devin Review"></picture></a>
<!-- devin-review-badge-end -->

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-authored-by: JD Davis <mxjerrett@gmail.com>
2026-10-04 13:54:58 -07:00
JD Davis 540f4da199 fix(ci): tolerate missing Docker cache blobs (#3945)
## Description

The Docker workflow on `main` failed when BuildKit restored a valid GHA
cache index whose backing blob had already been evicted. The ARM64
`slim-nonroot` build received `404 BlobNotFound`, so it never uploaded
its digest artifact and the manifest job failed secondarily.

This makes remote cache strictly best-effort: cache export errors are
ignored, and a failed cached build is retried once with remote cache
disabled. A real build failure remains fatal because the uncached retry
does not use `continue-on-error`.

## Type of Change

- [x] Bug fix (non-breaking change that fixes an issue)
- [ ] New feature
- [ ] Breaking change
- [ ] Documentation update
- [ ] Performance improvement
- [ ] Code refactoring

## Changes Made

- Mark the cached bake attempt as recoverable and make GHA cache export
non-fatal.
- Retry the identical per-platform digest build without cache
import/export when the cached attempt fails.
- Select digest metadata from the attempt that actually succeeded.
- Add structural regression coverage for fallback failure semantics and
metadata selection.

## Testing

- [x] Unit tests pass (`tests/test_release_workflows.py`)
- [x] Linting passes for changed Python test
- [ ] Type checking passes (`mypy headroom`) — no typed Python
production code changed
- [x] New tests added for the fix
- [x] Manual workflow validation performed

### Test Output

```text
uv run --extra dev python -m pytest tests/test_release_workflows.py -q
54 passed in 2.79s

uv run --extra dev ruff check tests/test_release_workflows.py
All checks passed!

uv run --extra dev ruff format --check tests/test_release_workflows.py
1 file already formatted

actionlint v1.7.12 .github/workflows/docker.yml
(exit 0)

git diff --check upstream/main...HEAD
(exit 0)
```

A repository-wide `pytest -q` run completed with 14,208 passed and 617
skipped, plus 53 unrelated failures and 20 setup errors in existing
Windows/environment-sensitive suites. The changed release-workflow suite
passed within that run.

## Real Behavior Proof

- Environment: GitHub Actions Docker workflow on `main`, ARM64 native
runner.
- Exact failure:
https://github.com/headroomlabs-ai/headroom/actions/runs/36963024403/job/110700641054
- Observed result: BuildKit failed lazy cache copy with `404
BlobNotFound`; `digests-slim-nonroot-arm64` was absent and the matching
manifest job failed.
- Not tested: hosted fallback execution cannot be forced safely because
GitHub controls cache eviction; PR CI validates workflow syntax and
regression invariants.

## Runtime Rollout Safety

- Rollout-managed feature(s): none; CI-only change.
- Stable/default behavior changed: Docker publishing retries uncached
after a failed cached bake.
- Kill switch / disable path: revert this commit or remove the fallback
step.
- Qualification impact: none.
- Rollback path: revert the PR.

## Review Readiness

- [x] I performed self-review
- [x] PR is ready for human review

## Checklist

- [x] My code follows the project's style guidelines
- [x] I performed a self-review
- [x] I commented the cache failure behavior
- [x] Changes generate no new warnings
- [x] I added tests proving the fix
- [x] Relevant existing unit tests pass locally
- [x] I did not edit `CHANGELOG.md`

## Additional Notes

The fallback intentionally retries any failed cached bake, not only a
parsed cache error. That avoids brittle log matching; deterministic
build defects still fail on the required uncached attempt.
<!-- devin-review-badge-begin -->

---

<a href="https://app.devin.ai/review/headroomlabs-ai/headroom/pull/3945"
target="_blank"><picture><source media="(prefers-color-scheme: dark)"
srcset="https://static.devin.ai/assets/gh-devin-review-dark.svg?v=4"><img
src="https://static.devin.ai/assets/gh-devin-review-light.svg?v=4"
alt="Devin Review"></picture></a>
<!-- devin-review-badge-end -->
2026-10-02 10:59:08 -07:00
be2a298ed0 ci: upload shard coverage even when a test in the shard fails (#3876)
## Description

The Codecov upload step in the sharded `test` job has no `if:`, so a
single failing test in a shard skips it. Every line that only that shard
covers then drops out of `codecov/patch`. Because of this, a PR can show
0% patch coverage when its own tests passed but an unrelated test in the
same shard failed. pytest-cov still writes `coverage-N.xml` when tests
fail, so the report exists and only the upload is skipped.

## Type of Change

- [x] Bug fix (non-breaking change that fixes an issue)

## Changes Made

- `.github/workflows/ci.yml`: add `if: ${{ !cancelled() }}` to `Upload
coverage shard N to Codecov`.
- `scripts/tests/test_ci_workflow.py`: extend the existing upload-step
contract test to require that condition.

## Testing

- [x] Unit tests pass (`pytest`)
- [x] Linting passes (`ruff check .`)
- [x] New tests added for new functionality

### Test Output

```text
$ uv run --frozen --extra dev pytest scripts/tests/test_ci_workflow.py -q
3 passed
# with the ci.yml change reverted: 1 failed, 2 passed
```

## Real Behavior Proof

- Environment: GitHub Actions `ci.yml` sharded test job, as observed on
PR #3874 (run 36671680550).
- Exact command / steps: Compared the failing shards' step lists against
the Codecov status on the PR.
- Observed result: Shard 3 failed on an unrelated test, and its `Upload
coverage` step was skipped although pytest had written `coverage-3.xml`.
With this change the step runs after a test failure and is still skipped
on cancellation.
- Not tested: A live Codecov upload from this branch; this PR's own CI
run exercises it.

## Runtime Rollout Safety

- Rollout-managed feature(s): None.
- Minimum rollout channel: Stable.
- Stable/default behavior changed: No.
- Kill switch / disable path: Not applicable.
- Unsafe override required: No.
- Qualification impact: None.
- Rollback path: Revert this commit.

## Review Readiness

- [x] I have performed a self-review
- [x] This PR is ready for human review

## Checklist

- [x] My code follows the project's style guidelines
- [x] I have performed a self-review of my code
- [x] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [x] I have added tests that prove my fix is effective or that my
feature works
- [x] New and existing unit tests pass locally with my changes
- [x] I did **not** edit `CHANGELOG.md` — it is generated by
release-please from my Conventional Commit PR title (a CI guard enforces
this)

## Additional Notes

This does not recover coverage from a shard that is killed outright. A
hard-exited process never writes its XML, so there is nothing to upload;
that case is fixed separately in fix/pytest-hard-watchdog.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-authored-by: JD Davis <mxjerrett@gmail.com>
2026-09-30 11:04:01 -05:00
55ce93f3e8 ci(pr-health): check out the commit the workflow runs from (#3887)
## Description

The `PR Governance / label` job fails with `pr-health-labels.py: error:
unrecognized arguments: --field drift --behind-by ... --base-files ...`
on any pull request whose recorded base commit predates #3229.

`pull_request_target` always runs this workflow file from the default
branch, so the job invokes `.github/scripts/pr-health-labels.py` with
the flags #3229 added. But both jobs check out
`github.event.pull_request.base.sha`, which is the base commit recorded
when the PR was last synced, not the commit the workflow came from. On
an older PR that checkout carries the pre-#3229 script, which does not
know those flags. Editing the description of any such PR (an `edited`
event) produces a red run and a failure email, even though nothing about
the PR changed. Today this hit #2626, #2627, #2942 and #3127, whose base
SHAs are all older than c22cd1f1; #3617 and #3108, synced today, pass.

This checks out `github.sha` instead. For `pull_request_target` that is
the last commit on the base branch, the same commit the workflow file is
read from, so the workflow and its helper scripts always match. It is
still trusted base-branch code: the PR head is never checked out, so the
`pull_request_target` safety property is unchanged.

## Type of Change

- [x] Bug fix (non-breaking change that fixes an issue)
- [ ] New feature (non-breaking change that adds functionality)
- [ ] Breaking change (fix or feature that would cause existing
functionality to change)
- [ ] Documentation update
- [ ] Performance improvement
- [ ] Code refactoring (no functional changes)

## Changes Made

- `.github/workflows/pr-health.yml`: both `actions/checkout` steps
(governance and label jobs) use `ref: ${{ github.sha }}` instead of
`ref: ${{ github.event.pull_request.base.sha }}`.
- `scripts/tests/test_pr_health_workflow.py`: a contract test that no
checkout uses `pull_request.base.sha` and every checkout pins
`github.sha`.

## Testing

- [x] Unit tests pass (`pytest`)
- [x] Linting passes (`ruff check .`)
- [ ] Type checking passes (`mypy headroom`)
- [x] New tests added for new functionality
- [ ] Manual testing performed

### Test Output

```text
$ uv run --frozen --extra dev pytest scripts/tests/test_pr_health_workflow.py scripts/tests/test_pr_health_labels.py -q
21 passed in 0.08s

# new test against main's pr-health.yml (before this change)
$ uv run --frozen --extra dev pytest scripts/tests/test_pr_health_workflow.py -q -k checkouts_use
1 failed, 7 deselected in 0.04s

$ uvx ruff check scripts/tests/test_pr_health_workflow.py && uvx ruff format --check scripts/tests/test_pr_health_workflow.py
All checks passed!
1 file already formatted
```

## Real Behavior Proof

- Environment: GitHub Actions on headroomlabs-ai/headroom, PR Governance
runs 36719570172, 36719565247, 36719562482 and 36719559715 (2026-09-30,
`pull_request_target` `edited` events).
- Exact command / steps: edited the PR body of #2626, #2627, #2942 and
#3127 (all with `base.sha` older than c22cd1f1), then read the failed
`label` job logs and compared each PR's `base.sha` against c22cd1f1 with
`git merge-base --is-ancestor`.
- Observed result: all four `label` jobs failed with
`pr-health-labels.py: error: unrecognized arguments: --field drift
--behind-by 150 --base-files [...]`; all four base SHAs lack c22cd1f1,
while #3617 and #3108 (base ffc6edb4, which contains it) ran green the
same day.
- Not tested: a live run of the patched workflow. `pull_request_target`
always runs the default branch's copy, so this change takes effect only
after merge; the first `edited` event on an older PR after that is the
live check.

## Runtime Rollout Safety

- Rollout-managed feature(s): None. CI workflow only; nothing in the
shipped package changes.
- Minimum rollout channel: N/A
- Stable/default behavior changed: No runtime behavior changes. In CI,
the governance and label jobs run the default branch's scripts instead
of each PR's stale base copy.
- Kill switch / disable path: N/A (CI only). Revert the PR.
- Unsafe override required: No
- Qualification impact: One contract test added; no existing test
changed or relaxed.
- Rollback path: Revert the PR.

## Review Readiness

- [x] I have performed a self-review
- [x] This PR is ready for human review

## Checklist

- [x] My code follows the project's style guidelines
- [x] I have performed a self-review of my code
- [x] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [x] I have added tests that prove my fix is effective or that my
feature works
- [x] New and existing unit tests pass locally with my changes
- [x] I did **not** edit `CHANGELOG.md` — it is generated by
release-please from my Conventional Commit PR title (a CI guard enforces
this)

## Screenshots (if applicable)

N/A

## Additional Notes

Documentation: N/A, no user-facing behavior changes.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-authored-by: JerrettDavis <mxjerrett@gmail.com>
2026-09-30 10:45:46 -05:00
Tejas ChopraandClaude Opus 5 b10dd8db6e fix(memory): pin LF on memory writers and guard the learn-writer newline contract (#3706)
Closes #3698. Follow-up to #3594, which fixed `headroom/learn/writer.py`
correctly but left three gaps.

## 1. The write half had no regression guard

`test_apply_does_not_accumulate_carriage_returns_on_crlf_file` passes on
`main` with the fix reverted — its assertion (`raw.count(b"\r") ==
raw.count(b"\r\n")`) holds for a CRLF-preserving file too. So the
`newline="\n"` pins, which *are* the fix, were unguarded.

This cannot be caught by asserting on file bytes on POSIX: CPython's C
`TextIOWrapper` picks the newline translation target at compile time
(`#ifdef MS_WINDOWS`), so monkeypatching `os.linesep` does not simulate
Windows.

The new test spies on `Path.write_text` and drives the real writer
`.write()` methods. Stripping the kwargs from all seven sites:

```
tests/test_learn/test_writer.py ................................F
E   AssertionError: learn writers wrote without newline='\n': [
E     .../data/memory/MEMORY.md, .../instructions.md, .../myproject/AGENTS.md,
E     .../myproject/CLAUDE.local.md, .../myproject/CLAUDE.md,
E     .../myproject/GEMINI.md, .../myproject/GROK.md]
=================== 1 failed, 32 passed ===================
```

All seven named — and note the other 32 pass, including the old test,
confirming it was never a guard.

## 2. The same bug was still live in the memory writers

Ten call sites, all nine from the issue plus
**`headroom/memory/sync.py:137`** (`_save_sync_state`), which the issue
missed:

`writers/base.py:168` · `writers/claude_writer.py:119` ·
`writers/cursor_writer.py:130` · `bridge.py:126, 394, 650` ·
`sync.py:137` · `sync_adapters/codex_agent.py:124` ·
`sync_adapters/claude_code.py:196, 239`

These write files that **overlap** with the learn writers
(`~/.claude/CLAUDE.md`, `AGENTS.md`), so on Windows a file flipped
between LF and CRLF depending on which subsystem wrote last.

**No live accumulation bug:** every reader of these files uses
`read_text()`, which normalizes — that is the key difference from
`learn/writer.py`'s `read_bytes().decode()`, which is what let `\r` pile
up. Checked all of them (`bridge.py:114, 222, 617`,
`writers/base.py:193`, `writers/cursor_writer.py:103`,
`sync_adapters/claude_code.py:106, 163, 178, 216`,
`sync_adapters/codex_agent.py:48, 83`, `sync.py:127`).

**But the churn is more than cosmetic**, which the issue did not note:
`claude_code.py:252` and `codex_agent.py:135` read via `read_bytes()`
for `fingerprint()` change-detection hashing. An EOL flip changes the
hash, so a CRLF/LF flip reads as a content change and triggers a
spurious re-sync.

Three new tests cover the writer, bridge and sync-adapter paths; all
three fail with the pins stripped.

## 3. No unit test had ever run on Windows

The sharded `test` job is ubuntu-only, and `build-wheel-windows` builds
without testing — which is how a Windows-only bug shipped twice. Added
`test-windows-newline`: consumes the existing `headroom-wheel-windows`
artifact and runs only tests marked `windows_newline`. Marker registered
in `pyproject.toml`.

**Known limitation, documented in the job comment:** it is gated on the
`packaging` paths-filter (that is what builds the wheel), so a
pure-Python PR skips it. The ubuntu shards still run the same marked
tests — they assert the kwarg, which fails on any platform — so this is
the Windows-side backstop, not the only guard. Making it fire on every
writer change would mean gating the Windows Rust wheel build on `code`,
which is too expensive to do unasked.

## Verification

- 4 guards proven to fail before, pass after.
- `tests/test_learn/ tests/test_memory/ tests/test_memory_sync.py` →
**950 passed, 4 skipped**.
- Adjacent suites → 168 passed. `pytest tests -m windows_newline` → 4
passed, no marker warning.
- `actionlint .github/workflows/*.yml` → exit 0. Action versions match
the file's conventions (`checkout@v7`, `setup-python@v7`,
`download-artifact@v8`).

`CONTRIBUTING.md` states the invariant once under Coding standards:
Headroom writes LF and normalizes on read, on every platform.

## Not in this PR

Issue section 3's release-note line about the one-time EOL churn on
Windows (the first `--apply` rewrites the whole file to LF). Harmless
under `autocrlf=true`, but worth a release note; `CHANGELOG.md` edits
are blocked by `changelog-guard.yml`.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
2026-09-29 11:18:03 -05:00
EasternandJerrettDavis 7c9fbed61a fix(router): preserve unmarked HTML tool output (#3778)
## Description

`HTMLExtractor` can reduce a tool result to article prose without a CCR
retrieval marker. The existing tool ground-truth guard omitted
`CompressionStrategy.HTML`, so the deleted script or structured data
could not be recovered.

This is independent of #3627's HTML-vs-MIXED routing change and #3774's
test isolation change. Closes #3775.

## Type of Change

- [x] Bug fix (non-breaking change that fixes an issue)

## Changes Made

- Add `HTML` to the lossy/unmarked strategy sets used by
`ContentRouter.apply` and the provider-neutral shell-output unit path.
Unmarked HTML extraction now leaves tool output unchanged; a future
extraction with a real CCR marker can still be accepted.
- Add three real-`trafilatura` regression cases for Anthropic
`tool_result`, OpenAI `role=tool`, and a structured
`local_shell_call_output`. The tests failed on the original code and
passed with the two set entries.
- Install the existing `html` extra in CI's `test-extras` job and run
the HTML extractor and new reversibility tests there. The main pytest
shards currently install `[dev]` without `html`; the `[sandbox]` smoke
job installs it but does not run pytest.

## Testing

- [ ] Unit tests pass (`pytest`) — the full suite was not run; the
focused run below passed.
- [x] Linting passes (`ruff check .`)
- [ ] Type checking passes (`mypy headroom`) — local Windows run has the
unrelated errors listed below.
- [x] New tests added for new functionality
- [x] Manual testing performed

### Test Output

```text
Before the source change:
python -m pytest tests/test_html_tool_reversibility.py -q --tb=short
3 failed (unmarked HTML replaced both message shapes and the provider unit).

After the source change, Windows Python 3.12.13 with trafilatura 2.0.0:
python -m pytest tests/test_transforms/test_html_extractor.py tests/test_html_tool_reversibility.py tests/test_compression_units.py tests/test_compression_batches.py tests/test_content_router_tool_role_reversibility.py tests/test_transforms_content_router.py tests/test_no_ccr_lossy.py -q --tb=short
137 passed in 9.55s

ruff check .
All checks passed!
ruff format --check .
1642 files already formatted
git diff --check
(no output)

python -m pytest tests/test_transforms/test_dense_line_elider.py -q --tb=short
9 passed on current head after #3774's test isolation change merged into main.

mypy headroom
2 errors in unmodified files on Windows: headroom/fileperms.py:71 (os.fchmod), headroom/integrations/langchain/chat_model.py:394 (truthy-function). Hosted Linux CI runs a separately pinned mypy version.
```

## Real Behavior Proof

- Environment: Windows 11, Python 3.12.13, source checkout at
`df8ebdf97` plus this patch, `uv sync --frozen --extra dev --extra html`
using that interpreter, `trafilatura==2.0.0`.
`ContentRouterConfig(enable_kompress=False, min_section_tokens=10)`,
default CCR marker setting, local `gpt-4o` token counter. Windows
selected the pure-Python content detector; no live provider request was
made.
- Exact command / steps: run this from the repository root after
installing those extras:

```powershell
@'
from headroom.providers import OpenAIProvider
from headroom.tokenizer import Tokenizer
from headroom.transforms.content_router import ContentRouter, ContentRouterConfig

js = "var a=1;function f(x){return x*2};" * 300
html = "<!doctype html><html><head><script>" + js + "</script></head><body><p>the answer is 42</p></body></html>"
messages = [
    {"role": "user", "content": "check the site"},
    {"role": "assistant", "content": [{"type": "tool_use", "id": "t1", "name": "Bash", "input": {"command": "curl -s x"}}]},
    {"role": "user", "content": [{"type": "tool_result", "tool_use_id": "t1", "content": html}]},
    {"role": "assistant", "content": "ok"},
    {"role": "user", "content": "and now?"},
]
tokenizer = Tokenizer(OpenAIProvider().get_token_counter("gpt-4o"), "gpt-4o")
router = ContentRouter(ContentRouterConfig(enable_kompress=False, min_section_tokens=10))
direct = router.compress(html, context="tool_result")
block = router.apply(messages, tokenizer).messages[2]["content"][0]["content"]
out = block if isinstance(block, str) else block[0]["text"]
print("direct:", direct.strategy_used.value, len(html), "->", len(direct.compressed), repr(direct.compressed))
print("tool_result:", len(html), "->", len(out), "same:", out == html, "marker:", "Retrieve original: hash=" in out)
'@ | .\.venv\Scripts\python.exe -
```

- Observed result: the unfixed router replaced 10,294 HTML characters
with 16 unmarked characters; after this patch the tool result retained
all 10,294 original characters.

```text
Before: direct: html 10294 -> 16 'the answer is 42'
        tool_result: 10294 -> 16, same: False, marker: False
After:  direct: html 10294 -> 16 'the answer is 42'
        tool_result: 10294 -> 10294, same: True, marker: False
```

A second unmocked probe with the same fixture yielded `role=tool: 10294
-> 10294, same=True` and `local_shell_call_output: html, modified=False,
same=True, reason=lossy_unrecoverable_tool_output`.
- Not tested: the reporter's actual page, a live LLM/provider request,
Linux/native detection, or a full local pytest run with `html`
installed.

## Runtime Rollout Safety

- Rollout-managed feature(s): none.
- Minimum rollout channel: N/A.
- Stable/default behavior changed: yes; tool outputs whose HTML
extraction is lossy and unmarked are retained verbatim, so those outputs
use more tokens. Direct `ContentRouter.compress()` extraction is
unchanged.
- Kill switch / disable path: `enable_html_extractor=False` prevents
HTML extraction. `ccr_inject_marker=False` remains the existing
intentional opt-out for the `ContentRouter.apply` guard.
- Unsafe override required: none.
- Qualification impact: CI's existing `test-extras` job now installs
`[html]` and runs real HTML tests; main shards are untouched. The #3774
test isolation change is in current main, outside this PR diff.
- Rollback path: revert this commit; no state migration or new
dependency is introduced.

## Review Readiness

- [x] I have performed a self-review
- [x] This PR is ready for human review

Current head `d361388e` merges latest `main`, including
[#3790](https://github.com/headroomlabs-ai/headroom/pull/3790)'s fix for
the unrelated SQLite test that failed in the previous CI run. On this
head, that test, the 137 focused HTML/router/unit tests, and all 9
dense-line-elider tests passed locally; Ruff and `git diff --check`
passed. Exact-head hosted checks are pending.

## Checklist

- [x] My code follows the project's style guidelines
- [x] I have performed a self-review of my code
- [x] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation (N/A: no
new public API or setting)
- [ ] My changes generate no new warnings (full suite not verified
locally)
- [x] I have added tests that prove my fix is effective or that my
feature works
- [ ] New and existing unit tests pass locally with my changes (focused
tests pass; full local suite was not run)
- [x] I did **not** edit `CHANGELOG.md`, it is generated by
release-please from my Conventional Commit PR title

## Additional Notes

This keeps the existing reversible-tool-output contract: an unmarked
lossy transform cannot replace tool ground truth. It deliberately does
not add a retrieval store or change HTML routing.

Co-authored-by: JerrettDavis <mxjerrett@gmail.com>
2026-09-29 11:16:39 -05:00
JD Davis 25274310ca fix(ci): keep hard watchdog out of pytest shards (#3845)
## Summary

- disable the production hard watchdog only in the sharded pytest job
- keep the existing 30-minute job timeout responsible for reporting CI
stalls
- add a workflow-contract regression test so the opt-out cannot
disappear silently

## Root cause

After the hard watchdog merged, `main` CI shard 1 began terminating with
exit code 1 during `tests/test_compress_session_mode.py`, without a
pytest failure or summary. A matching Ubuntu 24.04 / Python 3.12 shard
reproduced the abrupt termination locally. The same shard can complete
when `HEADROOM_HARD_WATCHDOG_SECS=0`.

The watchdog deliberately uses `faulthandler.dump_traceback_later(...,
exit=True)` to terminate a production process when native code holds the
GIL. That behavior is appropriate under a service supervisor, but inside
pytest it destroys the diagnostic process before pytest or the job
timeout can identify the stalled test. Production defaults and the
dedicated subprocess watchdog tests remain unchanged.

The contemporaneous Docker failures were separate: Docker Hub reset the
OAuth connection, then the manifest job could not download the missing
amd64 digest artifact.

## Verification

- `uv run --frozen --extra dev pytest scripts/tests/test_ci_workflow.py
tests/test_hard_watchdog.py -q` — 6 passed
- `uv run --frozen --extra dev ruff check
scripts/tests/test_ci_workflow.py` — passed
- `uv run --frozen --extra dev ruff format --check
scripts/tests/test_ci_workflow.py` — passed
- `git diff --check` — passed
- Ubuntu 24.04 / Python 3.12 exact shard command with the CI opt-out —
completed successfully

No production runtime behavior is changed.
2026-09-29 10:57:20 -05:00
c22cd1f1b6 ci(pr-health): flag stale PR branches by ref comparison (#3229)
## Description

The `status: needs rebase` label in `.github/workflows/pr-health.yml` is
driven by `mergeStateStatus == BEHIND`. GitHub only reports `BEHIND`
when the base branch requires branches to be up to date, and `main` does
not (`required_status_checks.strict = false`, per #3066). The label has
therefore never been applied since it was added in #933, so stale-base
risk is invisible on the PR.

This computes the drift directly with a ref comparison instead, so the
label works regardless of the branch-protection setting. It does not
replace the settings decision in #3066 (only a repo admin can enable
strict checks or a merge queue) — it makes the risk visible while that
is pending.

Refs #3066

## Type of Change

- [ ] Bug fix (non-breaking change that fixes an issue)
- [ ] New feature (non-breaking change that adds functionality)
- [ ] Breaking change (fix or feature that would cause existing
functionality to change)
- [ ] Documentation update
- [ ] Performance improvement
- [x] Code refactoring (no functional changes)

## Changes Made

- `.github/workflows/pr-health.yml`: the `label` job now asks `gh pr
view` for `baseRefName`, `headRefOid` and `files`, calls
`repos/{repo}/compare/{base}...{head}` for `behind_by` plus the merge
base, and — only when the branch is behind — calls
`compare/{merge_base}...{base}` for the files the base branch changed in
the meantime. That second call has no `[]` fallback: `base_files` is set
to an empty-string sentinel first and reset to it when the call fails,
so partial output from a call that died midway is discarded and a
missing merge base takes the same path.
- `.github/scripts/pr-health-labels.py`: added `drift_state()`,
`parse_behind_by()` and `parse_base_files()`, plus a `--field
checks|drift` switch with `--behind-by` / `--base-files`. A PR is
`stale` when it is behind **and** the base moved on files the PR also
changes, `current` otherwise, and `unknown` when either comparison call
failed. `parse_base_files()` maps the sentinel, invalid JSON and any
non-list payload to `None`, which is what makes a failed base-file
comparison `unknown` rather than an empty set of moved files; a
successful comparison that returns zero files still classifies as
`current`. `unknown` leaves the label untouched, mirroring the existing
`mergeStateStatus == UNKNOWN` guard, so a transient API error never
clears a real label. An explicit `mergeStateStatus == BEHIND` is still
honoured, so nothing regresses if strict checks are enabled later.
- The same `stale` verdict now holds back `status: ready for review`,
replacing the old `BEHIND` condition.
- File overlap is the deliberate narrowing: plain "behind by at least
one commit" matches 18 of 20 open PRs on a base branch this busy, which
would make the label noise. Overlap targets the case that hides a
semantic merge conflict from per-PR checks, which is what #3066
describes.
- Cost is 1-2 extra API calls per PR, so at most ~200 per scheduled run
at the existing 100-PR cap.
- Added unit tests for the new logic and workflow-contract assertions,
including a regression that runs the extracted `base_files` shell block
under `bash` with `gh` stubbed to print partial output and exit 1,
asserts the sentinel survives, feeds it to the script for an `unknown`
verdict, and asserts the drift dispatch has no `else` so `unknown`
neither adds nor removes the label.

## Testing

- [x] Unit tests pass (`pytest`)
- [x] Linting passes (`ruff check .`)
- [ ] Type checking passes (`mypy headroom`)
- [x] New tests added for new functionality
- [x] Manual testing performed

### Test Output

```text
$ python -m pytest scripts/tests/test_pr_health_labels.py scripts/tests/test_pr_health_workflow.py -q
scripts\tests\test_pr_health_labels.py .............                     [ 65%]
scripts\tests\test_pr_health_workflow.py .......                         [100%]
============================= 20 passed in 0.10s ==============================

$ ruff check .github/scripts/pr-health-labels.py scripts/tests/
All checks passed!

$ ruff format --check .github/scripts/pr-health-labels.py scripts/tests/test_pr_health_labels.py scripts/tests/test_pr_health_workflow.py
3 files already formatted
```

## Real Behavior Proof

- Environment: local checkout of the branch at 738f984d, Windows 11,
Python 3.13, `gh` 2.x authenticated against `headroomlabs-ai/headroom`
- Exact command / steps: replayed the new workflow steps against the 25
most recent open PRs — for each one, `gh pr view --json
baseRefName,files,headRefOid,isDraft,labels,mergeStateStatus,reviewDecision,statusCheckRollup`,
then `gh api repos/headroomlabs-ai/headroom/compare/{base}...{head}` and
`compare/{merge_base}...{base}`, feeding the results to `python
.github/scripts/pr-health-labels.py --state-json ... --field drift
--behind-by ... --base-files ...`
- Observed result: review follow-up on 2026-08-27, replayed #3192,
#3180, #3177 and this PR with a successful base-file comparison and
again with a failed one. The successful verdicts are unchanged (`stale`,
`stale`, `stale`, `current`); the failed comparison now returns
`unknown` on all four, where the pre-fix script returned `current` and
the label step would have removed `status: needs rebase`. Reverting the
workflow block to the old `|| echo '[]'` fallback fails both new
workflow tests (`assert 'partia[]' == ''`). Original sweep: 3 of 25 PRs
classified `stale` — #3192, #3180 and #3177, each 13 commits behind
`main` and each touching `headroom/proxy/server.py`, which `main` also
changed in that window. The other 22 came back `current`, including PRs
that are behind by 1 to 13 commits on unrelated files. Before this
change none of the 25 reported `mergeStateStatus == BEHIND` and none
carried `status: needs rebase`. Workflow YAML still parses via
`yaml.safe_load`.
- Not tested: no run of the workflow on GitHub Actions
(`pull_request_target` and the cron schedule can only fire from the
default branch after merge), and no `actionlint`/`act` run locally as
neither tool is installed on this machine — CI covers both.

## Runtime Rollout Safety

- Rollout-managed feature(s): none, this is CI-only automation and
touches no runtime code path
- Minimum rollout channel: not applicable
- Stable/default behavior changed: no product behavior changes; the only
observable change is which PRs receive the `status: needs rebase` label
- Kill switch / disable path: revert this commit, or delete the label —
the `label` job keeps working, and every `gh pr edit` failure is already
tolerated
- Unsafe override required: no
- Qualification impact: none
- Rollback path: `git revert` of this commit restores the previous
`mergeStateStatus == BEHIND` condition

## Review Readiness

- [x] I have performed a self-review
- [x] This PR is ready for human review

## Checklist

- [x] My code follows the project's style guidelines
- [x] I have performed a self-review of my code
- [x] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [x] I have added tests that prove my fix is effective or that my
feature works
- [x] New and existing unit tests pass locally with my changes
- [x] I did **not** edit `CHANGELOG.md` — it is generated by
release-please from my Conventional Commit PR title (a CI guard enforces
this)

## Additional Notes

- Documentation checkbox is unchecked because the label semantics are
described in the label description itself (updated by this PR) and no
docs page covers the PR-health labels.
- `mypy headroom` is unchecked because nothing under `headroom/`
changed; the touched script lives in `.github/scripts/`.
- The overlap comparison uses the files `gh pr view --json files`
returns, so a PR with an unusually large file list could under-report
overlap. That fails safe (no label) rather than mislabelling.
- This PR intentionally does not close #3066: the acceptance criteria
there are strict status checks or a merge queue on `main`, which need
admin rights on the repo.

---------

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
Co-authored-by: JerrettDavis <mxjerrett@gmail.com>
2026-09-25 10:34:18 -05:00
Serge ARADJandClaude 23c2054552 ci(docker): stop passing bake metadata through env in Export digest (#3785)
## Description

The `Export digest` step in `docker.yml` can fail before its script
runs:

```text
##[error]An error occurred trying to start process '/usr/bin/bash' with working directory '/home/runner/work/headroom/headroom'. Argument list too long
```

The step already writes the bake metadata to a file through a heredoc.
That was the fix in f3d5392c ("ci(docker): fix Argument list too long
when signing bake outputs"). But the native-arm64 rework in ed36676c
also added an `env: BAKE_METADATA` entry holding the same JSON, and the
script never reads it. The runner exports every `env:` entry when it
spawns bash, so when the metadata is large the step fails with E2BIG. No
digest marker gets uploaded, and every `docker-manifest` cell then fails
with `Artifact not found for name: digests-<variant>-amd64`.

The metadata's size varies from build to build, so the failure is
intermittent: most runs pass, and the occasional one fails in every
build job.

This PR removes the unused `env:` entry and adds a regression test so it
can't come back a second time.

## Type of Change

- [x] Bug fix (non-breaking change that fixes an issue)
- [ ] New feature (non-breaking change that adds functionality)
- [ ] Breaking change (fix or feature that would cause existing
functionality to change)
- [ ] Documentation update
- [ ] Performance improvement
- [ ] Code refactoring (no functional changes)

## Changes Made

- `.github/workflows/docker.yml`: drop `env: BAKE_METADATA` from `Export
digest`, and extend the step's comment to say why the metadata must not
go through `env:`. The heredoc path, the only one the script reads, is
unchanged.
- `tests/test_release_workflows.py`: add
`test_docker_bake_metadata_never_travels_through_env`. It fails if any
`docker.yml` step carries `outputs.metadata` in `env:`, and checks that
`Export digest` still reads the metadata through the heredoc.

## Testing

- [ ] Unit tests pass (`pytest`)
- [x] Linting passes (`ruff check .`)
- [ ] Type checking passes (`mypy headroom`)
- [x] New tests added for new functionality
- [ ] Manual testing performed

### Test Output

```text
# new test against the current workflow (before this change)
E   AssertionError: bake metadata passed via env (E2BIG risk): ['docker-build / Export digest / BAKE_METADATA']
1 failed, 52 deselected

# with this change
$ python -m pytest -q tests/test_release_workflows.py
53 passed

$ ruff check tests/test_release_workflows.py
All checks passed!
$ ruff format --check tests/test_release_workflows.py
1 file already formatted
```

## Real Behavior Proof

- Environment: GitHub Actions on a fork (orty/headroom) whose `main`
mirrors this repo's `main`, so it runs this exact `docker.yml`.
- Exact command / steps: push-triggered `Docker` runs on 2026-09-24 for
df8ebdf9 (#3557) and a8bd9bec (#3373).
- Observed result: in both runs all 16 `docker-build` jobs built and
pushed their image, then failed at `Export digest` with the `Argument
list too long` error above. All 8 `docker-manifest` jobs then failed
with `Artifact not found for name: digests-<variant>-amd64`. The builds
just before (c0292984) and after (7ad9f809, b9ded1ae, 3aa50128) were
green, with no workflow change in between. Both commits only touch
Python, so the trigger is the metadata size, not the code change.
- Not tested: I have not run the fixed workflow end to end on this
repository, and I can't see whether this repository's own Docker runs
have hit the error.

## Runtime Rollout Safety

- Rollout-managed feature(s): none
- Minimum rollout channel: n/a
- Stable/default behavior changed: no. CI only; the images built are
unchanged.
- Kill switch / disable path: n/a
- Unsafe override required: no
- Qualification impact: none
- Rollback path: revert the commit

## Review Readiness

- [x] I have performed a self-review
- [x] This PR is ready for human review

## Checklist

- [x] My code follows the project's style guidelines
- [x] I have performed a self-review of my code
- [x] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [x] I have added tests that prove my fix is effective or that my
feature works
- [ ] New and existing unit tests pass locally with my changes
- [x] I did **not** edit `CHANGELOG.md` — it is generated by
release-please from my Conventional Commit PR title (a CI guard enforces
this)

## Screenshots (if applicable)

N/A

## Additional Notes

- Unit tests / mypy boxes: only workflow YAML and one test file change,
so I ran `tests/test_release_workflows.py` (all 53 pass) rather than the
full suite. mypy doesn't cover these files.
- Documentation: none needed.

Co-authored-by: Claude <noreply@anthropic.com>
2026-09-25 09:41:57 -05:00
Rod BoevandJerrettDavis b0c19a25f0 fix(security): reject unauthenticated public proxy binds (#3316)
## Description

Headroom's published image and maintained Docker launchers could expose
the
proxy on every host interface without a proxy token. This change moves
the
security boundary to the deployment artifacts: published images default
to a
container-loopback listener, supported local launchers publish only on
host
loopback, and deliberate public deployments retain explicit token
protection.
The application factory remains transport-neutral.

Closes #3283

## Type of Change

- [x] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change that adds functionality)
- [x] Breaking change (fix or feature that would cause existing
functionality to change)
- [x] Documentation update
- [ ] Performance improvement
- [ ] Code refactoring (no functional changes)

## Changes Made

- Set both published image stages to a container-loopback default while
keeping explicit host overrides available.
- Changed native Compose and the maintained Bash and PowerShell
launchers to use an internal `0.0.0.0` listener with host-loopback
publication.
- Preserved the top-level Compose token requirement and the existing
HTTP and WebSocket credential behavior for deliberate public binds.
- Scoped differential-capture token injection to the internal
`headroom-proxy` destination and kept sensitive headers redacted in
captured records.
- Added focused launch-contract, native-core, capture, and Docker
publication checks, plus a base/head harness that tolerates a base
already containing the fix.
- Updated Docker, installer, capture, and mirrored documentation,
including an unauthenticated local loopback quickstart and an
authenticated deliberate-public example.

## Testing

- [x] Focused unit and integration tests pass
- [x] Linting and formatting checks pass
- [ ] Type checking passes
- [x] New tests added for the changed deployment and capture behavior
- [ ] Manual testing performed

### Test Output

```text
uv run python -m pytest tests/test_proxy_hardening.py tests/test_install/test_native_installers.py tests/test_docker_compose_persistence.py tests/test_network_diff_capture.py tests/test_rust_core_smoke.py -q
76 passed, 1 skipped, 1 warning in 23.45s

uv run ruff check tests/test_install/test_native_installers.py tests/test_install/test_runtime.py
All checks passed!

bash -n e2e/docker-bind-security.sh
passed

bash e2e/docker-bind-security.sh --base-image headroom-t3283-base --head-image headroom-t3283-head --fixture tests/fixtures/docker-bind-exposure.json --base-ref origin/main
base_ref=origin/main ... runtime_slim_config=loopback rust_core=loaded local_completion=200 attacker_loopback=000 ws_status=403
docker bind security: fixture forwarding, loopback isolation, built-image health, slim-image loopback config, and token controls passed
```

## Real Behavior Proof

- Environment: Windows, Docker Desktop 29.6.2, current `origin/main`
base, head image, and a real Docker bridge peer.
- Exact command / steps: run the focused security/runtime tests, Compose
configuration checks, then `bash e2e/docker-bind-security.sh` against
the current base and head image definitions.
- Observed result: `76 passed, 1 skipped`; the built-image harness
passed base/head health, local completion, non-loopback isolation,
authenticated public HTTP/WebSocket controls, loopback runtime-slim
configuration, and direct Rust-core loading.
- Not tested: runtime-slim proxy service health on this host, because
its unrelated ONNXRuntime import path exits with code 139; the full
hosted matrix and a future published GHCR image remain CI-owned.

## Runtime Rollout Safety

- Rollout-managed feature(s): none
- Unsafe override required: no
- Minimum rollout channel: next release containing the Docker and
launcher changes
- Stable/default behavior changed: published images and maintained local
Docker launchers now use loopback-safe publication defaults
- Kill switch / disable path: revert the deployment-artifact changes
before release; deliberate public deployments remain explicitly
operator-controlled
- Qualification impact: Docker users relying on all-interface default
publication must opt into public publication and configure the existing
proxy token
- Deliberate public deployment: use an explicit public host publication,
set `HEADROOM_PROXY_TOKEN`, and send the matching bearer or
`X-Headroom-Proxy-Token` credential
- Local deployment: use the maintained loopback publication and no
mandatory token
- Rollback path: revert the deployment-artifact and documentation
changes together

## Review Readiness

- [x] I have performed a self-review
- [x] This PR is ready for human review

## Checklist

- [x] My code follows the project's style guidelines
- [x] I have performed a self-review of my code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [x] I have made corresponding changes to the documentation
- [ ] My changes generate no new warnings
- [x] I have added tests that prove the behavior is effective
- [x] Focused tests pass locally with these changes
- [x] I did **not** edit `CHANGELOG.md`; release-please generates
release notes from the conventional PR title

## Additional Notes

The issue fixture remains provenance for the unauthenticated
publication. Native
`headroom proxy` defaults and the application-level authentication
owners are
unchanged.

---------

Co-authored-by: JerrettDavis <mxjerrett@gmail.com>
2026-09-24 23:58:46 -05:00
dependabot[bot] fa58d77317 ci: bump astral-sh/setup-uv from 10.1.0 to 10.2.0 in the actions-minor-patch group (#3766)
Bumps the actions-minor-patch group with 1 update:
[astral-sh/setup-uv](https://github.com/astral-sh/setup-uv).

Updates `astral-sh/setup-uv` from 10.1.0 to 10.2.0
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/astral-sh/setup-uv/releases">astral-sh/setup-uv's
releases</a>.</em></p>
<blockquote>
<h2>v10.2.0 🌈 Disable automatic cache saves for merge queues</h2>
<h2>Changes</h2>
<p>This release contains the known-checksum of the most recent uv
releases and also disabled the uploading(saving) of the cache when in a
merge queue since theses caches would almost never be used.</p>
<h2>🚀 Enhancements</h2>
<ul>
<li>Disable automatic cache saves for merge queues <a
href="https://github.com/eifinger"><code>@​eifinger</code></a> (<a
href="https://redirect.github.com/astral-sh/setup-uv/issues/1056">#1056</a>)</li>
</ul>
<h2>🧰 Maintenance</h2>
<ul>
<li>chore: update known checksums for 0.12.17 @<a
href="https://github.com/apps/github-actions">github-actions[bot]</a>
(<a
href="https://redirect.github.com/astral-sh/setup-uv/issues/1058">#1058</a>)</li>
<li>chore: update known checksums for 0.12.16 @<a
href="https://github.com/apps/github-actions">github-actions[bot]</a>
(<a
href="https://redirect.github.com/astral-sh/setup-uv/issues/1057">#1057</a>)</li>
<li>chore: update known checksums for 0.12.15 @<a
href="https://github.com/apps/github-actions">github-actions[bot]</a>
(<a
href="https://redirect.github.com/astral-sh/setup-uv/issues/1054">#1054</a>)</li>
<li>chore: update known checksums for 0.12.14 @<a
href="https://github.com/apps/github-actions">github-actions[bot]</a>
(<a
href="https://redirect.github.com/astral-sh/setup-uv/issues/1053">#1053</a>)</li>
<li>chore: update known checksums for 0.12.13 @<a
href="https://github.com/apps/github-actions">github-actions[bot]</a>
(<a
href="https://redirect.github.com/astral-sh/setup-uv/issues/1045">#1045</a>)</li>
</ul>
<h2>📚 Documentation</h2>
<ul>
<li>docs: update version references to v10.1.0 @<a
href="https://github.com/apps/github-actions">github-actions[bot]</a>
(<a
href="https://redirect.github.com/astral-sh/setup-uv/issues/1044">#1044</a>)</li>
</ul>
<h2>⬆️ Dependency updates</h2>
<ul>
<li>chore(deps): roll up Dependabot updates <a
href="https://github.com/eifinger"><code>@​eifinger</code></a> (<a
href="https://redirect.github.com/astral-sh/setup-uv/issues/1059">#1059</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/astral-sh/setup-uv/commit/c18668ad3cf93ea998bef934396af7bb5c839dc7"><code>c18668a</code></a>
chore(deps): roll up Dependabot updates (<a
href="https://redirect.github.com/astral-sh/setup-uv/issues/1059">#1059</a>)</li>
<li><a
href="https://github.com/astral-sh/setup-uv/commit/ffe14763056ca34ecd158146a9fc7e144c8a2753"><code>ffe1476</code></a>
chore: update known checksums for 0.12.17 (<a
href="https://redirect.github.com/astral-sh/setup-uv/issues/1058">#1058</a>)</li>
<li><a
href="https://github.com/astral-sh/setup-uv/commit/f5548c55522a1db0af3c84f2af3d058bc9bc2de2"><code>f5548c5</code></a>
chore: update known checksums for 0.12.16 (<a
href="https://redirect.github.com/astral-sh/setup-uv/issues/1057">#1057</a>)</li>
<li><a
href="https://github.com/astral-sh/setup-uv/commit/a761a4e9afd7b2f353ae020bd6d3a3af34c6c4d5"><code>a761a4e</code></a>
Disable automatic cache saves for merge queues (<a
href="https://redirect.github.com/astral-sh/setup-uv/issues/1056">#1056</a>)</li>
<li><a
href="https://github.com/astral-sh/setup-uv/commit/3377a30666f438759955882b3eba6a92b2b29b12"><code>3377a30</code></a>
chore: update known checksums for 0.12.15 (<a
href="https://redirect.github.com/astral-sh/setup-uv/issues/1054">#1054</a>)</li>
<li><a
href="https://github.com/astral-sh/setup-uv/commit/dfb5f386776afcea37f271f3b656318d9949b9f1"><code>dfb5f38</code></a>
chore: update known checksums for 0.12.14 (<a
href="https://redirect.github.com/astral-sh/setup-uv/issues/1053">#1053</a>)</li>
<li><a
href="https://github.com/astral-sh/setup-uv/commit/45c121f982720f3bdf236c2ac06f126ca211949c"><code>45c121f</code></a>
chore: update known checksums for 0.12.13 (<a
href="https://redirect.github.com/astral-sh/setup-uv/issues/1045">#1045</a>)</li>
<li><a
href="https://github.com/astral-sh/setup-uv/commit/8073452fd4b566e886f04f731bcdbd8332b0b779"><code>8073452</code></a>
docs: update version references to v10.1.0 (<a
href="https://redirect.github.com/astral-sh/setup-uv/issues/1044">#1044</a>)</li>
<li>See full diff in <a
href="https://github.com/astral-sh/setup-uv/compare/v10.1.0...v10.2.0">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=astral-sh/setup-uv&package-manager=github_actions&previous-version=10.1.0&new-version=10.2.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore <dependency name> major version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's major version (unless you unignore this specific
dependency's major version or upgrade to it yourself)
- `@dependabot ignore <dependency name> minor version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's minor version (unless you unignore this specific
dependency's minor version or upgrade to it yourself)
- `@dependabot ignore <dependency name>` will close this group update PR
and stop Dependabot creating any more for the specific dependency
(unless you unignore this specific dependency or upgrade to it yourself)
- `@dependabot unignore <dependency name>` will remove all of the ignore
conditions of the specified dependency
- `@dependabot unignore <dependency name> <ignore condition>` will
remove the ignore condition of the specified dependency and ignore
conditions


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-09-24 16:14:14 -05:00
dependabot[bot] 62f775d5e8 ci: bump jlumbroso/free-disk-space from 1.3.1 to 2.0.0 (#3767)
Bumps
[jlumbroso/free-disk-space](https://github.com/jlumbroso/free-disk-space)
from 1.3.1 to 2.0.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/jlumbroso/free-disk-space/releases">jlumbroso/free-disk-space's
releases</a>.</em></p>
<blockquote>
<h2>v2.0.0 — three breaking changes, each with its reason</h2>
<h2>Breaking changes</h2>
<ol>
<li><strong><code>swap-storage</code> now defaults to
<code>false</code>.</strong> Closes <a
href="https://redirect.github.com/jlumbroso/free-disk-space/issues/12">#12</a>
— reported and diagnosed by <a
href="https://github.com/zaikunzhang"><code>@​zaikunzhang</code></a>,
whose proposed documentation fallback became the new FAQ. Removing swap
can kill a job under memory pressure with no error pointing back at the
cleanup step; a default should not break something that elementary.</li>
<li><strong><code>tool-cache</code> is renamed
<code>preinstalled-runtimes</code>.</strong> The old name still works
until v3.0.0 and prints a deprecation warning. (Its default is
unchanged: <code>false</code>, as it has been since 2022.) The new name
says what actually breaks when you enable it: the runtimes that
<code>actions/setup-node</code>, <code>setup-python</code>,
<code>setup-go</code>, and <code>setup-ruby</code> rely on.</li>
<li><strong>Specific options now override general ones.</strong>
<code>dotnet: false</code> exempts .NET from every removal path,
including <code>large-packages</code>. Fixes <a
href="https://redirect.github.com/jlumbroso/free-disk-space/issues/33">#33</a>
— reported by <a
href="https://github.com/ashleney"><code>@​ashleney</code></a>; the
overlap was first reported by <a
href="https://github.com/gmij"><code>@​gmij</code></a> in <a
href="https://redirect.github.com/jlumbroso/free-disk-space/issues/6">#6</a>,
and <a href="https://github.com/ax3l"><code>@​ax3l</code></a> explained
the overlapping removal paths and a workaround. The policy is explicit,
and this release applies it to .NET; future subject options add and test
their own exemptions.</li>
</ol>
<h2>Upgrading from v1 to v2</h2>
<p>Most workflows need no change.</p>
<ul>
<li>If you set <code>tool-cache:</code>, rename it to
<code>preinstalled-runtimes:</code>. The old name still works until
v3.0.0 and prints a warning.</li>
<li>If you relied on swap being removed by default, add
<code>swap-storage: true</code>. It now defaults to <code>false</code>,
because removing swap can kill a job under memory pressure with no error
pointing back here (<a
href="https://redirect.github.com/jlumbroso/free-disk-space/issues/12">#12</a>).</li>
<li>If you set <code>dotnet: false</code> and were surprised that .NET
was still removed, that is fixed — a specific option now overrides a
general one (<a
href="https://redirect.github.com/jlumbroso/free-disk-space/issues/33">#33</a>).</li>
</ul>
<h2>Also in this release</h2>
<p>A README FAQ (&quot;what are the possible side-effects of these
settings?&quot;), <code>CONTRIBUTING.md</code>, and a workflow example
for running cleanup conditionally (<a
href="https://redirect.github.com/jlumbroso/free-disk-space/issues/22">#22</a>).
The reasons behind every design decision live in <a
href="https://github.com/jlumbroso/free-disk-space/tree/main/docs/adr"><code>docs/adr/</code></a>
— including ADR-0007, the record of this release's default change,
written the day it was decided.</p>
<h2>v1.3.2 — security fix and the decision records</h2>
<p>Fixes the template-injection pattern in input handling (<a
href="https://redirect.github.com/jlumbroso/free-disk-space/issues/51">#51</a>,
by <a
href="https://github.com/nbuckwalt"><code>@​nbuckwalt</code></a>).</p>
<p>Also adds <code>docs/adr/</code> — the reasoning behind this action:
why it exists, what it inherited from <code>apache/flink</code> and
<code>ShubhamTatvamasi</code>, what it deliberately does not do, and
what is still open.</p>
<p>No behaviour changes. The <code>swap-storage</code> default change
ships in the next release.</p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/jlumbroso/free-disk-space/commit/ceedf095f4ec1a097402bc6bd80831f2e1a6fde6"><code>ceedf09</code></a>
docs: credit the contributors who reported the .NET overlap first, and
narrow...</li>
<li><a
href="https://github.com/jlumbroso/free-disk-space/commit/afeb5ad61cc96fb57cd77f263f82523ad066b950"><code>afeb5ad</code></a>
docs: state the deprecation horizon and add the v1→v2 migration
note</li>
<li><a
href="https://github.com/jlumbroso/free-disk-space/commit/a6144990006c494b6077186d03b1f1f1be6d9fc3"><code>a614499</code></a>
docs: remove references to unreleased versions</li>
<li><a
href="https://github.com/jlumbroso/free-disk-space/commit/9881e8b2aa98885a0a15e68ccfc172c2e6793434"><code>9881e8b</code></a>
fix: specific options override general ones — <code>dotnet: false</code>
now keeps .NET ...</li>
<li><a
href="https://github.com/jlumbroso/free-disk-space/commit/654d8aa378d76bbe05686844dcf4a55e811679fb"><code>654d8aa</code></a>
feat!: swap-storage defaults to false; tool-cache renamed to
preinstalled-run...</li>
<li><a
href="https://github.com/jlumbroso/free-disk-space/commit/3f13feab2962a87273d379ebc36ea159527e6cc9"><code>3f13fea</code></a>
docs: backfill the deliberative record (ADR-0001..0007)</li>
<li><a
href="https://github.com/jlumbroso/free-disk-space/commit/a855e00708fa302615b6d1b31ff817be4482a64f"><code>a855e00</code></a>
Merge pull request <a
href="https://redirect.github.com/jlumbroso/free-disk-space/issues/51">#51</a>
from nbuckwalt/fix/cmd-exec-inputs-env-indirection</li>
<li><a
href="https://github.com/jlumbroso/free-disk-space/commit/bcffc68e42e9c9afbd46c5ec108c263be01873ff"><code>bcffc68</code></a>
fix: use env var indirection for all boolean inputs to prevent
CMD_EXEC</li>
<li>See full diff in <a
href="https://github.com/jlumbroso/free-disk-space/compare/v1.3.1...v2.0.0">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=jlumbroso/free-disk-space&package-manager=github_actions&previous-version=1.3.1&new-version=2.0.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-09-24 16:13:55 -05:00
JD Davis 7f44a64490 ci(release): announce completed GitHub Releases in Slack (#3607)
## Description

- announce a GitHub Release in Slack only after `create-release` has
successfully uploaded its assets
- build an accessible Block Kit payload with the exact release name,
tag, repository, actor, and GitHub Release link
- isolate the incoming webhook to the delivery step and fail closed on
missing configuration or an unexpected Slack response
- add a reproducible `act` smoke workflow whose `ACT=true` guard builds
and validates the production payload without sending network traffic

## Changes Made

- Adds a gated release-notification job, a local composite action, a
payload builder, and smoke/regression coverage.

## Boundary and rollout

This notification means **the GitHub Release and its assets are ready**.
It intentionally does not claim that every package registry publish
succeeded, matching the existing `create-release` contract.

Configure `SLACK_RELEASES_WEBHOOK_URL` as a repository Actions secret
containing an incoming webhook already bound to `#headroom`. Slack
incoming webhooks cannot override their configured channel. No Slack
request was made while developing or validating this PR.

This is additive to the current publication flow and does not implement
or bypass the future Gate B work tracked by Linear HEAOSS-19.

## Testing

- Rebased onto current `main` at `94206e265`; refreshed focused
qualification on `477f68047`.

- [x] Focused tests pass

### Test Output

```text
68 passed
```

- `uv run --extra dev pytest tests/test_release_workflows.py
tests/test_release_version.py -q` (68 passed)
- `uv run --extra dev ruff check
.github/actions/release-slack-notification/build_payload.py
tests/test_release_workflows.py`
- `uv run --extra dev ruff format --check
.github/actions/release-slack-notification/build_payload.py
tests/test_release_workflows.py`
- `actionlint .github/act/release-slack-notification.yml
.github/workflows/release.yml`
- `act workflow_dispatch -W .github/act/release-slack-notification.yml
-j smoke --pull=false`

## Type of Change

- [x] CI / release automation

## Real Behavior Proof

- Environment: maintainer macOS/Python 3.13 checkout at aedf2c2e.
- Exact command / steps: `python -m pytest
tests/test_release_workflows.py tests/test_release_version.py -q`.
- Observed result: 68 passed; current hosted build, test and security
checks pass. Payload and workflow guards are covered by the focused
tests.
- Not tested: delivery to the production Slack webhook. No notification
or release was sent during this review.

## Runtime Rollout Safety

- Rollout-managed feature(s): no runtime feature; release notification
only.
- Minimum rollout channel: human-reviewed repository workflow
deployment.
- Stable/default behavior changed: successful GitHub Release asset
publication triggers the notification.
- Kill switch / disable path: disable or revert the notification job;
missing webhook configuration fails that job.
- Unsafe override required: no.
- Qualification impact: notification signifies GitHub Release assets
ready, not registry-wide publication success.
- Rollback path: revert the additive notification workflow/action.

## Review Readiness

- [x] I have performed a self-review
- [x] This PR is ready for human review
2026-09-23 22:57:50 -05:00
dependabot[bot]andJD Davis 13536dbc42 ci: bump github/codeql-action from 3 to 4 (#3626)
Bumps [github/codeql-action](https://github.com/github/codeql-action)
from 3 to 4.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/github/codeql-action/releases">github/codeql-action's
releases</a>.</em></p>
<blockquote>
<h2>v3.38.0</h2>
<ul>
<li>On GitHub-hosted runners, the CodeQL Action now deletes unused
CodeQL bundles from the toolcache before downloading a different bundle,
which frees up disk space for the analysis. We expect to roll this
change out to everyone in September. <a
href="https://redirect.github.com/github/codeql-action/pull/4124">#4124</a></li>
<li>The CodeQL Action now supports CodeQL releases that are compatible
with Linux Arm64 and downloads the native <code>linux-arm64</code>
CodeQL bundle when available. <a
href="https://redirect.github.com/github/codeql-action/pull/4072">#4072</a></li>
<li>Update default CodeQL bundle version to <a
href="https://github.com/github/codeql-action/releases/tag/codeql-bundle-v2.27.0">2.27.0</a>.
<a
href="https://redirect.github.com/github/codeql-action/pull/4129">#4129</a></li>
</ul>
<h2>v3.37.9</h2>
<ul>
<li>Update default CodeQL bundle version to <a
href="https://github.com/github/codeql-action/releases/tag/codeql-bundle-v2.26.4">2.26.4</a>.
<a
href="https://redirect.github.com/github/codeql-action/pull/4106">#4106</a></li>
</ul>
<h2>v3.37.8</h2>
<p>No user facing changes.</p>
<h2>v3.37.7</h2>
<ul>
<li>Update default CodeQL bundle version to <a
href="https://github.com/github/codeql-action/releases/tag/codeql-bundle-v2.26.3">2.26.3</a>.
<a
href="https://redirect.github.com/github/codeql-action/pull/4085">#4085</a></li>
</ul>
<h2>v3.37.6</h2>
<ul>
<li>Changed the default filepath for the new remote file address format
that was introduced in CodeQL Action 4.37.0 / 3.37.0 to
<code>.github/codeql-config.yml</code> to align it with the suggested
path that is used elsewhere. <a
href="https://redirect.github.com/github/codeql-action/pull/4070">#4070</a></li>
</ul>
<h2>v3.37.5</h2>
<ul>
<li>Fixed a bug where a network error while streaming the download of
the CodeQL bundle could terminate the <code>init</code> Action instead
of falling back to downloading the bundle before extracting it. <a
href="https://redirect.github.com/github/codeql-action/pull/4061">#4061</a></li>
</ul>
<h2>v3.37.4</h2>
<ul>
<li>This version of the CodeQL Action adds support for the
<code>tools</code> input for the <code>codeql-action/init</code> step to
be specified using a <code>github-codeql-tools</code> <a
href="https://docs.github.com/en/organizations/managing-organization-settings/managing-custom-properties-for-repositories-in-your-organization">repository
property</a>. This feature will gradually be rolled out following the
release of this version. Once rolled out, this allows for the CodeQL CLI
version that is used in GitHub-managed workflows, such as Default Setup,
to be set to a custom value. For example, customers who run into issues
with rate limits when a new CodeQL CLI version is released can set the
value to <code>toolcache</code> to always use the CodeQL CLI version
that is available in the runner toolcache. For Advanced Setup workflows,
the value provided for <code>tools</code> in the workflow definition
always takes precedence unless the value of the repository property
starts with <code>!</code>. <a
href="https://redirect.github.com/github/codeql-action/pull/4037">#4037</a></li>
<li>Update default CodeQL bundle version to <a
href="https://github.com/github/codeql-action/releases/tag/codeql-bundle-v2.26.2">2.26.2</a>.
<a
href="https://redirect.github.com/github/codeql-action/pull/4051">#4051</a></li>
</ul>
<h2>v3.37.3</h2>
<p>No user facing changes.</p>
<h2>v3.37.2</h2>
<ul>
<li>The new address format for the <code>config-file</code> input that
was introduced in CodeQL Action 4.37.0 is now enabled by default. In
addition to the format described there, the <code>remote=</code> prefix
can now be used to explicitly indicate that the input refers to a remote
file. All previous input formats continue to be accepted as well. <a
href="https://redirect.github.com/github/codeql-action/pull/4023">#4023</a></li>
<li>The CodeQL Action can now make use of <a
href="https://docs.github.com/en/code-security/how-tos/secure-at-scale/configure-organization-security/manage-usage-and-access/giving-org-access-private-registries">configured
private registries</a> in Default Setup to retrieve CodeQL configuration
files from remote repositories that require authentication. This will
allow customers to store their CodeQL configuration in a single
repository that can then be referenced by Default Setup workflows in
other repositories. We expect to roll this and other, related changes
out to everyone in July. <a
href="https://redirect.github.com/github/codeql-action/pull/4007">#4007</a></li>
</ul>
<h2>v3.37.1</h2>
<ul>
<li><em>Upcoming breaking change</em>: Add a deprecation warning for
customers using CodeQL version 2.20.6 and earlier. These versions of
CodeQL were discontinued on 1 July 2026 alongside GitHub Enterprise
Server 3.16, and will be unsupported by the next minor release of the
CodeQL Action. <a
href="https://redirect.github.com/github/codeql-action/pull/3956">#3956</a></li>
<li>Update default CodeQL bundle version to <a
href="https://github.com/github/codeql-action/releases/tag/codeql-bundle-v2.26.1">2.26.1</a>.
<a
href="https://redirect.github.com/github/codeql-action/pull/4019">#4019</a></li>
</ul>
<h2>v3.37.0</h2>
<ul>
<li>Update default CodeQL bundle version to <a
href="https://github.com/github/codeql-action/releases/tag/codeql-bundle-v2.26.0">2.26.0</a>.
<a
href="https://redirect.github.com/github/codeql-action/pull/3995">#3995</a></li>
<li>In addition to the existing input format, the
<code>config-file</code> input for the <code>codeql-action/init</code>
step will soon support a new <code>[owner/]repo[@ref][:path]</code>
format. All components except the repository name are optional. If
omitted, <code>owner</code> defaults to the same owner as the repository
the analysis is running for, <code>ref</code> to <code>main</code>, and
<code>path</code> to <code>.github/codeql-action.yaml</code>. Support
for this format ships in this version of the CodeQL Action, but will
only be enabled over the coming weeks. <a
href="https://redirect.github.com/github/codeql-action/pull/3973">#3973</a></li>
</ul>
<h2>v3.36.3</h2>
<p>No user facing changes.</p>
<h2>v3.36.2</h2>
<ul>
<li>Cache CodeQL CLI version information across Actions steps. <a
href="https://redirect.github.com/github/codeql-action/pull/3943">#3943</a></li>
<li>Reduce requests while waiting for analysis processing by using
exponential backoff when polling SARIF processing status. <a
href="https://redirect.github.com/github/codeql-action/pull/3937">#3937</a></li>
<li>Update default CodeQL bundle version to <a
href="https://github.com/github/codeql-action/releases/tag/codeql-bundle-v2.25.6">2.25.6</a>.
<a
href="https://redirect.github.com/github/codeql-action/pull/3948">#3948</a></li>
</ul>
<h2>v3.36.1</h2>
<p>No user facing changes.</p>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/github/codeql-action/blob/main/CHANGELOG.md">github/codeql-action's
changelog</a>.</em></p>
<blockquote>
<h2>4.37.7 - 13 Aug 2026</h2>
<ul>
<li>Update default CodeQL bundle version to <a
href="https://github.com/github/codeql-action/releases/tag/codeql-bundle-v2.26.3">2.26.3</a>.
<a
href="https://redirect.github.com/github/codeql-action/pull/4085">#4085</a></li>
</ul>
<h2>4.37.6 - 04 Aug 2026</h2>
<ul>
<li>Changed the default filepath for the new remote file address format
that was introduced in CodeQL Action 4.37.0 / 3.37.0 to
<code>.github/codeql-config.yml</code> to align it with the suggested
path that is used elsewhere. <a
href="https://redirect.github.com/github/codeql-action/pull/4070">#4070</a></li>
</ul>
<h2>4.37.5 - 03 Aug 2026</h2>
<ul>
<li>Fixed a bug where a network error while streaming the download of
the CodeQL bundle could terminate the <code>init</code> Action instead
of falling back to downloading the bundle before extracting it. <a
href="https://redirect.github.com/github/codeql-action/pull/4061">#4061</a></li>
</ul>
<h2>4.37.4 - 29 Jul 2026</h2>
<ul>
<li>This version of the CodeQL Action adds support for the
<code>tools</code> input for the <code>codeql-action/init</code> step to
be specified using a <code>github-codeql-tools</code> <a
href="https://docs.github.com/en/organizations/managing-organization-settings/managing-custom-properties-for-repositories-in-your-organization">repository
property</a>. This feature will gradually be rolled out following the
release of this version. Once rolled out, this allows for the CodeQL CLI
version that is used in GitHub-managed workflows, such as Default Setup,
to be set to a custom value. For example, customers who run into issues
with rate limits when a new CodeQL CLI version is released can set the
value to <code>toolcache</code> to always use the CodeQL CLI version
that is available in the runner toolcache. For Advanced Setup workflows,
the value provided for <code>tools</code> in the workflow definition
always takes precedence unless the value of the repository property
starts with <code>!</code>. <a
href="https://redirect.github.com/github/codeql-action/pull/4037">#4037</a></li>
<li>Update default CodeQL bundle version to <a
href="https://github.com/github/codeql-action/releases/tag/codeql-bundle-v2.26.2">2.26.2</a>.
<a
href="https://redirect.github.com/github/codeql-action/pull/4051">#4051</a></li>
</ul>
<h2>4.37.3 - 22 Jul 2026</h2>
<p>No user facing changes.</p>
<h2>4.37.2 - 21 Jul 2026</h2>
<ul>
<li>The new address format for the <code>config-file</code> input that
was introduced in CodeQL Action 4.37.0 is now enabled by default. In
addition to the format described there, the <code>remote=</code> prefix
can now be used to explicitly indicate that the input refers to a remote
file. All previous input formats continue to be accepted as well. <a
href="https://redirect.github.com/github/codeql-action/pull/4023">#4023</a></li>
<li>The CodeQL Action can now make use of <a
href="https://docs.github.com/en/code-security/how-tos/secure-at-scale/configure-organization-security/manage-usage-and-access/giving-org-access-private-registries">configured
private registries</a> in Default Setup to retrieve CodeQL configuration
files from remote repositories that require authentication. This will
allow customers to store their CodeQL configuration in a single
repository that can then be referenced by Default Setup workflows in
other repositories. We expect to roll this and other, related changes
out to everyone in July. <a
href="https://redirect.github.com/github/codeql-action/pull/4007">#4007</a></li>
</ul>
<h2>4.37.1 - 16 Jul 2026</h2>
<ul>
<li><em>Upcoming breaking change</em>: Add a deprecation warning for
customers using CodeQL version 2.20.6 and earlier. These versions of
CodeQL were discontinued on 1 July 2026 alongside GitHub Enterprise
Server 3.16, and will be unsupported by the next minor release of the
CodeQL Action. <a
href="https://redirect.github.com/github/codeql-action/pull/3956">#3956</a></li>
<li>Update default CodeQL bundle version to <a
href="https://github.com/github/codeql-action/releases/tag/codeql-bundle-v2.26.1">2.26.1</a>.
<a
href="https://redirect.github.com/github/codeql-action/pull/4019">#4019</a></li>
</ul>
<h2>4.37.0 - 08 Jul 2026</h2>
<ul>
<li>Update default CodeQL bundle version to <a
href="https://github.com/github/codeql-action/releases/tag/codeql-bundle-v2.26.0">2.26.0</a>.
<a
href="https://redirect.github.com/github/codeql-action/pull/3995">#3995</a></li>
<li>In addition to the existing input format, the
<code>config-file</code> input for the <code>codeql-action/init</code>
step will soon support a new <code>[owner/]repo[@ref][:path]</code>
format. All components except the repository name are optional. If
omitted, <code>owner</code> defaults to the same owner as the repository
the analysis is running for, <code>ref</code> to <code>main</code>, and
<code>path</code> to <code>.github/codeql-action.yaml</code>. Support
for this format ships in this version of the CodeQL Action, but will
only be enabled over the coming weeks. <a
href="https://redirect.github.com/github/codeql-action/pull/3973">#3973</a></li>
</ul>
<h2>4.36.3 - 01 Jul 2026</h2>
<p>No user facing changes.</p>
<h2>4.36.2 - 04 Jun 2026</h2>
<ul>
<li>Cache CodeQL CLI version information across Actions steps. <a
href="https://redirect.github.com/github/codeql-action/pull/3943">#3943</a></li>
<li>Reduce requests while waiting for analysis processing by using
exponential backoff when polling SARIF processing status. <a
href="https://redirect.github.com/github/codeql-action/pull/3937">#3937</a></li>
<li>Update default CodeQL bundle version to <a
href="https://github.com/github/codeql-action/releases/tag/codeql-bundle-v2.25.6">2.25.6</a>.
<a
href="https://redirect.github.com/github/codeql-action/pull/3948">#3948</a></li>
</ul>
<h2>4.36.1 - 02 Jun 2026</h2>
<p>No user facing changes.</p>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/github/codeql-action/commit/762a5ed7f7424ff89c26820bdf497fe60e53a474"><code>762a5ed</code></a>
Add a helper to delete the CodeQL tools from the toolcache</li>
<li><a
href="https://github.com/github/codeql-action/commit/ceb85f25b55c9a71bfe9160f5f967eb002bb519f"><code>ceb85f2</code></a>
Distinguish GitHub-hosted runners from ones that look hosted</li>
<li><a
href="https://github.com/github/codeql-action/commit/9fddc16f0de775b9edd8a84dd5839ac2db070f8b"><code>9fddc16</code></a>
Merge pull request <a
href="https://redirect.github.com/github/codeql-action/issues/4088">#4088</a>
from github/dependabot/npm_and_yarn/octokit/plugin-r...</li>
<li><a
href="https://github.com/github/codeql-action/commit/36cbf13b5e1d1b4ef93c4828c59b8bf5d6290e3f"><code>36cbf13</code></a>
Address review comments</li>
<li><a
href="https://github.com/github/codeql-action/commit/38dd4a088a2d38c5d48640c3506dc86215880d92"><code>38dd4a0</code></a>
Don't record an overlay status when the job was cancelled</li>
<li><a
href="https://github.com/github/codeql-action/commit/2f3c1c964a44e3cb80f182ee1d38fc341e7aad63"><code>2f3c1c9</code></a>
Add an internal <code>job-status</code> input to the <code>init</code>
Action</li>
<li>See full diff in <a
href="https://github.com/github/codeql-action/compare/v3...v4">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=github/codeql-action&package-manager=github_actions&previous-version=3&new-version=4)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: JD Davis <mxjerrett@gmail.com>
2026-09-21 09:51:20 -07:00