From f2951a8b765b99dfb7d785ccddd34fbedf584333 Mon Sep 17 00:00:00 2001 From: Cameron Date: Fri, 10 Jul 2026 23:05:00 -0700 Subject: [PATCH] Fix CI classifier fixtures in PR context The corpus workflow runs its fixture suite during pull requests. Its ambient pipeline kind caused the generic wiki-only fixture to exercise the deliberately full pull-request policy instead of the local classifier path. Pin each ordinary fixture to local while retaining explicit manual and pull-request cases. Defense: wiki/process/agent-scale.md section 2 requires a fast corpus CI contract with change-aware Rust verification while pull-request and manual runs remain full safety gates. This keeps that stated policy testable from inside the always-on corpus workflow. --- tools/test_ci_rust_changed.sh | 9 ++++-- ...026-07-10-ci-classifier-fixture-context.md | 29 +++++++++++++++++++ wiki/log/DEVLOG.md | 5 ++++ wiki/process/agent-scale.md | 4 ++- 4 files changed, 44 insertions(+), 3 deletions(-) create mode 100644 wiki/log/2026-07-10-ci-classifier-fixture-context.md diff --git a/tools/test_ci_rust_changed.sh b/tools/test_ci_rust_changed.sh index 8b4d001..7a0820e 100755 --- a/tools/test_ci_rust_changed.sh +++ b/tools/test_ci_rust_changed.sh @@ -5,14 +5,19 @@ cd "$(dirname "$0")/.." fail=0 -if bash tools/ci-rust-changed.sh wiki/process/meta.md >/dev/null 2>&1; then +# The corpus workflow runs this suite for pull requests too. Pin the ordinary +# path fixtures to their own context so the workflow's ambient pipeline kind +# cannot turn the wiki-only case into a deliberately full safety run. +if TANGLED_PIPELINE_KIND=local \ + bash tools/ci-rust-changed.sh wiki/process/meta.md >/dev/null 2>&1; then echo "FAIL: wiki-only path requested the Rust gate" fail=1 else echo " ok skips: wiki-only path" fi -if ! bash tools/ci-rust-changed.sh src/lib.rs >/dev/null 2>&1; then +if ! TANGLED_PIPELINE_KIND=local \ + bash tools/ci-rust-changed.sh src/lib.rs >/dev/null 2>&1; then echo "FAIL: source path skipped the Rust gate" fail=1 else diff --git a/wiki/log/2026-07-10-ci-classifier-fixture-context.md b/wiki/log/2026-07-10-ci-classifier-fixture-context.md new file mode 100644 index 0000000..d2adb1a --- /dev/null +++ b/wiki/log/2026-07-10-ci-classifier-fixture-context.md @@ -0,0 +1,29 @@ +# 2026-07-10 — Keep CI classifier fixtures independent of their pipeline + +``` +Type: log +``` + +## Intent + +Repair the corpus pull-request workflow after its classifier fixture inherited +`TANGLED_PIPELINE_KIND=pull_request` and incorrectly reported that a wiki-only +path required the Rust gate. + +## Changed + +- The ordinary wiki-only and Rust-source fixtures now explicitly select the + local classifier context. The manual and pull-request cases continue to + select their own full-safety contexts. +- The agent-scale verification contract now records that fixture isolation. + +## Design/spec impact + +No game rule or CI policy changed. Pull requests and manual runs remain full +Rust/Bevy safety gates; this restores the classifier regression test that +verifies that policy from inside the always-on corpus workflow. + +## Checks + +- `TANGLED_PIPELINE_KIND=pull_request bash tools/test_ci_rust_changed.sh` +- `./tools/check.sh --docs` diff --git a/wiki/log/DEVLOG.md b/wiki/log/DEVLOG.md index faef278..3b9d919 100644 --- a/wiki/log/DEVLOG.md +++ b/wiki/log/DEVLOG.md @@ -421,6 +421,11 @@ add or amend a session log, then re-run the generator. - Intent: Make remote corpus enforcement real: missing audit utilities must turn the Tangled job red instead of letting an empty scan report success. - Log: [wiki/log/2026-07-10-ci-gates-fail-closed.md](2026-07-10-ci-gates-fail-closed.md) +## 2026-07-10 - Keep CI classifier fixtures independent of their pipeline + +- Intent: Repair the corpus pull-request workflow after its classifier fixture inherited `TANGLED_PIPELINE_KIND=pull_request` and incorrectly reported that a wiki-only path required the Rust gate. +- Log: [wiki/log/2026-07-10-ci-classifier-fixture-context.md](2026-07-10-ci-classifier-fixture-context.md) + ## 2026-07-10 - Signal without sight - Intent: (see session log) diff --git a/wiki/process/agent-scale.md b/wiki/process/agent-scale.md index 773e215..d2a0c14 100644 --- a/wiki/process/agent-scale.md +++ b/wiki/process/agent-scale.md @@ -158,7 +158,9 @@ two-commit clone and `tools/ci-rust-changed.sh` to stop after classification when a push cannot affect Rust. Pull-request and manual triggers deliberately run the complete Rust/Bevy safety gate. Tangled has no scheduled workflow trigger or native path filter, so the manual trigger is the supported full -safety run instead of pretending a scheduler exists. +safety run instead of pretending a scheduler exists. The classifier fixture +suite pins every case's pipeline kind, so its local wiki-only assertion stays +valid when the always-on corpus workflow supplies a pull-request context. ### Acceptance criteria (slice B) -- 2.51.2