Commit Graph

17544 Commits

Author SHA1 Message Date
ArnabChatterjee20k 14381f2268 Merge branch '1.9.x' into presence-api 2026-05-15 15:53:51 +05:30
Matej Bačo 246f487687 Merge pull request #12317 from appwrite/feat-org-scopes-console-api
Feat: Org scopes Console API
2026-05-15 11:17:13 +02:00
Matej Bačo 75587e629e Improve quality of org scopes 2026-05-15 10:23:22 +02:00
Chirag Aggarwal ad88b827e6 Refactor database queue publisher 2026-05-15 13:22:35 +05:30
ArnabChatterjee20k a8670ee8fb fix: update authorization handling in message processing to prevent state leakage 2026-05-15 13:17:14 +05:30
ArnabChatterjee20k 0e1cabe47a Merge remote-tracking branch 'origin/1.9.x' into presence-api 2026-05-14 18:25:16 +05:30
harsh mahajan 0b07305775 fix: remove redundant comment, rename commitSkip to validator, use getDescription in span 2026-05-14 18:05:04 +05:30
harsh mahajan b5f0ebb37b refactor: replace DeploymentSkipPatterns validator with VCS_DEPLOYMENT_SKIP_PATTERNS constant 2026-05-14 17:59:34 +05:30
ArnabChatterjee20k 12b2acd7f7 Merge remote-tracking branch 'origin/1.9.x' into presence-api 2026-05-14 17:31:24 +05:30
ArnabChatterjee20k 3703da188e refactor: enhance presence management to prevent cross-user overwrites 2026-05-14 17:17:27 +05:30
Chirag Aggarwal 8f481d6f2c refactor: keep delete publisher in shared container 2026-05-14 15:37:04 +05:30
Chirag Aggarwal 65d1e58e34 refactor: migrate delete queue publisher 2026-05-14 14:40:11 +05:30
ArnabChatterjee20k 7da3591d2b Merge branch '1.9.x' into presence-api 2026-05-14 13:12:42 +05:30
ArnabChatterjee20k faf13c502b reordered set in the realtime 2026-05-14 12:46:58 +05:30
ArnabChatterjee20k 43da03ef63 removed redundant container set 2026-05-14 12:38:11 +05:30
ArnabChatterjee20k 5123956790 reverted schema 2026-05-14 11:57:23 +05:30
ArnabChatterjee20k a3542ed7fa feat: enhance presence handling by refactoring usage and event triggering logic 2026-05-14 11:48:41 +05:30
ArnabChatterjee20k 0aa8d402ae feat: streamline presence cleanup logic and enhance stale presence deletion 2026-05-14 11:36:55 +05:30
Jake Barnby a4d1043684 Merge pull request #12302 from appwrite/fix-transaction-deletes
fix: match transactions collection name in deletes worker
2026-05-14 17:48:18 +12:00
Chirag Aggarwal 1ced50db1f Merge remote-tracking branch 'origin/1.9.x' into codex/resolve-12284-conflict
# Conflicts:
#	app/controllers/shared/api.php
2026-05-14 10:43:05 +05:30
Jake Barnby 10eae0ab87 fix: match transactions collection name in deletes worker
The DELETE_TYPE_TRANSACTION constant was 'transaction' (singular), so
the worker's inner switch on $document->getCollection() (which returns
'transactions') never matched and every transaction deletion fell to
the default branch, logging "No lazy delete operation available for
document of type: transactions". Renamed to DELETE_TYPE_TRANSACTIONS
to align with every other constant used in that switch.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-14 13:58:40 +12:00
ArnabChatterjee20k 995f844254 feat: refine permissions parameter handling in Presence action for clarity and consistency 2026-05-13 19:19:00 +05:30
ArnabChatterjee20k 18a26809af feat: improve user resolution during disconnect event for accurate actor context 2026-05-13 19:13:59 +05:30
ArnabChatterjee20k 42d3240d05 feat: refactor presence state usage and telemetry span naming for consistency 2026-05-13 19:12:11 +05:30
ArnabChatterjee20k 52c072489b Merge remote-tracking branch 'origin/1.9.x' into presence-api 2026-05-13 18:58:44 +05:30
ArnabChatterjee20k 602ceb55ef feat: refactor presence state usage across multiple files for consistency 2026-05-13 18:57:09 +05:30
ArnabChatterjee20k f09aec7651 feat: update presence handling and refactor related attributes for consistency 2026-05-13 18:52:14 +05:30
Chirag Aggarwal 85e2cf7d8b (refactor): Migrate queueForFunctions to FunctionPublisher and FunctionMessage 2026-05-13 18:28:05 +05:30
loks0n 24e108fdbf fix: use canonical project.id/user.id so trace sampler matches realtime and VCS spans
The sampler reads project.id from the span; realtime and VCS were storing it
under namespaced keys (realtime.project.id, vcs.github.event.repo.{id}.project.id),
causing all those spans to be dropped when _APP_TRACE_PROJECT_ID was set.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-13 11:03:28 +01:00
Chirag Aggarwal d9987dd645 Fix rate limit headers when abuse check is skipped 2026-05-13 15:00:51 +05:30
loks0n a0c4b7695e chore: normalize Span keys and centralize span lifecycle
Span attribute keys are now snake_case with dots only for child
relationships. Worker span lifecycle moved to app/worker.php; selective
trace filtering moved to the exporter sampler in app/init/span.php so
handlers only call Span::add.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-13 10:29:42 +01:00
ArnabChatterjee20k f1e0ef2991 feat: refactor queue handling for events and realtime to use coroutine context 2026-05-13 14:04:41 +05:30
ArnabChatterjee20k 4e2bd9c307 feat: add presence already exists error handling and update exception messages 2026-05-13 12:30:54 +05:30
ArnabChatterjee20k e799589d11 feat: implement deduplication for presence delete events and enhance presence management 2026-05-13 12:20:12 +05:30
ArnabChatterjee20k efadf1d74b removed redundant 2026-05-13 11:18:09 +05:30
ArnabChatterjee20k 7f6482a7d2 Merge remote-tracking branch 'origin/1.9.x' into presence-api 2026-05-13 11:12:23 +05:30
Jake Barnby be2bb984c5 Merge pull request #12194 from appwrite/feat-insights-module
feat(insights): add insights module with CTA framework
2026-05-13 17:34:56 +12:00
Jake Barnby b058eb31f4 (refactor): inline CTAs as JSON on insights collection 2026-05-13 17:10:33 +12:00
Luke B. Silver 35941ddc34 Merge pull request #12220 from appwrite/feat/utopia-http-resources-context
Migrate to utopia-php/http resources/context API
2026-05-12 23:01:29 +01:00
Jake Barnby f4133609db (fix): remove invalid index prefix lengths exceeding column size
The prefix length 700 exceeded the resourceId/parentResourceId column
size of 255 (Database::LENGTH_KEY), crashing the container at startup.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-05-13 02:05:55 +12:00
Jake Barnby 304b0dab35 (fix): address greptile P1 review comments
- Add skipFilters to Reports/Get.php (was the only endpoint still
  triggering the full N+1 subquery cascade)
- Scale CTA batch limit dynamically (insightCount * MAX_CTA_COUNT)
  instead of fixed APP_LIMIT_SUBQUERY to prevent silent truncation
- Revert deleteReport to callback-based pagination so CTAs are not
  orphaned when a report has more than APP_LIMIT_SUBQUERY insights
- Add explicit prefix lengths (700) to _key_project_resource and
  _key_project_parent_resource indexes to stay under InnoDB 3072-byte limit
- Validate CTA service/method against ADVISOR_CTA_SERVICES and
  ADVISOR_CTA_METHODS enums in the CTAs validator

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-05-13 01:42:59 +12:00
Jake Barnby 9da4a3260d (refactor): improve advisor module perf, security, and maintainability
- Fix N+1 in Reports/XList (51→4 queries) via skipFilters + batch fetch
- Add skipFilters to Reports/Delete and cursor fetch (avoid loading all
  nested insights/CTAs just for ownership check)
- Fix N+1 in deleteReport worker (flat CTA deletion instead of per-insight)
- Add advisor entity cleanup on project deletion (reports, insights, CTAs)
- Remove resourceInternalId, parentResourceInternalId, $permissions from
  Insight response model (internal IDs leak DB internals, permissions unused)
- Remove dead subQueryInsightCTAs filter registration
- Remove stale enum-value comments from platform schema
- Fix _key_dismissedAt index to include projectInternalId
- Fix scope category from 'Other' to 'Advisor'
- Switch action base class from Utopia\Platform\Action to Appwrite\Platform\Action

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-05-13 01:13:37 +12:00
ArnabChatterjee20k 5827f2ece6 fix: correct presence usage decrement in triggerPresenceUsage calls 2026-05-12 18:05:51 +05:30
ArnabChatterjee20k c1cab2e41a removed redundant 2026-05-12 17:33:21 +05:30
Jake Barnby f9ff1166b9 (perf): batch-fetch CTAs across an insight set to collapse N+1 2026-05-12 23:24:26 +12:00
Chirag Aggarwal 1ca8282944 Remove unused request logError resource 2026-05-12 16:30:31 +05:30
Jake Barnby 4cd35e4d93 Merge branch '1.9.x' into feat-insights-module 2026-05-12 22:59:34 +12:00
Matej Bačo 5e1439f64e Merge pull request #12276 from appwrite/feat-rework-project-response-model
Feat: Rework project response model
2026-05-12 12:57:16 +02:00
Chirag Aggarwal e132784532 Fix cache auth role lookup after rate limit refactor 2026-05-12 16:24:50 +05:30
loks0n 93e96a044d Fix bus resolver to look up context container per dispatch
The resources/context migration replaced the resolver closure with a
first-class callable from `$swoole->context()->get(...)`. That
captures the result of `$swoole->context()` once -- on the first
dispatch -- and binds the bus to the first request's per-request
container forever after.

Wrap the lookup in a fresh closure so each dispatch re-resolves
`context()` against the current Swoole coroutine. Restores the
behavior of the pre-migration `getContainer()` form.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-12 11:47:52 +01:00