Skip to content

test: delete cannot-fail tests, make macro and timing tests behavioural - #343

Merged
patrickleet merged 2 commits into
v5from
refactor/v5-review-27a-test-pruning
Nov 25, 2026
Merged

patrickleet merged 2 commits into
v5from
refactor/v5-review-27a-test-pruning

Conversation

@patrickleet

Copy link
Copy Markdown
Collaborator

Task 27 stage A ([[tasks/v5-review-27]]). Stacked on #342. Goal: every remaining test can fail for a behavioural reason.

What changed

Area Change Finding Tests
Source/config grep Deleted tests/legacy_authoring_absence.rs, the e2e_ui_celld_nats_profile grep tests, 4 in tests/celld and the cargo-features grep 12 #7 −14
Cannot-fail tests Deleted upcaster-existence twins, enum and Debug/Clone/new checks, OIDC e0_skips, capture_sdl_to_scratch, the strict_where default check, CLI self-compares, check_report_is_no_write 12 #9, 01 #24, 09 #19 about −30
Pre-release upgrades Deleted the legacy SQLite/Postgres migrator tests, projected→atomic, and old-format deserialize tests; one replaced by a v1 round trip. Removed a filter in tests/gateway-postgres/run.py that matched zero tests and so passed silently. 12 #6 −4
Sagas Deleted tests/sagas/orchestration.rs −5
e2e-ui Removed shard, arm-count, self-compare and inventory tests and dead helpers. The multi-row and mutation_file checks move into the framework. 13 #27, 12 #21 120 → 97
Macro expansion strings 32 contains tests replaced by runtime suites (aggregate_command/thin.rs, read_model_metadata, sourced_snapshot, known values). Each new test was checked to fail when its behaviour breaks. Rejects duplicating trybuild fixtures removed. 08 #17, #18 net about −26
Brittle rustc snapshots The 9 rustc-pinned .stderr snapshots become */tests/rustc_fail/ fixtures, built as one crate by tests/support/rustc_fail.rs and asserted by substring. Every fixture must list its expected substrings. 53 macro-diagnostic snapshots stay. 08 +2 binaries
Timing NATS: the idle test is bounded by the fetch expiry, retry asserts the order [poison, fresh, poison], and lanes uses a Notify handshake. queued_repo uses paused time. The SQL-lock "not yet stealable" check is asserted only inside the TTL. 12 #18 0
Postgres schemas PostgresTestSchema drops its schema on drop (also on panic) with a 5 s lock timeout. No test schemas are left after a run. 12 #19 0

Kept on purpose:

  • core_command_contract (a wire contract)
  • the released v3.3.4 migration fixture
  • the fingerprint-freeze tests
  • the rejects that have no fixture
  • the DB-clock lease/lock sleeps, which can only overshoot and never fail falsely

Counts

  • Workspace tests (--list): 2,926 → 2,853 (−73).
  • e2e-ui: 120 → 97. e2e-celld: 31 → 31.
  • Diff: 93 files, +947 / −3,013.

Tests

Run locally:

  • make test-local (Postgres and compose services, --no-fail-fast): 2,837 passed, 0 failed.
  • Macro crates, including both rustc_fail harnesses: pass.
  • CLI with --include-ignored: 341 passed (one self-compare test deleted).
  • e2e-celld: 31 passed. e2e-ui ci-offline: pass.
  • wasm32 workers, game cells and the domain check: OK.
  • Rewritten timing tests 30×: 0 failures.
  • After merging feat!: share live GraphQL refreshes across identical subscriptions #342's fix: workspace check clean, graphql_query_protocol passes.

Not done

  • About 25 expansion-string assertions remain in command_types.rs (directional serde names) and domain_state.rs (projection wire names). They need runtime fixtures first.
  • 12 fix: return microsvc transport join errors #19: the CI-vs-local service version mismatch.
  • Stages B and C: tests/common, the repository macro pattern, typed_commands fixtures, binary consolidation and rust-cache.

Framework bugs found (filed as incidents):

  • A thin command! with Succeeded fails for aggregates that capture domain events.
  • canonical_value (src/command/typed_command.rs:79) panics through .expect.

Removes source-grep, constant, self-compare and pre-release upgrade tests
and sagas/orchestration; replaces macro expansion-string tests with
runtime suites; moves the brittle rustc-pinned snapshots into a
substring-asserting rustc_fail harness; replaces wall-clock assertions
with ordering or paused time; PostgresTestSchema drops its schema on
drop; framework checks living in e2e-ui move into the framework.

Implements [[tasks/v5-review-27]]
@coderabbitai

coderabbitai Bot commented Nov 25, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: ebd42493-704f-472b-989f-ea0e9c1485db

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • 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

@patrickleet
patrickleet changed the base branch from refactor/v5-review-26b-live-sharing to v5 November 25, 2026 01:27
@patrickleet
patrickleet merged commit b2dce10 into v5 Nov 25, 2026
27 checks passed
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