Repository navigation
Conversation
Keep UTF-8 SSE frames and partial Responses output across TCP reordering, half-close and EOF. Release consumed capture buffers and full-call ownership, and coordinate storage checkpoints with graceful shutdown. Expose DuckDB resource controls and optional dynamic linking while preserving bundled defaults.
Append and sync deduplicated payloads before acknowledging ingestion. Commit replay cursors with metadata, hydrate detail reads on demand, and propagate durability and drain failures.
Preserve provider errors alongside partial text, reasoning and tools. Distinguish empty and unfinished output in the console, and request a bounded libpcap burst buffer.
Map stream integrity, TCP lifecycle, turn ownership, durable replay and shutdown failures to existing regression tests. Scope the journal read fixture under the test-only constructor allowlist.
Retire only snapshots owned by drained or discarded partitions and preserve visible IDs across late eligibility and reordered boundaries. Maintain ordered rollups and event indexes instead of rebuilding or scanning all pending calls. Add reference-field, lifecycle, drain and deterministic linear-work regressions.
Persist the exact token-estimation summary, hydrate only legacy unknown bodies, and backfill summaries with paced physical-key pages. Stream minimal topology projections, resolve endpoints in time-pruned batches, and retain cross-batch multiplicities under an explicit aggregation budget. Cover compatibility, restart, query-log transfer costs and budget failures.
Use an all-version time-ordered candidate index, complete cross-page clusters and a durable original-patch plan. Replay fresh authoritative rows in batches with checked versions, fixed backfill coverage and retention coordination. Detect index and materialized-view replacement on Atomic and Ordinary databases. Cover partial writes, restarts, object recreation, late data and warmed whole-sweep scan costs. Document maintenance costs and register regression contracts.
This branch has not been deployed
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.
Problem and resulting behavior
Stream boundaries, TCP reordering and shutdown could discard captured output or leave ownership alive. Large body indexing and repeated turn/pairing scans also increased resource costs during long runs.
This update preserves the original capture and durable-ingestion fixes and adds the long-running resource repairs:
Validation
cargo test --workspace --no-default-features -j1 -- --test-threads=1). All 65 ClickHouse tests passed. The only compiler warning is the preexisting unusedMODELS_USEDimport in the Aglake backend.The live summary-maintenance regression observes acknowledged mutation batches and post-completion pacing from query logs. An initial final-workspace run exposed an overly tight six-second test deadline; the test now uses a bounded eventual-progress watchdog while retaining exact batch, pacing and historical-wrap assertions. Production timing and cursor behavior are unchanged.
The performance regressions use deterministic work counters and actual ClickHouse query logs. With 1,000/2,000/4,000 ordered calls, snapshot visits fall from 500,500/2,001,000/8,002,000 to 1,000/2,000/4,000. With 100 recent candidates and 0/100,000/500,000 historical rows, the measured warmed whole sweep reads 813/813/813 rows instead of 100/100,100/500,100. These are fixture measurements, not universal physical-row or RSS guarantees.
Review notes
The four already-published capture/journal commits remain unchanged; the follow-up work is grouped into three logical turn/query/pairing commits. Existing design documentation and the scenario registry are updated with the code.
Full detail bodies and existing pairing classification semantics are retained. Initialization/recovery can scan retained history; ClickHouse granules/part mutations and a single large decoded row can exceed soft per-batch targets. Long-SSE buffering, count-bounded queues and failed remote-batch delivery policy remain outside these repairs.