Skip to content

config: ramp memory_list_index_window 5 -> 25 (mobile Memories page timeouts) - #23310

Merged
Git-on-my-level merged 1 commit into
mainfrom
lane/mem-index-window-ramp
Oct 22, 2026
Merged

Git-on-my-level merged 1 commit into
mainfrom
lane/mem-index-window-ramp

Conversation

@Git-on-my-level

@Git-on-my-level Git-on-my-level commented Oct 22, 2026 •

Copy link
Copy Markdown
Member

Summary

Ramp memory_list_index_window 5 -> 25 in FIRESTORE_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). Prod GET /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. PostHog Product Error error_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=None deadline blocker is fixed at the serving rev. This is one runbook step per backend/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)

  • Now: 25% on the next Cloud Run train (lead-owned).
  • Soak gate: 48h clean — the runbook comparison (GET /v3/memories list latency p95/p99, 504/500 counts, truncation rate on large accounts) vs the pre-roll baseline, run by the hermes lane and posted to the firestore-reads loop.
  • Expand: if clean, a follow-up config PR (same 9-file surface) raises the lever to 100, merged + trained by 2026-10-27. Same rollback (literal back to 25/5).
  • If the gate trips: hold at 25%, post findings to the loop, no expansion without a re-review.
  • Owner of the expansion clock: hermes lane (this PR's author); the lead owns the merge/train.

Deploy

Config-only; needs the merged SHA on a Cloud Run backend train (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

  • INV-MEM-4 (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_window 5 -> 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 per backend/docs/runbooks/list-read-serving.md.

Failure-Class

Failure-Class: none

…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%.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-22T14:43:00.359775Z 68e9422 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

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
Git-on-my-level merged commit a941331 into main Oct 22, 2026
72 of 75 checks passed
@Git-on-my-level
Git-on-my-level deleted the lane/mem-index-window-ramp branch October 22, 2026 15:55
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).
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)
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