CI: classifier self-tests run inside the classifier step (PLAT-986) #5

Merged
stephen merged 1 commit from ci-opt/plat-986-selftest-fallback into hearth 2026-12-02 23:34:53 +00:00
Owner

PLAT-986 follow-up to #4, the same fix as fj#345 (gerri's finding there applies here too).

The gap. The classifier self-tests and the content-unread guard ran in their own step before the classifier. A broken classifier failed that step, and every Rust step then skipped. The job was red, but the full suite never ran.

What changes.

  • One step: the self-tests and guard run inside the continue-on-error classifier step. Any failure there runs every Rust step, then fails the job.
  • Subshell: the self-tests run with CI_EVENT, CI_BASE_SHA, CI_HEAD_SHA and GITHUB_OUTPUT unset. Otherwise their classifier calls append scope= lines to the step's real outputs; on fj that was about 1,800 lines.
  • Final step: it fires only when the classifier ran (it failed, or succeeded with no valid scope). A failure before it is not reported as a classifier failure.
  • Self-test: it asserts all of this. Three mutations were checked: the self-test dropped, GITHUB_OUTPUT kept, and the final step's success guard removed. All were caught.

Locally, with a pull request's variables set, the step leaves only the classifier's three output lines.

Known and unchanged: after a classifier failure, a failing Rust step still stops the later ones, as on any full run.

Self-review: one round, no blocking findings.

Implementation: Claude (written before the 2026-12-02 Codex rule reached this lane)

PLAT-986 follow-up to #4, the same fix as fj#345 (gerri's finding there applies here too). **The gap.** The classifier self-tests and the content-unread guard ran in their own step before the classifier. A broken classifier failed that step, and every Rust step then skipped. The job was red, but the full suite never ran. **What changes.** - **One step:** the self-tests and guard run inside the `continue-on-error` classifier step. Any failure there runs every Rust step, then fails the job. - **Subshell:** the self-tests run with `CI_EVENT`, `CI_BASE_SHA`, `CI_HEAD_SHA` and `GITHUB_OUTPUT` unset. Otherwise their classifier calls append `scope=` lines to the step's real outputs; on fj that was about 1,800 lines. - **Final step:** it fires only when the classifier ran (it failed, or succeeded with no valid scope). A failure before it is not reported as a classifier failure. - **Self-test:** it asserts all of this. Three mutations were checked: the self-test dropped, `GITHUB_OUTPUT` kept, and the final step's success guard removed. All were caught. Locally, with a pull request's variables set, the step leaves only the classifier's three output lines. Known and unchanged: after a classifier failure, a failing Rust step still stops the later ones, as on any full run. Self-review: one round, no blocking findings. Implementation: Claude (written before the 2026-12-02 Codex rule reached this lane)
CI: classifier self-tests run inside the classifier step (PLAT-986)
All checks were successful
Rasterstate CI / check (pull_request) Successful in 11m43s
82bc8c7ab5
A failing self-test or content-unread guard now falls back like a failed
classification: every Rust step runs and the job fails. The self-tests run
without the step's CI_* variables and GITHUB_OUTPUT. The final step fires
only when the classifier ran. Same as fj#345.
stephen merged commit 06ea348019 into hearth 2026-12-02 23:34:53 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
rasterstate/rs-matter!5
No description provided.