Repository navigation
feat(intake): stream whole JSON preparation into sealed shards - #5562
Conversation
|
You have reached your Codex usage limits for security reviews. Please try again later. |
|
Warning Review limit reachedNext included review available in 39 minutes. View limit detailsLimit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Advanced Run ID: 📒 Files selected for processing (9)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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. |
63231e0 to
96d8324
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 96d8324ed4
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
## Summary Prepare retained non-JSON raws in an isolated process worker without the old payload-size refusal. ## Problem A retained raw beyond the old size cap could remain outside ordinary materialization even when its parser supported it. The first worker patch opened archive tiers directly from the source layer, bypassing the declared read boundary. ## Solution Route non-JSON retained preparation through the same sealed artifact publication path and inject an operations-owned worker that pins the archive through `open_operation_read`. The worker revalidates its descriptor, blob and enrichment dependencies before publishing; worker exit and stale input remain retryable. Content-aware routing keeps logical SQLite/Hermes exports named `.json` on their proper parser route. The separate 419 MB and 1.6 GB completed-convergence qualifications remain under `58bwo`, and the broader one-route work remains under `9m93s`. ## Verification - `devtools test` with the seven exact selectors for non-JSON over-limit replay, text/JSON parity, SQLite page and logical-export replay, worker death, canonical daemon raw admission and discovery costs: 9 selected, 9 passed on the frozen refactor content; receipt `20260926T221843Z-focused-test-4118482-81995384`. - `devtools gate controlled-read`: zero violations; `devtools gate schema-closure`: 565 observed/565 baseline; `devtools verify --quick`: passed, receipt `20260926T222117Z-quick-4130603-b8e512a5` on that content. - The two-commit branch was rebased onto merged master `dddac2422` after #5562. The same seven exact selectors passed 9/9 on clean published head `d50005095`, receipt `20260926T225042Z-focused-test-48131-03662e2f`. The hosted quick gate checks that head. An independent read-only review found no concrete wrong output or missing production caller. A wider three-file test selection was cancelled after it reached an unrelated 4,096-row bound test and occupied the managed pytest slot for 11 minutes. It is not acceptance evidence. The isolated worker still materializes a non-JSON parser's complete session tree; this PR removes the size refusal and makes that failure retryable, while bounded representation for supported large JSON is handled separately.
|
Closing out open Codex review threads on this PR (evidence checked against master at bf68918):
Resolving every thread listed; confirmed defects are fixed under the named bead. |
Summary
Stream supported whole-JSON bundle preparation into a sealed SQLite artifact and keep the shard session manifest on disk.
Problem
The worker parsed top-level bundle arrays and session wrappers into complete Python session lists, then returned an in-memory shard manifest. A large count of small sessions could retain a growing tree before publication even began.
Solution
Normalize supported JSON records incrementally into the worker artifact, keep duplicate-identity checks and lookahead in SQLite-backed state, and expose shard sessions through lazy sequence and identity lookups. Existing object-returning parser entry points collect from the same lowering logic. The writer can consume the sealed manifest without rebuilding its row identities.
Verification
devtools test tests/unit/sources/test_prepared_jsonl.py— 9 passed, receipt20260926T213827Z-focused-test-3920758-99aacb51.devtools test tests/unit/storage/test_session_shards.py::test_many_small_sessions_keep_manifest_off_python_heap— passed with 8,000 sessions, receipt20260926T213140Z-focused-test-3902735-bc95b2d7.20260926T213403Z-focused-test-3910057-4158a13eand20260926T214035Z-focused-test-3927591-ac1edb01.devtools gate patternspassed after that correction. Hosted quick gate on this PR will verify the final integrated bytes.This patch bounds worker preparation and its manifest. Live publication still materializes a session list; a separate follow-up is implementing that boundary. This PR alone does not satisfy end-to-end
9m93sor the whale memory qualification.