Skip to content

test: prune deprecated, superseded and duplicate tests - #1025

Merged
pbean merged 6 commits into
mainfrom
test/prune-superseded-tests
Nov 2, 2026
Merged

pbean merged 6 commits into
mainfrom
test/prune-superseded-tests

Conversation

@pbean

@pbean pbean commented Nov 2, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Removes tests that were deprecated, inert, fully superseded by a surviving test, or true duplicates, and folds near-duplicates into parametrized survivors that keep every assertion. It also adds one rule to docs/testing.md ("Duplicate tests and contract parity"): a local "lands on a clean tree" positive control stays only when no same-file test with the same setup already proves the success path. When one does, the refusal test's docstring names that test as its positive control.

Only tests and that doc change. No src behavior change, and the only src edits allowed were comment cross-references (none were needed). No CHANGELOG entry, because the change is test-only.

  • Tests collected: 18096 at main (4ede863) → 17966 at this branch's HEAD (−130).
  • Lines: git diff --stat origin/main...HEAD -- tests/ gives 42 files changed, 915 insertions, 2535 deletions.
  • Full suite (with coverage, run twice at HEAD): 17850 passed, 116 skipped. trunk check, uv run pyright and tests/test_docs_hygiene.py are clean.
  • Deleted names: none of the deleted test or helper names appears anywhere in tests/, src/, docs/ or skills/, except one unrelated lambda parameter _seconds in test_codex_trust.py.

Coverage-neutral evidence

The gate is a branch coverage measure (pytest-cov 7.1.0, in-process) at every phase's start and end. A comparator exits 1 if any src line or branch covered before is missed after.

Program-wide, from the main baseline 4ede863 to HEAD 2852ae4, on the second measure:

coverage-neutral: no line or branch lost

Phase 6 against its start 57329df gives the same result. The union of the two HEAD runs loses nothing against either baseline.

Nondeterministic lines I accepted, all from Pilot/teardown timing. Each was re-measured, and none is executed by any removed test run alone at its start SHA:

  • tui/screens/dashboard.py 1209–1210 (the task-row update_cell refresh): lost on HEAD run 1 only. All 41 phase-6 test cases removed (40 functions), run at 57329df, never execute it.
  • tui/widgets.py branches 372->376 and 465->467: the known race set; they move between runs from phase 1 on.
  • verify.py 1931/1932/2066 (phase 1) and 1984/1985 (phase 4), the discard_stderr daemon-thread loop. 1984/1985 is missing at the main baseline too.
  • One real loss was found and fixed in phase 4: launch.py 1678->1682, the only run of run_captured's empty-stderr branch. The case was ported into the surviving twin.

Ablations

Whenever a merge or parametrize moved an ablation record, it was re-run against the merged test, one gate at a time: cp backup, mutate src, confirm the expected rows go red, restore, check byte-identity with cmp. Each phase's commit body lists its runs. Phase 6 re-ran 7, and every one went red only on its expected rows:

  • operatoractions.py ParkedStory.resumable confirmation arm
  • install.py enable above the seed
  • tui/app.py _paused_spec degrade arm
  • runs.py PSMUX_DATA_DIR if-unset guard
  • runs.py _warn_foreign_session call
  • sweep.py if bundles: guard
  • sweep.py DW-426 hold

Items by phase and category

Round 1 has 86 items (R1-01..R1-86), applied over phases 1–4. Round 2 has 69 items (R2-01..R2-69); phase 6 applied the first 40, as capped. Every item was re-verified at apply time against its survivor before anything was deleted.

Phase 1 (4dea169): engine, statemachine, escalation, policy, CLI, operatoractions, entry_point. 23 applied, 1 skipped.

  • duplicate: R1-01, R1-08, R1-10, R1-13, R1-15
  • near-duplicate-parametrize: R1-17, R1-18
  • superseded: R1-02, R1-03, R1-04, R1-05, R1-06, R1-07, R1-09, R1-11, R1-12, R1-14, R1-19, R1-20, R1-21, R1-22, R1-23 and R1-24 (both positive controls), R1-16 (skipped, see below)
  • Skipped: R1-16 test_a_record_does_not_touch_the_repository_exclude_file. Its substring check on .git/info/exclude also catches a non-hiding line naming .bmad-loop/operator, which the git-visibility survivor cannot see.

Phase 2 (8f701aa): worktree, recovery, verify, deferredwork, decisions, devcontract. 19 applied, none skipped.

  • dead-target: R1-27
  • duplicate: R1-31, R1-32, R1-33, R1-34, R1-35
  • near-duplicate-parametrize: R1-29, R1-30, R1-40, R1-43
  • superseded: R1-25, R1-26, R1-28, R1-36, R1-37, R1-38, R1-39, R1-41, R1-42

Phase 3 (a187d4a): sweep, runs, childrun, cleanup, journal, tmux/adapters, profile, tokens, hooks, psmux. 21 applied, none skipped.

  • dead-helper: R1-47
  • duplicate: R1-55, R1-60
  • inert: R1-59. The test was hardened rather than deleted: the no-env hook tests now run from tmp_path.
  • near-duplicate-parametrize: R1-44, R1-45, R1-46, R1-49, R1-50, R1-58, R1-64
  • superseded: R1-48, R1-51, R1-52, R1-53, R1-54, R1-56, R1-57, R1-61, R1-62, R1-63

Phase 4 (57329df): TUI, install, stories, model, plugins, release, perf_report. 22 applied, none skipped.

  • dead-helper: R1-85, R1-86
  • duplicate: R1-67, R1-69, R1-84
  • near-duplicate-parametrize: R1-68, R1-71, R1-78, R1-79
  • superseded: R1-65, R1-66, R1-70, R1-72, R1-73, R1-74, R1-75, R1-76, R1-77, R1-80, R1-81, R1-82, R1-83

Phase 5: the round-2 audit only, with no repo changes.

Phase 6 (7b38e4a, plus 2852ae4 for the docs): R2-01..R2-40. 40 applied, none skipped.

  • duplicate: R2-02, R2-08, R2-09, R2-13, R2-14, R2-16, R2-17, R2-20, R2-21, R2-34, R2-35, R2-36, R2-37
  • superseded: R2-01, R2-03, R2-04, R2-05, R2-06, R2-07, R2-10, R2-11, R2-12, R2-15, R2-18, R2-19, R2-22, R2-23, R2-24, R2-25, R2-26, R2-27, R2-28, R2-29, R2-30, R2-31, R2-32, R2-33, R2-38, R2-39, R2-40
  • R2-22, R2-25 and R2-30 are positive controls removed under the new rule; each refusal docstring now names its survivor.

Overflow

R2-41..R2-69 were past the 40-item cap: medium-confidence, "modify" and low-confidence items. They were never re-verified at apply time and are not in this PR. They are filed as one entry in the deferred-work ledger, DW-625. The entry also lists the regions the round-2 completeness critic said were still only skimmed: the test_engine_worktree.py tail sections, test_tickets_engine.py, the test_verify_worktree.py submodule/receipt rows, test_resolve.py build_context/rearm, and others.

Audit provenance

The round-1 evidence came from a 23-agent audit workflow: 11 domain-shard auditors, each paired with an adversarial skeptic whose default verdict was "refuted", plus a completeness critic. Round 2 used a second 23-agent workflow of the same shape over the regions round 1 only skimmed and the remaining positive-control instances. Refuted candidates were never applied. That means 14 in round 1 and 7 in round 2, mostly look-alikes that differ in platform branch, encoding, fault point or error path. Tombstone tests of removed features, parity twins, quality guards, strict-xfail pins and the zero-token E2E/live gates were all kept on purpose.

Summary by CodeRabbit

  • Documentation

    • Clarified when refusal tests should include a local successful-write control versus reference an existing test.
  • Tests

    • Consolidated repeated cases into parameterized tests and expanded coverage across run cleanup, worktree handling, checkpoints, archiving, and error scenarios.
    • Updated assertions and test descriptions; removed redundant or standalone tests.
    • No end-user product behavior changes are described in this update.

t added 6 commits November 1, 2026 17:16
Phase 1 of the test-suite prune program (round-1 audit items R1-01..R1-24).

Applied (23):
- R1-01 merge test_verify_fix_rounds_do_not_spend_damping_cap into
  test_review_verify_failure_routes_fix_session_then_rereview (damping
  assertions + docstring ported; cross-link comment in the damping section)
- R1-02, R1-03 (env-fault guard assertion ported into
  test_dev_produced_work_default_keeps_todays_routing) in test_escalation.py
- R1-04, R1-05 (both ablation records ported into test_plan_transition_table)
  in test_statemachine.py
- R1-06, R1-07 engine-level rollback-gate rows superseded by test_recovery_flow.py
- R1-08..R1-12, R1-14, R1-19, R1-20 in test_policy.py
- R1-15 test_settings_schema.py duplicate of the [engine] tombstone (the
  policy-layer tombstone and the CLI twin stay)
- R1-13 test_cli.py stories --spec duplicate
- R1-17 committed_drift() assertion ported into
  test_drift_names_the_side_that_disagrees
- R1-18 three sweep --archive refusals parametrized into
  test_sweep_archive_refuses_a_run_dir_it_cannot_prove_dead
  (ids live / unknown-liveness / no-state-json)
- R1-22 isinstance(ExitCode, int) folded into test_exit_code_enum_values
- R1-21, R1-23, R1-24 positive controls deleted; each refusal test's docstring
  now names its same-setup survivor as the positive control

Skipped (1):
- R1-16 test_a_record_does_not_touch_the_repository_exclude_file: its
  substring check on .git/info/exclude also catches a non-hiding line naming
  .bmad-loop/operator (e.g. the legacy operator-actions.json name), which the
  git-visibility survivor cannot see, so the survivor does not imply every
  assertion.

Ablations re-run (cp backup, mutate, run, restore, cmp identical):
- R1-18: _sweep_archive back on runs.list_run_dirs -> only [no-state-json] red
- R1-05: final-state refusal deleted alone -> green; done added to rearm's
  sources alone -> green; both -> rearm-done-{ready-for-dev,in-progress,
  in-review} red; salvage targets += done -> salvage-{in-progress,in-review}-done
  (+ salvage-done-done) red; salvage sources = every build status ->
  salvage-{draft,ready-for-dev}-built red; salvage rule removed ->
  salvage-{in-progress,in-review,built}-built red

Test count: 18096 -> 18045 collected.

Coverage gate (pytest-cov 7.1.0, branch, vs 4ede863): not attributable.
Run 1 lost only tui/widgets.py branch 465->467; run 2 covered it and lost
instead tui/widgets.py 372->376 and verify.py 1931, 1932, 2066 (+ 2065->2066),
all of which run 1 covered. Those are teardown/race paths, and none was
executed by the removed tests when they ran alone at 4ede863. The union of
the two runs loses nothing, so this is nondeterministic coverage.
Applied (round-1 audit, phase 2): R1-25, R1-26, R1-27, R1-28, R1-29,
R1-30, R1-31, R1-32, R1-33, R1-34, R1-35, R1-36, R1-37, R1-38, R1-39,
R1-40, R1-41, R1-42, R1-43.

- R1-25/26/28/33/34/35/36/38/39: superseded or duplicate tests deleted;
  the claims carried only in docstrings (as_posix cross-OS contract,
  profile-less fakes, the DW-198 positive half, balanced-bold shapes and
  their ablation) moved onto the survivors.
- R1-27: dropped the dead `atomic_write_bytes_confined` monkeypatch
  (recovery_flow imports only atomic_write_bytes_at); the test stays.
- R1-29: the eight ledger/board seed rows are four tests parametrized
  over _SEED_ARTIFACTS (moved above them), with the per-artifact
  consequences in the section header.
- R1-30: the four {story_title} engine rows are one parametrized test
  (nul/surrogate/h1/key), with both ablation records kept per id.
- R1-31: the accept-baseline assertion and DW-371 line merged into
  test_pause_committed_wording_names_at_risk_commits.
- R1-32: the broken-gitdir row moved to
  test_verify_worktree.py::test_git_toplevel_none_outside_repo in its
  own directory; the probe-file duplicate was deleted.
- R1-37: the stub-body date assertion ported into the frozen-clock test.
- R1-40: added a separator-run row to the artifact-only mint grid.
- R1-41/42: the failed-publish grid gained an append_decision row and a
  two-id mark_done_many row, plus the all-or-nothing and raise-reaches-
  the-caller rationale; test_append_entry_write_failure's twin link and
  the #328 rationale now point at that grid.
- R1-43: the five fenced-heading strip no-ops are one parametrized test,
  with each CommonMark rationale kept per id.

Skipped: none.

Ablations re-run (cp backup, mutate, red, restore, cmp byte-identical):
- engine.py: drop the _TITLE_CONTROL_RE substitution -> [nul] (and
  [surrogate]) red.
- engine.py: drop \ud800-\udfff from _TITLE_CONTROL_RE -> [surrogate]
  red only.
- devcontract.py: drop the trailing (?:\*\*)? from ARTIFACT_ONLY_LINE_RE
  -> [balanced-bold], [bold-whole-line], [bold-value] red.
- deferredwork.py: bare re-raise in _publish -> all three failed-publish
  rows red.

Tests collected: 18045 -> 18031.
Round-1 audit items R1-44..R1-64 (plan delightful-splashing-peacock, phase 3).

Applied (21 of 21):
- R1-44 test_sweep: the three resolve-degrade class tests (OSError default,
  RuntimeError symlink loop, ValueError NUL faults) merged into one test over
  fault x family; every row now asserts outcome == "unavailable"; per-class
  ablations and the dangling-store cross-reference kept in one docstring.
- R1-45 test_sweep: truncated-json / non-utf8 / oserror stored-answer faults
  parametrized; the non-utf8 row gains closed == 0 and the
  decision-skipped-unattended assertion.
- R1-46 test_sweep: bundle reconcile draft / in-review parametrized over
  final_status, both DW rationales kept.
- R1-47 test_journal: dead _JOURNAL_ROW constant removed.
- R1-48 test_childrun: test_no_probe_means_never_pending deleted (the
  scoped-probe test ends in the same no-probe state).
- R1-49 test_runs: four rearm latch-clear tests merged into
  test_rearm_clears_a_stale_task_latch (ids dw386-adopt-latch,
  dw523-env-fault-site, reverify-latch, dw527-post-replay-marker), phase ==
  PENDING asserted on every row, each ablation record kept per id.
- R1-50 test_cleanup: retention-by-count rows parametrized, name-slice check
  on every row.
- R1-51/52/53/57 test_generic_tmux: four superseded readback/breadcrumb tests
  deleted; the hash-gate and resolve_story_spec rationales folded into their
  survivors. No opencode_http parity twin names any of them.
- R1-54 test_multiplexer: VERSION_MAX_CHARS bound and its rationale moved into
  the fold test, then the duplicate deleted.
- R1-55/58 test_profile: five MINIMAL_PROFILE default tests plus the
  skill_tree one replaced by test_minimal_profile_field_defaults, one row per
  field; skill_tree now reads the overlay parse-time default instead of
  duplicating test_builtin_profiles_load.
- R1-56 test_tokens: single-line no-token-key tally deleted (the no-usage
  test carries the same line).
- R1-59 test_hook_script / test_probe_hook: re-confirmed inert (no cwd, env
  holds only PATH, so tmp_path could never receive a write); kept and
  hardened: run_hook takes cwd and the no-env tests run from tmp_path.
  Installed-copy drift guard untouched.
- R1-60 test_psmux_backend: edge-whitespace rows (NBSP, tab, ASCII,
  all-whitespace) folded into the untransportable-values parametrize with
  the Unicode-strip rationale; bodies were identical, the survivor has more.
- R1-61 test_psmux_backend: colon-session list_windows duplicate deleted.
- R1-62 test_psmux_backend: parked-window qualified id folded into the
  colon-session test as a (session, expected) parametrize.
- R1-63 test_psmux_backend: new_window return-value pin ported into
  test_window_alive_accepts_new_window_id, duplicate deleted.
- R1-64 test_psmux_backend: five return-target probe tests parametrized
  into test_return_target_from_the_pane_and_session_probes.

Skipped: none.

Ablations re-run (cp backup, mutate, run, restore, cmp identical):
- sweep._commit_ledger resolve tuple: drop OSError -> only
  [oserror-default-*] red; drop RuntimeError -> only
  [runtime-symlink-loop-*] red; drop ValueError -> only [nul-*] and
  [lone-surrogate-*] red.
- sweep._decisions_phase OSError arm removed -> only [oserror] red.
- runs._rearm_escalation_locked: dropping each of adopt_pending /
  env_fault_site / reverify_from / reverify_replayed clears reddens only its
  own row.

Tests collected: 18031 -> 18027.

Coverage gate: covcmp vs 8f701aa exited 1 on both HEAD runs, on the
nondeterministic teardown/race set phase 1 recorded: tui/widgets.py
465->467 and verify.py 1931/1932/2066 + 2065->2066 in both runs, plus
tui/data.py 1325->1326 (1326/1327) in run 2 only. Triage: the start-SHA
versions of all 12 touched files, run alone with coverage in a worktree,
execute none of those lines, so the loss is not attributable to this change.
Phase 4 of the test-suite prune program (round-1 items R1-65..R1-86).

Applied (22/22):
- R1-65 delete tui_data journal-tail fragment test (survivor:
  test_journal_tail_withholds_partial_line)
- R1-66 delete test_active_task_id_matches_open_session_start (each
  active_task_id assertion lives in a sibling; the private-helper identity
  check pinned no contract)
- R1-67 move test_severity_extraction's 8 rows, multi-line entry wrapper kept,
  to test_deferredwork.py::test_field_severity_in_a_multiline_entry
- R1-68 parametrize the three private-marker SGR strip tests
  (xtmodkeys / gemini-111-mid-params / vim9-pyte202; provenance kept)
- R1-69 fold the seed no-op report into
  test_provision_worktree_seed_does_not_clobber_existing
- R1-70 delete test_provision_worktree_seeds_gitignored_config (feature
  sentence folded into the reports-nothing survivor)
- R1-71 parametrize merge_hooks idempotency over claude/copilot/antigravity,
  reading the container via hook_event_container
- R1-72 delete test_run_captured_real_subprocess (docstring folded into the
  streams twin; the coverage gate showed it was the only run of run_captured's
  empty-stderr branch, launch.py 1678->1682, so the twin now also asserts
  run_captured(["--version"]) == (rc, out))
- R1-73 port s2.done, spec status 'done' and story-2 DONE into
  test_pinned_plan_then_story_checkpoint_flow
- R1-74/75 add done + absent columns to test_pinned_done_checkpoint_skip_records
  (summary.done, persisted not paused, story 2 never dispatched under the cap
  and the graceful stop; last-story and MINOR-F rationale as row comments)
- R1-76 port summary.done and the persisted (paused_stage, paused_story_key)
  plus the conservative-pause docstring into
  test_pinned_done_checkpoint_on_unreadable_manifest
- R1-77 port the no-dev-session (no leapfrog) check into test_pinned_wedge_pause
- R1-78 parametrize the invalid-id rejections (float / charset / leading-dash)
- R1-79 fold 24 StoryTask scalar round-trip/legacy-default tests into
  test_story_task_scalar_field_round_trips_and_defaults_for_legacy_state
  (12 field rows, always through JSON, legacy doc built from the non-default
  value; per-field DW/#860 rationale kept as row comments)
- R1-80 delete test_build_defaults_to_no_grants
- R1-81 pass live=never_called explicitly in both never-granted survivors
- R1-82 delete test_data_only_workflow_is_active (comment folded)
- R1-83 delete test_prepare_accepts_a_promoted_changelog (positive-control
  comment moved onto test_prepare_warns_on_a_release_star_branch)
- R1-84 port the record_instantiate spy into
  test_untrusted_python_module_is_never_imported
- R1-85 delete dead perf_report._seconds
- R1-86 move the orphaned "renamed but never reopened" comment above
  NO_UNRELEASED_HEADING

Skipped: none.
Ablations re-run: none; no merged or parametrized test carries an ablation
record.
Tests collected: 18027 -> 18007. `--ci-shard 1/3` collection still works
(needs a path argument, as at the start SHA).

Coverage gate vs a187d4a: the first measure lost launch.py 1678->1682
(attributed to R1-72 and ported back, see above) and verify.py 1984/1985,
the discard_stderr daemon-thread loop. That is the known nondeterministic
teardown region, which no removed test exercises. The same two lines are
also missing from the program baseline (4ede863) and from 8f701aa, and the
re-measure after the port lost only them.
Applied R2-01..R2-40 (findings-r2.md order, cap 40), each re-verified at
apply time against its survivor; none skipped:
- test_cli.py: R2-01 R2-02 R2-03 R2-04 R2-23 R2-24 R2-25 R2-26 R2-27 R2-28
- test_runs.py: R2-05 R2-06 R2-07 R2-08 R2-29 R2-30 R2-31 R2-32 R2-33
  R2-34 R2-35
- test_sweep.py: R2-09 R2-10 R2-11 R2-12 R2-36 R2-37
- test_verify.py: R2-13 R2-14 R2-15 R2-40
- test_deferredwork.py: R2-16 R2-17 R2-18 R2-19 (write-spy oracle ported
  into the no-lock NOOP grid)
- test_install.py R2-20, test_tui_app.py R2-21, test_platform_util.py
  R2-22, test_engine.py R2-38, test_engine_worktree.py R2-39
Positive controls R2-22/R2-25/R2-30 deleted under the same-setup-survivor
rule; each refusal docstring now names its survivor.

R2-41..R2-69 are past the cap and go to the deferred-work ledger.

Ablations re-run against the merged tests (cp backup, mutate, red,
restore, cmp identical):
- R2-02 operatoractions.py ParkedStory.resumable confirmation arm: 1/1 red
- R2-20 install.py worktreeConfig enable above the seed: 2/2 red
- R2-21 tui/app.py _paused_spec degrade arm returns "": 1/1 red
- R2-31 runs.py if-unset guard on the PSMUX_DATA_DIR export: 4/4 red
- R2-35 runs.py _warn_foreign_session call dropped: 1/1 red
- R2-09 sweep.py `if bundles:` -> `if True:`: 1/1 red
- R2-11 sweep.py DW-426 hold dropped: 3/3 red

Tests collected: 18007 -> 17966.
@coderabbitai

coderabbitai Bot commented Nov 2, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 9db39e08-ed6f-47a5-b28a-22a75cd1d6d9
Commits

Reviewing files that changed from the base of the PR and between 4ede863 and 2852ae4.

Files selected for processing: 43
  • docs/testing.md
  • tests/perf_report.py
  • tests/test_childrun.py
  • tests/test_cleanup.py
  • tests/test_cli.py
  • tests/test_decisions.py
  • tests/test_deferredwork.py
  • tests/test_devcontract.py
  • tests/test_engine.py
  • tests/test_engine_worktree.py
  • tests/test_entry_point.py
  • tests/test_escalation.py
  • tests/test_generic_tmux.py
  • tests/test_hook_script.py
  • tests/test_install.py
  • tests/test_journal.py
  • tests/test_model.py
  • tests/test_multiplexer.py
  • tests/test_operatoractions.py
  • tests/test_platform_util.py
  • tests/test_plugin_grants.py
  • tests/test_plugin_trust.py
  • tests/test_plugin_workflows.py
  • tests/test_policy.py
  • tests/test_probe_hook.py
  • tests/test_profile.py
  • tests/test_psmux_backend.py
  • tests/test_recovery_flow.py
  • tests/test_release.py
  • tests/test_runs.py
  • tests/test_settings_schema.py
  • tests/test_statemachine.py
  • tests/test_stories.py
  • tests/test_stories_engine.py
  • tests/test_sweep.py
  • tests/test_ticketstore_probe.py
  • tests/test_tokens.py
  • tests/test_tui_app.py
  • tests/test_tui_data.py
  • tests/test_tui_launch.py
  • tests/test_verify.py
  • tests/test_verify_worktree.py
  • tests/test_worktree_flow.py
Files with no reviewable changes: 7
  • tests/perf_report.py
  • tests/test_childrun.py
  • tests/test_ticketstore_probe.py
  • tests/test_tokens.py
  • tests/test_settings_schema.py
  • tests/test_journal.py
  • tests/test_policy.py

Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 1 remain after this review.

Walkthrough

This pull request reorganizes tests across the repository. It replaces several standalone cases with parameterized tests, adds assertions to selected cases, removes tests whose coverage is represented elsewhere, and updates testing guidance. No production implementation changes are reported.

Changes

Test Suite Consolidation

Layer / File(s) Summary
Contracts and state coverage
docs/testing.md, tests/test_model.py, tests/test_profile.py, tests/test_policy.py, tests/test_devcontract.py, tests/test_statemachine.py, tests/test_stories.py, tests/test_settings_schema.py, tests/test_entry_point.py
Consolidates test cases for model serialization, profile defaults, policy, parsing, state transitions, story IDs, and exit-code values. Updates guidance on positive controls.
Run and worktree execution coverage
tests/test_engine.py, tests/test_engine_worktree.py, tests/test_escalation.py, tests/test_generic_tmux.py, tests/test_recovery_flow.py, tests/test_runs.py, tests/test_stories_engine.py, tests/test_worktree_flow.py, tests/test_childrun.py
Combines or removes standalone execution tests and adds assertions for run state, story dispatch, checkpoint pauses, and worktree behavior.
Ledger, sweep, and verification coverage
tests/test_decisions.py, tests/test_deferredwork.py, tests/test_sweep.py, tests/test_verify.py, tests/test_verify_worktree.py, tests/test_ticketstore_probe.py
Consolidates ledger, sweep, and verification cases. Adds or clarifies assertions for write failures, read faults, ledger state, and repository resolution.
CLI and integration test coverage
tests/test_cli.py, tests/test_install.py, tests/test_operatoractions.py, tests/test_platform_util.py, tests/test_plugin_*.py, tests/test_psmux_backend.py, tests/test_release.py
Combines CLI and integration cases across test areas, with added checks for plugin instantiation, window IDs, line endings, seeding, and installer configuration.
UI and test-support coverage
tests/test_tui_*.py, tests/test_hook_script.py, tests/test_probe_hook.py, tests/test_cleanup.py, tests/test_perf_report.py, tests/test_journal.py, tests/test_multiplexer.py, tests/test_tokens.py
Consolidates rendering and utility cases, adds temporary working directories to hook subprocess tests, and removes unused test helpers or duplicate cases.

Estimated code review effort: 3 (Moderate) | ~30 minutes

Change: Other

Suggested reviewers: dracic

Merge Risk: Minimal · up to 2852a

The change consolidates tests and documentation; no material merge-blocking risk was identified.

Pre-merge checks: Passed 4 · Inconclusive 1

Failed Failed checks: 1 inconclusive

Check name Status Explanation Resolution
Docstring Coverage Inconclusive Docstring coverage is 41.18% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documenta… Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title accurately and concisely describes the main changes: removing deprecated, superseded, and duplicate tests.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 41.18% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 17 functions across 24 files. (12 skipped: 1 unsupported, 11 too large.)

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

Finishing Touches
Generate docstrings
  • Commit to this branch
  • Create a new PR
Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

A rabbit checks the tests at dawn
And hops through cases, one by one
Old duplicates yield their place
New parameters join the race
The green-page burrow hums along

@pbean

pbean commented Nov 2, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 2, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-02T03:30:16.457360Z 2852ae4 Manual request
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Breezy!

Reviewed commit: 2852ae49d3

ℹ️ 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".

@pbean
pbean merged commit b4c2808 into main Nov 2, 2026
17 checks passed
@pbean
pbean deleted the test/prune-superseded-tests branch November 3, 2026 02:48
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