Skip to content

test(perf): tiered scale fixtures and pytest markers (#1183) - #1207

Merged
Sinity merged 1 commit into
masterfrom
feature/test/scale-fixtures-1183-v2
May 17, 2026
Merged

Sinity merged 1 commit into
masterfrom
feature/test/scale-fixtures-1183-v2

Conversation

@Sinity

@Sinity Sinity commented May 17, 2026

Copy link
Copy Markdown
Owner

Summary

Introduce explicit small / medium / large scale tiers so performance and
regression tests run in the correct verification gate. Closes #1183.

Problem

tests/benchmarks/ mixes fixture sizes (1k → 50k message DBs) without a
documented contract for which tier belongs in which gate. The default
devtools verify baseline either runs every benchmark or none of them;
operators have no way to express "quick perf sanity vs lab perf evidence
vs nightly perf gate" without reading source. Issue #1183 (under the
#997 closure thread) tracks this gap.

Solution

  • tests/infra/scale_fixtures.py exposes session-scoped tier factories
    tier_small_db (~100 convs / ~1k msgs), tier_medium_db (~1k / ~10k),
    and tier_large_db (~10k / ~100k). They reuse the realistic-distribution
    seeder in tests/benchmarks/conftest.py so the new fixtures inherit the
    archive shape the existing benchmarks already trust.
  • pyproject.toml and tests/conftest.py register matching pytest
    markers scale_small, scale_medium, scale_large.
  • devtools/verify.py defaults the pytest step to
    -m "not scale_medium and not scale_large"; --lab drops the medium
    exclusion; the new .github/workflows/nightly-scale.yml owns
    scale_large and is the only scheduled gate that exercises it.
  • tests/benchmarks/test_scale_tiers.py demonstrates the contract with
    FTS5 search and list_conversations exercises at each tier.
  • tests/unit/devtools/test_verify.py adds explicit coverage for the
    default / lab / skip-slow marker composition (and is updated for the
    pre-existing verify-closure-matrix step that the old fixture list
    missed).
  • docs/test-quality-workflows.md gains a generated "Scale Tier Model"
    section documenting the tier table and how to add a new scale
    benchmark; ratio-based assertions (large/medium, medium/small) are
    recommended over absolute milliseconds to keep tests host-portable.

Verification

  • nix develop -c devtools verify --quick → exit 0 (20.9s).
  • nix develop -c pytest -q -n 0 -p no:randomly tests/unit/devtools/test_verify.py
    → 30 passed.
  • nix develop -c pytest -q -n 0 -p no:randomly tests/benchmarks/test_scale_tiers.py -m scale_small
    → 2 passed, 4 deselected.
  • nix develop -c mypy tests/infra/scale_fixtures.py tests/benchmarks/test_scale_tiers.py devtools/verify.py
    → Success.
  • nix develop -c devtools render-all --check → exit 0 (run via
    devtools verify --quick).

The default-baseline pytest step from devtools verify --seed-testmon
inherits 11 pre-existing master failures (topology / artifact-graph /
storage_records harness drift) that are unrelated to this PR; confirmed
reproducible on origin/master before staging any changes here.

Closes #1183

Introduces explicit small/medium/large scale tiers so performance and
regression tests run in the right verification gate (issue #1183).

- tests/infra/scale_fixtures.py adds session-scoped tier_small_db
  (~100 convs / ~1k msgs), tier_medium_db (~1k / ~10k), and
  tier_large_db (~10k / ~100k) backed by the realistic-distribution
  seeder already used by tests/benchmarks/conftest.py
- pyproject.toml + tests/conftest.py register matching scale_small,
  scale_medium, scale_large markers
- devtools/verify.py defaults to "-m not scale_medium and not
  scale_large"; --lab drops the medium exclusion; nightly CI workflow
  .github/workflows/nightly-scale.yml owns scale_large
- tests/benchmarks/test_scale_tiers.py demonstrates the contract with
  FTS5 search and list_conversations exercises at each tier
- tests/unit/devtools/test_verify.py covers the new pytest marker
  composition (and updates skip-slow expectations)
- docs/test-quality-workflows.md gains a Scale Tier Model section via
  devtools/render_quality_reference.py

Ref #1183

Co-Authored-By: Claude <[email protected]>
@coderabbitai

coderabbitai Bot commented May 17, 2026

Copy link
Copy Markdown

Warning

Rate limit exceeded

@Sinity has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 57 minutes and 33 seconds before requesting another review.

You’ve run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 0463928f-49c3-40c6-8d7e-e0db78343e30

📥 Commits

Reviewing files that changed from the base of the PR and between 5b9868c and c7025ef.

📒 Files selected for processing (9)
  • .github/workflows/nightly-scale.yml
  • devtools/render_quality_reference.py
  • devtools/verify.py
  • docs/test-quality-workflows.md
  • pyproject.toml
  • tests/benchmarks/test_scale_tiers.py
  • tests/conftest.py
  • tests/infra/scale_fixtures.py
  • tests/unit/devtools/test_verify.py
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/test/scale-fixtures-1183-v2

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@Sinity
Sinity merged commit 3d26161 into master May 17, 2026
2 of 3 checks passed
@Sinity
Sinity deleted the feature/test/scale-fixtures-1183-v2 branch May 17, 2026 20:34

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c7025ef1fa

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread devtools/verify.py Resolved
Comment thread tests/infra/scale_fixtures.py Resolved
@Sinity

Sinity commented May 17, 2026

Copy link
Copy Markdown
Owner Author

Backlog batch filed (2026-05-17)

Net-new issues opened in a planning pass, grouped by tier for visibility.

Tier A — observed-but-unfiled tech debt

Tier B — substrate work in docs but not tracked

Tier C — operational / observability

Tier E — privacy/security hardening

Tier F — release/distribution

@Sinity

Sinity commented Sep 30, 2026

Copy link
Copy Markdown
Owner Author

Historical Codex triage: evidence checked at 5ebcfe5. This records that source revision; it does not claim a fresh review of current master.

  • 54.F053 / P1: stale at the checked revision: The historical scale-marker exclusion and --all non-integration profile have been replaced by an explicit native correctness corpus. Full selection uses --testmon-noselect (devtools/verify.py:279), and performance-only tests are excluded by path rather than scale_medium/scale_large marker expressions (devtools/pytest_invocation.py:148).

Only the rows listed above are dispositioned. Held findings remain open.

@Sinity

Sinity commented Oct 1, 2026

Copy link
Copy Markdown
Owner Author

Historical Codex triage: evidence checked at 5ebcfe5. This records that source revision; it does not claim a fresh review of current master.

Only the rows listed above are dispositioned. Held findings remain open.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

test(perf): tiered scale fixtures separating local, lab, and CI/nightly performance gates

1 participant