Two coverage gaps closed:
- testAppwriteMigrationUpsertOneWayRelationshipDropAndRecreate exercises
the path that updateRelationshipInPlace gates off: one-way + onDelete
change → returns false → falls through to DropAndRecreate via
deleteRelationship. Coverage was lost when
testAppwriteMigrationUpsertUpdatesRelationshipOnDeleteInPlace was
converted to two-way to actually hit the in-place path.
- testAppwriteMigrationUpsertAttributeRecreateDropsAndRecreates pins
the createdAt-different leaf path: source drops + recreates the
attribute (createdAt advances), re-migration must DropAndRecreate
on dest and re-flow the row data through the row pass. Companion to
testAppwriteMigrationUpsertUpdatesAttributeInPlace which covers the
same-createdAt + newer-updatedAt path.
Migration package already at 09c1b21 (the maintainability commit) from
the previous lock bump — no further composer.lock change needed.
- Functions/Sites: lower minimum chunk requirement from 3 to 2
- Sites: use random_bytes instead of str_repeat for non-compressible test data
- Remove assertions on sourceChunksTotal/Uploaded from response body (not in response model)
testAppwriteMigrationUpsertTwoWayRecreateSkipsPartnerSide exercises
the DropAndRecreate path on a two-way relationship that the partner-
side pair-key dedup guards. Source recreates the relationship between
runs, forcing parent-side createdAt diff. Test asserts the migration
completes cleanly and partner-table rows survive — without dedup, the
partner pass re-fires DropAndRecreate and destroys those rows.
composer.lock: utopia-php/migration c76de9a -> c13e77d (partner-side
pair-key dedup restored).
- Functions/Sites: include sourceChunksUploaded in updateDocument when finalizing existing deployments, fixing the retry guard
- Functions test: rename loop variable to avoid shadowing setup result
- Add APP_LIMIT_UPLOAD_CHUNK_SIZE constant (5MB) matching official SDKs
- Replace dynamic chunk calculation with fixed 5MB chunk math in all upload endpoints
- Remove -1 last-chunk sentinel that broke when last chunk arrived first
- Fix duplicate-retry guards: return existing resource instead of erroring for chunked uploads
- Add out-of-order e2e tests for Storage, Functions, and Sites
- Upgrade utopia-php/storage to 2.0.0 for device-level out-of-order assembly support
The previous version of this test created a one-way relationship,
which falls through to DropAndRecreate (one-way + onDelete change is
gated off in updateRelationshipInPlace because utopia's
updateRelationship partner-cascade throws on one-way). It never
exercised the in-place path it was named for.
Converted to two-way (parents.kids ↔ children.parent), and asserted
both parent- and partner-side onDelete on dest. Partner-side
assertion is the regression guard for the partner-meta refresh that
was missing from updateRelationshipInPlace.
composer.lock: utopia-php/migration a36d95f -> c76de9a (partner-side
onDelete sync fix).
Three new e2e tests in MigrationsBase covering the schema reconciliation
paths added in utopia-php/migration:
- testAppwriteMigrationUpsertUpdatesAttributeInPlace: PATCH source
required/default (SDK-reachable), assert dest reflects change and the
pre-existing row's column data is preserved (drop+recreate would have
wiped it).
- testAppwriteMigrationSkipPreservesAttributeDrift: leaf-level analog
of the existing container-drift Skip test — guards Skip from ever
consulting timestamps.
- testAppwriteMigrationUpsertUpdatesRelationshipOnDeleteInPlace: PATCH
source onDelete cascade->restrict (SDK-reachable), assert dest
reflects change and structural fields (relationType, twoWay) untouched.
composer.lock: utopia-php/migration 6e6f825 -> a36d95f (mechanical
helpers replacement, parseTimestamp dedup, match dispatch, comment trim).
- Implement `test_convert_channels_rewrites_account_action_suffixes` to ensure
that account action suffixes are correctly rewritten to user-scoped channels.
- Add `test_convert_channels_drops_account_actions_for_guest` to verify that
account actions are dropped for guests without a user ID.
- Introduce `test_from_payload_does_not_suffix_account_for_nested_user_events`
to confirm that nested user events do not leak action suffixes onto account channels.
- Changed test method names from camelCase to snake_case for consistency.
- Updated assertions to ensure action channels are correctly emitted and filtered.
- Improved readability and maintainability of the test suite by restructuring test cases.