Skip to content

test: no wall-clock budget assertion carries the performance marker — all 73 run on the PR gate #13445

Description

@mrveiss

Finding

pytest.ini declares a performance marker, ci.yml deselects it on the PR gate
(-m "not integration and not slow and not distributed and not performance"), and
marker-tests.yml exists to run the excluded set on a schedule.

An AST sweep of every *_test.py / test_*.py for assertions comparing a measured
elapsed delta
(a subtraction of two clock reads) against a numeric literal found:

TRUE elapsed-vs-literal assertions: 73  |  on PR gate: 73  |  marker-excluded: 0

Not one of the 73 carries an excluding marker. Every wall-clock budget in the repo
runs on the PR gate, where CI queue depth inflates wall-clock — the same shard was
measured at 82.49s quiet vs 132.55s loaded. Even the two files named for it,
system_benchmarks_performance_test.py and performance_benchmarks_test.py, are
unmarked.

The full file:line list is in #13444 (comment).

Why this is one issue, not 73

The decision is systemic, not per-test. Each of the 73 falls into one of three buckets:

  1. A genuine performance budget → mark performance, so it runs in
    marker-tests.yml where timing is meaningful, not on a contended PR runner.
  2. A concurrency proxy — the test wants "these ran in parallel", and time is a
    stand-in → rewrite as a rendezvous, the way file_locking_test already was
    (test: file_locking_test asserts a 0.04s wall-clock budget — fails 2 of 13 runs on unmodified base #13366 / 3726bc6): park every worker inside its critical section until all are
    inside. No clock, survives any load.
  3. A timeout guard — the test wants "this was bounded / the timeout fired" → assert
    ordering and causality (the timeout path ran), not a duration.

Bucket 1 is a one-line change per test once the bucket is decided.

Scope

Related

Activity

  1. mrveiss commented on Sep 2, 2026

    @mrveiss
    OwnerAuthor

    Re-measured against merged base (cf2d29d54e) — the headline numbers are wrong, and one claim in the body is now false.

    Claimed: 73 wall-clock assertions, 73 on the PR gate, 0 marker-excluded, "not one carries a marker".

    Measured two ways, because the original 73 came from a script I do not have:

    definition total on the gate marker-excluded
    strict AST sweep 29 in 23 files 25 4
    loose, name-based 51 in 35 files 48 3

    "Not one carries a marker" is no longer true. autobot-backend/performance_benchmarks_test.py:218 carries pytest.mark.performance (3 hits), autobot-backend/security/security_edge_cases_test.py:437 carries slow, and system_benchmarks_performance_test.py is now marked as well.

    Worth noting: no commit in base references #13445. The reduction from 73 to 29–51 landed under other issue numbers, incidentally. So the trend is favourable but unmanaged — nothing here was driven by this issue, and nothing stops it reversing.

    Largest unmarked residue, if this is picked up:

    • autobot-backend/tests/test_run_jwt_denylist_timeout.py:58
    • autobot-backend/knowledge/knowledge_base_integration_test.py:290
    • autobot-backend/security/security_integration_test.py:396
    • autobot-slm-backend/services/playbook_executor_timeout_14524_test.py:205 (2 each)

    Recommend restating the ACs against a measured number with its definition attached — "29 strict / 51 loose" rather than a bare count — since the two differ by 76% and the checklist is unfalsifiable without knowing which one it means.

  2. added this to the Backlog milestone on Sep 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions