Repository navigation
config: ramp memory_list_index_window 5 -> 25 (mobile Memories page timeouts) - #23310
Merged
Merged
Conversation
…imeouts) Mobile clients load the Memories page with a 10s read budget (ReadRetry.callerWindow, app/lib/backend/http/read_retry.dart). Prod GET /v3/memories runs p50 0.8s but p99 17.4s with 26 walks past 24s in the last 24h, so large-account first pages time out client-side and the page never loads; PostHog Product Error error_kind=memories_fetch shows ~450 distinct reporters over 7 days. The scan-reduction lever memory_list_index_window (bounded index-window reads for the legacy list, #22856) has been merged and observed at the 5% cohort since 7d3e0a0 with no adverse signal, and the list-read-serving runbook step (compare list latency, 504/500 counts, truncation rate on large accounts) is this ramp's evidence gate. Raise it one step to 25%; all other 15 keys unchanged. Rollback is the same literal at 5. set_levers.py-style replace-mode edit, complete 16-key literal; contract tests green (test_render_backend_runtime_env, test_verify_pusher_config_references, test_check_cloud_run_env_drift, test_backend_runtime_env_validator: 271 passed). Loop: firestore-reads; ramp continues to 100 after a clean soak at 25%.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Git-on-my-level
added a commit
that referenced
this pull request
Oct 22, 2026
…canonical_statuses_dedupe 5->100 Firestore reads loop graduates (ramp5 clocks from 2026-10-21 ~23:20Z on backend-02083-stk; verify PASS on consecutive hourly ticks incl 14Z/15Z/16Z 2026-10-22): mcp_conversation_cards_cache 5->100, canonical_statuses_dedupe 5->100; singleton_loops 25->100 (lease rework #22142 live; all 6 loops acquiring, no max_hold fires 10-21..10-22). memory_list_index_window stays 25 (ramped 5->25 by #23310 on main for mobile Memories timeouts; graduation deferred). Literal via set_levers.py (REPLACE mode, complete 16-key object) on origin/main 8cd2c27; contract tests 121 green (test_render_backend_runtime_env + test_verify_pusher_config_references).
2 tasks done
Git-on-my-level
added a commit
that referenced
this pull request
Oct 22, 2026
…canonical_statuses_dedupe 5->100 (#23291) ## Summary Firestore reads loop config: graduate the proven levers on the served 16-key literal. - `mcp_conversation_cards_cache` 5 -> 100 - `canonical_statuses_dedupe` 5 -> 100 - `singleton_loops` 25 -> 100 - `memory_list_index_window` stays 25 (ramped 5->25 by #23310 for mobile Memories timeouts; graduation deferred, not part of this batch) Qualification: ramp5 clocks started 2026-10-21 ~23:20Z on train P (backend-02083-stk); verify PASS on consecutive hourly ticks including 14Z/15Z/16Z on 2026-10-22 (no lever UNSAFE/FALSIFIED on its pinned absolute grade). singleton_loops rides the #22142 lease rework: lease_1h shows all 6 loops acquiring (acquired 8-58/h each) with zero max_hold_exceeded across 10-21/10-22 ticks. Rebased on main 8cd2c27 (supersedes the stale head at 8a3e745 whose Backend Unit shard 2/6 failure test_sync_silent_failure.py::test_app_keeps_wals_retryable_on_failed_reconcile was main's red, fixed by the 13:58Z dream revert 9b9dcd3). Literal regenerated with set_levers.py (REPLACE mode, complete 16-key object); contract tests 121 green. ## Product invariants affected - INV-FSR-LEVERS: FIRESTORE_READ_LEVERS literal identical across _base.yaml, runtime_env.yaml, listen/pusher dev+prod values (contract tests pin consistency) - INV-FSR-SINGLETON: singleton_loops at 100 only while lease gate shows acquisitions and no max_hold breaches; flag-off config PR is the rollback - INV-MEM-4: config-only change to runtime_env rendering (levers cache percentages); no canonical-memory intake/promotion route is added or altered ## Test plan - [x] backend/tests/unit/test_render_backend_runtime_env.py + test_verify_pusher_config_references.py (121 passed) - [x] verify.py hourly ticks 14Z-16Z 2026-10-22 PASS (pinned absolute grades, FSR_SMOOTH_HOURS=12)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Ramp
memory_list_index_window5 -> 25 inFIRESTORE_READ_LEVERS. Complete 16-key literal, every other key unchanged; same 9-file surface as the precedent 5% enable (7d3e0a0): backend/deploy/runtime_env.yaml + _base.yaml, backend-listen/pusher chart values (dev+prod), feature-flag-registry.md, and the two fixture files.Why
Mobile clients load the Memories page with a 10s read budget (
ReadRetry.callerWindow,app/lib/backend/http/read_retry.dart). ProdGET /v3/memories(cloud_run/backend, rev 6f411f0) measured 2026-10-21T14:00Z→10-22T14:06Z: p50 0.8s but p99 17.4s, 26 walks past 24s, plus 55 fast 503s — every hour had slow walks, so large accounts regularly blow the client budget and the page never loads. PostHogProduct Errorerror_kind=memories_fetch: ~450 distinct reporters over 7 days (build-dependent emission; older builds only log to Crashlytics, so this is a floor).The lever (bounded index-window reads for the legacy list, #22856) has served at the observational 5% cohort since 7d3e0a0 with no adverse signal, and the FSL-F1
retry=Nonedeadline blocker is fixed at the serving rev. This is one runbook step perbackend/docs/runbooks/list-read-serving.md: compare list latency, 504/500 counts, and truncation rate on large accounts after the roll; rollback is the same literal at 5.Ramp plan (dated expansion checkpoint)
Deploy
Config-only; needs the merged SHA on a Cloud Run
backendtrain (lead-owned). ~13% of users move into bounded window reads (per-uid sha256 bucket); rollback = revert this PR or re-render the literal at 5.Product invariants affected
product/invariants/memory-promotion-authority.md): Canonical promotion is the sole Long-term authority. All new canonical intake starts in Short-term, one consolidation decision gives every pending item exactly one terminal route, and only an atomically receipted, graph-backed promotion may admit an item to Long-term. Default access collapses canonical lineage, while keyword, vector, compatibility, and shared-graph projections remain retryable derived views.This change is in the invariant's path globs only via
backend/deploy/runtime_env.yaml; it raises a read-path rollout percentage for the bounded index-window list scan (memory_list_index_window5 -> 25). It creates no intake route, no promotion pass, no second visibility authority, and no projection-state treatment — the window read applies the unchanged row policy and merge rules perbackend/docs/runbooks/list-read-serving.md.Failure-Class
Failure-Class: none