Commit Graph
33232 Commits
Author SHA1 Message Date
Jake BarnbyandClaude Opus 4.6 dca59528df (fix): load collection ID mapping in getDatabasesDB instead of decorator
Move the collection mapping query from inside the Metadata decorator to
the getDatabasesDB resource factory. This avoids decorator-level
database queries that can fail in various contexts and cause cascading
issues.

The mapping is loaded once when getDatabasesDB creates the database
instance, and the results are passed to the Metadata decorator via
setCollectionId(). The decorator itself is now stateless with respect
to database queries.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-01 06:27:34 +13:00
Jake BarnbyandClaude Opus 4.6 f8b3e687a0 (fix): batch-load collection ID mapping instead of per-document queries
Replace findOne per decoration with a single find query that loads all
collection sequence→ID mappings on first access. Caches the result for
the lifetime of the decorator instance. Silently falls back to internal
names on failure.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-01 05:19:59 +13:00
Jake BarnbyandClaude Opus 4.6 ca99508c55 (fix): resolve internal collection names to user-facing IDs in Metadata decorator
The decorator receives _metadata documents where $id is the internal
collection name (e.g. 'collection_5'), not the user-facing collection
ID. The old processDocument() got the user-facing ID from the endpoint.

Fix: extract the sequence number from the internal name, look up the
Appwrite collection document by $sequence to get the user-facing $id,
and cache the mapping.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-01 04:55:52 +13:00
Jake BarnbyandClaude Opus 4.6 cf71c104e8 (fix): update utopia-php/database with loose tenant comparison and PHPStan fixes
Includes loose comparison (!=) for tenant checks in Collections.php to
handle int/string tenant value mismatches, and PHPStan type assertions
for Document constructor calls.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-01 04:16:48 +13:00
Jake BarnbyandClaude Opus 4.6 a097f5a987 (fix): fix inline relationship auto-ID, increase test timeouts
Updates utopia-php/database with fix for inline relationship data
without $id not being auto-converted to Document objects. The
Relationships hook now converts associative arrays to Documents before
type-checking, allowing auto-ID generation to work.

Also increases testEventTrigger timeout to 120s and Realtime concurrent
test timeout to 90s for CI resilience.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-01 03:54:11 +13:00
Jake BarnbyandClaude Opus 4.6 4cb70799ab (fix): register floatRange format against ColumnType::Double
Float attributes created via API use type 'double' (ColumnType::Double)
since the Float/Create endpoint was updated. The format registration
must match to pass format validation during attribute creation.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-01 02:54:13 +13:00
Jake BarnbyandClaude Opus 4.6 e214a154b3 (chore): regenerate composer.lock timestamp
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-01 02:51:24 +13:00
Jake BarnbyandClaude Opus 4.6 5f4b91c350 (fix): correct ForeignKeyAction import namespace
Use Utopia\Query\Schema\ForeignKeyAction instead of the non-existent
Utopia\Database\ForeignKeyAction.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-01 02:03:21 +13:00
Jake BarnbyandClaude Opus 4.6 7520234e4a (fix): increase testEventTrigger timeout and harden Realtime coroutine test
- Functions testEventTrigger: increase assertEventually from 20s to 60s
  to accommodate shared mode queue latency and cold starts
- Realtime testConcurrentRealtimeTrafficCoroutines: already has 45s
  WebSocket timeout and TimeoutException handling for CI resilience

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-01 01:51:45 +13:00
Jake BarnbyandClaude Opus 4.6 e8f4137249 (fix): convert onDelete string to ForeignKeyAction enum in updateRelationship
The updateRelationship() method expects ForeignKeyAction enum but
Action.php was passing the raw string from options. Use
ForeignKeyAction::from() to convert.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-01 01:35:13 +13:00
Jake BarnbyandClaude Opus 4.6 1b1b1dfc2b (fix): fix Metadata relatedCollection lookup, aggregate test aliases, and decorator silencing
- Metadata decorator: look for relatedCollection inside options array
  since new Attribute format nests it there
- Skip decorators during silenced operations to prevent $databaseId etc.
  from leaking into internal write operations
- Fix aggregate test queries to use Query::count('*', 'total') instead
  of Query::count('total') which treats 'total' as a column name

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-01 00:56:19 +13:00
Jake BarnbyandClaude Opus 4.6 7fc153d344 (fix): set project on UserEvents, stop removing $collection, update migration lib
- UserEvents hook: set project on events before triggering to fix null
  project in function worker queue messages. Also use $this->project
  directly for console check instead of $this->events->getProject()
  which was null.
- Metadata decorator: stop removing $collection from documents since
  the Response model layer already handles this in filter(). Removing it
  in the decorator broke updateDocument and cursor pagination.
- Update utopia-php/migration to feat-query-lib branch with ColumnType
  enum, Attribute objects, and removed Database::VAR_* constants.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-01 00:23:09 +13:00
Jake BarnbyandClaude Opus 4.6 44d7591dd1 (fix): use ColumnType::Double for float attributes and restore databaseId response key
Float attributes must use ColumnType::Double (value 'double') to match
the existing AttributeFloat response model condition and Range validator.
ColumnType::Float (value 'float') caused "Missing model" errors and
Range validation failures.

Also reverts Collection/Table response model rule keys from $databaseId
back to databaseId since the Metadata decorator skips _metadata
documents — collection responses use the non-prefixed key.

Updates utopia-php/database with Attribute validator Float case fix.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-31 23:30:09 +13:00
Jake BarnbyandClaude Opus 4.6 1f20a18587 (fix): update database with castingAfter fix and remove debug project filter
castingAfter must run unconditionally in createDocument to convert
adapter-specific types (MongoDB UTCDateTime) to PHP types.

Also removes hardcoded project ID check in Executions worker that was
preventing execution upserts for a specific project.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-31 22:17:26 +13:00
Jake BarnbyandClaude Opus 4.6 2cf04e4b0f (fix): skip Metadata decorator for internal documents, add Tenancy hook, fix Mongo tenant null
- Metadata decorator now skips _metadata collection documents to prevent
  injected $databaseId/$collectionId attributes from leaking into SQL
  UPDATE statements via getAttributes()
- Add Tenancy hook to dbForProject in shared mode (was missing, causing
  401 on session verification)
- Update Collection/Table response models to use $databaseId with $
  prefix matching the decorator
- Update utopia-php/database with MongoDB tenant null filter fix

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-31 21:43:50 +13:00
Jake BarnbyandClaude Opus 4.6 3a2e61224d (fix): update V17 test expectations to include query attributes and values
The V17 filter now correctly parses cursorAfter/search/isNotNull queries
with their full parameters (attribute, values) instead of stripping them
to method-only objects.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-31 21:02:12 +13:00
Jake BarnbyandClaude Opus 4.6 348750b6d1 (fix): handle Method enum in V17 str_contains and fix Proxy cleanup order
V17 filter's str_contains($method, '.') throws when $method is a Method
enum. Guard with is_string() since enum cases never contain dots.

Proxy test: delete rule before site to avoid cascade-delete race.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-31 20:49:07 +13:00
Jake BarnbyandClaude Opus 4.6 ead8e37699 (fix): convert V17 filter method string to Method enum and update database
V17 request filter switch compared raw strings against Method enum
cases which never matched in PHP 8.1+. Use Method::tryFrom() to convert
the parsed method string to the enum before the switch.

Also updates utopia-php/database with skipValidation for internal
metadata document updates.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-31 20:32:02 +13:00
Jake BarnbyandClaude Opus 4.6 a9fd6c6282 (fix): resolve PermissionType enum, Method enum, VectorsDB and database library issues
- Use PermissionType->value when constructing Permission objects (Documents/Create,
  Upsert, Transactions/Create, Storage/Files/Create)
- Convert Method enum to string in Realtime adapter implode and interpolation
- Use Attribute/Index object property access in VectorsDB Collections/Create
- Update utopia-php/database with Structure Float case, TenantFilter alias fix,
  and Document::getTenant() type cast removal

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-31 19:47:55 +13:00
Jake BarnbyandClaude Opus 4.6 7de44f16b1 (fix): update utopia-php/database with Mongo datetime casting fix
Handles numeric string (millisecond timestamp) values in castingBefore
by passing them directly to UTCDateTime instead of NativeDateTime.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-31 18:56:20 +13:00
Jake BarnbyandClaude Opus 4.6 6c5f028d24 (fix): use property access on GroupedQueries return type
Query::groupByType() now returns a GroupedQueries readonly class instead
of an associative array. All bracket access ($grouped['filters'], etc.)
must use arrow syntax ($grouped->filters).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-31 18:53:11 +13:00
Jake BarnbyandClaude Opus 4.6 3ce82ab29f (fix): update utopia-php/database with Pool write hook propagation fix
The Pool adapter was only syncing write hooks (Permissions, Tenancy) for
plural document operations (createDocuments, updateDocuments) but not
singular ones (createDocument, updateDocument). This caused permission
rows to never be inserted for single-document creates, making newly
created users invisible to subsequent queries on SQL databases.

Also removes stale PHPStan baseline entries and fixes redundant null
coalesce in FunctionCache.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-31 18:35:45 +13:00
Jake Barnby 26f70357c8 Merge remote-tracking branch 'origin/1.9.x' into feat-query-lib
# Conflicts:
#	app/config/collections/projects.php
#	src/Appwrite/Platform/Modules/Databases/Http/DocumentsDB/Collections/Indexes/Create.php
#	src/Appwrite/Platform/Modules/Storage/Http/Buckets/Files/Update.php
2026-03-31 17:09:24 +13:00
Jake BarnbyandGitHub ec20fb59e2 Merge pull request #11689 from appwrite/fix-installer 1.9.0-rc.4 2026-03-31 03:51:20 +00:00
Jake Barnby 7e49cf0bed Revert "(fix): increase GraphQL schema polling timeouts to match CI expectations"
This reverts commit 4e32497be1.
2026-03-31 16:48:32 +13:00
Jake BarnbyandClaude Opus 4.6 4e32497be1 (fix): increase GraphQL schema polling timeouts to match CI expectations
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-31 16:26:20 +13:00
Jake Barnby fe6f79c9c6 (fix): restore ip key in tracking payload 2026-03-31 16:02:22 +13:00
Jake Barnby 5c84efdd7c (fix): upgrade UI — remove min-height, hide secret key row, fix copy 2026-03-31 15:58:45 +13:00
Jake Barnby 02d234ad3a (fix): detect existing installation as upgrade for web installer 2026-03-31 15:58:41 +13:00
Jake Barnby 8b7459f634 (fix): address review comments — coroutine guard and hostIp key 2026-03-31 15:15:51 +13:00
Jake Barnby 100cbf50f0 Merge remote-tracking branch 'origin/feat-auto-detect-cli' into fix-installer
# Conflicts:
#	src/Appwrite/Platform/Tasks/Install.php
2026-03-31 15:04:56 +13:00
Jake Barnby c7c59f4e7b Fix key 2026-03-31 15:04:04 +13:00
Jake Barnby a955dff55a (fix): run install tracking in coroutine to avoid blocking worker 2026-03-31 14:59:31 +13:00
Jake Barnby 7bcd5b4ebc (fix): remove swallowed exception around tracking call 2026-03-31 14:46:04 +13:00
Jake Barnby dfb23612b0 (docs): rewrite AGENTS.md with module structure and action patterns 2026-03-31 14:44:24 +13:00
Jake Barnby 4e71a54fae (fix): send SSE done event before tracking to prevent installer hang 2026-03-31 14:44:20 +13:00
Jake BarnbyandGitHub ea032c2804 Merge pull request #11679 from appwrite/fix/remove-documentsdb-spatial 2026-03-30 23:40:03 +00:00
Prem Palanisamy c72d438a10 fix: remove INDEX_SPATIAL from DocumentsDB index creation 2026-03-30 15:55:37 +01:00
Harsh MahajanandGitHub 5d962e21b0 Merge pull request #11674 from appwrite/fix-vcs-sdk-models
fix: merge duplicate SDK responses in VCS repository list and detections
2026-03-30 16:49:56 +05:30
Harsh Mahajan 551c83dd2c fix: merge duplicate SDK responses in VCS repository list and detections 2026-03-30 16:34:26 +05:30
Chirag AggarwalandGitHub d964c5a439 Merge pull request #11671 from appwrite/codex/reduce-specs-memory-retention
[codex] Reduce specs task memory retention
2026-03-30 14:48:27 +05:30
Chirag Aggarwal 4850fb54ed Disallow --release=yes with --mode=examples 2026-03-30 14:19:02 +05:30
Chirag Aggarwal 796bc13c19 Skip spec version prompt when creating SDK releases
When --release=yes, the Appwrite spec version is not needed since
the release flow uses the SDK version from config. This moves the
version prompt and validation behind a !$createRelease guard and
hoists the release block before the spec/SDK generation setup.
2026-03-30 14:11:36 +05:30
Chirag Aggarwal 30e080c4d3 Address review: race-safe mkdir and separate encode/write errors 2026-03-30 14:04:20 +05:30
ArnabChatterjee20kandGitHub 1789d2ce89 Merge pull request #11658 from appwrite/update-db-size
updated db size
2026-03-30 13:37:18 +05:30
Chirag Aggarwal 239a9c5457 Reduce specs task memory retention 2026-03-30 13:32:57 +05:30
ArnabChatterjee20kandGitHub 995e9fdf39 Merge branch '1.9.x' into update-db-size 2026-03-30 13:07:30 +05:30
Damodar LohaniandGitHub 8ce42fe057 Merge pull request #11553 from appwrite/claude/apply-cloud-user-pattern-az7qg
Use injected user document for privilege checks
2026-03-30 10:24:58 +05:45
Claude c14ebab1a0 Fix unintentional merge artifacts in Upsert.php and XList.php
Revert auth types in Bulk/Upsert.php back to [AuthType::ADMIN, AuthType::KEY]
and remove duplicate query filter in Databases/XList.php that were accidentally
introduced during the 1.9.x merge.

https://claude.ai/code/session_01JLPDurUgyj7qViA8JqQFTH
2026-03-30 04:11:52 +00:00
Claude f1ea496764 fix: add missing inject('user') to Transactions/Operations/Create and
remove duplicate inject('user') from XList in DocumentsDB/VectorsDB

- DocumentsDB and VectorsDB Transactions/Operations/Create.php were
  missing ->inject('user') needed by parent action method
- DocumentsDB and VectorsDB Collections/Documents/XList.php had
  duplicate ->inject('user') calls - removed the extra one

https://claude.ai/code/session_01JLPDurUgyj7qViA8JqQFTH
2026-03-29 03:55:17 +00:00