fix(memory): persist smaller windows after extraction timeouts - #1769
Merged
Teingi merged 2 commits intoOct 1, 2026
Merged
Conversation
knqiufan
requested review from
AlexStocks,
PsiACE,
Teingi,
frostming and
zhanghuidinah
as code owners
September 28, 2026 08:52
Member
|
please resolve conflicts |
knqiufan
force-pushed
the
codex/fix-memory-window-timeout-1757
branch
from
October 1, 2026 15:09
e842fee to
a0337e9
Compare
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.
Which issue or RFC does this PR close?
Closes #1757. Updates RFC 1515's Memory recovery behavior.
Rationale for this change
When a large Memory extraction times out, retrying the same Source window can indefinitely block subsequent input in that Scope. Other Scopes can continue and manual recovery remains possible, but retries currently do not adapt the failing input size.
What changes are included in this PR?
Are there any user-facing changes?
Repeated Memory generation timeouts reduce subsequent automatic and SDK/HTTP flush windows without operator intervention.
memory.window_reducedlogs the affected journal range and next limit without Source contents. A single Source may still require changing the provider or timeout; keep the Worker deadline above the provider timeout plus startup/commit overhead.Schema change is additive: startup creates
pc_memory_source_windows, with at most one recovery hint per affected Scope. Existing Source/cursor payload formats and public APIs are unchanged. The new state is an input-size hint, not an acknowledgement of processed evidence or a Supervisor failed-job state. Access uses the Scope primary key rather than scanning pending Sources.How was this change tested?
uv run --locked pytest -q tests/builtin/runtime/test_memory_window_recovery.py tests/builtin/runtime/test_family_processing.py tests/builtin/runtime/test_processing_scheduler.py tests/builtin/persistence/test_cursors.py tests/builtin/persistence/test_mysql_schema.py tests/builtin/persistence/test_processing_migration.py tests/e2e/test_builtin_runtime.py tests/builtin/artifacts/memory/test_capacity.py tests/e2e/test_memory_capacity.py— 75 passed, 13 skipped after rebasing onto the latest Memory-capacity changes. The skipped cases require a live OceanBase database.uv run --locked pytest -q tests/test_integration_manifest.py tests/e2e/test_runtime_server.py -k 'memory or source or integration'— 40 passed, 1 live-backend case skipped, 9 deselected on the initial baseline.uv lock --locked, Linux-target fullty check, native-target type checking of changed modules/tests, Pydantic AI integration type check, workflow action pin check, and integration-manifest documentation check passed.SKIP=ty-check uv run --locked prek run -a). The default Windows full type check has existing POSIX-only native-code errors, so it is not reported as passing. No live OceanBase/seekdb execution is claimed.AI usage statement
Implemented and reviewed with OpenAI Codex (GPT-6), including regression tests, concurrency/transaction review, and validation. Execution limitations are stated above.