Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .github/actions/prepare-native/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ inputs:
description: Installed Core interpreter command or executable path
required: false
default: python
host-dependencies:
description: Also install the locked runtime host packages Core's durable host imports from beside it (src/agent_comms)
required: false
default: "false"
runs:
using: composite
steps:
Expand All @@ -18,3 +22,8 @@ runs:
- name: Prepare pinned native Pi
shell: bash
run: stack/bin/prepare-pi-native --python "$(command -v '${{ inputs.python }}')"
- name: Install locked runtime host dependencies
if: inputs.host-dependencies == 'true'
shell: bash
working-directory: src/agent_comms
run: npm ci --ignore-scripts --omit=dev --no-audit --no-fund
11 changes: 11 additions & 0 deletions .github/actions/prepare-python/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: Prepare Python
description: Set up the interpreter pyproject.toml names and install Core, the refactor-audit skill and the test dependencies, editable.
runs:
using: composite
steps:
- uses: actions/setup-python@v5
with:
python-version-file: pyproject.toml
- name: Install agent-comms and test dependencies
shell: bash
run: python -m pip install -e src/agent_comms/skills/refactor-audit -e '.[dev]'
21 changes: 5 additions & 16 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,18 +72,13 @@ jobs:
with:
submodules: recursive

- name: Setup Python
uses: actions/setup-python@v5
with:
python-version-file: pyproject.toml
- name: Prepare Python
uses: ./.github/actions/prepare-python

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e src/agent_comms/skills/refactor-audit -e ".[dev]"

- name: Prepare pinned native Pi
- name: Prepare pinned native Pi and its runtime host dependencies
uses: ./.github/actions/prepare-native
with:
host-dependencies: "true"

- name: Check the native pin matches the tree
run: pytest tests/test_native_pin.py --no-cov -q
Expand All @@ -95,12 +90,6 @@ jobs:
run: |
npm install -g --prefix "$HOME/.local/pi-npm" --ignore-scripts --no-audit --no-fund @earendil-works/pi-coding-agent@0.85.1

# The durable host imports pi-durable, pi-ai and chord from beside it.
- name: Install locked runtime host dependencies
working-directory: src/agent_comms
shell: bash
run: npm ci --ignore-scripts --omit=dev --no-audit --no-fund

- name: Run tests with coverage (85% enforced on Linux)
if: matrix.os == 'ubuntu-latest'
run: |
Expand Down
34 changes: 29 additions & 5 deletions .github/workflows/debt-ratchet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,8 @@ jobs:
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: actions/setup-python@v5
with:
python-version-file: pyproject.toml
- name: Install agent-comms and test dependencies
run: python -m pip install -e src/agent_comms/skills/refactor-audit -e '.[dev]'
- name: Prepare Python
uses: ./.github/actions/prepare-python
- name: Compile production and tools
run: python -m compileall -q src tools
- name: Import every Core and hook module
Expand All @@ -47,6 +44,33 @@ jobs:
- name: Stack clients import only modules Core has
run: python tools/module_layers.py --check

touched-tests:
# A pull request that edits a test file runs it: two PRs on 2026-10-21 reported a touched
# test green while it failed (2510, 2560), and smoke only collects the suite.
name: touched-tests
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0
- name: Prepare Python
uses: ./.github/actions/prepare-python
- name: Prepare pinned native Pi and its runtime host dependencies
uses: ./.github/actions/prepare-native
with:
host-dependencies: "true"
- name: Run every test file the change touches
env:
BASE: ${{ github.event.merge_group.base_sha || github.event.pull_request.base.sha }}
run: |
changed=$(git diff --name-only --diff-filter=AMR "$BASE" HEAD -- 'tests/test_*.py' 'tests/**/test_*.py')
if [ -z "$changed" ]; then echo "no test file touched"; exit 0; fi
mapfile -t touched <<<"$changed"
printf '%s\n' "${touched[@]}"
timeout 15m pytest -q -p no:cacheprovider -o faulthandler_timeout=60 "${touched[@]}"

native-scripts:
name: native-scripts
runs-on: ubuntu-latest
Expand Down
Loading