Skip to content

test(database): share real-backend atomic conformance tests - #17

Merged
Upd4ting merged 1 commit into
mainfrom
test/atomic-provider-conformance
Sep 14, 2026
Merged

Upd4ting merged 1 commit into
mainfrom
test/atomic-provider-conformance

Conversation

@Upd4ting

Copy link
Copy Markdown
Member

Outcome

Adds 13 real-backend atomic mutation conformance tests to src/tests/atomic_mutation_operations.test.ts. The published dist/tests suite is automatically discovered by ajs module test for modules declaring @antelopejs/interface-database in antelopeJs.implements.

This supplements the existing atomic encoding, validation, and outcome-wrapper tests, which remain unchanged. The new suite uses public database operations rather than mocking query execution or importing provider internals. There are no production API changes or package version changes.

Coverage includes competing updates, revision deletion versus update, scalar cleanup versus refresh, stale revisions, missing identities/no upsert, tenant/default scope, absent versus null revisions, literal top-level replacement, unchanged payload revision advancement, scalar equality, and declared Date equality. Each contention scenario runs eight rounds.

Verification

  • Frozen install, build, lint, format, Knip, and git diff --check: passed. Existing lint warnings and configuration hints remain.
  • The exact packed candidate passed all 13 shared cases through the normal Antelope runner on MongoDB, RethinkDB, and PostgreSQL.
  • With bounded duplicate-removal commits applied locally only, total suites passed: MongoDB 202, RethinkDB 198, PostgreSQL 1,334. Provider-specific faults, wire commands, SQL/storage regressions, and the original interface suite remain intact.
  • MongoDB's 202-test candidate run was independently repeated during integration review.
  • Candidate tarball SHA256: 5d479cf8e486d371d278e2c6a2ed5ab0dab9007b6126b3689bb558b1411ed114. Its metadata still says 0.1.5, but it is not the published 0.1.5 package and must not be republished under that version.

Merge/release blocker: standalone test provider

Do not merge or publish yet. src/antelope.test.ts still selects published @antelopejs/mongodb@1.2.7, which does not implement atomic mutations. The standalone interface test run has 171 passing and 13 failing tests, all new failures reporting Unimplemented stage: atomicMutation. This is an explicit prerequisite failure, not a skipped or suppressed check.

Resolve the fixture with an atomic-capable MongoDB provider: either a separately approved release of MongoDB #33, followed by pinning its actual published version here, or an explicitly coordinated test-only fixture. Then rerun standalone interface CI and the three providers before publishing a new interface version.

Follow-up ordering

Only after the new interface version is published should the prepared provider duplicate removals be combined with minimum-version/lockfile updates and registry-only verification:

Their current remote test coverage is unchanged. If MongoDB #33 is merged first to unblock the fixture, its later test cleanup needs a follow-up PR instead of updating the closed PR.

No merge, package release, deployment, or shared-database writes are part of this PR creation.

Exercise portable mutation behavior through the provider resolved by ajs.
Preserve interface encoding and mocked-outcome tests separately.

The standalone test provider must support atomicMutation before this
follow-up can be released.
@Upd4ting
Upd4ting merged commit 1ae0516 into main Sep 14, 2026
1 of 2 checks passed
@Upd4ting
Upd4ting deleted the test/atomic-provider-conformance branch September 14, 2026 22:34
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