Skip to content

check-pr-size classify_path has no entry for a per-run bench-evidence directory, so its own suite is red on main #1448

Description

@localai-bot

Found while adding the conflict-marker gate for #1417, which necessarily edits scripts/check-pr-size.py to register a new checker's creation mutation.

The gap

classify_path fails closed on an unknown path. BENCH_EVIDENCE matches exactly ONE path segment:

BENCH_EVIDENCE = re.compile(r"(?:benchmarks/(?:demo|media)|docs/bench-evidence)/[A-Za-z0-9_.-]+\.(?:json|png|gif|mp4|log)\Z")

docs/bench-evidence/gdn-replayssm-w0-20260818/ landed on 2026-08-18 as a per-run directory of ten files, and none of them matches. Measured on origin/main 9ecaf1bb3, sweeping every tracked path through classify_path:

unclassified tracked paths: 10
   docs/bench-evidence/gdn-replayssm-w0-20260818/RESULT.txt
   docs/bench-evidence/gdn-replayssm-w0-20260818/build_w0.sh
   docs/bench-evidence/gdn-replayssm-w0-20260818/count_sass.sh
   docs/bench-evidence/gdn-replayssm-w0-20260818/job1.log
   docs/bench-evidence/gdn-replayssm-w0-20260818/job2.log
   docs/bench-evidence/gdn-replayssm-w0-20260818/job3_sass.log
   docs/bench-evidence/gdn-replayssm-w0-20260818/probe.cu
   docs/bench-evidence/gdn-replayssm-w0-20260818/run_on_lease.sh
   docs/bench-evidence/gdn-replayssm-w0-20260818/run_sass_on_lease.sh
   docs/bench-evidence/gdn-replayssm-w0-20260818/sass.txt.gz

What it costs

tests/scripts/test_check_pr_size.py::test_every_tracked_and_current_change_path_is_classified sweeps every tracked path, so that suite is RED on origin/main today, verified in a detached worktree at 9ecaf1bb3:

FAIL: test_every_tracked_and_current_change_path_is_classified
Ran 46 tests in 0.546s
FAILED (failures=1)

The suite runs in no preflight SUITES entry, so a plain scripts/agent-preflight.sh is green over it. It surfaces only through the checker-evidence contract: any change that edits scripts/check-pr-size.py must prove its HEAD checker/test pair passes, and that pair cannot pass while the sweep is red. scripts/check-pr-size.py --base origin/main --head HEAD then reports

ERROR: HEAD checker/test pair failed for 'scripts/check-pr-size.py'

which reads as a defect in the change under review rather than as a pre-existing red.

Registering a NEW checker requires an entry in CREATION_MUTATIONS, so every future checker is blocked behind this until it is repaired.

Fourth instance of the same class: #856 (.agents/issue-index.md), #668 (.agents/oracles/), #989 (.agents/reachability.md).

Fix

Name the surface; do not widen a rule. A BENCH_EVIDENCE_RUN pattern for docs/bench-evidence/<run-id>/<file>, restricted to the extensions the directory actually carries (txt, log, gz, sh, cu) and deliberately excluding .md and .json, which already classify as public_document through DOC and would be silently reclassified because the evidence arm is tested first.

Repaired in the same flow as #1417, per AGENTS.md: the person who found the bug has the context. The red-before case already exists and needed no new fixture, and classification is verified to move exactly those 10 paths and nothing else.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions