feat: add checkpointed whole-request partitioning outside routing policy - #1117
feat: add checkpointed whole-request partitioning outside routing policy#1117seonghobae wants to merge 3 commits into
Conversation
49 focused tests pass; scoped statement/branch coverage 100%. Proposed kernel only: live gateway/tokenizer, inner-call accounting and HTTP continuation integration remain required. No production default changes.
|
Warning Review limit reachedNext included review available in 44 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: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (7)
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 |
|
Bounded writer continuation for the user's repeated LineageWeave#983 request. Read exact |
Preserve acknowledged responses for resume without returning cancelled work as success. Four focused tests pass on the reconstructed complete leaf; changed executable lines 2/2 and branch arcs 2/2. Full repository gates and Rust/gateway production integration remain unproven. Preserve #1117 lineage.
|
@coderabbitai review Current continuation head is Correction to inherited verification prose: the earlier 49-test/full-kernel coverage claim was not independently rerun in this continuation. The current evidence is the four new focused cases, not full-repository or hosted GREEN. Automatic HTTP/gateway decomposition, exact live payload counting, inner-call usage admission, Rust runtime migration and OpenCode/Noema/Strix consumer rollout remain open. Do not infer those from the prototype's existence. Companions: central .github#2068 for reviewer memory, #1119 (stacked on #1000) for empirical-policy authority. Bounded cancellation source writer RELEASED after this publication; no force update, closure, bypass or production default change. |
|
|
|
Continuation scope: repair immutable partition replay on published head Fresh baseline: 53 existing tests PASS. Five new cases reproduce silent regrouping/re-accounting on resume: the same source/policy/backend identity can generate different map/reduction packets and resubmit completed evidence when the accounting callback changes. Local candidate binds each map/reduction layout transactionally before dispatch and rejects changed reservation accounting. Combined 66 tests PASS; scoped kernel coverage is 185/185 statements and 60/60 branches. This is not live model quality or HTTP/reviewer integration evidence. No other source path, provider policy, paid fallback, timeout or branch protection is changed. Preparing a normal descendant on this same PR; the root budget still covers this adapter's calls only, not all inner Fugu/Conductor calls. The new central finding is separate: the checked-in OpenCode profile has empty MCP and denies edit/bash/task, so its memory instructions cannot be executed by the agent as currently configured. That integration must be implemented by a trusted host adapter without broadening agent privileges. |
Bind each ordered partition before dispatch; reject regrouping and changed reservation accounting under the same request identity. Preserve completed responses, cancellation, uncertain-outcome reconciliation and existing budgets. Fresh predecessor baseline: 53 passed. RED: 5 failed / 3 passed. Repaired combined suite: 66 passed; scoped kernel 185/185 statements, 60/60 branches. No hosted CI, Rust runtime, gateway rollout or live-review accuracy claim.
|
@coderabbitai review Current exact head Current PR-triggered hosted snapshot: Security and Quality Bounded replay source writer RELEASED. Next owner integration is the Rust/runtime and actual gateway/host-session path, with inner usage reservation and source+relationship completeness; the present Python kernel does not complete those requirements. |
|
|
Current exact head and delivery boundary
2e7e1d128d13a0e22382ed4081b246f15c47be98— normal descendant of86cb73a8d73f3152f253fc6e4433e3f73511d538and originald797d54db3d2fcc5983425a4b012172409c00b41. Proposed / Draft. No full-repository hosted GREEN, independent approval, immutable release, production runtime or automatic HTTP/reviewer rollout is claimed.User request: prevent context saturation on large requests such as LineageWeave#983 using both reviewer-local memory and a separate CO whole-request layer. Companion central .github#2068 owns reviewer work state. CO#1119, stacked on #1000, owns separate effort/evaluation repairs. Preserve those ownership boundaries and all predecessor deltas.
Implemented kernel
New causal repair: immutable partition replay
Previously
_packrecomputed layout on every resume. A changed accounting callback under unchanged request/source/policy/backend identity could regroup already reviewed evidence, generating new operation IDs and submitting it again. The same issue affected reduction packets. Same-layout accounting drift also reused an obsolete reservation.The current commit seals each ordered map/reduction layout transactionally before dispatch and checks reservation accounting on reuse. Changed layout =>
checkpoint_partition_changed; changed accounting =>checkpoint_accounting_changed; old rows lacking a map manifest =>checkpoint_manifest_required, not retrospective attestation. Existing cancellation, budget and uncertain-response behavior remains.Fresh verification executed on the complete leaf
Original production and both original test files were reconstructed from fetched source and matched their Git blob hashes before execution. No fake replacement implementation was used.
CPython 3.13.5, pytest 9.0.2. Production blob
495e03431d2c4473bf237c5eff20aebb0fd7b691; new tests5686fb2129b59d443bd870ff10dfc50a3a3313f5. Test counters are scripted protocol fixtures, not production tokenizers. The 90-unit case proves unit conservation in that fixture, not LineageWeave defect detection. Original 49-test and later four-test evidence remain predecessor history; the 66-case run is the current local evidence.Runbooks:
docs/doctoring/request_partition_replay_20260910.md,docs/doctoring/request_partition_cancellation_20260910.md. Initial design:docs/planning/adrs/2026-09-10-request-partitioning.md.Remaining acceptance before production
The Python kernel is a Proposed compatibility prototype, not the required Rust operational boundary. Real effective-payload counting for every admitted route; gateway/HTTP continuation; shared inner-worker/retry/race-loser usage reservation; storage authorization/retention; actual host-driven OpenCode, Noema and Strix fresh-session adapters; independent review and exact-head hosted checks; immutable owner release and consumer replay remain open. The root budget currently covers outer invocations only.
The central checked-in OpenCode config denies edit/bash/task and has no MCP server. Merely appending a memory instruction is not executable persistence. Its trusted host must own checkpoint writes and fresh sessions without expanding arbitrary agent privileges. The previous central keyset commit was security-blocked and is not republished by this work.
Research and evaluation
Fugu basic is learned worker selection, not fixed role assignment. Fugu-Ultra/Conductor learns subtask and communication topology; the report distinguishes within-workflow tool-history isolation from cross-workflow memory. Five steps is a training setting, not a root-request/provider/tool-call ceiling. RLM external input access motivates bounded context but transfers no empirical score to CWL.
A future held-out review study must compare baseline / agent-memory / outer-partition / both on unchanged PR snapshots, separating cross-file from source-local defects, false positives, incomplete work and actual usage. Neither synthetic theta construction nor inventory coverage authorizes policy promotion. No paid fallback, new timeout, credential expansion, forced push or gate weakening is introduced.