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
1 change: 1 addition & 0 deletions .github/workflows/ci-guards.yml
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ jobs:
run: python3 scripts/generate-cmux-config-schema.py --check

- name: Set up Bun for guard tests
if: ${{ matrix.group == 'preflight' || matrix.group == 'release' }}
uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2
with:
bun-version: "1.3.6"
Expand Down
15 changes: 14 additions & 1 deletion tests/test_ci_change_areas.py
Original file line number Diff line number Diff line change
Expand Up @@ -1417,7 +1417,7 @@ def test_build_input_fingerprint_tracks_product_identity_not_ci_orchestration()
from build_input_fingerprint import fingerprint
import product_input_identity as product_inputs

workflow = CI_WORKFLOW.read_text(encoding="utf-8")
workflow = MACOS_WORKFLOW.read_text(encoding="utf-8")
admission = product_inputs._job_block(
workflow,
product_inputs.MACOS_ADMISSION_JOB,
Expand Down Expand Up @@ -1993,6 +1993,19 @@ def test_linux_preflight_allows_skipped_guard_call_when_all_guard_routes_are_fal
assert result.returncode == 0, result.stderr


def test_guard_bun_setup_runs_only_for_groups_that_execute_bun() -> None:
block = workflow_job_block("workflow-guard-tests", GUARD_WORKFLOW)
setup = block.index(" - name: Set up Bun for guard tests")
next_step = block.index(" - name: Validate Claude launch environment policy behavior", setup)
setup_block = block[setup:next_step]
assert "if: ${{ matrix.group == 'preflight' || matrix.group == 'release' }}" in setup_block
assert block.count("setup-bun@") == 1
# The release group executes test_ios_testflight_main_push_filter.py, whose
# decision harness launches Bun. Do not remove release from this condition
# just because the direct command is Python.
assert "test_ios_testflight_main_push_filter.py" in block


def test_history_guard_uses_shallow_synthetic_merge_parent() -> None:
block = workflow_job_block("workflow-guard-history", GUARD_WORKFLOW)
assert "github.event_name == 'workflow_dispatch' && '0' || '2'" in block
Expand Down
Loading