Skip to content
Merged
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/ci-policy.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ also scans the full workflow directory. Main and manual venues are explicit:
| workflow-lint | none | yes |
| proxy-port-fallbacks | none | yes |
| fleet-search-parity-guard | none | yes |
| fleet-rust-tests | main push, path gated | yes |
| opencode-config-guard | main push | yes |
| mcpx fix-test guard | main push contract tests | yes |
| production-line guard | main push, path gated | yes |
Expand Down
16 changes: 12 additions & 4 deletions .github/scripts/check-fleet-rust-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@
# The contract: the fleet.rust row of .github/test-suite-registry.json
# counts as covered only while all of these agree —
# 1. .github/workflows/fleet-rust-tests.yml exists, is basic-tier,
# and runs on pull_request (pkgs/fleet/** paths), push to main,
# and workflow_dispatch;
# and runs on push to main (pkgs/fleet/** paths) and
# workflow_dispatch — and declares no pull_request trigger
# (main-only CI policy, .github/ci-policy.md, 2026-11-13);
# 2. its test step runs the locked workspace test command with the
# toolchain channel pinned in pkgs/fleet/rust-toolchain.toml;
# 3. the registry row fleet.rust is status "mapped" and names this
Expand Down Expand Up @@ -38,12 +39,19 @@ if [ "$fail" -ne 0 ]; then
exit 1
fi

# 1. Triggers and tier shape.
for trigger in pull_request push workflow_dispatch; do
# 1. Triggers and tier shape. Main-only CI policy (2026-11-13): the
# workflow runs on push to main and workflow_dispatch only; a
# pull_request trigger is a contract violation, not a requirement.
for trigger in push workflow_dispatch; do
if ! grep -qE "^ ${trigger}:" "$WF"; then
err "workflow does not declare the ${trigger} trigger"
fi
done
for trigger in pull_request pull_request_target merge_group; do
if grep -qE "^ ${trigger}:" "$WF"; then
err "workflow declares the ${trigger} trigger - main-only CI policy forbids PR triggers"
fi
done
if ! grep -qF '"pkgs/fleet/**"' "$WF"; then
err "workflow path filter does not cover pkgs/fleet/** — a Fleet change could silently skip the suite"
fi
Expand Down
10 changes: 10 additions & 0 deletions .github/scripts/check-fleet-rust-tests.test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,16 @@ make_fixture "$MUT"
sed -i '/pkgs\/fleet\/\*\*/d' "$MUT/.github/workflows/fleet-rust-tests.yml"
expect_fail "$MUT" "workflow without the pkgs/fleet path filter"

MUT="$TMP/pr-trigger"
make_fixture "$MUT"
sed -i 's/^ workflow_dispatch:/ pull_request:\n workflow_dispatch:/' "$MUT/.github/workflows/fleet-rust-tests.yml"
expect_fail "$MUT" "workflow with a pull_request trigger (main-only policy)"

MUT="$TMP/no-push"
make_fixture "$MUT"
sed -i 's/^ push:/ pushx:/' "$MUT/.github/workflows/fleet-rust-tests.yml"
expect_fail "$MUT" "workflow without the push trigger"

MUT="$TMP/registry-uncovered"
make_fixture "$MUT"
python3 - "$MUT/.github/test-suite-registry.json" <<'PYEOF'
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/fleet-rust-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ permissions:

concurrency:
# Push-to-main runs are keyed by run_id so every merged tree gets
# its own completed run (the scripts-test/nix-ci contract);
# pull-request runs share a per-ref group so a new push supersedes
# the stale one.
# its own completed run (the scripts-test/nix-ci contract); manual
# dispatch runs share a per-ref group so a new dispatch supersedes
# the stale one. (Main-only CI policy: no PR runs exist.)
group: fleet-rust-tests-${{ github.event_name == 'push' && github.run_id || github.ref }}
cancel-in-progress: true

Expand All @@ -51,7 +51,7 @@ jobs:
bash .github/scripts/check-fleet-rust-tests.test.sh

- name: Install Rust toolchain
run: rustup toolchain install 1.99.0 --profile minimal
run: rustup toolchain install 1.99.1 --profile minimal

- name: Test the fleet Rust workspace
run: cargo +1.99.0 test --manifest-path pkgs/fleet/Cargo.toml --workspace --all-targets --locked
run: cargo +1.99.1 test --manifest-path pkgs/fleet/Cargo.toml --workspace --all-targets --locked