Skip to content

Reduce product event collection and query overhead - #29

Merged
akcorca merged 1 commit into
mainfrom
wt/cortex-efficiency
Oct 29, 2026
Merged

akcorca merged 1 commit into
mainfrom
wt/cortex-efficiency

Conversation

@akcorca

@akcorca akcorca commented Oct 29, 2026

Copy link
Copy Markdown
Contributor

Cortex product collection performs unnecessary learning reads and stores repeated event fields; log lists also fetch full detail payloads, and partial export failures replay already completed Queue messages.

Skip per-owner reads when no learning references exist, expose a bounded analytics.eventList projection, compact track/goal payloads while reconstructing the existing detail contract, and acknowledge messages only after all their raw and dictionary rows export. Mixed storage versions and cursor/dedup semantics remain supported.

Validation: build, TypeScript, core (172 tests), Workers (117 tests including packed-message failure coverage), generated API docs, package consumer/dry-run checks, and maintenance unittest (3 tests) passed. Reproducible local benchmark: 100-user empty-reference SQL calls 205→106; sample pageview bytes 1093→808 and reference-goal bytes 1274→870; injected retry deliveries 14882→10000. These are synthetic counters/wire sizes, not production billing measurements.

Two independent parallel reviewers found no correctness issues. Added the suggested packed-message export-failure coverage and verified it. Schema-v2 writes require a compatible reader on rollback; deploy this runtime before Cortex adopts the new RPC.

@coderabbitai

coderabbitai Bot commented Oct 29, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 529cfb14-337b-4ce1-9a03-6c3234fd878c

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

@akcorca
akcorca merged commit 980bf39 into main Oct 29, 2026
2 checks passed
@akcorca
akcorca deleted the wt/cortex-efficiency branch October 29, 2026 00:27
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