Skip to content

test: make service specs fail only on a regression - #1054

Merged
jaspermayone merged 4 commits into
mainfrom
test-pass-services
Nov 16, 2026
Merged

jaspermayone merged 4 commits into
mainfrom
test-pass-services

Conversation

@jaspermayone

Copy link
Copy Markdown
Member

This PR is the tests pass of the codebase untangle for spec/services. The goal: each spec fails on a regression, and only then. The PR changes spec files only.

What changes

  • Removed: 7 examples and about 9 assertions that repeated constants or names, or that could not fail.
  • Merged: 3 duplicates. These are the JWT exp check, the 25Live client_spec into client_http_spec, and the read-only hint checks that api/mcp_spec already covers.
  • Rewritten: about 85 examples now call the public method. They use stub_request at the HTTP boundary, travel_to, or real rows. Before, they stubbed or called private methods of the object under test. The largest groups are the Google provider events, the 25Live spaces sync and LeopardWebClient. The query checks became Prosopite scans, or same-count checks for 1 and N records.
  • Fixed flakes (10):
    • The query count in next_term_courses is now warmed and resets Current.
    • The booking race specs use a latch, not sleep 0.3.
    • The time-dependent specs run with frozen time.
    • The concurrency checks use latches, not sleep polling.
  • Kept guards: an adversarial review found checks that were the only guard of real behavior, and all of them are kept:
    • The sync puts back friend meetings that are missing from the calendar.
    • The RecordNotUnique rescue in create_event.
    • The OauthCredentials::Http timeouts.
    • No catalog query runs with course_details: false.
    • find_schedules needs the catalog scope.
  • Pending (1): "deletes the new event when a concurrent sync already tracks it" shows a real app bug. The uniqueness validation raises RecordInvalid, and create_event does not rescue it. The follow-up PR fixes the bug and removes the pending. You approved that fix.

Checks

  • Full suite with CI=1 on 9a1eac1: 6652 examples, 0 failures, 1 pending (the bug above). Line coverage 96.18%, branch 86.23%.
  • RuboCop is clean on the changed files.

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