Skip to content

[finding] an assertion floor over an ENVIRONMENT-CONDITIONAL battery: run-with-stall-guard (41 cases, /proc) and release-rehearsal-clone (32, two existsSync guards) #15317

Description

@claude

Found while landing #13799 batch 8a (PR #15308). Filed unassigned, no labels — recording, not claiming.

The reading

Two of the nine self-tests floored in batch 8a register a case count that depends on the machine the self-test runs on, not on whether any case stopped running:

  • scripts/run-with-stall-guard.mjsconst linux = existsSync('/proc') guards a block of process-classification cases, and the self-test already prints (process-classification cases skipped: /proc not available) when it is false. Measured on this Linux container: 41 cases. On a runner without /proc the same healthy self-test registers fewer.
  • scripts/pm/release-rehearsal-clone.mjs — two of its 32 cases sit behind existsSync(doc) / existsSync(lint), so a checkout without docs/releases-maintenance.md or .github/workflows/lint.yml registers 30.

The floors landed in PR #15308 are the counts measured on a run in a Linux checkout of the full repo, which is what CI provides (ubuntu-latest, full checkout), so nothing is red today and nothing in that PR is blocked on this. What is worth deciding once, for the class rather than per file, is what a floor should say about a battery whose size is conditional:

  1. Nothing — leave it. The floor is a Linux-plus-full-checkout measurement and CI is exactly that. Cost: a developer running the self-test on macOS gets registered N case(s), below its pinned floor of 41 — cases that used to run no longer do, which is the one diagnosis the message rules out, and the trained response to it is to edit the floor down. That is the habit these floors exist to prevent.
  2. Floor the unconditional part; leave the conditional cases outside the roster. Precedent exists: check-whole-set-label-write's ALLOWLIST loop is deliberately unregistered because that list is meant to shrink (Survey: which scripts/** self-tests cannot prove they ran — and the two that now can #13797's ruling, cited in PR tooling(scripts): assertion floors for the class-2 self-tests, one hoisted battery each (#13799 batch 5) #15217's ACCEPT). Cost: the conditional cases are then floored by nothing.
  3. A second battery for the conditional block, floored at 0 with the roster still pinned — the set difference then says the block was skipped rather than that it broke. Cost: a battery with floor 0 is a shape no landed recipe has.

This is the same question as a floor is not always the measured count in #13799's body, one step further out: there the count moved with a shrink-only ledger, here it moves with the environment. It is a question for whoever owns the recipe, not a defect in either script.

Where it will be noticed

pnpm check:stall-guard and the lint.yml step that runs node scripts/pm/release-rehearsal-clone.mjs --self-test, on any runner that is not Linux or any checkout that is not the full repo.


Generated by Claude Code

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions