mirror of
https://github.com/headroomlabs-ai/headroom.git
synced 2026-08-27 14:17:10 -04:00
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 5 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="5fda3b95a4"><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="4ab7e95f05"><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="0f3a009f47"><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="f8cf4291c8"><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="54baeea5b3"><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="c7092773a3"><code>c709277</code></a> Annotation code fix (<a href="https://redirect.github.com/actions/setup-python/issues/1335">#1335</a>)</li> <li><a href="6849080452"><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="0903b469fb"><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><a href="ece7cb06ca"><code>ece7cb0</code></a> Fix pip cache error handling on Windows. (<a href="https://redirect.github.com/actions/setup-python/issues/1040">#1040</a>)</li> <li><a href="1d18d7af5f"><code>1d18d7a</code></a> Update advanced-usage.md (<a href="https://redirect.github.com/actions/setup-python/issues/811">#811</a>)</li> <li>Additional commits viewable in <a href="https://github.com/actions/setup-python/compare/v5...v7">compare view</a></li> </ul> </details> <br /> [](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>
164 lines
5.5 KiB
YAML
164 lines
5.5 KiB
YAML
name: Network Diff Capture
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
concurrency:
|
|
group: network-diff-capture-${{ github.ref }}
|
|
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
|
|
|
|
env:
|
|
PY_VERSION: "3.12"
|
|
|
|
jobs:
|
|
offline:
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 20
|
|
steps:
|
|
- uses: actions/checkout@v7
|
|
|
|
- uses: actions/setup-python@v7
|
|
with:
|
|
python-version: ${{ env.PY_VERSION }}
|
|
|
|
- name: Install offline test tools
|
|
run: |
|
|
python -m pip install --upgrade pip
|
|
python -m pip install \
|
|
'tiktoken>=0.5.0' \
|
|
'pydantic>=2.0.0' \
|
|
'litellm==1.82.3' \
|
|
'click>=8.1.0' \
|
|
'rich>=13.0.0' \
|
|
'opentelemetry-api>=1.24.0' \
|
|
'ast-grep-cli>=0.30.0' \
|
|
'fastapi>=0.100.0' \
|
|
'uvicorn>=0.23.0' \
|
|
'httpx[http2]>=0.24.0' \
|
|
'openai>=2.14.0' \
|
|
'mcp>=1.0.0' \
|
|
'magika>=0.6.0' \
|
|
'zstandard>=0.20.0' \
|
|
'websockets>=13.0' \
|
|
'onnxruntime>=1.24' \
|
|
'transformers>=4.30.0' \
|
|
'watchdog>=4.0.0' \
|
|
'sqlite-vec>=0.1.6' \
|
|
pytest ruff mypy
|
|
|
|
- name: Lint capture code
|
|
run: ruff check headroom/capture headroom/cli/capture.py tests/test_network_diff_capture.py
|
|
|
|
- name: Format check capture code
|
|
run: ruff format --check headroom/capture headroom/cli/capture.py tests/test_network_diff_capture.py
|
|
|
|
- name: Type-check capture code
|
|
run: mypy headroom/capture/network_diff.py headroom/cli/capture.py
|
|
|
|
- name: Run capture tests
|
|
run: python -m pytest tests/test_network_diff_capture.py
|
|
|
|
- name: Validate compose model
|
|
env:
|
|
ANTHROPIC_API_KEY: dummy
|
|
run: docker compose -f docker/differential-network-capture/docker-compose.yml --profile run config
|
|
|
|
- name: Build Claude Code runner image
|
|
env:
|
|
ANTHROPIC_API_KEY: dummy
|
|
run: docker compose -f docker/differential-network-capture/docker-compose.yml --profile run build claude-direct
|
|
|
|
- name: Smoke Claude Code runner image
|
|
run: docker run --rm -e CLAUDE_COMMAND="claude --version" headroom-network-diff-claude-direct:latest
|
|
|
|
live-anthropic:
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 90
|
|
needs: offline
|
|
env:
|
|
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
|
|
CLAUDE_PROMPT: "Summarize this repository in one sentence. Keep the answer under 30 words."
|
|
steps:
|
|
- uses: actions/checkout@v7
|
|
|
|
- uses: actions/setup-python@v7
|
|
with:
|
|
python-version: ${{ env.PY_VERSION }}
|
|
|
|
- name: Install report dependencies
|
|
run: |
|
|
python -m pip install --upgrade pip
|
|
python -m pip install \
|
|
'tiktoken>=0.5.0' \
|
|
'pydantic>=2.0.0' \
|
|
'litellm==1.82.3' \
|
|
'click>=8.1.0' \
|
|
'rich>=13.0.0' \
|
|
'opentelemetry-api>=1.24.0' \
|
|
'ast-grep-cli>=0.30.0' \
|
|
'fastapi>=0.100.0' \
|
|
'uvicorn>=0.23.0' \
|
|
'httpx[http2]>=0.24.0' \
|
|
'openai>=2.14.0' \
|
|
'mcp>=1.0.0' \
|
|
'magika>=0.6.0' \
|
|
'zstandard>=0.20.0' \
|
|
'websockets>=13.0' \
|
|
'onnxruntime>=1.24' \
|
|
'transformers>=4.30.0' \
|
|
'watchdog>=4.0.0' \
|
|
'sqlite-vec>=0.1.6'
|
|
|
|
- name: Run live Claude Code differential capture
|
|
if: env.ANTHROPIC_API_KEY != ''
|
|
working-directory: docker/differential-network-capture
|
|
run: |
|
|
set -euo pipefail
|
|
mkdir -p captures
|
|
docker compose up -d --build mitm-direct mitm-headroom-upstream headroom-proxy mitm-headroom-client
|
|
trap 'docker compose --profile run down -v' EXIT
|
|
|
|
for i in $(seq 1 90); do
|
|
if docker compose exec -T headroom-proxy curl --fail --silent http://127.0.0.1:8787/readyz >/dev/null; then
|
|
break
|
|
fi
|
|
if [ "$i" -eq 90 ]; then
|
|
docker compose logs headroom-proxy
|
|
exit 1
|
|
fi
|
|
sleep 2
|
|
done
|
|
|
|
docker compose --profile run run --rm claude-direct
|
|
docker compose --profile run run --rm claude-headroom
|
|
|
|
- name: Report skipped live capture
|
|
if: env.ANTHROPIC_API_KEY == ''
|
|
run: |
|
|
echo "::warning title=Live network diff skipped::ANTHROPIC_API_KEY is not configured for this repository; offline harness checks ran, but live Claude Code capture was skipped."
|
|
mkdir -p docker/differential-network-capture/captures
|
|
cat > docker/differential-network-capture/captures/skipped.md <<'EOF'
|
|
# Live Network Diff Capture Skipped
|
|
|
|
`ANTHROPIC_API_KEY` is not configured for this repository.
|
|
EOF
|
|
|
|
- name: Generate network diff report
|
|
if: env.ANTHROPIC_API_KEY != ''
|
|
run: |
|
|
python -m headroom.cli capture network-diff \
|
|
--direct docker/differential-network-capture/captures/direct.jsonl \
|
|
--headroom docker/differential-network-capture/captures/headroom-client.jsonl \
|
|
--output docker/differential-network-capture/captures/report.md \
|
|
--json-output docker/differential-network-capture/captures/report.json
|
|
|
|
- name: Upload capture artifacts
|
|
if: always()
|
|
uses: actions/upload-artifact@v7
|
|
with:
|
|
name: network-diff-capture-${{ github.run_number }}
|
|
path: docker/differential-network-capture/captures/
|
|
if-no-files-found: warn
|