Skip to content

fix(tests): clear inherited proof-law staleness blocking PR wave - #1090

Merged
Sinity merged 2 commits into
masterfrom
feature/fix/scenario-catalog-test-staleness
May 16, 2026
Merged

Sinity merged 2 commits into
masterfrom
feature/fix/scenario-catalog-test-staleness

Conversation

@Sinity

@Sinity Sinity commented May 16, 2026

Copy link
Copy Markdown
Owner

Summary

Six pre-existing test failures on master were blocking every newly opened PR in the #1058 wave (#1081, #1086, #1087, #1088, #1089). All trace to incomplete cleanup after earlier proof-runner retirement work.

Problem

pytest --ignore=tests/integration,benchmarks,fuzz on origin/master@fc3c43f3 exits with 6 failures:

  • tests/unit/devtools/test_benchmark_campaign.py::test_compile_benchmark_campaigns_indexes_by_name
  • tests/unit/devtools/test_benchmark_campaign.py::test_benchmark_scenario_index_tracks_authored_catalog
  • tests/unit/devtools/test_scenario_projections.py::test_all_projection_operation_targets_are_declared
  • tests/proof/laws/completeness/test_every_command_has_help_claim.py::*
  • tests/proof/laws/completeness/test_every_json_command_has_envelope_claim.py::*
  • tests/proof/laws/anti_dead_code/test_every_subject_has_at_least_one_claim.py::test_every_subject_of_a_fully_bound_kind_is_selected[cli.command]

Multiple parallel agents inherited and flagged these failures; they cannot be cleared at PR scope because each PR is supposed to follow the "no inherited debt" rule.

Solution

  1. Benchmark catalog drift — BENCHMARK_SCENARIOS grew to include reader-api and daemon-convergence (real entries with pytest paths). Two tests still asserted the old 3-element set, and the new operation_targets (benchmark.reader.api, benchmark.daemon.convergence) had no declared OperationSpec. Added the two missing OperationSpec rows in polylogue/operations/specs.py and updated the test assertions.

  2. Stale proof-law tests — tests/proof/laws/completeness/test_every_command_has_help_claim.py and test_every_json_command_has_envelope_claim.py asserted the existence of cli.command.{help,no_traceback,plain_mode,json_envelope} proof claims. Those were intentionally retired in PRs refactor(proof): retire CLI proof runners covered by pytest (#594) #1069/refactor(verification): replace proof reports with standard evidence #594 (proof-runner cleanup) because the intent is now pinned by pytest contract evidence tests under tests/unit/cli/ (test_json_envelope_contract.py, test_plain_output_contract.py, test_help_contract.py, test_cli_error_boundaries.py). The law tests are stale debt — both files deleted.

  3. `_FULLY_BOUND_KINDS` parametrize drift — same retirement removed all claims selecting cli.command / cli.json_command subjects. Removed both kinds from _FULLY_BOUND_KINDS in test_every_subject_has_at_least_one_claim.py — the CLI contract suites cover the surface directly now.

  4. Generated docs — docs/test-quality-workflows.md and docs/verification-catalog.md regen as part of the new OperationSpec rows.

Verification

nix develop -c pytest --ignore=tests/integration --ignore=tests/benchmarks --ignore=tests/fuzz -q --no-header
# 6841 passed, 2 xfailed, 0 failed (was 6 failed before)
nix develop -c devtools verify --quick  # exit 0

Ref #1058 #594 #1069

Sinity and others added 2 commits May 16, 2026 13:38
Six pre-existing test failures on master were blocking every newly opened
PR. All trace to incomplete cleanup after earlier work:

1. test_benchmark_campaign / test_scenario_projections: BENCHMARK
   scenario catalog grew to include reader-api and daemon-convergence
   but tests still asserted the old 3-element set and the new
   operation_targets had no declared OperationSpec. Added
   benchmark.reader.api and benchmark.daemon.convergence specs and
   updated the test set.

2. test_every_command_has_help_claim and
   test_every_json_command_has_envelope_claim: asserted the existence
   of cli.command.help, cli.command.no_traceback, cli.command.plain_mode,
   and cli.command.json_envelope proof claims. Those were retired in
   PRs #1069 / #594 because the intent is now pinned by pytest contract
   evidence tests (test_json_envelope_contract, test_plain_output_contract,
   test_help_contract, test_cli_error_boundaries). Both stale law files
   removed.

3. test_every_subject_of_a_fully_bound_kind_is_selected[cli.command]:
   parametrize fixture asserts no claim selects any cli.command subject
   because the claims above are retired. Removed cli.command and
   cli.json_command from _FULLY_BOUND_KINDS — pytest contract suites
   cover the CLI surface directly.

Verification: pytest --ignore=tests/integration,benchmarks,fuzz → 6841
passed, 2 xfailed, 0 failed (was 6 failed).

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

coderabbitai Bot commented May 16, 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 25 minutes and 59 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: c0d0a928-b31c-4499-95ba-e460594595b6

📥 Commits

Reviewing files that changed from the base of the PR and between 1f7d96a and 240c97b.

📒 Files selected for processing (7)
  • docs/test-quality-workflows.md
  • docs/verification-catalog.md
  • polylogue/operations/specs.py
  • tests/proof/laws/anti_dead_code/test_every_subject_has_at_least_one_claim.py
  • tests/proof/laws/completeness/test_every_command_has_help_claim.py
  • tests/proof/laws/completeness/test_every_json_command_has_envelope_claim.py
  • tests/unit/devtools/test_benchmark_campaign.py
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/fix/scenario-catalog-test-staleness

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 f95cd9c into master May 16, 2026
3 checks passed
@Sinity
Sinity deleted the feature/fix/scenario-catalog-test-staleness branch May 16, 2026 11:40
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.

1 participant