Skip to content

Fix/1586 unquarantine openapi db reset - #1666

Merged
greatest0fallt1me merged 4 commits into
CalloraOrg:mainfrom
Tekprecious:fix/1586-unquarantine-openapi-db-reset
Nov 26, 2026
Merged

greatest0fallt1me merged 4 commits into
CalloraOrg:mainfrom
Tekprecious:fix/1586-unquarantine-openapi-db-reset

Conversation

@Tekprecious

Copy link
Copy Markdown
Contributor

Summary

Closes #1586
Closes #1596
Closes #1598
In one focused change set.

Changes

  • Un-quarantine the OpenAPI contract and DB reset helper suites #1586 — OpenAPI contracts and DB reset suites: Un-quarantined the four fixed suites; aligned contract tests with the raw OpenAPI endpoint, current authentication, and pagination behavior; validated runtime requests against the OpenAPI document; and strengthened reset-helper tests for idempotence, reinsertion, and foreign-key handling. Also corrected the OpenAPI validator import and routed unmatched requests through the canonical 404 error envelope.
  • Add CRUD, status-transition and cursor tests for SubscriptionRepository #1596 — Subscription repository tests: Added SQLite-backed tests for repository CRUD, status transitions, cancellation, ordering, retries, and edge cases, including zero metering limits and re-subscription after cancellation. The tests apply the relevant migrations directly because unprefixed SQL files currently prevent initializeDb() from discovering the full migration directory.
  • Add direct tests for src/services/spikeDetector.ts and src/services/usageAnomalyDetector.ts boundary thresholds #1598 — Detector boundary tests: Added direct detectSpikes tests and expanded detectUsageAnomalies coverage for threshold equality, minimum series length, zero variance, downward deviations, API independence, ordering, ties, limits, and four-decimal rounding. No production changes were made for this issue.

Validation

  • The four Un-quarantine the OpenAPI contract and DB reset helper suites #1586 suites: 4 suites and 55 tests passed.
  • Subscription repository and retry-policy suites: 2 suites and 15 tests passed.
  • Detector suites: 2 suites and 18 tests passed.
  • OpenAPI validation passed: 51 paths, 65 operations (83 compatibility warnings).
  • Detector coverage: 100% statements for both modules; usageAnomalyDetector reached 100% branch coverage. The documented mean-zero percentage-change branch in spikeDetector remains unreachable for nonnegative call counts because zero mean implies zero variance.
  • The full npm test run, performed before the final OpenAPI test-timeout adjustment, reported 25 failing suites and 98 failing tests (266 suites passed, 3 skipped). Failures included unrelated suite errors and timeouts.
  • npm run typecheck is blocked by parser errors in untouched src/index.ts and src/lifecycle/jobs* files.

Closes #1586
Closes #1596
Closes #1598

tekprecious and others added 3 commits November 25, 2026 06:23
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@drips-wave

drips-wave Bot commented Nov 25, 2026

Copy link
Copy Markdown

@Tekprecious Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@greatest0fallt1me
greatest0fallt1me merged commit d7f77c4 into CalloraOrg:main Nov 26, 2026
1 check passed
@greatest0fallt1me

Copy link
Copy Markdown
Contributor

Thanks @Tekprecious! Merged. 🎉

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

Labels

None yet

Projects

None yet

2 participants