Compress tool outputs, logs, files, and RAG chunks before they reach the LLM. 20% fewer tokens for coding agents, 60-95% fewer tokens for JSON, same answers. Library, proxy, MCP server.
Python agentaianthropicclaude-codecompressioncontext-engineeringcontext-windowcursorfastapilangchainllmmcpopenaiprompt-engineeringproxypythonragtoken-optimizationtokenstypescript
ci: scope native/wheel/dashboard jobs to relevant paths (unstarve the queue) (#2155)
Tejas Chopra58d3445d2367
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.ymlindex 4f86a5160..2963d3819 100644--- a/.github/workflows/ci.yml+++ b/.github/workflows/ci.yml@@ -43,7 +43,9 @@ jobs:timeout-minutes: 5outputs:code: ${{ steps.filter.outputs.code }}- e2e: ${{ steps.filter.outputs.e2e }}+ native: ${{ steps.filter.outputs.native }}+ dashboard: ${{ steps.filter.outputs.dashboard }}+ packaging: ${{ steps.filter.outputs.packaging }}workflows: ${{ steps.filter.outputs.workflows }}steps:- uses: actions/checkout@v7@@ -61,14 +63,41 @@ jobs:- 'tests/**'- 'scripts/**'- '.github/workflows/**'- e2e:- - 'headroom/**'+ # native = anything that can change the compiled wrapper, the native+ # install flow, or the docker image (drives the scarce macOS/Windows+ # runners + docker E2E). A pure-Python logic change hits none of these.+ native:+ - 'headroom/cli/**'+ - 'headroom/install/**'+ - 'headroom/providers/**'+ - 'headroom/rtk/**'- 'crates/**'+ - '**/*.rs'+ - 'Cargo.toml'+ - 'Cargo.lock'+ - 'rust-toolchain.toml'- 'docker/**'- 'Dockerfile'- 'e2e/**'- 'scripts/install*'- 'pyproject.toml'+ - '.github/workflows/**'+ dashboard:+ - 'headroom/dashboard/**'+ - '.github/workflows/**'+ # packaging = anything that changes how the wheel is built (so the+ # cross-platform wheel build only reruns when the build actually changes).+ packaging:+ - 'pyproject.toml'+ - 'Cargo.toml'+ - 'Cargo.lock'+ - 'uv.lock'+ - 'rust-toolchain.toml'+ - 'crates/**'+ - '**/*.rs'+ - 'scripts/**'+ - 'MANIFEST.in'+ - '.github/workflows/**'workflows:- '.github/workflows/**'@@ -122,7 +151,7 @@ jobs:build-wheel-windows:needs: changes- if: needs.changes.outputs.code == 'true'+ if: needs.changes.outputs.packaging == 'true'runs-on: windows-latesttimeout-minutes: 45steps:@@ -354,7 +383,7 @@ jobs:test-dashboard-ui:needs: [changes, build-wheel]- if: needs.changes.outputs.code == 'true'+ if: needs.changes.outputs.dashboard == 'true'runs-on: ubuntu-latesttimeout-minutes: 20steps:@@ -474,7 +503,7 @@ jobs:docker-native-e2e:needs: changes- if: needs.changes.outputs.e2e == 'true'+ if: needs.changes.outputs.native == 'true'runs-on: ubuntu-latesttimeout-minutes: 45steps:@@ -518,7 +547,7 @@ jobs:windows-native-wrapper:needs: changes- if: needs.changes.outputs.e2e == 'true'+ if: needs.changes.outputs.native == 'true'runs-on: windows-latesttimeout-minutes: 20steps:@@ -535,7 +564,7 @@ jobs:macos-native-wrapper:needs: changes- if: needs.changes.outputs.e2e == 'true'+ if: needs.changes.outputs.native == 'true'runs-on: macos-latesttimeout-minutes: 20steps:diff --git a/.github/workflows/init-e2e.yml b/.github/workflows/init-e2e.ymlindex d6b9bb9ff..8ec26ee1b 100644--- a/.github/workflows/init-e2e.yml+++ b/.github/workflows/init-e2e.yml@@ -3,8 +3,12 @@ name: Init E2Eon:pull_request:branches: [main]+ # Scoped to what the `headroom init` flow actually exercises (mirrors+ # init-native-e2e), not all of headroom/** — a pure-Python logic change+ # elsewhere shouldn't spin up a docker init E2E.paths:- - 'headroom/**'+ - 'headroom/cli/**'+ - 'headroom/install/**'- 'crates/**'- 'docker/**'- 'Dockerfile'diff --git a/.github/workflows/wrap-e2e.yml b/.github/workflows/wrap-e2e.ymlindex 37ff164dc..cc041e092 100644--- a/.github/workflows/wrap-e2e.yml+++ b/.github/workflows/wrap-e2e.yml@@ -3,8 +3,13 @@ name: Wrap E2Eon:pull_request:branches: [main]+ # Scoped to what the `headroom wrap` flow actually exercises (mirrors+ # wrap-native-e2e), not all of headroom/** — a pure-Python logic change+ # elsewhere shouldn't spin up a docker wrap E2E.paths:- - 'headroom/**'+ - 'headroom/cli/**'+ - 'headroom/providers/**'+ - 'headroom/rtk/**'- 'crates/**'- 'docker/**'- 'Dockerfile'