From b0becfe54582539302e238bf7b8bb96e25c787f4 Mon Sep 17 00:00:00 2001 From: LoopX Agent <337587101+loopx-agent@users.noreply.github.com> Date: Tue, 17 Nov 2026 03:05:48 +0800 Subject: [PATCH 1/3] docs,cli,control_plane: distill C1 ledgers and slim CLI context adapters Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com> --- .../2026-10-28-packaged-heartbeat.md | 819 +--- .../2026-10-28-packaged-heartbeat.zh-CN.md | 601 +-- .../2026-10-30-c1-source-convergence.md | 3488 +---------------- .../2026-10-30-c1-source-convergence.zh-CN.md | 2583 +----------- loopx/cli_commands/quota_capture.py | 421 +- loopx/cli_commands/quota_context_reader.py | 84 +- loopx/cli_commands/quota_failure_report.py | 219 +- loopx/cli_commands/quota_presentation.py | 28 +- .../turn_driver/codex_context_history.py | 61 +- 9 files changed, 777 insertions(+), 7527 deletions(-) diff --git a/docs/architecture/rfcs/ledger/controller-executor-unified-contract-v0/2026-10-28-packaged-heartbeat.md b/docs/architecture/rfcs/ledger/controller-executor-unified-contract-v0/2026-10-28-packaged-heartbeat.md index 96be002c07..6d02d37fc2 100644 --- a/docs/architecture/rfcs/ledger/controller-executor-unified-contract-v0/2026-10-28-packaged-heartbeat.md +++ b/docs/architecture/rfcs/ledger/controller-executor-unified-contract-v0/2026-10-28-packaged-heartbeat.md @@ -4,731 +4,106 @@ This is a measurement checkpoint for the [controller/executor RFC](../../control not acceptance of C1 or a default promotion. The [Chinese mirror](2026-10-28-packaged-heartbeat.zh-CN.md) records the same scope and results. -## Source and workload - -Compare original quota at main `843be494266774b63b3de61d0adf5dd7f4f877a2` -with the integration candidate at runtime commit -`1199cbe0b8e92ddf845e345483041486fe808024` in [#7430](https://github.com/loopx-project/loopx/pull/7430). -Each wheel was built with its own source-dependent frontend fingerprint; -1,884 packaged product members matched their respective source checkout. -No global runtime was installed or active Goal state used as a test fixture. - -Both arms use the same synthetic workload and real, isolated File and SQLite -authorities: one active Goal, a complete selected task, one current-Agent outcome -and five independent peer outcomes, with four requirements each. Global intent, -authority and stop conditions remain available. The candidate's existing native -context opt-in expands the current outcome and indexes the peers. Every peer -body remains readable from the original capture; all 24 requirement descriptions, -owners, linked work and unverified states were checked after expansion. - -The packaged CLI path runs thin heartbeat bootstrap, guarded quota/native context, -every required context page, mandatory Goal-source reads, and the real context-hook -command. Synthetic native lifecycle events provide warm continuity and then -PostCompact/SessionStart invalidation. Loss recovery reads the **same original -capture**, without replacing admission. Tampered sources and early spending are -rejected; refresh and spend replays preserve one effect and one debit. The -unfinished selected task remains open. Warm reconstruction and missing-baseline -full fallback were also checked. - -These are packaged engineering observations with simulated host continuity. -They do not establish installed Codex App adoption, model retention or decisions, -SDK coverage, accepted task outcomes, or a controller/executor experiment. - -## Observations - -One matched cohort was run, one observation per arm/backend/phase. Background -host load was uncontrolled. Elapsed time sums actual CLI calls, including startup, -required Goal reads and lifecycle observations. Counts are logical Python-to-runtime -requests; physical framing, retries and provider-internal IO are not inferred. -Artifact size is delivered UTF-8 context content, not tokens or the full stdout. - -| Backend / phase | Context bytes, original → candidate | Logical requests | Elapsed ms | -| --- | ---: | ---: | ---: | -| File / cold full | 75,387 → 76,162 | 103 → 102 | 5,052.49 → 4,867.53 | -| File / warm delta | 40,991 → 43,558 | 99 → 98 | 3,240.32 → 3,399.05 | -| File / loss recovery | 74,619 → 75,390 | 6 → 6 | 4,045.91 → 4,213.20 | -| SQLite / cold full | 75,483 → 76,270 | 103 → 102 | 4,566.19 → 4,428.81 | -| SQLite / warm delta | 41,085 → 43,666 | 99 → 98 | 3,236.50 → 3,416.50 | -| SQLite / loss recovery | 74,713 → 75,498 | 6 → 6 | 4,149.99 → 3,957.72 | - -Both arms use 13/9/13 CLI calls for cold/warm/recovery. Invalidation itself is -separate: two hook calls, 683–738 ms across these observations. Expanding all five -peers in the candidate adds 13,940 content bytes, five reader pages and five -observation hooks: **10 CLI calls / 10 logical requests**, 17,620 stdout bytes, -and 3,416–3,713 ms per phase. The original arm already carries these bodies inline. - -Total phase stdout also grows: File cold 94,662 → 96,082 bytes, warm -58,077 → 60,649, recovery 89,807 → 91,144; SQLite 94,776 → 96,208, -58,185 → 60,771 and 89,911 → 91,262. The seven settlement/negative/readback calls -per backend use 226 logical requests in each arm, with identical stdout totals -within each backend. Setup, builds, failed authoring probes and optional reads -are separate costs, not removed from the experiment history. - -Coalescing acceptance/title/Explore projection removes one logical request and -reduces bridge JSON. For example, File cold request/response content falls from -965,261/585,535 to 902,963/494,206 bytes. That local reduction does **not** offset -the larger delivered artifact or optional expansion. Warm elapsed time rises in -both backends; recovery observations are mixed. This sample supports no causal -speedup, default SQLite performance qualification or positive complete-cost diff. -Tokens, cache use, billing, verification outcomes, human attention and long-horizon -net benefit remain unqualified. Earlier negative and mixed measurements stand. - -## Owning gap and continuation - -Compared with original quota, scoping removes about 13 KB of peer bodies, but the -candidate retains about 6.6 KB of repeated Todo diagnostic lanes and adds about -3.9 KB of scope metadata. Candidate lists and other diagnostic repetitions consume -the remaining savings. This is a composition/compaction gap, not evidence that -peer scope itself lowers total cost. - -That checkpoint selected a C1 slice to characterize necessary diagnostic compaction and -move it into the existing shared typed composer, retiring the replaced Python -caller algorithm. Preserve complete selected work, portfolio/horizon, -claim/lease facts, global obligations, unknown fields, exact references and -historical recovery. The old Python compactor drops unknown list fields and -shortens some prose; copying it unchanged would not meet that contract. Reuse -the same packaged comparison for default reads and all-peer expansion before -claiming improvement. No new packet format or per-field RPC is justified. - -The integration candidate adopts the merged route owner (#7520) and reference -owner (#7457). Acceptance, Task-title and Explore legacy references now share -one existing `reference_context` operation; the redundant acceptance operation -and duplicate controller-input dispatch branch are removed. Complete composition -reuses those same semantic functions. This is a bounded convergence change, -not full writer cutover, historical-reader retirement or C1 completion. - -The final affected suite has 469 passes and five optional native/SDK skips; -116 typed tests and control-plane typechecking pass. Earlier build fingerprint, -missing-dependency, harness-carrier and outdated call-count failures are retained -as authoring/validation costs, not silently converted into product passes. -No model, paid evaluation, managed benchmark, live install, release or merge was -performed for this comparison. - -## Shared diagnostic owner follow-through - -The follow-through at `d33c1a19d91738c66073d9e71586f14466f36d89` replaces the -Python Todo-list algorithms with `quota/diagnostic_projection.ts`. Existing -`reference_context` callers share it for should-run and the whole status/plan row -collection; scoped native composition reuses it inside its existing request. -[#7557](https://github.com/loopx-project/loopx/pull/7557), at -`5b5d9dd3b0a816aae9d5160b849cff4a3c38da13` on main -`19c213324fbb5990288bd374c1b79096f22bb152`, proposes the independently usable -legacy-reader slice as a normal PR. Its typed module is identical to the -integration module. Neither proposal is merged or installed by this work. - -Only explicitly known diagnostic lanes with recognized canonical Todo records may be -bounded. An unknown item field/version, a non-record item or complex nested -content preserves that entire list. Unknown lists survive. Retained records stay -complete; portfolio prose, capability candidates, planning horizon, selected -work and existing succession IDs are not shortened or reconstructed. Original -capture/recovery remains complete. Projection metadata points to the existing -source capture instead of repeating long recovery commands in each lane. - -The same frozen packaged harness and original quota commit were rerun in one -matched cohort, with the same path lengths, synthetic task and 24 clauses. The -base wheel has 1,884 source-matching product members; the candidate has 1,885. -These measurements belong to the recorded pre-rebase commit above. The later -rebase onto `19c213324` adds the unrelated merged Lark-return change; it does not -turn the frozen experiment into a measurement of that later head. - -| Backend / phase | Context bytes, original → candidate | Stdout bytes | Logical requests | Elapsed ms | -| --- | ---: | ---: | ---: | ---: | -| File / cold full | 75,648 → 70,388 | 95,004 → 89,875 | 103 → 102 | 4,959.03 → 6,475.69 | -| File / warm delta | 41,252 → 44,029 | 58,401 → 61,183 | 99 → 98 | 3,465.08 → 4,538.62 | -| File / loss recovery | 74,880 → 69,618 | 90,113 → 84,903 | 6 → 6 | 5,108.18 → 5,762.51 | -| SQLite / cold full | 75,740 → 70,492 | 95,114 → 89,997 | 103 → 102 | 5,771.16 → 5,856.03 | -| SQLite / warm delta | 41,346 → 44,133 | 58,509 → 61,301 | 99 → 98 | 3,772.95 → 3,794.99 | -| SQLite / loss recovery | 74,974 → 69,722 | 90,217 → 85,017 | 6 → 6 | 4,226.47 → 5,113.92 | - -Both arms still use 13/9/13 CLI calls. Expanding all five peers still adds 13,940 -context bytes, 17,620 stdout bytes and 10 CLI/logical requests to each candidate -phase; measured optional-read time is 4,107–4,875 ms. The original already has -those bodies inline. The seven settlement/negative/readback calls still use 226 -logical requests with identical per-backend stdout; one effect/debit and the -open task are preserved. Builds, setup, failed probes, two invalidation hooks -and optional reads remain separate recorded costs. - -Cold/recovery context is about 5.3 KB smaller, but warm context is about 2.8 KB -larger and all-peer consumption remains more expensive. Every observed candidate -phase is slower in this cohort; with one observation and uncontrolled background -load this is not a causal latency estimate. An intermediate version repeated -capture commands and was larger still (File warm 45,187; SQLite 45,303 bytes); -the metadata fix does not erase that experiment or establish net benefit. - -Four cold/warm File/SQLite presentations were independently compared with their -original source captures for complete selected work, boundary, horizon, -capability gate and portfolio. An intentionally mutated QA wheel that deletes -the capability gate is rejected through the packaged guard/reader path. This -checks oracle sensitivity, not model adherence. Source tampering, early spend, -same-capture loss recovery and once-only settlement retain their negative and -positive checks. - -The final affected integration selection passes 144 Python and 117 typed tests; -an earlier broader selection had 533 passes and five optional skips, before the -unknown-item fallback was strengthened. The independent #7557 slice passes 264 -Python/70 typed cases, including real File/SQLite status/plan/detail and canonical -Todo readback, and all 14 selected premerge checks. Status/plan now pays one coarse -typed request; explicit full Todo summaries skip it. A crowded diagnostic unit -fixture grows to 43,862 characters because complete candidates are retained; this -is an intentional information delta, not a speedup. The unchanged public v4 -multi-Agent budget probe passes on original quota but fails at 27,934 > 13,000 -characters on both the preceding and current integration wheels. That integration -failure remains open; no public budget was raised. - -The next existing C1 work is to diagnose the warm reconstruction/metadata cost -without losing obligations, then qualify remaining consumers and writer cutover. -No positive complete-cost diff, default SQLite performance, installed App/model -retention, token/cache/billing, accepted-outcome or long-horizon benefit is claimed. -C1 and the separate C2/controller experiment remain open. - -## Relocated-context integration - -Runtime `167b31e5d078193b9fd73ad6609804e268390972`, rebased onto main -`f205c02a37d5a668c956733a721af911dcac7fab`, adopts the existing -[#7528](https://github.com/loopx-project/loopx/pull/7528) codec change at -`759c16a9cf430bb7442b47dd3a5c3336ffb93666`. The integration keeps main's scoped -preference binding, native checkpoint fixtures and intelligent-mediation design. -It does not create another encoder. One exact baseline subtree plus literal -current overrides replaces repeated paths to unchanged evidence. Unknown and -current controls remain inline; original capture, identity and recovery stay -unchanged. A scoped-wrapper regression exercises the same implementation. - -A 24-row synthetic relocation compares that runtime with its immutable parent -`87e216f24f966671d35e035df7ba285248b48bad`. Complete ordinary delta bytes fall -13,199 → 6,090; the C1 scoped-wrapper delta falls 13,809 → 6,230. Cold/current -full encodings remain 20,060/20,188 bytes and 20,167/20,295 bytes respectively. -Both reconstruct exactly; the actual old decoder recovers the same full current -capture for the new overlay. The original missing-overlay case fails before -adoption. These are codec observations, excluding model retention, tokens, -framing, billing and task outcomes. - -The unchanged packaged harness is rerun in a new matched cohort against original -quota `843be494266774b63b3de61d0adf5dd7f4f877a2`. Both arms use the same fixture -and equal path lengths; their 1,884/1,885 product members match their sources. -These results belong to this runtime and cohort; the earlier tables remain -historical observations of their own sources. - -| Backend / phase | Context bytes, original → candidate | Stdout bytes | Logical requests | Elapsed ms | -| --- | ---: | ---: | ---: | ---: | -| File / cold full | 75,211 → 69,934 | 94,432 → 89,286 | 103 → 102 | 5,961.28 → 5,183.22 | -| File / warm delta | 40,817 → 43,575 | 57,861 → 60,624 | 99 → 98 | 3,981.29 → 3,592.23 | -| File / loss recovery | 74,445 → 69,164 | 89,603 → 84,374 | 6 → 6 | 5,052.05 → 5,156.02 | -| SQLite / cold full | 75,311 → 70,044 | 94,550 → 89,414 | 103 → 102 | 5,205.45 → 6,393.69 | -| SQLite / warm delta | 40,913 → 43,683 | 57,971 → 60,746 | 99 → 98 | 3,482.77 → 4,216.01 | -| SQLite / loss recovery | 74,541 → 69,272 | 89,709 → 84,492 | 6 → 6 | 4,649.12 → 5,590.37 | - -CLI counts remain 13/9/13. All-five-peer expansion still adds 13,940 context -bytes, 17,620 stdout bytes and ten CLI/logical requests per candidate phase; -observed optional-read time ranges from 4,046 to 9,431 ms. Seven negative, -settlement and readback calls retain 226 logical requests and equal per-backend -stdout in both arms. Tamper/early-spend rejection, all 24 clauses, same-capture -recovery, one effect/debit and the open task pass. Four source comparisons keep -selected work, boundary, horizon, capability gate and portfolio complete; a new -mutated QA wheel dropping the capability gate is rejected by the real guard and -reader. No other owned build or test overlaps the timed cohort; host background -load remains uncontrolled. One observation does not qualify latency or p95. - -The final typed selection passes 147 cases and typecheck. The affected Python -run records 299 passes, 51 optional native/SDK skips and two recovery-text size -failures in a long temporary namespace. A controlled identical-path comparison -on immutable main and this runtime reproduces both failures at 2,015 characters; -neither hook embeds the requirement body, and both retain the original recovery -command. The normal-path lifecycle suite separately passes all 145 cases. No limit, -assertion or fixture body was relaxed, and the original failing run is retained. -The new wheel required rebuilding main's stale frontend bundle before successful -packaging. The unchanged v4 probe still fails at 27,934 > 13,000 characters. - -Relocation redundancy is reduced, while ordinary warm input still grows about -2.8 KB and all-peer reading remains more expensive. The latter is a different -remaining C1 composition/metadata gap. Default SQLite performance, installed App -and model retention, token/cache/billing, accepted outcomes and full long-horizon -benefit remain unqualified. Continue the existing C1 on that gap and remaining -consumers; this adoption does not close C1, C2 or the controller experiment. - -Subsequent integration is rebased onto main -`0cfbf11dcea4ba7bc8fb13f06f1c915b63ce8fad`, which contains #7528; its duplicate -commit drops out. Both Goal-source commits from [#7547](https://github.com/loopx-project/loopx/pull/7547) -retain their authorship and all 12 contributed product/test blobs match the -accepted integration head. Main's capture owner still stages before admission -and publishes afterward. The original complete contract is installed only after -publication. Removing an unused capture helper restores the process-level fence -around the actual Turn executor; the existing held-lane test fails before this -repair and passes afterward. - -Runtime `6f30cc454f2dea7e77f0821a14a1deaf268efe2e` has a source-matching -1,885-member wheel. The post-rebase typed selection passes 148 cases and -typecheck. The integration Python selection initially records 185 passes, two -explicit live-host skips and 12 failures: eight new staged-readback assertions -compare adapter metadata with the actual model projection, and four observers -still name the pre-#7547 metadata-only operation. Retaining their complete -comparisons against the real Host input and observing the stricter dispatch -operation makes all 54 Host-capture cases pass; no product gate is relaxed. -The earlier run and its other passed cases remain recorded separately. - -The packaged File/SQLite bootstrap, complete Goal delivery, all clause/detail -reads, same-capture recovery, rejection and once-only settlement pass again on -this wheel. This functional run overlaps other validation and is not a new -matched timing cohort. The older cost tables remain attached to runtime -`167b31e5d`, not relabeled as this later source. Current-version complete-cost -and outcome qualification remain open. - -The committed premerge then exposes a maintainability failure: the executor -contains 94 statements against the existing 90-statement limit. Runtime -`82f93ab76a403c2633efedb2f8bf02f85be8e3c6` moves published-input installation -into the existing staged-capture owner, preserving recovery bindings and -publication ordering. Its source-matching 1,885-member wheel, all 54 Host-capture -cases and the unchanged maintainability ratchet pass. The original failure is -retained; no exception or threshold is added. This owner consolidation does not -turn the historical warm-input or v4 budget failures into passes. - - -The next integration rebases the retained C1 history onto main -`6f8f476388645fcea2269329d32974b559d490e6` and adopts the repaired diagnostic -slice [#7557](https://github.com/loopx-project/loopx/pull/7557) at -`eb4e9b970aeb1ffb83e46705d6386cc3a4679ead`. That slice originally transported -the whole Python input through JavaScript JSON: `1.0`, negative zero and integers -above the safe range could change outside the display fields. Nine independent -source-number cases fail before repair. The shared typed owner now returns only -display edits and immutable source references; Python applies them to its original -values without owning compaction policy. The standalone slice passes 305 Python -cases, 99 typed cases, typecheck, Ruff and its standard premerge. These are source -and real File/SQLite CLI checks, not installation or independent acceptance. - -C1 runtime `7f35454b392e09ae574c5065c473ee27b5eee853` uses the byte-identical -shared diagnostic module. Its acceptance-sharing stage formerly cloned every -source object, defeating references for relocated numeric facts. It now copies -only changed registered carrier paths. The first integration selection retains -253 passes and five failures: three expose that clone and two old boundary -fixtures fail the complete-Goal dispatch requirement, also on the previous C1 -head. The boundary fixtures now keep work in its canonical provider and deliver -complete non-Todo Goal material; they check both the current original-contract -Host input and historical scope aliases, including rejection, without relaxing -dispatch. The final affected selection passes all 258 Python cases; the 110-case -typed selection, typecheck and Ruff pass. The older wheel and matched timing -cohorts remain attached to their actual versions. This source follow-through -does not qualify a new packaged cohort, cure the warm-input or v4 budget failures, -or close remaining consumers, reader retirement or actual model/outcome costs. - - -The additional complete-Host selection retains 200 passes and two failures -against the later main integration: its operation-host oracle still expected -whitespace folding, removed by main's [#7549](https://github.com/loopx-project/loopx/pull/7549). -The actual `chat_agent.py` blob equals the verified main base. Checking original -prompt bytes on both transports, while retaining schema, retry and tamper -assertions, makes all 54 Host-capture cases pass. This changes the test oracle, -not the production transport. The initial failure remains recorded. - -GitHub subsequently reports #7557 merged as -`4b2b97b7b726d902a20969e3911fd15d15b4bb2e`; all seven contributed files match -its repaired head. Merge occurrence does not supply a missing new-head -independent review or protected-action receipt. The C1 qualification above -remains bound to its frozen main base; later main changes are not implicitly -qualified. C1 stays an unfinished author integration with its existing cost, -consumer and retirement gaps. - -## Complete Goal reuse and independently usable native slice - -C1 is subsequently rebased onto main -`f5e9be3671c1b5c80eba5c62fe4d617bfefd66d6`. Runtime -`a0cc4c14b` reuses the exact unchanged scoped-reading instruction and objective, -while keeping every other wrapper field current. It also reuses complete Goal -text only after the existing source-integrity predicate succeeds. That predicate -moves unchanged into `goal_context_source.ts`, shared by fulfillment and the -codec. Changed text, control fields, scope, indexes, ownership, revisions and -unknown fields stay literal; malformed witnesses and missing baselines cannot -hide required reads. This removes repeated interpretation rather than adding -another context or decision owner. - -Source `ebdce8a49b4faa584571cfb688aa2c2a238a5860` retains this behavior and -native complete-Goal regression coverage. Its rebuilt wheel has 1,889 product -members matching source, with no packaged-only or mismatched member. The same -unchanged private harness compares it with the original quota baseline -`843be494266774b63b3de61d0adf5dd7f4f877a2`, using equal-length namespaces and -the same six outcomes, 24 clauses, work, stops and backends. Both arms include -mandatory supplementary Goal-file reads; recovery also includes the two -invalidation/startup hook outputs and reads the original capture without a new -admission. Optional peer expansion is separate. - -| Backend / phase | Original quota stdout bytes | C1 stdout bytes | Calls, quota → C1 | RPCs, quota → C1 | -| --- | ---: | ---: | ---: | ---: | -| File / cold | 94,892 | 90,918 | 13 → 14 | 103 → 103 | -| File / warm | 58,289 | 52,474 | 9 → 8 | 99 → 98 | -| File / loss recovery | 92,068 | 87,418 | 15 → 14 | 8 → 8 | -| SQLite / cold | 95,002 | 91,048 | 13 → 14 | 103 → 103 | -| SQLite / warm | 58,401 | 52,598 | 9 → 8 | 99 → 98 | -| SQLite / loss recovery | 92,178 | 87,540 | 15 → 14 | 8 → 8 | - -Calls count native CLI/hooks and any mandatory Goal-file read, separately from -RPCs. Capture/delta bytes alone are larger than quota in this cohort; the -complete-input comparison improves because quota separately requires 7,952 Goal -bytes. C1's optional expansion of all five independent peer outcomes still adds -13,940 content bytes and ten CLI/hook calls per phase. Complete clauses, exact -reconstruction, compaction recovery, tamper/early-spend rejection, one durable -writeback/debit and replay pass on both backends. These are deterministic -packaged-consumer checks, not actual model retention or outcome acceptance. -The single cohort ran alongside background work; it does not qualify latency, -model tokens/cache, billing, human cost or complete long-horizon benefit. -Historical negative warm observations remain attached to their earlier source. - -The final affected integration selection passes 205 Python cases, 112 typed -cases, typecheck, configured mypy and scoped Ruff. The packaged source -still fails the unchanged historical v4 oracle (digest `d12a8843834aea84…`) at -27,934 > 13,000 characters; the earlier 26,253-character observation used a -different current-source oracle (`1b5d010a30e608c6…`) and remains separate. -Neither failure is waived or relabeled by the positive paged-input comparison. - -The independently usable [#7575](https://github.com/loopx-project/loopx/pull/7575) -at `d980d621219b10353fdaeb058a1a0fd5714f4389`, based on main -`2cdff65d886d13121ffd78dccd96dd7413ab9d01`, supplies complete Goal material -through the existing opt-in native path and exact warm reuse. It has no dependency -on unmerged C1. Its main-baseline complete-Goal oracle fails on File and SQLite, -then passes with the change. Its 175 Python cases, 57 typed cases, typecheck, -configured mypy, scoped Ruff and packaged real-backend recovery/settlement pass. -Matched native stdout improves about 7.7 KB warm, but cold and loss recovery each -add about 1.2 KB and one RPC. That tradeoff stays explicit; this normal author PR -does not certify complete C1 or promote the default. C1 reuses the same predicate -and native source behavior, with scoped-wrapper reuse remaining in C1. Remaining -callers, writer cutover, historical-reader retirement and actual decision/outcome -qualification continue in the original work stream. - -## Same-capture Todo-summary lane reuse - -C1 subsequently rebases onto main `ffc90182bc2a896aa9980cf24dcf23a0e3276e3d`, -which includes #7575 merged as `a6283d923e3c951443fea65ba1a855c4f7c6c335`. -Its native Goal producer and integrity owner are adopted rather than copied. -Runtime `4604ee479` adds exact lane sharing in the existing typed diagnostic -owner. Equal nonempty registered arrays retain one literal owner and use -same-summary `_ref` references where smaller. Equality preserves order, -JSON types and unknown item fields; other fields and candidate collections stay -unchanged. The complete composer, action projection and native presentation use -this owner, resolving references before display caps. No extra state read, -capture, admission or settlement owner is introduced. Ambiguous, chained, -missing and cross-summary targets are rejected, including with valid inner -contract hashes. Older captures remain readable. - -The same source-checkout workload emits 27,934 characters before this change -and 25,862 afterward: 2,072 fewer (7.4%), entirely in the agent summary. All other -root-section lengths are unchanged. The rebuilt wheel, with 1,889 source-matching -product members, independently fails the unchanged `d12a8843834aea84…` v4 oracle -at **25,862 > 13,000**. This is the opt-in complete-contract variant, not the -default quota output budget. Neither ceiling is raised or claimed passed. -An identical real File/SQLite producer oracle fails on immutable pre-change -`87c14a5aa` and passes with the references. The integration passes 333 Python -cases; five explicit native-Codex environment cases remain skipped. The 125 typed -cases, control-plane typecheck, configured mypy and scoped Ruff pass. A stale -bridge test is corrected separately: display edits are compared with edits, -and the resolved document retains its original semantic assertions. - -The unchanged packaged harness again compares original quota `843be494…` with -this integrated candidate, in equal-length namespaces and with all mandatory -Goal reads. This new cohort measures the complete integration; its difference -does not isolate the lane change from the rebase and preceding C1 work. - -| Backend / phase | Original quota stdout bytes | C1 stdout bytes | Calls, quota → C1 | RPCs, quota → C1 | -| --- | ---: | ---: | ---: | ---: | -| File / cold | 94,510 | 89,911 | 13 → 12 | 103 → 102 | -| File / warm | 57,931 | 52,094 | 9 → 8 | 99 → 98 | -| File / loss recovery | 91,720 | 87,048 | 15 → 14 | 8 → 8 | -| SQLite / cold | 94,622 | 90,638 | 13 → 14 | 103 → 103 | -| SQLite / warm | 58,043 | 52,218 | 9 → 8 | 99 → 98 | -| SQLite / loss recovery | 91,830 | 87,170 | 15 → 14 | 8 → 8 | - -Both backends preserve all 24 clauses, full/delta reconstruction, original-capture -loss recovery without new admission, exact optional peer reads, tamper and early -spend refusal, and one writeback/debit under replay; work stays open. Complete -capture/delta bytes alone remain larger than quota, which separately reads -7,952 mandatory Goal bytes. Five optional peer outcomes still add 13,940 content -bytes and ten CLI/hook calls per phase. Warm RPC response bytes and loss-recovery -request/response bytes grow. One uncontrolled cohort does not qualify latency, -model retention/tokens/cache, billing, human cost or accepted outcomes. Remaining -caller replacement, writer cutover, historical-reader retirement and actual -single-session decision/outcome qualification stay open; the controller-model -comparison remains a separate later experiment. +## Source, workload, and convergence scope + +Compares original quota on main against the unmerged `#7430` C1 integration +candidates using isolated File and SQLite authorities and a synthetic six-outcome +(24-requirement, one open selected task) packaged CLI workload (`1,884`–`1,889` +source-matching wheel members; no global runtime install, live Goal state, or +paid model run). Lifecycle continuity, `PostCompact`/`SessionStart` invalidation, +same-capture recovery without new admission, tamper/early-spend refusal, and +once-only replay settlement are exercised on both backends. + +Absorbed prerequisite slices on main: `#7520` (route owner), `#7457` (shared +`reference_context`), `#7557` (`quota/diagnostic_projection.ts`, merged +`4b2b97b7b7`), `#7528` (relocated-context overlay `759c16a9cf`), `#7547` +(staged-capture Goal owner), `#7549` (prompt whitespace), `#7575` (complete Goal +warm reuse, merged `a6283d923e`), `#7594`/`#7609`/`#7610` (material planner and +exact Todo-record reuse), `#7628` (current-capture recovery ordering, merged +`75034bfa99`), `#7633` (lossless-reference regression suite), and `#7643` +(source-preserving display edits). + +## Packaged cohort progression + +One uncontrolled matched cohort per checkpoint (`13/9/13` CLI calls for +cold/warm/recovery; invalidation adds two hook calls, `683–738 ms`; expanding +all five optional peer outcomes adds `13,940` content bytes, `17,620` stdout +bytes, and `10` CLI/logical requests per candidate phase; seven settlement/negative +calls keep `226` logical requests). + +| Checkpoint (candidate / main) | File cold → warm → recovery stdout B (orig → cand) | SQLite cold → warm → recovery stdout B (orig → cand) | Outcome & open regressions | +| --- | --- | --- | --- | +| Initial `#7430` (`1199cbe0b8` / `843be49426`) | `94,662→96,082` / `58,077→60,649` / `89,807→91,144` | `94,776→96,208` / `58,185→60,771` / `89,911→91,262` | Warm latency & stdout regressed (`~6.6 KB` Todo lanes + `~3.9 KB` scope metadata). | +| Diagnostic owner `#7557` (`d33c1a19d9` / `843be49426`) | `95,004→89,875` / `58,401→61,183` / `90,113→84,903` | `95,114→89,997` / `58,509→61,301` / `90,217→85,017` | Cold/recovery `-5.3 KB`, warm `+2.8 KB`; every phase slower; v4 probe `27,934 > 13,000` FAIL. | +| Relocated overlay `#7528` (`167b31e5d0` / `843be49426`) | `94,432→89,286` / `57,861→60,624` / `89,603→84,374` | `94,550→89,414` / `57,971→60,746` / `89,709→84,492` | Synthetic 24-row delta `13,199→6,090 B` (wrapper `13,809→6,230`); warm `+2.8 KB` & v4 `27,934 > 13,000` still FAIL. | +| Complete Goal reuse `#7575` (`ebdce8a49b` / `843be49426`, incl. `7,952 B` Goal read) | `94,892→90,918` / `58,289→52,474` / `92,068→87,418` | `95,002→91,048` / `58,401→52,598` / `92,178→87,540` | Stdout improves only when counting quota's separate Goal read; v4 `27,934 > 13,000` FAIL. | +| Todo-lane `_ref` (`4604ee479` / `843be49426`) | `94,510→89,911` / `57,931→52,094` / `91,720→87,048` | `94,622→90,638` / `58,043→52,218` / `91,830→87,170` | Agent summary `-2,072 B` (`7.4%`), v4 oracle **still FAIL** at `25,862 > 13,000`. | ## Mainline integration and immutable reader identity -The existing C1 proposal #7430 integrates main `447c35ed6`, including the shared -native progressive-material planner, generic capture selectors, request-scoped -settlement and current-request authorization. Those owners remain authoritative; -the integration does not create another policy or schema. The native operation -uses the existing material planner in the same typed boundary: sources needing -no material edits keep one RPC, while actual edits still apply to the original -Python JSON before capture and encoding. C1 scope fallbacks retain the complete -source. Signed complete v1 material staging remains unfinished; its full fallback -must not be reported as migrated or compacted. - -Two reader seams are repaired. Generic `context-read --select` continuations -carry their selection digest through the existing CLI validator. Historical -replan commands bind the original captured complete input before diagnostic -references are expanded for the executor view; hashing that expanded view made -the original immutable capture reject a valid generated command. Both repairs -reuse the existing selector, reader and hash owners, without another admission, -receipt or debit. Tampered or differently scoped reads still reject. - -The independent no-material RPC-count oracle fails on the frozen initial -integration and passes after repair. A new repeated replan-read oracle also -fails there when the complete source shares a Todo-summary lane, then passes -with the original binding. The initial repaired source `5a770d183` passes 160 typed cases and 23 -real File/SQLite replan CLI cases, control-plane typecheck, configured mypy and -scoped Ruff. Existing legacy resumed-task display assertions remain alongside -the complete-input assertions; no candidate text, unknown fields or ceiling is -removed to obtain a pass. - -A wider 37-module run at that revision stops at three failures, with 1,364 -passed and 53 environment skips; it is not a full-suite pass. Two assertions -still read the old detached Host layout. The corrected oracle checks complete -Goal bytes and exact current work in the canonical channel, and separately -retains the original pending-read and verification assertions for the historical -reader. The fixture excludes only the harness-added `_returncode` from signed -CLI input. The third failure exposes ordinary missing Task/request identity being -classified as a wait: `281910a95` restores its contract error. The four direct -File/SQLite and missing-work regressions then pass. Its local host-preparation -extraction passes the unchanged maintainability limits; that result does not -establish execution or concurrency parity. - -Integration `bca6350b2` then adopts main `ccf6aacc5`, including #7594 recovery -output guidance, #7609 first-guard choice and #7610 exact Todo-record reuse. The -existing material planner returns reference-only edits through the same native -operation, with original Python-value checks preserved. No duplicate heartbeat -view or reference owner is restored. Its 163 typed cases and control-plane -typecheck pass; focused caller/recovery follow-through is reported on #7430 at -its tested revision. Record reuse retains main's required-view profile; it does -not qualify signed-complete material staging. The source and oracle corrections -do not retroactively pass the wider interrupted/failed cohorts above. - -The later 16-module cohort also stops at three failures, with 843 passed. One -new test still calls the superseded private helper signature; it is moved to the -same existing typed-plan fixture without changing its overhead assertions. The -two real File/SQLite busy-request failures expose an author refactoring mistake: -the lane decorator was left on the preparation helper rather than the complete -execution entry. The corrected entry retains the fence over admission, host and -settlement. The existing public-entry refusal oracle fails on frozen `fc4763098` -and passes after correction, along with busy-request restart/replay. Premerge -now automatically selects that existing seven-case public-entry module when -the executor, lane owner or CLI execution entry changes, including in quick -validation; nine focused planner cases cover selection and unrelated-context -exclusion. This reuses the real fence oracle instead of adding a duplicate -implementation check. Earlier automatic passes do not qualify the broken -intermediate entry, and neither stopped cohort is reported as a full pass. - -This is integration qualification, not new installed or model behavior. Earlier -interrupted cohorts and the subsequent three real reader failures remain failed -historical observations. Earlier cost tables and **25,862 > 13,000** retain their -original revisions and status; no threshold is raised and no latest complete-cost -result is inferred. Caller/writer migration, historical-reader retirement and -actual single-session decisions, accepted outcomes and complete costs remain C1 -work; the proposal stays unfinished. +Integration on main `447c35ed6` and `ccf6aacc5` adopts the shared native +progressive-material planner, generic capture selectors, request-scoped +settlement, and current-request authorization without creating a second policy +or schema. + +- **Reader seams repaired (`5a770d183`):** `context-read --select` continuations + carry their selection digest through the CLI validator; historical replan + commands bind the original captured complete input *before* expanding + diagnostic references so immutable captures do not reject valid commands. +- **Process lane fence (`82f93ab76a`):** moved published-input installation into + the staged-capture owner so the process fence covers the actual Turn executor + and complies with the unchanged 90-statement limit (fixing an intermediate + 94-statement premerge failure and two busy-request failures at `fc4763098`). +- **Numeric fidelity & display edits (`7f35454b39`, `fd65514e7`, `dd600ac02`):** + `1.0` vs `1`, `-0.0`, and unsafe integers caused **8/10** adapted `#7633` + display/CLI counterexamples and **4/5** complete-composition failures at + `c335aae894` even after `#7643` edit-plan adoption. Sending sparse numeric + spellings to the TypeScript `diagnostic_projection.ts` / `turn_envelope.ts` + owner and applying edit plans on original Python IO values resolved 12/15 + counterexamples (`31,469` / `87,469` / `279,469` → `1,243 B` response for + identical contracts; `279,469 → 536,456 B` caller view when preserving + distinct bodies). Existing JavaScript normalized hash inputs remain separate + from immutable exact-byte capture digests. +- **Interrupted & failed runs retained:** 37-module cohort stopped at `1,364` + pass / `3` fail (`281910a95` restored missing-task contract error); 16-module + cohort stopped at `843` pass / `3` fail; long temporary namespace reproduced + `2,015`-char hook recovery-text failures on both main and candidate; earlier + `28` codec-fixture failures and `27` inherited broad-mypy errors are preserved. ## Signed complete material staging -The next integration adopts main `b47bbc6c9`, including first-call selection and -original captured-failure recovery. The actual native caller supplies -`complete_turn`, rather than the legacy `quota_packet` surface. After validating -the complete decision, that caller now uses the same outcome-scope, progressive -material and exact-record owners. The canonical signed capture is not edited, -re-signed or treated as a new observation. An existing -`outcome_context_projection_v0` presentation carries the original capture -reference; it is also used when material staging alone is worthwhile. Unknown -fields, unsupported obligations, unavailable planning and small material keep -the original full fallback. Delivery disabled remains unchanged. - -Scope filtering can move an outcome to a different array position. The planner -therefore retains original row identity and source positions, then emits two -existing transport-edit stages: scope, followed by material edits. The Python -adapter applies those plans to its original JSON values. There is no second -Python material policy or new public work contract. The shared source-owned -guidance retains cumulative requirements, work links, current review/check -states, permissions and stop conditions; only supporting history, review -reasoning and evidence references become same-capture detail. Historical -scope-only presentations retain their original decoder. -Exact-reference equality still checks the original Python JSON types: a new -negative oracle caught integral floats being equated with integers by the -JavaScript bridge, so that existing IO-side safeguard is retained before edits. - -The independent public-entry oracle requires real File/SQLite `quota should-run` -to deliver the signed staged presentation and recover the exact original source -history through `context-read --select`. It also checks unchanged binding, -original Turn receipt and CLI settlement channel. The scoped fixture deliberately -places the current Agent's outcome after a peer's outcome in the original array, -so a pointer into the filtered position cannot pass as the original evidence. -Existing full-source, disabled-delivery, missing-source, unknown-field, -small-material, pending-read and tampered-hash cases remain. - -The native lifecycle cases distinguish complete required-view coverage from -optional selected evidence, a partial prefix and a truncated inner page inside -valid tool-result JSON. Partial reads never establish a full native baseline. -Repeated compaction recovers the same current presentation and original source; -it does not require finishing an unusable delta or admitting work again. -These are hook/transport checks, not proof of model retention. Default file -navigation and file-version differences are a separate active caller change; -this slice neither defines that reading policy nor adds a necessary-facts index. - -Initial follow-through runs remain failed observations: the real signed caller -first exposed the unsupported `complete_turn` surface, and the historical wrapper -reader exposed a local variable-shadowing error. Author fixtures also exceeded -the existing source-summary limit and requested oversized pages without an -explicit output budget; the fixtures were corrected within the original limits. -No acceptance, page-size or cost ceiling was raised. Final validation and frozen -source sensitivity are recorded on the proposal at their tested revision. - -This removes a demonstrated consumer integration gap, not the remaining C1 -cutover. Earlier **25,862 > 13,000**, failed/interrupted cohorts and complete-cost -tables keep their original status. Installed adoption, model inputs/retention, -tokens/cache/billing, accepted outcomes and total latency/cost are unqualified. -Caller/writer replacement, historical-reader retirement and the original quota -single-session outcome comparison remain open; the two-session controller study -remains separate. - -## Independent current-capture recovery slice - -Prioritize the independently reviewable [#7628](https://github.com/loopx-project/loopx/pull/7628) -before the remaining C1 cutover. It targets main directly at -`6743ce72593121b2e15a9f8ef84355c31c94e46c`, without an unmerged C1 dependency. -The existing native adapter publishes current original recovery and pending -delivery before optional material planning. A real saved-context CLI process -exit reproduces stale predecessor recovery on main `ce4c78088` in both resume -and compaction; the same assertions pass on the proposal. Its affected cohort -has 199 passed and five existing explicit-native opt-in skips; standard premerge -passes at the proposal head. It was merged as -`75034bfa99d39aa949d7bb0fed33913034ce7eca` on 2026-10-29; installed adoption -remains unqualified. The proposal's cohort is not a new whole-main validation. - -Matched project-call observations keep off/plain capture and typed-request counts -unchanged. Material staging adds one journal publication, from two to three; -capture files remain two and typed requests remain two. This buys current-source -durability, not a measured latency, model or complete-cost improvement. The same -recovery ordering is already present in this C1 integration; future mainline -integration must reuse that owner rather than restore another implementation. - -## Lossless-reference qualification and deferred caller migration - -The independent test proposal [#7633](https://github.com/loopx-project/loopx/pull/7633) -adds ten combinations across the existing acceptance-sharing helper and ordinary -CLI projection, directly on main `ee7b65f124`. It preserves distinct integer/float, -negative-zero and large-integer source values, a later exact carrier, source -immutability and repeated projection. The affected mainline cohort has **116 -passed**, including the existing real File/SQLite entrypoint cases; standard -premerge passes. This is a test prerequisite, not another runtime projection. - -Applying the same inputs and assertions through C1 `c335aae894`'s renamed display -and CLI interfaces produces **eight counterexamples out of ten**: JavaScript -number equality can cause a different acceptance body to be referenced away. -This adapted assertion probe is not an unchanged pytest cohort or an installed -observation. Earlier passing cohorts remain valid for their stated cases, but do -not qualify this lossless boundary. C1 stays Draft pending repair and revalidation. - -A separate, unsubmitted migration prototype moved the legacy caller's acceptance -matching into its single existing TypeScript projection call. A matched local -probe used the frozen main Python caller and the candidate against the same -native backend, with ten alternating warm samples and four equal synthetic -contracts. Output remained equal and both made one typed request, but moving -sharing after transport increased the request and local median: - -| Requirement characters per contract | Request bytes, base → candidate | Median milliseconds, base → candidate | -| --- | --- | --- | -| 8,000 | 30,498 → 55,229 | 8.18 → 8.51 | -| 64,000 | 86,498 → 279,229 | 9.25 → 10.64 | -| 256,000 | 278,498 → 1,047,229 | 11.55 → 17.04 | - -These are diagnostic caller measurements, not production-volume, isolated CPU, -model-token or long-horizon benefit qualification. The prototype was deferred -before publication; its larger transport is not an accepted refactor outcome. -Converge at the C1 boundary that already receives the complete source, validating -references against original IO values before replacement. Keep the existing -legacy caller until that usable replacement qualifies; do not add another reader -or restore mandatory outcome scopes while adopting file-first delivery. - -## Source-preserving display transport follow-through - -The independent normal proposal [#7643](https://github.com/loopx-project/loopx/pull/7643), -head `0212a1f2e` on main `5d7f0a61b`, removes a separate source-preservation defect: -reference-only context sharing returned the entire JavaScript-decoded payload -when diagnostic caps were absent. Eight numeric regression cases and an -untouched-material response check fail on that unchanged base. Both callers now -use the existing typed edit plan and original IO facts, preserving numeric -spelling, nested facts, immutability and repeated application with one request. -The same change is absorbed in C1 `fd65514e7`; it does not add another owner. - -The exact frozen requests remain byte-identical before/after. With 8,000, -64,000 and 256,000 bytes of untouched synthetic supporting material, owner -response payloads change from 31,853 / 87,853 / 279,853 bytes to 388 bytes in -each reference-only case. The diagnostic control stays at 7,659 bytes. The -model-visible views retain their content and grow nine bytes to preserve the -original numeric spelling. These are local transport observations, not model -token, latency, installed-client or complete-cost qualification; budgets are -unchanged. The proposal passes 176 Python cases, including isolated real -File/SQLite CLI and staged reads, 74 TypeScript cases and standard premerge. -Configured mypy passes 17 files; three errors in an extra CLI-file typing check -reproduce on base and head. Readback tests use the existing source signature -and reject a mutated capture; the runtime hash codec is unchanged. -The separate C1 integration cohort passes 255 Python and 94 TypeScript cases, -control-plane typecheck, configured mypy and Ruff. This affected cohort does not -replace the earlier whole-path or budget evidence. - -After absorption, the adapted #7633 assertions still produce **eight failures -out of ten** through C1 display/CLI, plus **four out of five** through complete -composition. The edit transport preserves untouched facts; it cannot repair an -earlier incorrect reference decision. These remain adapted assertion probes, -not passing unchanged cohorts. C1 stays Draft with the original budget, -writer/caller/reader retirement, numeric-reference and outcome/full-cost gaps. - -## Exact source-number comparison - -The next C1 slice repairs the preceding 12 failing assertions out of 15 across -display, CLI and complete composition. It reuses the source-value assertions now -merged in #7633. Sparse float and unsafe-integer spellings cross the existing -coarse call; the TypeScript owner uses that original identity when comparing -registered acceptance carriers and summary lanes. Different bodies remain -literal, while subsequent exact copies still share their later owner. Python -supplies JSON source facts and applies edits; it owns no carrier-selection or -equality policy. Small bodies still use the existing body-versus-reference size -decision, excluding the transport metadata from that comparison. - -Complete composition now returns the same edit plan already used by display -projection, applied to original IO values. Both paths reuse one object-path -indexer. There is no additional RPC, full-body return, public view, reader, -authority store or persistent cache. Native JavaScript callers retain their -existing result shape; the Python producer requests source-preserving edits. - -Frozen synthetic inputs at C1 baseline `dd600ac02` compare as follows. With four -identical contracts, each coarse call remains one RPC; complete-composition -request parameters grow by 491 bytes for the sparse identity and edit selector. - -| Supporting material per contract, bytes | Composition response body, base → candidate | -| --- | --- | -| 8,000 | 31,469 → 1,243 | -| 64,000 | 87,469 → 1,243 | -| 256,000 | 279,469 → 1,243 | - -The complete caller view grows by four bytes to retain original numeric -spellings. With different original contracts, correctness requires more input: -the 256,000-byte case grows from 279,469 to 536,456 caller-view bytes because the -previous result wrongly discarded a distinct body. The corrected result still -shares the later exact copies. These are bridge parameter/body and caller-view -bytes, not model tokens or total cost. Three warm timing samples had uncontrolled -concurrent work and provide no latency qualification. - -The affected Python cohort passes 246 cases, including real isolated File/SQLite -entrypoints and original-Turn reentry/settlement. Context/capture recovery adds -128 passes and five existing explicit-native opt-in skips; 104 TypeScript cases, -control-plane typecheck, configured mypy and scoped Ruff pass. Initial validation -retains 28 failures from fixtures that hashed Python spellings as though they -were the existing JavaScript codec; the corrected independent fixture uses native -JSON number encoding without changing runtime hashing or semantic refusals. -Four additional legacy-layout assertions fail on the unchanged C1 baseline too; -their migration now verifies the complete contract's owning command path, -original identity and integrity, preserving the subsequent once-only settlement -and successor checks. - -The existing JavaScript hash normalization is unchanged: numerically distinct -source values can still share its normalized hash input. This slice is not new -numeric hash-integrity qualification; immutable capture hashes retain exact-byte -verification. C1 must reconcile that identity boundary, merge current main and -adopt the existing file-first/delta and advisory navigation work while retiring -its obsolete mandatory outcome scopes/readers. A main integration attempt exposed -those owner conflicts and was aborted without retaining a parallel owner. C1 -remains Draft. The original 25,862 > 13,000 budget failure, historical negatives, -writer/caller retirement, original-quota outcome/full-cost comparison and optional -two-session qualification remain open. -Continue at the owner already holding the complete source, without resending -duplicate legacy bodies or introducing another required reader. +Integration on main `b47bbc6c9` wires the real native `complete_turn` caller to +use the shared outcome-scope, progressive-material, and exact-record owners +after validating the complete decision, without editing or re-signing the +canonical capture. + +- **Ordering & invariants:** scope edits apply before material edits using + original source array positions so filtered peer offsets never corrupt + original evidence pointers; integral floats vs integers are distinguished on + the Python IO side prior to edits; unknown fields, unsupported obligations, + and small materials keep full fallback; delivery-off remains inert. +- **Current-capture recovery (`#7628`):** native presentation publishes current + original recovery and pending delivery before optional material planning (one + extra journal publication, `2 → 3`), preventing stale predecessor recovery on + exit/compaction. +- **Hook & lifecycle boundaries:** tests distinguish required-view coverage from + partial prefixes and truncated inner pages (partial reads never establish a + baseline); `outcome_context_projection_v0` stays bounded to optional staging + until replaced; no default reading policy or budget ceiling was relaxed. + +## Pass, fail, and open gates + +- **PASS (deterministic source & isolated wheel checks):** exact-byte capture + readback, 24-clause completeness, numeric-preserving carrier sharing, tamper + and early-spend refusal, once-only replay settlement, and process-level lane + fencing on isolated File/SQLite authorities (`144`–`333` Python, `104`–`163` + TypeScript across respective checkpoint revisions; `1,885`–`1,889` matching + wheel members). +- **FAIL / negative (unchanged):** v4 multi-Agent budget (`25,862 > 13,000`), + warm ordinary-input growth (`~2.8 KB`) and expensive all-peer reads (`+10` + calls), delayed-sharing prototype (`8K`–`256K` request bytes `30.5K→55.2K` up + to `278.5K→1,047.2K`), and long-namespace `2,015`-char recovery failures. +- **UNTESTED / open:** installed App/model retention, real tokens/cache/billing, + latency under controlled load, native Windows execution, matched single-session + accepted outcomes & complete costs under RFC §9, remaining consumer/writer + cutover, and historical-reader retirement. diff --git a/docs/architecture/rfcs/ledger/controller-executor-unified-contract-v0/2026-10-28-packaged-heartbeat.zh-CN.md b/docs/architecture/rfcs/ledger/controller-executor-unified-contract-v0/2026-10-28-packaged-heartbeat.zh-CN.md index 7fbe1e171a..545b32a294 100644 --- a/docs/architecture/rfcs/ledger/controller-executor-unified-contract-v0/2026-10-28-packaged-heartbeat.zh-CN.md +++ b/docs/architecture/rfcs/ledger/controller-executor-unified-contract-v0/2026-10-28-packaged-heartbeat.zh-CN.md @@ -4,538 +4,81 @@ 的测量检查点,不代表 C1 验收或提升默认。[英文镜像](2026-10-28-packaged-heartbeat.md) 记录相同范围和结果。 -## 来源与负载 - -以 main `843be494266774b63b3de61d0adf5dd7f4f877a2` 的原 quota 对照 -[#7430](https://github.com/loopx-project/loopx/pull/7430) 集成候选,候选运行时代码 -固定为 `1199cbe0b8e92ddf845e345483041486fe808024`。两份 wheel 分别按自身源码构建 -前端指纹,各自 1,884 个打包产品成员与来源工作树一致。未安装全局 runtime,也未拿 -活动 Goal 状态做实验夹具。 - -两臂使用同一合成负载及真实隔离 File、SQLite authority:一个活动 Goal、完整选中任务、 -一项当前 Agent 成果与五项独立 peer 成果,每项四条要求。全局意图、权限及停止条件 -仍可读取。候选在已有 native context opt-in 中展开自身成果并索引其他成果;正文仍可 -从原 capture 精确补读,展开后核对全部 24 条完整要求、owner、关联工作和未验证状态。 - -打包 CLI 路径执行 thin heartbeat bootstrap、quota/native context guard、全部必读 -上下文分页、强制 Goal 来源读取和真实 context-hook 命令。以合成 native 生命周期 -事件建立温态连续性,再通过 PostCompact/SessionStart 失效。丢失后读取**同一原始 -capture**,不替换准入;来源篡改和提前记账被拒绝,refresh/spend 重放保持一次 effect -及一次扣额,未完成的选中任务仍开放。另核对温态重建与缺 baseline 的完整回退。 - -这属于模拟宿主连续性下的打包工程观察,不证明正式 Codex App 采用、模型保留或决策、 -SDK 覆盖、任务验收成果,也不是 controller/executor 双会话实验。 - -## 观测 - -只有一组匹配 cohort,每臂、每后端、每阶段一次;宿主后台负载未受控。耗时为实际 CLI -调用之和,包含启动、必读 Goal 和生命周期观察。请求数是 Python 到 runtime 的逻辑 -请求,不推断物理 framing、重试和 provider 内部 IO。产物字节指已交付 UTF-8 上下文, -不是 tokens 或完整 stdout。 - -| 后端/阶段 | 上下文字节,原实现 → 候选 | 逻辑请求 | 耗时 ms | -| --- | ---: | ---: | ---: | -| File/冷态完整 | 75,387 → 76,162 | 103 → 102 | 5,052.49 → 4,867.53 | -| File/温态差分 | 40,991 → 43,558 | 99 → 98 | 3,240.32 → 3,399.05 | -| File/丢失恢复 | 74,619 → 75,390 | 6 → 6 | 4,045.91 → 4,213.20 | -| SQLite/冷态完整 | 75,483 → 76,270 | 103 → 102 | 4,566.19 → 4,428.81 | -| SQLite/温态差分 | 41,085 → 43,666 | 99 → 98 | 3,236.50 → 3,416.50 | -| SQLite/丢失恢复 | 74,713 → 75,498 | 6 → 6 | 4,149.99 → 3,957.72 | - -两臂冷态/温态/恢复均为 13/9/13 次 CLI。失效本身另计两次 hook 调用,本组耗时 -683–738 ms。候选展开全部五项 peer 成果每阶段增加 13,940 字节正文、五页 reader 和 -五次观察 hook:**10 次 CLI/10 次逻辑请求**、17,620 字节 stdout、3,416–3,713 ms。 -原实现已经内联这些正文。 - -完整阶段 stdout 也增加:File 冷态 94,662 → 96,082 字节、温态 58,077 → 60,649、 -恢复 89,807 → 91,144;SQLite 分别为 94,776 → 96,208、58,185 → 60,771、 -89,911 → 91,262。每后端另有七次结算/负例/读回调用,两臂均为 226 次逻辑请求, -同后端 stdout 合计相同。初始化、构建、失败作者探针与可选补读单独计量,不从历史抹去。 - -合并 acceptance/title/Explore 投影减少一次逻辑请求及 bridge JSON。例如 File 冷态 -请求/响应正文从 965,261/585,535 降到 902,963/494,206 字节。这一局部下降**没有** -抵消更大的交付产物和可选补读;两后端温态耗时均上升,恢复结果混合。本样本不支持 -因果提速、默认 SQLite 性能资格或完整成本正向 diff。Tokens、cache、账单、验收成果、 -人工注意力与长程净益仍未资格化;此前负向和混合测量继续保留。 - -## 归属缺口与接续 - -相对原 quota,scope 去掉约 13 KB 的 peer 正文,但候选仍保留约 6.6 KB 的重复 Todo -诊断列表,并新增约 3.9 KB scope 元数据;候选列表及其他诊断重复消耗了剩余节省。 -这是组合/压缩缺口,不能据此认定 peer scope 已降低总成本。 - -该检查点选择的后继 C1 切片是刻画原 quota 中必要的诊断压缩,迁入既有共享 typed composer,并删除 -被替代的 Python caller 算法。保留完整选中工作、portfolio/horizon、claim/lease、全局 -义务、未知字段、精确引用与历史恢复。旧 Python compactor 会丢弃未知列表和缩短部分 -正文,原样复制不满足此合同。继续用同一打包对照分别测默认读取与全 peer 补读,再判断 -是否改善;没有理由新增 packet 格式或逐字段 RPC。 - -集成候选采用已合入的 route owner(#7520)及 reference owner(#7457)。旧投影的 -acceptance、Task 标题和 Explore 引用合用既有 `reference_context` 操作,删除独立 -acceptance 操作和重复 controller-input dispatch;完整组合复用相同语义函数。这只是 -有界代码收敛,不是全部 writer 切换、历史 reader 退役或 C1 完成。 - -最终受影响测试 469 通过、五项可选 native/SDK 跳过;116 项 typed 测试及 control-plane -类型检查通过。此前构建指纹、缺依赖、harness carrier 和过时调用数断言失败保留为作者/ -验证成本,不静默改成产品通过。本对照未调用模型、付费评测、managed benchmark, -未执行 live 安装、发布或合并。 - -## 共享诊断 owner 的接续结果 - -后续 `d33c1a19d91738c66073d9e71586f14466f36d89` 以 -`quota/diagnostic_projection.ts` 替换 Python Todo 列表算法。现有 -`reference_context` 调用方让 should-run 和整组 status/plan 行复用它;scoped -native composition 在已有请求内部调用相同函数。 -[#7557](https://github.com/loopx-project/loopx/pull/7557) 在 main -`19c213324fbb5990288bd374c1b79096f22bb152` 上以 -`5b5d9dd3b0a816aae9d5160b849cff4a3c38da13` 提交可独立使用的旧读取方切片, -为正常 PR;其 typed 模块与集成版本完全相同。本次未合并或安装任一提案。 - -仅明确已知的诊断 lane 且全部为已知规范 Todo 记录时可以有界投影。条目字段/版本未知、 -非记录条目或复杂嵌套内容会保留整个列表;未知列表保留。留下的记录全文不变,不缩短 -或重建 portfolio 正文、能力候选、planning horizon、选中工作和原 succession IDs。 -原 capture/恢复仍完整。投影元数据指向已有 source capture,不在各 lane 重复长恢复命令。 - -复用同一冻结打包 harness 和原 quota commit,按相同路径长度、合成任务及 24 条完整 -要求重跑一组匹配 cohort。基线 wheel 的 1,884 个产品成员、候选的 1,885 个成员分别 -与来源一致。测量绑定上述 rebase 前 commit;随后 rebase 到 `19c213324` 只带入 -无关的已合入 Lark 返回修复,不把冻结实验改称后续 head 的测量。 - -| 后端/阶段 | 上下文字节,原实现 → 候选 | Stdout 字节 | 逻辑请求 | 耗时 ms | -| --- | ---: | ---: | ---: | ---: | -| File/冷态完整 | 75,648 → 70,388 | 95,004 → 89,875 | 103 → 102 | 4,959.03 → 6,475.69 | -| File/温态差分 | 41,252 → 44,029 | 58,401 → 61,183 | 99 → 98 | 3,465.08 → 4,538.62 | -| File/丢失恢复 | 74,880 → 69,618 | 90,113 → 84,903 | 6 → 6 | 5,108.18 → 5,762.51 | -| SQLite/冷态完整 | 75,740 → 70,492 | 95,114 → 89,997 | 103 → 102 | 5,771.16 → 5,856.03 | -| SQLite/温态差分 | 41,346 → 44,133 | 58,509 → 61,301 | 99 → 98 | 3,772.95 → 3,794.99 | -| SQLite/丢失恢复 | 74,974 → 69,722 | 90,217 → 85,017 | 6 → 6 | 4,226.47 → 5,113.92 | - -两臂 CLI 次数仍为 13/9/13。候选各阶段展开全部五项 peer 仍增加 13,940 字节正文、 -17,620 字节 stdout 及 10 次 CLI/逻辑请求;补读耗时 4,107–4,875 ms,原实现已 -内联这些正文。七次结算/负例/读回仍为 226 次逻辑请求,同后端 stdout 相同, -保持一次 effect/扣额和开放任务。构建、初始化、失败探针、两次失效 hook 和补读 -各自保留成本记录。 - -冷态/恢复正文约少 5.3 KB,但温态约多 2.8 KB,全部 peer 消费仍更贵。本组每个 -候选阶段的观测耗时均更长;单次观测和未控制的后台负载不能支持因果延迟估计。 -中间版本重复 capture 命令,更大(File 温态 45,187、SQLite 45,303 字节); -修元数据不抹去该实验,也不证明净收益。 - -四组冷/温 File/SQLite 展示与各自原始 capture 独立核对完整选中工作、boundary、 -horizon、capability gate 和 portfolio。故意删除 capability gate 的 QA wheel -经实际打包 guard/reader 路径被拒绝;这验证 oracle 敏感性,不证明模型遵从。 -来源篡改、提前 spend、同 capture 丢失恢复及一次结算的正负例保持。 - -最终集成受影响集合 144 项 Python、117 项 typed 通过;较早的扩大集合为 533 通过、 -五项可选跳过,发生在加强未知条目回退之前。独立 #7557 为 264 项 Python/70 项 typed -通过,含真实 File/SQLite status/plan/detail 和规范 Todo 回读,14 项选中 premerge -检查均过。Status/plan 新增一次粗粒度 typed 请求;显式完整 Todo 摘要跳过它。 -拥挤诊断单元夹具因保留完整候选增至 43,862 字符,是有意的信息增量,不是提速。 -未修改的公开 v4 多 Agent 预算探针在原 quota 通过,在前一版及当前集成 wheel 均为 -27,934 > 13,000 字符而失败;该集成失败保持开放,未扩大公开预算。 - -下一步沿现有 C1 诊断温态重建/元数据成本,保留义务,再验收剩余消费者和 writer -切换。不宣称完整成本正向、默认 SQLite 性能、正式 App/模型保留、token/cache/账单、 -验收成果或长程收益。C1 及独立的 C2/controller 实验继续开放。 - -## 搬移上下文的集成 - -Runtime `167b31e5d078193b9fd73ad6609804e268390972` 已 rebase 到 main -`f205c02a37d5a668c956733a721af911dcac7fab`,采用现有 -[#7528](https://github.com/loopx-project/loopx/pull/7528) 的 codec 变更 -`759c16a9cf430bb7442b47dd3a5c3336ffb93666`,保留主干的偏好作用域绑定、原生 checkpoint -夹具及智能中介设计。没有新增第二编码器;精确基线子树加字面当前覆盖,替代对未变证据 -反复引用长路径。未知及当前控制仍内联,原 capture、身份和恢复保持,scoped wrapper -回归覆盖相同实现。 - -24 条合成记录搬移,对比该 runtime 的不可变父版本 -`87e216f24f966671d35e035df7ba285248b48bad`:普通完整差分 13,199 → 6,090 字节,C1 -scoped wrapper 差分 13,809 → 6,230。冷态/当前完整编码分别保持 20,060/20,188 及 -20,167/20,295 字节。两者精确重建,实际旧 decoder 对新 overlay 恢复相同当前全文; -原缺失 overlay 用例在采用前失败。这只是 codec 观察,不含模型保留、tokens、framing、 -账单或任务成果。 - -未改打包 harness 再以原 quota `843be494266774b63b3de61d0adf5dd7f4f877a2` 为基线运行 -一组匹配 cohort;两臂夹具和路径长度相同,1,884/1,885 个产品成员与各自来源一致。 -本组结果绑定本 runtime,之前表格仍属于各自原版本,不重新归属。 - -| 后端/阶段 | 上下文字节,原实现 → 候选 | Stdout 字节 | 逻辑请求 | 耗时 ms | -| --- | ---: | ---: | ---: | ---: | -| File/冷态完整 | 75,211 → 69,934 | 94,432 → 89,286 | 103 → 102 | 5,961.28 → 5,183.22 | -| File/温态差分 | 40,817 → 43,575 | 57,861 → 60,624 | 99 → 98 | 3,981.29 → 3,592.23 | -| File/丢失恢复 | 74,445 → 69,164 | 89,603 → 84,374 | 6 → 6 | 5,052.05 → 5,156.02 | -| SQLite/冷态完整 | 75,311 → 70,044 | 94,550 → 89,414 | 103 → 102 | 5,205.45 → 6,393.69 | -| SQLite/温态差分 | 40,913 → 43,683 | 57,971 → 60,746 | 99 → 98 | 3,482.77 → 4,216.01 | -| SQLite/丢失恢复 | 74,541 → 69,272 | 89,709 → 84,492 | 6 → 6 | 4,649.12 → 5,590.37 | - -CLI 次数仍为 13/9/13;全部五项 peer 补读在候选每阶段仍增加 13,940 字节正文、17,620 -字节 stdout 和十次 CLI/逻辑请求,观测耗时 4,046–9,431 ms。七次负例、结算及回读 -仍为 226 次逻辑请求,同后端两臂 stdout 相同。篡改/提前 spend 拒绝、24 条全文、同 -capture 恢复、一次 effect/扣额及开放任务通过。四组来源核对完整保留 selected work、 -boundary、horizon、capability gate 和 portfolio;新 QA mutant wheel 删除能力候选后被 -真实 guard/reader 拒绝。计时 cohort 没有其他自有构建或测试并发,宿主后台负载未控; -单次观察不认证延迟或 p95。 - -最终 typed 集合 147 项及 typecheck 通过。受影响 Python 运行保留 299 通过、51 项可选 -native/SDK 跳过,以及长临时 namespace 下两项恢复文本尺寸失败。同路径受控比较在 -不可变 main 和本 runtime 均复现两项 2,015 字符失败;两者钩子正文不内嵌原要求全文, -均保留原恢复命令。正常路径的 lifecycle 套件另有全部 145 项通过,没有放宽预算、断言或夹具正文, -原失败记录保留。新 wheel 先遇到主干前端 bundle 过期,重建后打包成功。未改 v4 探针 -仍为 27,934 > 13,000 字符而失败。 - -搬移冗余已减少,普通温态输入仍多约 2.8 KB,全部 peer 阅读仍更贵;后者是原 C1 -组合/元数据的另一未解缺口。默认 SQLite 性能、正式 App/模型保留、token/cache/ -账单、验收成果和完整长程净收益均未资格。沿原 C1 继续该缺口及剩余消费者,不以采用 -本修复结清 C1、C2 或 controller 实验。 - -随后集成 rebase 到 main `0cfbf11dcea4ba7bc8fb13f06f1c915b63ce8fad`,其中已含 #7528, -重复 commit 因而退出。[#7547](https://github.com/loopx-project/loopx/pull/7547) 两项 Goal -来源提交保留原作者,12 个贡献的产品/测试 blob 与已接收的集成 head 完全相同。 -主干 capture owner 仍在准入前 stage、准入后发布,发布后才安装原完整契约。删除未用 -capture helper 后,进程级 fence 重新包住实际 Turn executor;既有占用 lane 用例在 -修复前失败、修复后通过。 - -Runtime `6f30cc454f2dea7e77f0821a14a1deaf268efe2e` 的 wheel 含 1,885 个与来源一致的 -产品成员。重基后的 typed 集合 148 项及 typecheck 通过。集成 Python 首次记录 -185 通过、两项明确的 live-host 跳过及 12 失败:八项新增 staged 回读断言把 adapter -元数据与实际模型投影混比,四项 observer 仍记录 #7547 之前的 metadata-only 操作。 -保留对真实 Host 输入的完整比较,观测更严格的 dispatch 操作后,54 项 Host-capture -全部通过,没有放宽产品门;前次失败和其余已通过案例分别保留。 - -该 wheel 再通过打包 File/SQLite bootstrap、完整 Goal 交付、全部条款/详情读取、同 -capture 恢复、拒绝及一次结算。本次功能验证与其他检查并行,不是新的匹配计时 cohort; -旧成本表仍绑定 `167b31e5d`,不改称后续源码的测量。当前版本完整成本与成果资格保持 -开放。 - -随后已提交版本的 premerge 暴露维护性失败:executor 有 94 条语句,超过既有 90 条 -限制。Runtime `82f93ab76a403c2633efedb2f8bf02f85be8e3c6` 将已发布输入的安装收回 -现有 staged-capture owner,保留恢复绑定与发布顺序。其 1,885 个产品成员与来源一致, -54 项 Host-capture 及未改动的维护性 ratchet 均通过。原失败保留,没有新增例外或改 -阈值;本次 owner 收敛不把历史温态输入及 v4 预算失败改判通过。 - - -下一次集成将保留的 C1 历史 rebase 到 main -`6f8f476388645fcea2269329d32974b559d490e6`,采用 -[#7557](https://github.com/loopx-project/loopx/pull/7557) 的修复版本 -`eb4e9b970aeb1ffb83e46705d6386cc3a4679ead`。该独立切片原先把整个 Python 输入经 -JavaScript JSON 往返,展示字段之外的 `1.0`、负零及安全整数范围外的值可能改变。 -九项独立的原数值案例在修复前失败。现在共享 typed owner 仅返回展示变更及不可变 -来源引用,Python 在原值上应用,不拥有裁剪规则。独立切片通过 305 项 Python、99 项 -typed、typecheck、Ruff 及其标准 premerge;这些是源码及真实 File/SQLite CLI 检查, -不是安装或独立验收。 - -C1 runtime `7f35454b392e09ae574c5065c473ee27b5eee853` 使用逐字节相同的共享诊断 -模块。其验收共享阶段原先克隆所有来源对象,导致搬移数值事实无法沿用来源引用;现在 -只复制发生变化的已注册 carrier 路径。首次集成保留 253 通过、五项失败:三项暴露 -上述克隆问题,两项旧边界夹具不满足完整 Goal 的 dispatch 要求,后两项在前一 C1 head -也失败。夹具现在将任务保留于规范 provider,完整交付非 Todo 的 Goal 内容,同时 -验证当前原始契约 Host 输入与历史作用域别名及拒绝,没有放宽 dispatch。最终受影响 -集合 258 项 Python 全过;110 项 typed、typecheck 和 Ruff 通过。旧 wheel 与匹配计时 -cohort 仍绑定各自实际版本。本次源码接续不认证新的打包 cohort,不消除温态输入或 v4 -预算失败,也不结清剩余消费者、reader 退役及实际模型/成果的完整成本。 - - -额外的完整 Host 集合在后续 main 集成上保留 200 通过、两项失败:operation-host -oracle 仍预期折叠空白,而主干 [#7549](https://github.com/loopx-project/loopx/pull/7549) -已经去掉该行为。实际 `chat_agent.py` blob 与已核 main 基线完全相同。两类 transport -都检查原 prompt 字节,并保留 schema、重试和篡改断言后,54 项 Host-capture 全过。 -此处修正测试 oracle,没有改变生产 transport,首次失败记录保留。 - -GitHub 随后报告 #7557 已合并为 `4b2b97b7b726d902a20969e3911fd15d15b4bb2e`,七个 -贡献文件均与修复 head 相同。发生合并不能补足尚缺的新 head 独立评审或受保护操作 -回执。上述 C1 资格仍绑定冻结的 main 基线,不隐含认证后续 main 变化;C1 仍是尚未 -完成的作者集成,原有成本、消费者及退役缺口保持。 - -## 完整 Goal 复用与可独立使用的原生切片 - -C1 随后 rebase 到 main `f5e9be3671c1b5c80eba5c62fe4d617bfefd66d6`。Runtime -`a0cc4c14b` 精确复用不变的作用域阅读指令和 objective,wrapper 其他字段仍取当前值; -完整 Goal 正文也仅在既有来源完整性判定通过后复用。该判定原样移到 -`goal_context_source.ts`,由 fulfillment 与 codec 共享。正文变化、控制字段、scope、 -索引、归属、修订及未知字段仍按字面交付;畸形凭据或缺少基线不能隐藏必读内容。 -这减少重复解释,没有再建上下文或决策 owner。 - -Source `ebdce8a49b4faa584571cfb688aa2c2a238a5860` 保留上述行为和原生完整 Goal -回归覆盖。重建 wheel 的 1,889 个产品成员与源码一致,没有仅存在于包中或不匹配的 -成员。使用同一份未改动的私有 harness,与原 quota 基线 -`843be494266774b63b3de61d0adf5dd7f4f877a2` 比较:namespace 等长,六项成果、 -24 条要求、工作、停止条件及后端相同。两组都计入必需的额外 Goal 文件读取;恢复 -还计入两个失效/启动 hook 输出,沿原 capture 读取,不重新准入。可选 peer 展开单列。 - -| 后端/阶段 | 原 quota stdout 字节 | C1 stdout 字节 | 调用,quota → C1 | RPC,quota → C1 | -| --- | ---: | ---: | ---: | ---: | -| File/冷态 | 94,892 | 90,918 | 13 → 14 | 103 → 103 | -| File/温态 | 58,289 | 52,474 | 9 → 8 | 99 → 98 | -| File/上下文丢失恢复 | 92,068 | 87,418 | 15 → 14 | 8 → 8 | -| SQLite/冷态 | 95,002 | 91,048 | 13 → 14 | 103 → 103 | -| SQLite/温态 | 58,401 | 52,598 | 9 → 8 | 99 → 98 | -| SQLite/上下文丢失恢复 | 92,178 | 87,540 | 15 → 14 | 8 → 8 | - -调用数包含原生 CLI/hook 及必需的 Goal 文件读取,与 RPC 分列。此 cohort 的 capture/ -delta 自身字节仍大于 quota;完整输入对照改善,是因为原 quota 还须另外读取 7,952 -字节的 Goal。C1 可选展开五项独立 peer 成果,每个阶段仍另增 13,940 正文字节及十次 -CLI/hook 调用。两后端的完整条款、精确重建、压缩恢复、篡改/提前扣额拒绝、一次 -持久写回/扣额及重放均通过。这是确定性打包消费者检查,不是实际模型保留或成果验收。 -单个 cohort 与后台工作并行,不认证延迟、模型 token/cache、账单、人工或完整长程 -收益。历史温态负向观察仍绑定原先源码。 - -最终受影响集合集成的 205 项 Python、112 项 typed、typecheck、配置内 mypy 和限定 -Ruff 通过。打包源码在未改动的历史 v4 oracle -(digest `d12a8843834aea84…`)仍为 27,934 > 13,000 字符而失败;早先 26,253 字符 -观察使用另一份当时源码 oracle(`1b5d010a30e608c6…`),单独保留。正向的分页输入 -比较不豁免或重标这两项失败。 - -可独立使用的 [#7575](https://github.com/loopx-project/loopx/pull/7575),精确 head -`d980d621219b10353fdaeb058a1a0fd5714f4389`、基于 main -`2cdff65d886d13121ffd78dccd96dd7413ab9d01`,在现有 opt-in 原生路径完整交付 Goal -并精确复用温态正文,不依赖尚未合入的 C1。完整 Goal oracle 在 main 的 File、SQLite -均失败,修改后通过。175 项 Python、57 项 typed、typecheck、配置内 mypy、限定 Ruff -及打包真实后端恢复/结算通过。匹配的原生 stdout 温态少约 7.7 KB,但冷态及丢失恢复 -各增约 1.2 KB 和一次 RPC。该取舍明确保留;这个正常作者 PR 不认证完整 C1 或提升默认。 -C1 复用相同判定与原生来源行为,作用域 wrapper 复用仍留在 C1。剩余调用方、writer -切换、历史 reader 退役及实际决策/成果资格,沿原工作流继续。 - -## 同 capture 的 Todo 摘要列表复用 - -C1 随后 rebase 到 main `ffc90182bc2a896aa9980cf24dcf23a0e3276e3d`,其中 #7575 -已合入为 `a6283d923e3c951443fea65ba1a855c4f7c6c335`。原生 Goal producer 和完整性 -owner 直接采用,不复制。Runtime `4604ee479` 在既有 typed 诊断 owner 中加入精确 -列表复用:相等且非空的已注册数组仅保留一份字面正文,在更小时用同摘要内的 -`_ref` 引用。相等比较保留顺序、JSON 类型和未知条目字段;其他字段与候选集合 -不变。完整 composer、action projection 和 native 展示共用此 owner,应用展示上限 -前先展开引用。不新增状态读取、capture、准入或结算 owner。正文/引用歧义、引用链、 -目标缺失和跨摘要目标均拒绝,包括内部契约 hash 有效的情况。旧 capture 仍可读取。 - -同一源码工作负载从修改前 27,934 字符降到修改后 25,862,少 2,072(7.4%),全部来自 -agent summary;其他根字段长度不变。重建 wheel 的 1,889 个产品成员与源码一致, -独立运行未改动的 `d12a8843834aea84…` v4 oracle,仍为 **25,862 > 13,000** 而失败。 -这是 opt-in 完整契约变体,不是默认 quota 输出预算;两项上限均未提高,也不称通过。 -相同真实 File/SQLite producer oracle 在不可变修改前 `87c14a5aa` 失败,加入引用后 -通过。集成通过 333 项 Python;五项须显式 native Codex 环境的用例仍跳过。125 项 -typed、control-plane typecheck、配置内 mypy 和限定 Ruff 通过。另行纠正过期 bridge -测试:display edits 与 edits 比较,展开后的文档保留原语义断言。 - -同一未改动的打包 harness,再以等长 namespace 和全部必读 Goal 内容,对照原 quota -`843be494…` 与当前集成候选。此新 cohort 测量完整集成,其差异不能把列表修改与 -rebase、先前 C1 工作分离归因。 - -| 后端/阶段 | 原 quota stdout 字节 | C1 stdout 字节 | 调用,quota → C1 | RPC,quota → C1 | -| --- | ---: | ---: | ---: | ---: | -| File/冷态 | 94,510 | 89,911 | 13 → 12 | 103 → 102 | -| File/温态 | 57,931 | 52,094 | 9 → 8 | 99 → 98 | -| File/上下文丢失恢复 | 91,720 | 87,048 | 15 → 14 | 8 → 8 | -| SQLite/冷态 | 94,622 | 90,638 | 13 → 14 | 103 → 103 | -| SQLite/温态 | 58,043 | 52,218 | 9 → 8 | 99 → 98 | -| SQLite/上下文丢失恢复 | 91,830 | 87,170 | 15 → 14 | 8 → 8 | - -两后端保留全部 24 条要求、全量/差分重建、无需新准入的原 capture 丢失恢复、精确 -可选 peer 补读、篡改及提前扣额拒绝、一次写回/扣额和重放,工作保持 open。完整 -capture/delta 自身字节仍大于 quota;原 quota 另读 7,952 字节必需 Goal。可选五项 -peer 成果每阶段仍另增 13,940 正文字节和十次 CLI/hook 调用。温态 RPC 响应字节与 -丢失恢复的请求/响应字节增长。一次非受控 cohort 不认证延迟、模型保留/token/ -cache、账单、人工或验收成果。剩余调用方替换、writer 切换、历史 reader 退役及实际 -单会话决策/成果资格仍未完成;controller 模型比较另作后续实验。 +## 来源、负载与收敛范围 + +以主干原 quota 对照尚未合入的 `#7430` C1 集成候选:使用隔离的 File、SQLite authority +和六成果(24 条完整要求、1 项开放选中任务)合成打包 CLI 负载(`1,884`–`1,889` 个 +与来源一致的 wheel 成员;未安装全局 runtime,未拿活动 Goal 状态做夹具,也未调用 +付费模型)。两后端均覆盖生命周期连续性、`PostCompact`/`SessionStart` 失效、无需 +新准入的同 capture 恢复、篡改/提前扣额拒绝和一次结算重放。 + +已合入或吸收的主干前置切片:`#7520`(route owner)、`#7457`(共享 +`reference_context`)、`#7557`(`quota/diagnostic_projection.ts`,合入 `4b2b97b7b7`)、 +`#7528`(搬移上下文 overlay `759c16a9cf`)、`#7547`(staged-capture Goal owner)、 +`#7549`(prompt 空白)、`#7575`(完整 Goal 温态复用,合入 `a6283d923e`)、 +`#7594`/`#7609`/`#7610`(材料 planner 与精确 Todo 记录复用)、`#7628`(当前捕获恢复 +顺序,合入 `75034bfa99`)、`#7633`(无损引用回归集)与 `#7643`(保真展示编辑)。 + +## 打包对照演进 + +每检查点跑一组未控后台负载的匹配 cohort(冷态/温态/恢复 `13/9/13` 次 CLI;失效 +另计 2 次 hook 调用,`683–738 ms`;候选展开五项可选 peer 成果每阶段另增 `13,940` +正文字节、`17,620` stdout 字节与 `10` 次 CLI/逻辑请求;七次结算/负例读回固定 +`226` 次逻辑请求)。 + +| 检查点(候选/主干) | File 冷态 → 温态 → 恢复 stdout B(原 → 候选) | SQLite 冷态 → 温态 → 恢复 stdout B(原 → 候选) | 结果与未解回归 | +| --- | --- | --- | --- | +| 初版 `#7430`(`1199cbe0b8` / `843be49426`) | `94,662→96,082` / `58,077→60,649` / `89,807→91,144` | `94,776→96,208` / `58,185→60,771` / `89,911→91,262` | 温态耗时与 stdout 上升(约 `6.6 KB` Todo 列表 + `3.9 KB` scope 元数据)。 | +| 共享诊断 `#7557`(`d33c1a19d9` / `843be49426`) | `95,004→89,875` / `58,401→61,183` / `90,113→84,903` | `95,114→89,997` / `58,509→61,301` / `90,217→85,017` | 冷态/恢复 `-5.3 KB`,温态 `+2.8 KB`;全阶段更慢;v4 探针 `27,934 > 13,000` 失败。 | +| 搬移覆盖 `#7528`(`167b31e5d0` / `843be49426`) | `94,432→89,286` / `57,861→60,624` / `89,603→84,374` | `94,550→89,414` / `57,971→60,746` / `89,709→84,492` | 24 条合成差分 `13,199→6,090 B`(wrapper `13,809→6,230`);温态 `+2.8 KB` 及 v4 `27,934 > 13,000` 仍失败。 | +| 完整 Goal 复用 `#7575`(`ebdce8a49b` / `843be49426`,含 `7,952 B` Goal 读) | `94,892→90,918` / `58,289→52,474` / `92,068→87,418` | `95,002→91,048` / `58,401→52,598` / `92,178→87,540` | 计入原实现必读 Goal 后 stdout 才降;v4 `27,934 > 13,000` 仍失败。 | +| 列表 `_ref`(`4604ee479` / `843be49426`) | `94,510→89,911` / `57,931→52,094` / `91,720→87,048` | `94,622→90,638` / `58,043→52,218` / `91,830→87,170` | agent summary `-2,072 B`(`7.4%`),v4 oracle 仍以 `25,862 > 13,000` **失败**。 | ## 主线集成与不可变 reader 身份 -既有 C1 提案 #7430 集成 main `447c35ed6`,采用共享的原生渐进材料 planner、通用 -capture selector、request-scoped settlement 及当前 request 授权。继续以这些 owner -为准,不新增决策或 schema。原生操作在相同 typed 边界内调用既有材料 planner:无需 -材料编辑的输入保留一次 RPC;确需编辑时,仍在 capture 和编码前应用于原始 Python -JSON。C1 scope 回退保留完整来源。已签名完整 v1 的材料分阶段迁移尚未完成,其完整 -回退不能称为已迁移或已压缩。 - -修复两处 reader 接线。通用 `context-read --select` 接续的 selection digest 通过既有 -CLI 校验。历史 replan 命令在为 executor 展开诊断引用前,先绑定原始 capture 中的完整 -输入;此前对展开视图取 hash,会使不可变原 capture 拒绝其生成的有效命令。两项修复 -均复用既有 selector、reader 和 hash owner,不另行准入、记回执或扣额。篡改及不同 -作用域的读取仍拒绝。 - -独立的无材料 RPC 次数 oracle 在冻结的初次集成上失败,修复后通过。新增重复 replan -读取 oracle 在完整来源复用 Todo 摘要列表时同样复现失败,保留原绑定后通过。修复后 -初次修复源码 `5a770d183` 通过 160 项 typed、23 项真实 File/SQLite replan CLI、control-plane typecheck、 -配置内 mypy 和限定 Ruff。既有 resumed-task 展示断言与完整输入断言同时保留;未为 -通过测试而移除候选正文、未知字段或上限。 - -该版本随后运行更广的 37 模块 cohort,在第三项失败处停止:1,364 项通过、53 项环境 -跳过,不能称为整套通过。其中两项断言仍读取旧的 detached Host 布局。修正后的 -oracle 核对 canonical channel 中完整 Goal 字节和当前任务全文,同时单独保留历史 -reader 的原必读及验证断言;签名 CLI 输入只排除 harness 另加的 `_returncode`。 -第三项失败暴露普通任务缺少 Task/request 身份时被误判为等待;`281910a95` 恢复其 -contract error。四项直接 File/SQLite 和缺失任务回归随后通过。同版本的局部宿主 -准备提取通过原维护性上限;这不能证明执行与并发等价。 - -集成 `bca6350b2` 随后采用 main `ccf6aacc5`,包括 #7594 恢复输出指引、#7609 首次 -guard 选择及 #7610 精确 Todo 记录复用。相同 native 操作接收既有材料 planner 的 -纯引用编辑,保留原始 Python 值核对;不恢复第二套 heartbeat 视图或引用 owner。 -163 项 typed 和 control-plane typecheck 通过;后续限定 caller/recovery 验证在 -#7430 绑定各自实测版本记录。记录复用仍保留 main 的 required-view profile,不认证 -已签名完整输入的材料分阶段交付。源码及 oracle 修正不倒改上述中断/失败 cohort。 - -后续 16 模块 cohort 同样在第三项失败处停止,843 项通过。一项新测试仍调用已替换的 -私有 helper 签名,改用既有相同 typed-plan fixture,保留原开销断言。两项真实 -File/SQLite busy-request 失败暴露作者提取时的错误:lane 装饰器留在准备 helper, -而非完整执行入口。修正后,执行锁继续覆盖准入、host 和结算。既有公共入口拒绝 -oracle 在冻结 `fc4763098` 失败,修正后通过,同时核对 busy-request 重启/重放。 -现在 premerge 在 executor、lane owner 或 CLI 执行入口变化时自动选择既有七项公共 -入口测试,包含 quick 验证;九项限定 planner 用例核对选择及无关 context 编辑排除。 -复用真实 fence oracle,不新增重复实现检查。先前自动检查通过不能认证错误的中间 -执行入口;两组停止的 cohort 都不称为整套通过。 - -这是集成验证,不是新安装或模型行为。先前中断的 cohort、随后三项真实 reader 失败 -仍保留原失败观察。既有成本表及 **25,862 > 13,000** 仍绑定原版本与状态;未提高上限, -不推断最新版完整成本收益。调用方/writer 迁移、历史 reader 退役及实际单会话决策、 -验收成果和完整成本仍属 C1 工作,提案保持未完成。 +在 main `447c35ed6` 与 `ccf6aacc5` 上采用共享渐进材料 planner、通用 capture +selector、request-scoped settlement 与当前请求授权,未新增第二套决策或 schema。 + +- **Reader 边界修复(`5a770d183`):** `context-read --select` 接续通过既有 CLI + 校验携带 selection digest;历史 replan 命令在展开诊断引用前先绑定原 capture 完整 + 输入,避免不可变原捕获拒绝合法命令。 +- **进程级 lane fence(`82f93ab76a`):** 将已发布输入安装收回 staged-capture + owner,使执行锁完整包住真实 Turn executor,并满足既有 90 语句上限(修复此前 94 + 语句 premerge 失败及 `fc4763098` 两项 busy-request 失败)。 +- **数值保真与修改计划(`7f35454b39`、`fd65514e7`、`dd600ac02`):** `1.0` 与 `1`、 + `-0.0` 及大整数拼写导致 `c335aae894` 上适配 `#7633` 出现 **10 项中 8 项** display/CLI + 反例及 **5 项中 4 项**完整组合失败,即使吸收 `#7643` 仍未消除。将稀疏数值拼写传给 + TypeScript `diagnostic_projection.ts` / `turn_envelope.ts` 并在原 Python IO 值上应用 + 修改计划后,修复 15 项中 12 项失败(相同合同返回体 `31,469` / `87,469` / `279,469` + → `1,243 B`;保留不同正文时调用方视图 `279,469 → 536,456 B`)。既有 JavaScript 哈希 + 归一化不变,与不可变精确字节 capture 摘要分离。 +- **中断与历史失败保留:** 37 模块在 `1,364` 通过 / `3` 失败处停止(`281910a95` + 恢复缺任务 contract error);16 模块在 `843` 通过 / `3` 失败处停止;长临时 namespace + 在主干和候选均复现两项 `2,015` 字符 hook 恢复失败;早期 `28` 项 codec 夹具失败、 + `27` 条八文件遗留 mypy 错误及包重编记录均保留。 ## 签名完整输入的材料分阶段 -后续集成采用 main `b47bbc6c9`,包括首次选择及原 capture 失败恢复。真实 native -调用方使用 `complete_turn`,而非旧 `quota_packet` surface。完整决策验证通过后, -该调用方现在复用相同 outcome scope、渐进材料及精确记录 owner。canonical 签名 -capture 不被编辑、重新签名或当成新观察。既有 `outcome_context_projection_v0` -呈现携带原 capture 引用;只有材料分阶段值得采用时,也使用这个呈现。未知字段、 -不支持的义务、不可用规划和小材料仍保留原完整回退;关闭交付时行为不变。 - -范围筛选可能改变 outcome 的数组位置。因此 planner 保留原始条目身份和来源位置, -依次输出两个既有传输编辑阶段:先 scope,再材料编辑。Python adapter 将这些计划 -应用于原始 JSON 值,不新增 Python 材料决策或公开工作契约。共享来源 owner 的指引 -保留累积要求、工作关联、当前 review/check 状态、权限与停止条件;只有支持性历史、 -review 原因及证据引用改为同 capture 选读。历史 scope-only 呈现保留原 decoder。 -精确引用相等性仍核对原 Python JSON 类型:新增反例捕获 JavaScript 桥接把整数值 -浮点数与整数混同,因此在编辑前继续保留既有 IO 侧校验。 - -独立公共入口 oracle 要求真实 File/SQLite `quota should-run` 交付签名分阶段 -呈现,并用 `context-read --select` 精确恢复原 source history;同时核对 binding、 -原 Turn 回执和 CLI 结算 channel 不变。范围 fixture 故意把当前 Agent 的 outcome -放在原数组的 peer 之后,避免误用筛选后的位置也能通过证据校验。既有完整来源、 -关闭交付、缺失来源、未知字段、小材料、pending read 及 hash 篡改用例继续保留。 - -native 生命周期用例区分完整 required-view 覆盖与可选证据、未完成前缀,以及外层 -工具 JSON 有效但内层 page 被截断。部分读取不建立完整 native baseline。重复 -compaction 仍恢复相同当前呈现及原来源,不要求先读完已不可用的 delta,也不重新 -准入。这些是 hook/传输校验,不证明模型保留。默认文件导航及文件版本差分属于另一个 -进行中的 caller 改动;本切片不定义该阅读策略,也不新增必要事实索引。 - -初次后续运行保留失败观察:真实签名调用方首先暴露不支持 `complete_turn` surface, -历史 wrapper reader 暴露局部变量遮蔽错误。作者 fixture 还曾超过既有 source-summary -上限,并在未声明输出预算时请求过大 page;随后在原限制内修正。未提高验收、page -或成本上限。最终验证及冻结源码敏感性在提案中绑定实测版本记录。 - -这移除了已证实的消费者接线缺口,不代表剩余 C1 切换完成。此前 **25,862 > 13,000**、 -失败/中断 cohort 及完整成本表均保留原状态。安装采用、实际模型输入/保留、 -tokens/cache/账单、验收成果与总延迟/成本仍未资格化。调用方/writer 替换、历史 -reader 退役及相对原 quota 的单会话成果对照保持开放;双会话 controller 研究另行进行。 - -## 独立的当前捕获恢复切片 - -优先让可独立评审的 [#7628](https://github.com/loopx-project/loopx/pull/7628) 先于剩余 -C1 切换推进。该提案 `6743ce72593121b2e15a9f8ef84355c31c94e46c` 直接面向 main, -不依赖未合 C1。既有 native adapter 在可选材料规划前,先发布当前原始来源的 recovery -及 pending delivery。真实 saved-context CLI 进程退出反例在 main `ce4c78088` 的 -resume/compaction 均复现恢复前一份来源,提案通过相同断言。受影响 cohort 为 -199 项通过、五项既有显式 native opt-in 跳过;提案 head 的标准 premerge 通过。 -2026-10-29 已合入为 `75034bfa99d39aa949d7bb0fed33913034ce7eca`;安装采用仍未资格化, -提案 cohort 不冒充新的完整主线验证。 - -相同 project 调用的关闭态/普通态 capture 及 typed 请求数不变。材料分阶段多一次 -journal 发布,从两次增至三次;capture 文件及 typed 请求仍各两份/次。这换取当前 -来源的持久可恢复性,不是已测延迟、模型或完整成本收益。C1 集成已具有相同恢复顺序; -后续主线集成应复用该 owner,不恢复第二份实现。 - -## 无损引用资格与暂缓的调用方迁移 - -独立测试提案 [#7633](https://github.com/loopx-project/loopx/pull/7633) 直接基于 main -`ee7b65f124`,在既有验收共享 helper 和普通 CLI 投影中新增十个组合,保护不同整数/ -浮点、负零及大整数原值、后续精确 carrier、来源不变与重复投影。受影响主线 cohort -**116 项通过**,含既有真实 File/SQLite 入口;标准 premerge 通过。这是测试前置, -没有新增运行时投影。 - -通过 C1 `c335aae894` 已改名的 display/CLI 接口执行相同输入与断言,十个组合中有 -**八个反例**:JavaScript 数值相等可能把不同的验收正文替换成引用。这是经过接口适配 -的断言 probe,不是原样 pytest cohort 或安装态观察。此前通过 cohort 对各自场景仍 -有效,但未覆盖此无损边界;C1 保持 Draft,修复后需重新验证。 - -另一个未提交的迁移原型将 legacy 调用方的验收匹配移入既有的一次 TypeScript 投影 -调用。同一 native backend 上,对冻结 main Python 调用方和候选使用四份相同合成 -合同,交替执行十次温态样本。输出一致、typed 请求均为一次,但共享晚于传输使请求 -及本地中位耗时增加: - -| 每份合同的要求字符数 | 请求字节,基线 → 候选 | 中位毫秒,基线 → 候选 | -| --- | --- | --- | -| 8,000 | 30,498 → 55,229 | 8.18 → 8.51 | -| 64,000 | 86,498 → 279,229 | 9.25 → 10.64 | -| 256,000 | 278,498 → 1,047,229 | 11.55 → 17.04 | - -这是调用方诊断测量,不是生产规模、隔离 CPU、模型 token 或长程收益资格。原型在 -公开前暂缓,传输增加没有被当成已验收重构成果。应在已收到完整来源的 C1 边界收敛, -替换引用前核验原始 IO 值;可用替代方案资格齐备前保留现有 legacy 调用方。采用默认 -文件交付时,不另建 reader,也不恢复强制 outcome 读取范围。 - -## 保留来源原值的展示传输接续 - -独立普通提案 [#7643](https://github.com/loopx-project/loopx/pull/7643),head -`0212a1f2e`、main 基线 `5d7f0a61b`,移除另一处来源保真缺陷:未开启诊断裁剪的 -上下文引用共享会返回完整 JavaScript 解码结果。八个数值回归场景及一个未修改材料 -返回检查在该未改动基线上失败。两条调用方现统一使用既有 typed 修改计划和原始 IO -事实,一次请求保留数值拼写、嵌套事实、来源不变与重复应用。C1 `fd65514e7` 已吸收 -同一改动,没有另建 owner。 - -冻结请求在修改前后逐字节相同。未修改的合成支持材料分别为 8,000、64,000、256,000 -字节时,仅引用场景的 owner 返回体由 31,853/87,853/279,853 字节均降至 388 字节; -诊断控制保持 7,659 字节。模型可见视图保留正文,为保留原始数值拼写增加九字节。 -这是本地传输观测,不是模型 token、延迟、安装客户端或完整成本资格;预算不变。 -独立提案的 176 项 Python(含隔离真实 File/SQLite CLI 与 staged reads)、74 项 -TypeScript 及标准 premerge 通过。配置内 mypy 的 17 个文件通过;额外 CLI 单文件 -检查的三条旧错误在基线和候选均复现。读回测试使用既有来源签名并拒绝篡改捕获, -运行时哈希 codec 未改变。 -另一次 C1 集成 cohort 的 255 项 Python、94 项 TypeScript、control-plane typecheck、 -配置内 mypy 与 Ruff 通过;该受影响 cohort 不替代此前完整路径或预算证据。 - -吸收后,适配 #7633 断言通过 C1 display/CLI 仍有 **10 项中 8 项失败**,完整 -composition 另有 **5 项中 4 项失败**。修改计划保留未改动事实,不能修复此前已作出 -的错误引用决定。这仍是适配断言 probe,不是原样 cohort 通过。C1 保持 Draft,原有 -预算、writer/caller/reader 退役、数值引用及成果/完整成本缺口均保留。继续在已 -持有完整来源的 owner 修复,不重传重复 legacy 正文,也不另建必需 reader。 - -## 精确的来源数值比较 - -下一项 C1 切片修复前述 display、CLI 与完整 composition 的 15 项断言中失败的 12 项, -复用现已通过 #7633 合入主线的原值断言。浮点数及不安全整数的稀疏拼写随既有一次粗粒度 -调用传输;TypeScript owner 在比较已注册的验收载体与摘要列表时使用原始身份。不同正文 -保持 literal,后续相同副本仍引用其更晚的精确 owner。Python 只提供 JSON 来源事实和 -应用修改计划,不拥有载体选择或相等判断策略。小正文仍按原有正文与引用大小决定是否 -共享,不把传输元数据计入这个比较。 - -完整 composition 现在返回展示投影已使用的同一修改计划,并在原始 IO 值上应用。 -两条路径复用同一个对象路径索引器;没有新增 RPC、完整正文返回、公开视图、reader、 -authority store 或持久缓存。原生 JavaScript 调用方保留既有结果形状,Python producer -请求保留来源原值的修改计划。 - -冻结合成输入以 C1 `dd600ac02` 为基线。四份相同合同下,每次粗粒度调用仍为一次 RPC; -完整 composition 的请求参数因稀疏身份与修改计划选项增加 491 字节。 - -| 每份合同的支持材料字节 | composition 返回体,基线 → 候选 | -| --- | --- | -| 8,000 | 31,469 → 1,243 | -| 64,000 | 87,469 → 1,243 | -| 256,000 | 279,469 → 1,243 | - -完整调用方视图因保留原始数值拼写增加四字节。原始合同不同时,正确性需要更多输入: -256,000 字节场景的调用方视图从 279,469 增至 536,456 字节,因为原结果错误地丢弃了 -不同正文;修复后仍共享后续相同副本。这些是 bridge 参数/返回体与调用方视图字节, -不是模型 token 或完整成本。三次温态耗时样本存在未控制的并发工作,不构成延迟资格。 - -受影响 Python cohort 的 246 项通过,包含真实隔离 File/SQLite 入口及原 Turn 的重入/ -结算。上下文/capture 恢复另有 128 项通过、五项既有显式原生配置的 opt-in 跳过; -104 项 TypeScript、control-plane typecheck、配置内 mypy 与定向 Ruff 通过。首次验证的 -28 项失败保留:夹具将 Python 数值拼写误当作既有 JavaScript codec 来散列;修正后的 -独立夹具使用原生 JSON 数值编码,没有改变运行时哈希或语义拒绝。另四项旧布局断言在 -未修改的 C1 基线上也失败;迁移后的断言检查完整契约自有的命令路径、原始身份及完整性, -保留后续恰好一次结算和 successor 检查。 - -既有 JavaScript 哈希归一化不变:来源不同的数值仍可能得到相同的归一化哈希输入。 -本切片不是新的数值哈希完整性资格;不可变 capture 哈希仍校验精确字节。C1 尚须对齐 -该身份边界、集成当前 main,采用已有的文件默认交付/差分和建议性导航,并退役自身 -过期的强制 outcome scope/reader。一次 main 集成暴露了这些 owner 冲突,已中止且 -未保留并行 owner。C1 保持 Draft,原有 25,862 > 13,000 预算失败、历史负结果、 -writer/caller 退役、原 quota 成果/完整成本比较和可选双会话资格仍未闭合。 +在 main `b47bbc6c9` 上,真实 native `complete_turn` 调用方在完整决策校验通过后 +复用同一 outcome scope、渐进材料与精确记录 owner,不修改或重签 canonical capture。 + +- **顺序与不变式:** 先 scope 后材料编辑,并保持原数组位置,避免筛选位置污染原证据 + 指针;编辑前在 Python IO 侧区分整数浮点与整数;未知字段、不支持义务与小材料保持 + 完整回退;关闭交付时行为不变。 +- **当前捕获恢复(`#7628`):** native 展示在可选材料规划前先发布当前原来源恢复与 + pending delivery(journal 发布由 `2` 增至 `3`),避免退出或压缩后回退到过期前驱。 +- **Hook 与生命周期边界:** 用例区分完整 required-view 覆盖、未完成前缀与截断内层 + page(部分读取永不建立完整 baseline);`outcome_context_projection_v0` 仅作可选 + 分阶段载体;未提高或放宽任何预算门槛。 + +## 通过、失败与待验收门禁 + +- **通过(确定性源码与隔离 wheel 检查):** 原 capture 读回、24 条要求完整性、保真 + 引用共享、篡改/提前扣额拒绝、一次结算重放与进程级 lane fence(各检查点对应 + `144`–`333` 项 Python、`104`–`163` 项 TypeScript 及 `1,885`–`1,889` 个一致 wheel 成员)。 +- **失败/负结果(未改判):** v4 多 Agent 预算(`25,862 > 13,000`)、普通温态增约 + `2.8 KB` 与全部 peer 补读(`+10` 次调用)、延后共享原型请求膨胀(`8K`–`256K` 请求由 + `30.5K→55.2K` 至 `278.5K→1,047.2K`),以及长 namespace 下 `2,015` 字符恢复失败。 +- **未验证/开放门禁:** 正式 App/模型保留、真实 tokens/cache/账单、受控延迟、原生 + Windows 执行、RFC §9 匹配单会话成果与完整成本对照、剩余消费者/writer 切换及历史 + reader 退役。 diff --git a/docs/architecture/rfcs/ledger/controller-executor-unified-contract-v0/2026-10-30-c1-source-convergence.md b/docs/architecture/rfcs/ledger/controller-executor-unified-contract-v0/2026-10-30-c1-source-convergence.md index 8b72fa86a3..cdb7569f91 100644 --- a/docs/architecture/rfcs/ledger/controller-executor-unified-contract-v0/2026-10-30-c1-source-convergence.md +++ b/docs/architecture/rfcs/ledger/controller-executor-unified-contract-v0/2026-10-30-c1-source-convergence.md @@ -1,3414 +1,112 @@ # C1 source convergence and historical integration checkpoints -- **Date:** 2026-10-30 +- **Date:** 2026-10-30 (rolling integration checkpoints through `#8266`) - **Status:** Unmerged integration evidence; C1 remains open. -- **Source:** original candidate `648104978fdd67176cccdbb765c5bc3f36bf2ca3`, integrated with target `e8f4c6f8125e3cc0ef912afac653d5542671392f`. +- **Source:** Unmerged C1 unification branch integrating target `main` checkpoints (see [packaged heartbeat comparison](2026-10-28-packaged-heartbeat.md)). - **Language mirror:** [中文版](2026-10-30-c1-source-convergence.zh-CN.md) -## Current caller retirement boundary +## Shipped vs. unshipped convergence boundaries -The current #8266 candidate delivers complete v1 through ordinary quota, -the former envelope flag, generated heartbeat loaders, Benchmark wake and -checkpoint entrypoints, and managed or stdio Host requests. Context delivery -Off inlines the same complete source. The Benchmark runtime guides now describe -that behavior. An original-quota reference arm uses its pinned pre-C1 runner -and LoopX revision, while saved captures retain their recorded version. - -| Remaining boundary | Current caller and exit condition | -| --- | --- | -| Complete-source composition and validation | Current quota, Turn, heartbeat and Host consumers share the existing TypeScript owner. The ordinary v0 renderer and flag-based source choice have exited those callers. | -| Versioned plan, capture and receipt recovery | Historical records retain their original source, binding and once-only settlement. Retirement requires the supported recovery window and the disposition of outstanding records. | -| Legacy comparison constructor | The Python `build_turn_envelope` has tree callers only in `model_behavior_corpus.py`. Raw/v0 retained cases and the versioned state matrix preserve their existing control. Complete v1 cases use their original checked source. Retire this constructor after its last supported comparison caller exits. | -| Model outcome and installed adoption | The original-quota/C1 single-session comparison, complete costs, supported installed Hosts and native Windows retain their existing acceptance. | - -The legacy constructor now forwards directly to the same TypeScript operation; -its one-caller Python wrapper is removed. One complete-capture test duplicated -the first thirteen statements of another case, including the same actor and -seed. The retained case also checks damaged-binding refusal before an actor -call, so the duplicate is removed with that coverage preserved. These changes -keep the frozen control and public constructor behavior. They qualify the -caller boundary and reduce duplicate maintenance. Model outcomes and complete -costs remain open. - -## Native selections across repeated resume - -The existing single-resume repair keeps a selection when the original full -capture cannot be replayed. On C1 `043463500ddd`, a second resume before the -next capture discards that selection's read state. The lifecycle owner now -carries the verified selection checkpoint into the new epoch. A later resume -checks the original native output again, and the new capture delivers changed -stop conditions using its current scope. - -With native Codex 0.167.0-alpha.4.1 Code Mode and a local fixed provider, the -next first-read selection after two resumes drops from 11,978 to 631 content -bytes and from two pages to one. Missing selected output, a changed Todo, source -or body, and actual compaction require a fresh read. The full capture still -starts a new baseline after its replay fails. This fixture measures reader -delivery. Actual model costs and long-horizon outcomes remain open. - -## Quota packet size and repeated continuation audit - -The synthetic File quota workflow on main `f38fae05bb9a1` and C1 -`1f2f10539117` uses the same task, accepted artifact and Turn identity. -Total stdout across guard, complete read, writeback, debit and duplicate -submission grows from 53,248 to 65,554 bytes in five calls. SQLite records -53,310 and 65,616 bytes. In the selected-read size breakdown, the new compact -settlement plan occupies 10,646 bytes, including 3,209 bytes of writeback -conditions and 2,939 bytes of Vision authoring structure and examples. -Validation, the original settlement identity and recovery commands account -for further bytes. - -The initial-read projection reuses the exact continuation audit only after -the native hook observes its complete literal body under the same current -Goal, bound Todo, agent and context epoch. A changed audit, missing -observation, changed binding, compaction or a reference to other material -requires a current read. The current writeback command and settlement identity -are delivered separately. Explicit recovery still reads the original audit -from the same capture. - -Two-turn CLI probes on File and SQLite exercise ordinary and complete -selection, actual paged reads, writeback and settlement. Across all four -pairs, the second Turn's first-read stdout decreases by 2,226 bytes at the -same call count. The ordinary File second-Turn workflow drops from 54,093 to -51,827 bytes in eight calls. The isolated installed wheel reproduces reuse, -original capture readback and valid settlement. The matched cold default -workflow stays at 65,554 bytes on File and 65,616 bytes on SQLite with this -change. Explicit off, staged and original recovery also complete with the -same accepted fixture and one debit. These local stdout observations leave -native model token, task outcome and fleet adoption measurements open. - -## Current repair: scoped capture reads and migrated consumers - -C1 integrates main `3a0c9608cc06`. The shared thin heartbeat renderer had turned -complete-capture availability into an unconditional pre-action whole-capture -read. Four matched real CLI cases (ordinary/App × default/explicit context-off) -compare actual main with pre-fix C1 integration `c6d7d0a573f0`: main does not add -that obligation, while C1 does. -The repaired renderer requires current work context, required materials and -applicable goals, criteria, constraints and stops; it scopes original capture -reads to decision dependencies. Explicit full-read obligations, supplied flags -and complete original-source/identity recovery remain. In all four cases, text -outside the changed read clause is byte-identical before/after. The instruction -grows by 347 UTF-8 bytes: this is a semantic correction, not a measured token or -whole-task saving. - -On frozen C1 `c37bd8d0d9`, selected-work collection fails on a deleted helper; -native-child and independent-delegation checks record 62 passes and eight -failures. The existing fixtures now use the current context reader and v1 -request/work-contract owner. Contradictory secondary carriers and damaged owner -identities are still deliberately injected to require pre-effect refusal; -original material, off isolation, lost-response recovery, replay and once-only -settlement assertions remain. Read-scope/source-preflight checks pass 141 cases -with four skips; native/delegation checks pass 70. A broader run first records -104 passes and 28 failures; its subsequent migrated delegation/example run -records 139 passes and two stale example assertions. After migrating explicit -selection and typed pre-effect refusal, both complete canonical-delivery cases -pass on source and the installed package. The refusal checks the original -subject and absence of Host, state, scheduler and spend effects. The broader -failures were not all independently -reproduced on untouched `c37` and are not attributed wholesale to that baseline. - -The first installed-wheel run records 88 passes and 32 setup errors: the example -initializer imports TypeScript through checkout-relative paths. Its existing -Python launcher now supplies the actually loaded package root to the same -initializer; canonical authority, exclusive disposable-runtime creation and -existing-state refusal remain. No Core source is copied into the harness. -After that repair, the installed run records 148 passes and two remaining -stale settlement-field assertions; correcting them yields 150 passes in a -new complete run. All 1,815 package Python/TypeScript sources match the tested -candidate; 374 observed Python processes import only from the -isolated package. Earlier failures and partial replays keep their own evidence. - -Configured cold-cache Mypy (17 roots), control-plane TypeScript and changed-path -Ruff checks pass without weakening settings. Exact-head premerge and -review/readiness remain separate qualification gates; this checkpoint does not -declare them passed. -This slice neither substantially reduces the parent PR nor qualifies complete -provider coverage, independent review, natural adoption, model costs or whole -C1. The actual main already has the intended ordinary-read scope, so this C1 -regression does not justify a duplicate main change. Historical experiments and -frozen base/head cost denominators remain below. - -## Previous dependency repair: source transport below the driver - -C1 integrates main `5a58635028fb`, including merged proposals #8192 and #8186. -Its configured Python check originally -reported 4,562 errors in 463 files: low-level capture and journal readers imported -the driver/Host-result converter for thin source and identity helpers. Those -seven helpers now use the existing `quota.turn_envelope` transport directly; -three old private implementations are removed and published exports remain -aliases. The TypeScript decision owner, wire versions, source refusals, exact -numbers, historical recovery and once-only settlement are unchanged. - -The same configured 17 roots pass with incremental checking disabled and an -isolated empty cache; strict settings and import following were not weakened. -Full control-plane TypeScript checking also passes. This is a repaired import -boundary, not a claim to fix typing in every formerly reachable module or to -improve runtime performance. The broad source run records 627 passes, six -fixture failures and four skips. A clean integrated baseline reproduces the -same six failures: fixtures access a retired second `turn_envelope` carrier. -Corrected fixtures exercise the current producer's missing-witness recovery and -deliberately injected mixed authority; all 36 module cases pass. The rebuilt -independent wheel passes 136 cases across capture/Host, session/journal, -authoring and completion paths. All 1,815 Python/TypeScript package sources -match the candidate; 141 observed Python processes import from the installed -package, without borrowing checkout source. The earlier 100-case package run -and the six original fixture failures retain their own recorded identities. - -Before this dependency repair, integration reduces the parent diff from 201 -files (+18,429/−2,042 at `49a621c9b8` against main `546c08c0d3`) to 197 files -(+17,928/−1,989 at `2fe98521f1` against main `5a58635028`). This is a limited -reduction; a substantially smaller review boundary remains to be delivered. - -Independent review, quality/readiness, full provider coverage, natural adoption -and whole C1 acceptance remain open. This repair does not establish a new -efficiency result or qualify the whole parent PR. Historical bilingual -experiments stay together, and earlier cost measurements retain their frozen -base/head rather than becoming measurements of this integration. - -## Previous extraction: complete replan authoring - -Both author proposals integrate main `d0985c35aa`. [PR #8192](https://github.com/loopx-project/loopx/pull/8192) -extracts C1's existing same-response authoring owner into main, removes Python's -duplicate comparison and restores authoring for ordinary, staged and real CLI -readers. All three complete-authoring oracles fail on original main `a9485073f2` -and pass on the repair. Missing stride declarations still refuse semantic -writeback; a Host reading the delivered contract can declare its decision and -the following task consumes the independently validated plan. C1 retains its -modern source/version checks before captured reads. - -The main repair passes 30 integrated source and 30 isolated-wheel cases; -C1 passes 180 focused source, 96 TypeScript and 30 isolated-wheel cases. -Canonical fixtures locate TypeScript from the loaded package. C1 fixtures use -its actual structured Host prompt and versioned capture binding, rather than -assuming an inline value or a historical digest. Earlier fixture failures remain -recorded. The main repair's frozen standard mechanical checks pass, but the -strict quality receipt remains missing. Independent review and whole C1 remain -open. This repair adds one parent RPC in the frozen fixture (2 to 3, excluding -the CLI child); it is not a net-efficiency result. Neither independent proposal -has landed, so this checkpoint does not claim the parent has already shrunk. - -## Latest field reuse: a main proposal shared with C1 - -[PR #8186](https://github.com/loopx-project/loopx/pull/8186) isolates the native -progressive reader repair at `9df99f042b5f`, based on main `62e234c93999`. -C1 integrates that main at `2f1c91085` and the same repair at `dde48f084b`. -The existing TypeScript owner now considers an exact requirement list, a large -criterion, then its large description. Current changes and unknown controls -invalidate their containing record; current revisions and complete recovery -remain available. Complete current pages can combine with authenticated exact -inherited sections for the next read, without becoming a full-input baseline. -The native hook uses its already matched event session, rather than assuming -it inherits a shell session environment. No new admission, model invocation, -configuration or storage schema is introduced. - -The following is a **main base/head** comparison, not C1's incremental gain. -One sample per File/SQLite, base/head and cold/warm/recovery/canonical-correction -condition gives 16 scenarios and 40 Turns. Twelve scenarios complete the -original synthetic three-step Task; four cold samples execute only its first -step. Current/previously delivered requirements, full UTF-8 page coverage, -independent artifacts, original identities, three receipts, single debits and -replay are checked. Setup and retry probes remain separate, with completed -child costs counted once. Product bytes at the committed head equal the -measured source. - -| SQLite ordinary task | Main base | Proposed main repair | Change | -| --- | ---: | ---: | ---: | -| Warm three-step BODY | 147,059 B | 109,016 B | −25.87% | -| Corrected three-step BODY | 147,793 B | 113,819 B | −22.99% | -| Warm three-step stdout | 268,953 B | 230,730 B | −14.21% | -| Warm / corrected RPCs | 863 / 867 | 863 / 867 | unchanged | -| Warm / corrected framed RPC bytes | baseline | +2.42% / +0.98% | extra cost | - -File has the same direction. Cold and this recovery cohort's BODY are unchanged. -Observed SQLite warm Python regular-file reads/writes increase 11.94%/19.06%; -correction increases them 5.73%/3.31%. Node/kernel/provider and CLI-external -fixture IO are not included. Single instrumented samples do not qualify stable -latency, model retention, natural adoption, tokens/cache, bills or net benefit. -The leaf-only prototype saved no representative task BODY; eagerly indexing -small criteria raised IO substantially. Those negatives remain evidence, not -passes attributed to the final repair. - -Source regressions cover changed text/status/unknown controls, low-value splits, -partial and forged observations, compaction, off and exact recovery. The same -new case fails on untouched main. Both source and isolated-package native paths -exercise the existing owner; each actual Codex static-loopback journey takes -ten requests, includes the subsequent whole-section reuse and restores full -requirements on unverified resume. No paid model is used. At the recorded `dde48f084b` integration, C1 configured -mypy has 4,818 diagnostics; main's configured 17-file check passes. The earlier -C1 count was 4,814 at another integration head; this is not a waiver or an -attribution of the four additional diagnostics. Main standard premerge's six -direct and fourteen selected checks pass mechanically, but its strict Goal -quality receipt is missing. Independent review, CQR, unchanged-head readiness, -maintainer merge authority and whole C1 qualification remain open. This proposal -has not reduced the parent PR's size on main yet; that requires maintainer -adoption of independently reviewable slices. Earlier bilingual experiments stay -together below. - -The later author integration includes main `910ff3bca5`: main product -`a8902b05b` and C1 product `7e52f3a1e`. The frozen cost table above is not -relabelled as a measurement of this later composition. Focused real-entrypoint -checks pass 102 cases on main and 104 on C1; each typed reader/report projection -set passes 66 cases, with typecheck passing. Main configured mypy passes; C1 now -reports 4,831 diagnostics in 485 files, without an attribution or waiver of the -additional diagnostics. Standard premerge passes 6/14 direct/selected checks on -main and 7/19 on C1 mechanically; both still lack the strict quality receipt, -and C1 retains its manual review hold. - -## Previous integration: incremental costs after field reuse reached main - -Measured product revision `b90e711cdb81` integrates main `d602248c5329`, including -#8124's field reuse, Vision audit references, first-read consumers and Chat -observation updates. C1 retains its complete-source validation in the shared -TypeScript owner; native navigation and historical-source refusals remain on -that same path. Later changes in this checkpoint are validation and documentation. -Earlier versioned cohorts below remain historical evidence. - -The current matched engineering cohort uses the original synthetic three-step -Task and two canonical acceptance groups. File/SQLite × cold/warm/recovery × -three repetitions gives 36 scenarios and 84 settled Turns. The 12 cold cases -exercise one step; the other 24 complete the original Task with matching -independently checked artifacts. Actual returned BODY is reconstructed through -EOF, and each omitted outcome must equal both its current immutable source and -its previously delivered value. Original settlement identities, three receipts, -single debits and product-source stability are checked. Preparation and deliberate -retry probes are counted separately; completed child costs are included once. - -| SQLite ordinary path, three-repeat mean | Adopted main | C1 | Change | -| --- | ---: | ---: | ---: | -| Warm step 2 BODY | 27,874 B | 27,159 B | −2.57% | -| Complete three-step BODY | 102,836 B | 100,691 B | −2.09% | -| Complete three-step stdout | 225,841 B | 184,316 B | −18.39% | -| Complete three-step RPCs | 863 | 866 | +3 | -| Complete three-step framed RPC bytes | 11,754,471 B | 11,852,055 B | +0.83% | -| Observed Python regular-file read/write bytes | baseline | −10.39% / −13.83% | limited IO boundary | - -File has the same direction. Recovery first resends the complete current -requirements; the three-step recovery BODY falls only 1.78%. The large savings -against pre-field-reuse main are not C1's exclusive incremental benefit. - -A separate canonical-correction probe appends one criterion through the actual -refine command, preserving the original criteria. Four File/SQLite cases complete -12 Turns and four Tasks. Main conservatively rereads both outcomes; C1 reuses one -unchanged outcome at step 2 and both at step 3. The new criterion remains visible. -SQLite step-2 BODY is 52,169 → 32,905 B (−36.93%); complete-Task BODY is -149,223 → 106,688 B (−28.50%), RPCs 867 → 870 and framed bytes −0.23%. -This is one synthetic correction per provider/arm, not natural feedback adoption -or a scientific outcome result. - -Final-source validation reconciles 1,065 passed / four skipped unique Python -cases, including real native Codex with static loopback inference. The 112 native -cases required focused rechecks after fixing fixture cursor planning, reading -choices before selection, and isolating the eight-page stress loop from static -resume qualification. Original failures remain recorded; this is grouped -qualification, not one wholly passing native invocation. Full TypeScript has -6,161 passed / 77 skipped; control-plane typechecking passes. The isolated wheel -matches 1,809 packaged Python/TypeScript files, passes 24 source/default/off/recovery -cases, and passes actual-client default Progressive and independent Delta checks -with no source import contamination. - -Configured Python typing still fails with 4,814 diagnostics; the same configured -17 roots pass on main. This hold is not waived by broader historical typing -comparisons or the successful transport checks. PostgreSQL/full affected-provider -qualification, independent review, exact-head readiness, installed adoption and -whole-C1 acceptance remain open. BODY/stdout and Python IO are distinct metrics; -Node/kernel/provider IO, model input/cache/output tokens, invoices and sustained -latency are not qualified. No model/scientific run, live installation, CI query, -manual workflow trigger or merge was performed for this engineering cohort. +| Boundary / owner | Current C1 state | Retained compatibility & exit gate | +| --- | --- | --- | +| Complete-source `work_contract` (`compose_turn_decision`, `completePlanningFacts`) | **Unmerged in C1:** unifies guard, Host, driver, MCP, benchmark, Kiro, DSH, SSH, and bound `generic_cli` (`quota_settlement_plan_v2`, `task_context` via `#8691`). | Unbound turnless observation (`--scheduler-observation`), raw `--turn-envelope` v0 display (`EdgeBench` / explicit compatibility callers), and historical v0 captures keep explicit readers until replacement and recovery windows qualify. | +| File-first progressive/delta & field reuse (`#7560`, `#7627`, `#7935`, `#8186`) | **Shipped on `main` & adopted by C1:** invocation-local initial plan, observed-field reuse, and digest-bound file deltas replace the retired unmerged `outcome_context_projection_v0` mandatory reading plan. | Partial/truncated reads never establish baselines; independent `delta_delivery=auto` with `context_delivery=off` emits no progressive navigation; default ordinary CLI adoption requires §9 qualification. | +| Numeric integrity (`#7557`, `#7633`, `#7643`, [numeric checkpoint](2026-10-29-complete-numeric-integrity.md)) | **Shipped owners + C1 transport:** sparse numeric tokens (`1.0` vs `1`, `-0.0`, unsafe integers) and `hash_codec` v1/v2 preserve original Python JSON values across TypeScript edit plans. | Persisted Python JSON/action-hash preimage stays unchanged so existing Turn keys remain valid; exact-byte capture digests remain separate from normalized JS hashes. | +| Native selection & replay checkpoints (`codex_context_history.py`) | **Unmerged in C1:** binds hook replay (`native_resume` / `selected_resume`) to physical inode/interval digests and append-only transcript coverage across repeated resumes. | Missing output, changed Todo/body, non-append-only tail, or compaction forces a fresh read; `cli_version` covers writer provenance only and never grants model-retention proof. | ## Current private-plan boundary -New complete-source Turns now write `loopx_turn_plan_v1` with one original -`work_contract`, its source digest and capture header. The complete planner no -longer generates the v0 executor adapter. `planning_facts`, Host input and -`turnPlanWorkSource` reuse the existing TypeScript source/projection, route and -settlement owners; Python retains the persisted action-hash number codec. - -| Production chain | Replacement / retained compatibility | -| --- | --- | -| Turn CLI and current launch decision → plan | Pass the complete source directly. The private planner no longer accepts a complete source paired with a v0 executor adapter. | -| Default CLI plan inspection | Retain the one complete source, including portfolio and writeback; keep inspection non-executable even when transport metadata is restored. | -| Immutable capture → Host | Bind the original source/header without regenerating an adapter; retain capture refusal, original read commands and Host v1. | -| Journal write, inspection, settlement query and CLI resume | Validate v1 through the shared source reader; preserve GoalRef, Agent, Turn, scoped identity, native Session and once-only effects. | -| Native report recovery, capability context, reward-memory activation and child-result context | Read the same work facts; carry original sparse numeric spellings with recovery proof. Existing experiment/capability gates remain required; disabled memory does no source/provider read. Host/provider and authority rules stay with their existing owners. | -| Recorded v0 journals | Keep explicit transitional source/adapter cross-check and historical adapter-only decoding; never downgrade a malformed v1 plan. | - -At this private-plan checkpoint, quota presentation and the managed controller's -quota preview were still separate v0 callers; their subsequent replacement is -recorded below. Outstanding v1 work requires a compatible reader during rollback; -stopping new v1 admission does not let an older binary rewrite or resume it. -Historical readers retire only after their original work and supported recovery -window are reconciled. No new capability, setting, cache or execution grant is -introduced. - -A matched replay uses the actual frozen `0eb0042191d5` implementation and the -candidate on 14 identical synthetic File/SQLite plan inputs plus 16 original -Host recovery inputs. All route/session/transaction/topology and execution -facts agree. Four plan cases use the existing no-Todo replan or request binding. -Capture publication, real journal writes, load/query and idempotent replay run -through their production owners. Only the separate capture-store namespace is -substituted for equality; source clauses and values are not normalized away. +New complete-source Turns write `loopx_turn_plan_v1` with one original +`work_contract`, its source digest, and capture header; the complete planner no +longer emits a duplicate v0 executor adapter (`planning_facts`, Host input, and +`turnPlanWorkSource` share TypeScript owners while Python keeps persisted +action-hash numeric encoding). -| Measured component, aggregate over 14 plan cases | Before | Candidate | -| --- | ---: | ---: | -| Canonical plan JSON bytes after capture | 528,364 | 373,372 (−29.33%) | -| Actual journal file bytes | 698,776 | 500,880 (−28.32%) | -| Final canonical Host input bytes | 335,446 | 335,446 | - -Across all 30 matched calls and their measured pipeline steps, native RPC count -is 162→158 and canonical argument/result JSON is 4,645,847→3,536,656 bytes. -Planning saves 18 calls, while checked plan loading adds 14 calls and increases -that read step from 7,052 to 340,486 bytes. Before capture, the new plan's source -digest adds 97 bytes to an unbound Host header; after capture both implementations -already carry that binding and the final model bodies agree. These are component -observations, excluding framing, CPU, model tokens, invoices, cold/warm context -costs and accepted outcomes. They do not improve the original-capture-to-selected- -body control-packet metric or establish whole-workflow net benefit. - -Default plan inspection previously kept a bounded legacy view after omitting -the complete source. Removing the adapter exposed that omission, including the -portfolio and writeback context. Current inspection retains its one source. -A separate real read-only File fixture passes on both implementations with -independent stores: actual JSON stdout grows 12,388→26,524 bytes (+14,136). -This is an explicit readback cost, separate from the smaller persisted plan and -unchanged final model bodies. No CLI read-byte saving is claimed. - -New no-adapter cases first fail on the frozen writer. Subsequent integration -also exposes an actual no-Todo recovery reader still using the removed adapter; -that reader now uses the complete source's original settlement identity. Invalid -current versions, missing/null sources, mixed carriers and wrong source/capture -bindings are refusal cases, alongside explicit historical/transitional controls. -After the readback, capability and historical-fixture corrections, all 403 cases -in the seven affected complete Python modules pass on the current source. -TypeScript typechecking and its full 6,053-pass/77-skip suite pass. The PR records -the exact source/wheel cohorts, retained failures/skips and remaining standard -gates. The expanded source run's 1,367 passes, 37 failures and 22 skips remain -recorded: it exposed the default inspection omission and a real reward-memory -gate still reading the absent adapter. The latter is now bound to checked work -facts; current missing-source and explicit historical controls remain distinct. -This is a private-plan migration proposal, not installed rollout, original- -quota outcome/full-cost qualification or C1 completion. - -## Current quota and managed-controller cutover - -The source candidate removes the remaining normal quota presentation builder -branch and changes the managed controller's fresh preview to the same complete -source used by an executing Turn. It reuses `compose_turn_decision` and -`completePlanningFacts`; the latter validates and derives work/lineage inside -the existing `turn.controller` RPC. Exact numeric tokens cross that boundary -without another projection RPC. Unknown supporting facts survive; an unknown -current execution action is refused before dispatch or settlement. - -| Replaced mechanism / caller | Shared owner and actual deletion | Remaining consumer and exit condition | +| Production chain | C1 behavior & owner | Retained compatibility | | --- | --- | --- | -| Quota `_project_quota_cli_payload` and renderer selection | Delete the v0 builder import, ordinary/envelope format branch, its soft fallback and unused scheduler/capture arguments. Existing complete composition and renderer own should-run output. | Status, plan and monitor remain diagnostic projections. The request owner already permits `--turn-envelope` only on should-run; that alias selects no second current contract. No byte saving is credited to deleting unreachable branches. | -| Managed fresh quota preview → loop disposition | Compose the full source with the actual scheduler context; remove `TurnControllerInput`, its private JSON copy, `build_turn_controller_input` and the TypeScript `build_controller_input` operation. Reuse checked complete planning facts for disposition. | The managed controller keeps its observation/retry and journal ownership. Historical v0 decisions alone retain their scalar route codec. | -| Complete plan/capture/journal → reader and resume | Retain the preceding single-source v1 migration and its original source/header checks. Normal preview no longer rebuilds its v0 adapter. | Recorded v0 and transitional journals retain explicit readers until their outstanding work and supported recovery/rollback window are reconciled. Malformed v1 never falls back to them. | -| Explicit legacy envelope builder and historical renderer | No new ordinary product caller remains for the legacy builder. Complete rendering still reuses the existing renderer module. | `control_plane_composition_scenarios`, `model_behavior_corpus` and original-version controls still construct legacy inputs. Retire a legacy constructor/decoder only after the last supported fixture/replay caller and version window migrate; preserve independent historical negative coverage. | - -A reproducible maintenance drill temporarily adds one missing synthetic-material -check to the existing complete-source validator, then restores the owner file -byte-for-byte. The same four real CLI/provider cases run against integrated -baseline `856faed423620` and the candidate: File/SQLite quota refusals pass on -both; the two managed refusals fail on baseline and pass on candidate. One -production owner edit and zero caller edits now reach both entries; the former -managed path needs a separate migration. The temporary check is not shipped as -a new production read gate. This proves that maintenance boundary, not natural -model compliance or Goal acceptance. - -The durable eight-case source/unknown-action matrix likewise has four managed -failures and four quota controls passing on that baseline, then eight passes -on candidate. It checks actual isolated providers, original supporting evidence -including unsafe integers/integral floats, no journal mutation and no debit. -The affected source cohort passes 408 Python cases and 76 focused TypeScript -cases. Twenty-two stale integration-fixture failures were reproduced on the -unchanged baseline before correction: retry injection targeted a retired helper -statement, complete planning used a newer operation, sender validation moved -earlier, and historical controls had incorrectly used current v1 producers. -Corrections retain receiver refusal, original-version and retry negatives; -those historical failures are not erased or counted as candidate regressions. - -After integrating main `d4aaaaefbd37`, the expanded source cohort passes 427 -cases, including the public lane fence and complete journal recovery. Integration -retains main's typed casts together with complete-source Goal/Agent checks; an -initial missing `cast` import was exposed by the lane check and repaired. The -isolated installed wheel passes the eight-case matrix and two native synthetic -transactions plus once-only replay on each of File/SQLite. Package provenance -is checked independently of source-only test helpers. A stale frontend bundle -initially held wheel building; rebuilding the existing bundle restored it. - -Standard premerge still has a maintainability hold and no exact-scope quality -receipt. A real Git checkout of the same main reproduces four module-metric -findings; the candidate additionally exceeds the existing quota-emitter -decision-function limit at 62 decision points/74 statements. No ceiling or -exception is raised here. The remaining original size holds likewise remain -failures; passing the focused cohort is not a passing whole-PR merge gate. - -This remains an unmerged source proposal. No candidate installation, default -change, model run, budget relaxation or C1 closure follows from these checks. -The original-quota cost comparison below is separate from the earlier adjacent -plan/journal savings and from the still-open natural accepted-outcome gate. - -### Original-quota product-path cost observation +| Turn CLI & launch decision → plan | Passes complete source directly; planner refuses complete source paired with a v0 adapter. | Default inspection retains full source, portfolio, and writeback without becoming executable (`12,388 → 26,524 B` readback delta). | +| Capture → Host / `turn_driver` / MCP / DSH / Ark | `host_dispatch_context` & `driver_lineage` check complete source & `selectedWorkTodo` once before dispatch, session lineage, or completion intent. | Omitted contracts retain historical v0 decoding; explicit `null`, non-object, malformed, or source/adapter-mismatched `work_contract` refuses before Host/writeback/spend. | +| Journal write, inspection & resume | Validates v1 and transitional `v0+work_contract` via shared TypeScript reader; enforces hard-lease execution key & lock sharing before `turn/start`. | Source-absent v0 records keep raw identity checks and original bytes during their supported recovery window (`14` File/SQLite plan JSON `-29.33%`, journal bytes `-28.32%`, final Host bytes equal). | -The frozen original-main baseline is `5f1a9d78ba7ac`, not the adjacent private-plan -baseline. Candidate runtime content is pinned to `b8c2bf1dc`, before the later -mainline integration; later source validation does not remeasure this cohort. -Both snapshots use Python 3.12.15, the same frozen numbered-artifact -task, isolated File/SQLite stores, equal-width namespaces and native context -delivery. Each of twelve scenarios reads the returned entry and every required -continuation, creates the same artifact, passes its independent validator, -writes back, spends once and verifies an idempotent spend replay. Artifact -SHA-256 agrees in all twelve cases. This is synthetic acceptance of that small -task; it does not establish equal natural-model outcomes or equal decision -obligations across the two packet versions. - -Cold starts an isolated runtime. Warm includes its preparatory guard/read; -post-compaction additionally runs the actual PreCompact/PostCompact CLI hooks -before the next admission. The latter measures baseline invalidation, not a -resume of interrupted business effects. Setup is excluded. Preparation failures -remain recorded separately; the table uses the completed final comparison -cohort only. - -The primary metric is `1 - selected BODY file bytes / same full capture bytes`. -It excludes reader envelopes and other output; those are counted separately. - -| Provider / scenario | Original quota: capture → BODY (reduction) | Candidate: capture → BODY (reduction) | -| --- | ---: | ---: | -| File / cold | 59,033 → 28,446 (51.81%) | 55,416 → 55,416 (0%) | -| File / warm | 58,464 → 6,419 (89.02%) | 54,849 → 9,411 (82.84%) | -| File / post-compaction | 58,582 → 28,562 (51.24%) | 54,963 → 54,963 (0%) | -| SQLite / cold | 59,121 → 28,530 (51.74%) | 55,500 → 55,500 (0%) | -| SQLite / warm | 58,552 → 6,344 (89.17%) | 54,937 → 9,397 (82.89%) | -| SQLite / post-compaction | 58,674 → 28,648 (51.17%) | 55,055 → 55,055 (0%) | - -Candidate full fallback retains the full source; its 0% BODY reduction does not -mean zero net benefit. Actual initial reads select their required material -instead of printing that entire BODY. Conversely, a smaller warm delta does -not guarantee a cheaper initial read: the candidate's current initial read -still supplies complete required context. - -| Provider / scenario | All stdout bytes, original → candidate | RPC calls, original → candidate | Framed socket bytes, original → candidate | -| --- | ---: | ---: | ---: | -| File / cold | 55,815 → 48,709 | 236 → 237 | 1,454,525 → 1,547,159 | -| File / warm | 67,522 → 76,353 | 325 → 327 | 2,128,926 → 2,348,959 | -| File / post-compaction | 89,968 → 75,700 | 327 → 329 | 2,132,977 → 2,343,467 | -| SQLite / cold | 56,212 → 49,086 | 236 → 237 | 1,456,277 → 1,548,893 | -| SQLite / warm | 67,849 → 76,806 | 325 → 327 | 2,131,180 → 2,351,673 | -| SQLite / post-compaction | 90,461 → 76,149 | 327 → 329 | 2,135,847 → 2,346,351 | - -All stdout includes guard headers, required reader pages, preparation/hooks, -writeback and spend/replay responses. Both versions use 5/7/9 CLI processes -and one independent validator for cold/warm/post-compaction; there are no help -or failed-command retries inside this final cohort. Readiness pings and framing -are included in RPC counts/bytes; neither side uses referenced RPC snapshots. - -One-time preparation must not be charged again for every steady warm step. -Separating that measured preparation, the current warm operation adds -15,936 File / 16,083 SQLite stdout bytes, while a cold operation saves -7,106 / 7,126. One measured cold byte saving would not pay for one measured -warm increment on this workload. This is conditional byte accounting, not a -prediction of a real session's event mix, tokens, invoices or outcome value. - -Capture IO also grows. Observed Python capture reads/writes on File are -186,399/189,228 → 277,768/238,234 bytes cold, -387,693/392,774 → 664,229/495,634 warm, and -430,659/378,418 → 664,963/475,336 post-compaction. SQLite shows the same -direction. Observed journal bytes and retained provider-state footprint agree -within each matched scenario; retained capture footprint grows by -24,503–51,506 bytes. These are Python regular-file traffic and retained disk -sizes, not physical IO or write amplification. Node/provider IO and native -SQLite page IO remain unmeasured. Process wall time includes Python startup -and wrappers; one observation per condition does not qualify latency. No model -requests, cache/invoice coverage or human-attention cost is measured here. -The main-path byte/RPC regressions and the original size holds remain open; -adjacent plan/journal savings cannot offset them by declaration. - -### Prepared initial-reader transport - -The subsequent reader increment is compared against integrated `86081b142c62`, -not against the original-quota cohort above. Capture generation already asks -the TypeScript selection owner for current initial navigation. It now pins that -owner's resolved addresses with the existing immutable selection cursor, which -the opaque first reader reuses. The reader still checks the complete source -and selected-view digests on every page; selected values come from the original -Python JSON bytes, including unsafe integers. Unselected prose no longer crosses -the runtime bridge a second time. The raw `--initial-read` recipe, explicit -readers and complete recovery remain available. Optional metadata write failure -keeps the raw recipe; an unsupported historical schema uses generic discovery -with one additional bounded selection RPC. A startup/transport failure does -not retry the runtime. - -The independent same-capture oracle preserves the exact selected body and its -unknown obligations. No additional BODY compression or model-input saving is -credited to this change. In particular, warm initial reads still need current -required facts; an old delta or saved cursor grants no retention or freshness. - -The same numbered-artifact fixture, Python version, providers, preparation, -compaction hooks, validator and once-only settlement are replayed in twelve -isolated cases. All artifacts agree. Full-path socket traffic falls modestly; -RPC counts remain 237 / 327 / 329 for cold / warm / post-compaction on both -versions, including pings. - -| Provider / scenario | All stdout bytes, base → candidate | Framed socket bytes, base → candidate | -| --- | ---: | ---: | -| File / cold | 48,258 → 48,293 | 1,541,169 → 1,509,780 | -| File / warm | 75,583 → 75,664 | 2,337,709 → 2,275,365 | -| File / post-compaction | 74,963 → 75,033 | 2,333,325 → 2,270,641 | -| SQLite / cold | 48,635 → 48,670 | 1,542,959 → 1,511,454 | -| SQLite / warm | 76,036 → 76,117 | 2,341,764 → 2,276,882 | -| SQLite / post-compaction | 75,412 → 75,482 | 2,336,165 → 2,273,331 | - -Current initial-reader stdout is byte-identical in each pair; its socket traffic -falls from approximately 60 KB to 30 KB. The longer cursor path adds 35 / 81 / -70 stdout bytes across the complete cold / warm / post-compaction flows. -SQLite Python-observed capture read/write bytes are -276,540/236,976 → 280,522/237,574 cold, -661,271/492,992 → 669,177/490,960 warm, and -662,043/472,836 → 669,965/474,028 post-compaction. File shows the same increased -read cost; visible journal bytes agree. Cursor preparation adds local work and -retained metadata. Native provider IO, model/cache invoices and natural outcomes -remain unmeasured; single wall-clock observations do not qualify latency. -Neither the original-quota warm regression nor the existing size/quality holds -is cleared by this adjacent transport improvement. - -The same-capture transport regression fails on the frozen base while its raw -reader control passes. The initial eleven-module source run records 647 passes, -78 skips and four failures: two navigation tests still invoked the now-prepared -model cursor as a fresh recipe, and two historical staged-reader fixtures also -fail on the unchanged base. Their explicit raw/historical controls are retained; -the final three affected modules pass 103 cases. The actual installed wheel -passes the same 103 cases, with installed module and CLI-child routing checked. -An initial wheel attempt omitted the repository runtime-isolation fixtures and -is rejected as evidence. The default-route fixture now refuses before writing -unless both roots belong to its disposable test base; the repaired package -qualification loads the original isolation fixtures. Source isolation checks -pass 21 cases and a missing-isolation negative leaves synthetic roots untouched. -Standard premerge passes seven direct checks and eighteen of nineteen selected -checks; the same five maintainability findings remain a hold. No ceiling, -exception, merge authority or natural-outcome acceptance is changed. - -### Native command ownership and settled receipts - -The next normal native caller adopts the already shipped -`refresh-state --settle-turn` adapter. Its complete-source plan is -`quota_settlement_plan_v2`: writeback invokes that adapter with explicit receipt -output, and quota spend is runtime-owned rather than a second unconditional -Agent command. Completion, claim/lease, original identity, Vision authoring and -terminal conditions retain their existing obligations. A partial failure still -returns the canonical original `settlement_owed`; there is no extra admission, -automatic retry or direct-debit bypass. Native-off/manual v1, historical readers, -replan successor creation and callback-owned runners retain their paths. - -Receipt output is an explicitly selected post-effect result projection, not a -new admission input or a context-retention claim. Exact receipts and unresolved, -failed or unknown controls remain visible. Known supporting snapshots remain -complete in an immutable result with the originating CLI reader. Failed capture -delivery preserves committed receipts and permits exact-identity retry. A real -replay test also exposed that the old combined adapter returned only the first -two receipt steps on refresh replay despite reporting settled state. Replay now -independently reads all three original receipts without executing another child -or debit. Existing quota presentation IO is separated within its existing owner. - -Three implementations run the same frozen numbered-artifact workload on Python -3.12.15: original quota `5f1a9d78ba7a`, integrated C1 `898aaa9d0c33`, and this -runtime increment. Eighteen isolated File/SQLite cold, warm and post-compaction -cases produce identical independently checked artifacts and one debit each. -The child CLI's RPC and Python IO are included, using an import observer that -waits for the pinned package rather than importing LoopX from its working -directory. Agent CLI calls fall 5/7/9 → 4/6/8; one internal CLI child means total -CLI process counts remain 5/7/9. RPC counts include pings and that child. - -| Provider / scenario | All stdout B: original / integrated C1 / increment | RPC: original / integrated C1 / increment | Socket B: original → increment | -| --- | ---: | ---: | ---: | -| File / cold | 55,622 / 48,556 / 39,643 | 236 / 237 / 231 | 1,452,338 → 1,577,844 | -| File / warm | 67,302 / 76,098 / 66,385 | 325 / 327 / 321 | 2,125,470 → 2,350,007 | -| File / post-compaction | 89,643 / 75,454 / 65,676 | 327 / 329 / 323 | 2,129,249 → 2,345,468 | -| SQLite / cold | 56,020 / 48,933 / 39,982 | 236 / 237 / 231 | 1,454,093 → 1,579,746 | -| SQLite / warm | 67,723 / 76,551 / 66,792 | 325 / 327 / 321 | 2,128,276 → 2,352,873 | -| SQLite / post-compaction | 90,133 / 75,903 / 66,079 | 327 / 329 / 323 | 2,132,085 → 2,348,364 | - -The primary metric remains bytes from each complete capture to its own selected -BODY file. These are separate from initial-read pages and all stdout above. - -| Provider / scenario | Original F → BODY B | Increment F → BODY B | -| --- | ---: | ---: | -| File / cold | 58,907 → 28,329 | 54,498 → 54,498 | -| File / warm | 58,338 → 6,408 | 53,925 → 8,605 | -| File / post-compaction | 58,458 → 28,446 | 54,027 → 54,027 | -| SQLite / cold | 58,995 → 28,414 | 54,578 → 54,578 | -| SQLite / warm | 58,426 → 6,420 | 54,005 → 8,613 | -| SQLite / post-compaction | 58,546 → 28,530 | 54,107 → 54,107 | - -Warm same-capture BODY reduction is 84.04% / 84.05%, against original -89.02% / 89.01%. The candidate's cold and post-compaction rates remain 0%. - -Full BODY fallback remains 0% reduction, not zero net value. More importantly, -removing one-time preparation still leaves the current warm step at -33,603 → 40,558 B (File) and 33,932 → 40,901 B (SQLite), about 7 KB above original -quota. The approximately 1.4% improvement in warm *total* stdout includes the -smaller one-time preparation and does not clear that recurring regression. -Warm Python-observed CLI reads/writes are -636,750/451,370 → 919,810/591,486 B (File) and -645,056/454,206 → 928,728/595,466 B (SQLite). Node/provider/native page IO, model -usage/cache/invoices and natural outcomes remain unknown. Concurrent byte -characterization does not qualify latency. Validator calls/output are counted; its file IO is not measured. The final-head -repetition changes warm BODY from 7,799/7,807 to 8,605/8,613 B while stdout is -identical; each capture retains its own denominator, not a stable-ratio promise. -Whole-workflow net benefit and C1 completion remain open; the remaining targets are repeated warm control input -and duplicate snapshot/transport IO, not another runner or a weaker obligation. - -The integrated runtime at `5aa46dc27de8` passes all ten affected Python modules -(419 passes, 10 skips), TypeScript typechecking and 243 focused TypeScript tests. -Its actual isolated wheel passes 245 cases with 10 skips; 1,181 loaded Core -modules and 392 CLI child routes resolve to that installation. Earlier fixture -failures remain recorded: stale v0 assertions, a metadata-length-dependent -UTF-8 offset and an implicit producing working directory were corrected using -their independent current semantics. Failed result capture, oversized unknown -controls, wrong bindings/workspaces, lost responses and exact replay have real -CLI coverage. Standard premerge reports seven direct checks and nineteen -selected checks, with one inherited maintainability advisory. The raw ratchet -still fails on four untouched baseline modules; the former quota-emitter -finding is absent. No ceiling, exception or historical failed result changes; -this is neither an exact-scope quality receipt nor merge/readiness authority. - -### Settled snapshot replay and repeated original-quota comparison - -The output-IO increment at `4ef428767ce9` treats a completed `current` Todo -projection like its already supported `delivered` state. Strictly known inactive -runtime-route, shared-projection and Explore snapshots also use the existing -immutable result reader. No additional RPC, cache, permission owner or setting -is introduced. This is Python file/output IO over existing TypeScript facts; -settlement, freshness and permissions still belong to their typed owners. -Unsettled/error/dry-run results, unknown nested fields, route conflicts, -projection retries, copied artifacts and blocking postconditions remain inline. -The original identity, three receipts and unsatisfied Vision checkpoint remain -visible; reading the full stored result proves neither acceptance nor retention. - -A new matched cohort freezes main `f04ec308f6e7` and this candidate, with the -same numbered-artifact Task, necessary materials, independent check and one -debit. Three repetitions across File/SQLite and cold/warm/post-compaction give -36 cases and 252 verified parent/child source/executable observations. Table -values are medians of the three observations, in bytes; `current` excludes -one-time baseline preparation. Preparatory output remains in `all stdout`. - -| Provider / scenario | All stdout B: main → candidate | Current stdout B: main → candidate | RPC | Framed socket B | -| --- | ---: | ---: | ---: | ---: | -| File / cold | 55,570 → 36,270 | 55,570 → 36,270 | 236 → 203 | 1,451,832 → 1,437,675 | -| File / warm | 67,892 → 62,991 | 34,239 → 37,183 | 326 → 284 | 2,127,817 → 2,152,912 | -| File / recovery | 89,549 → 62,276 | 55,764 → 36,392 | 328 → 286 | 2,131,374 → 2,147,978 | -| Sqlite / cold | 55,963 → 36,344 | 55,963 → 36,344 | 236 → 203 | 1,453,556 → 1,439,471 | -| Sqlite / warm | 68,313 → 63,133 | 34,568 → 37,261 | 326 → 284 | 2,130,625 → 2,155,458 | -| Sqlite / recovery | 90,038 → 62,414 | 56,165 → 36,466 | 328 → 286 | 2,134,204 → 2,150,686 | - -The recurring warm step is still **8.60% / 7.79% larger** (File/SQLite), while -RPC count is 12.88% lower and framed bytes are 1.18% / 1.17% higher. Warm -Python-observed reads+writes are 787,482 → 813,035 B and -796,984 → 822,778 B (medians of each direction summed), about 3.2% higher. -Counts and byte observations do not qualify CPU/latency while other validation -runs concurrently; native provider/SQLite-page IO and real model cache, input, -generated output, invoices and natural effectiveness remain unknown. - -This increment changes settlement output, not guard BODY selection. In the -first repeat, warm complete-capture F → selected BODY is -58,306 → 7,082 B versus 53,899 → 8,579 B (File), and -58,396 → 7,094 B versus 53,979 → 8,609 B (SQLite). Each rate uses its own -same-capture UTF-8 files. Candidate cold/post-compaction BODY is full, so its -primary reduction remains 0%; that does not imply zero workflow value. Warm -candidate rates vary 82.62–84.08% / 82.64–85.44% across these repetitions, -with no new BODY saving attributable to this output-only change. - -A separate component comparison applies the old `9380173c` and new output IO -to identical captured settled payloads. Warm first-result plus replay saves -3,347 / 3,612 B. If a consumer actually requests all newly deferred fields -from both results, the real selected readers add 5,434 / 5,723 B and two RPCs: -that component instead costs about 2.1 KB more. An equal-demand-probability -byte-only proxy breaks even near 62% / 63%; demand is unmeasured, and neither -that proxy nor this fixed Task establishes model/billing net benefit. There is -no new mandatory detail-read gate. - -Seven complete affected Python modules pass 360 cases; the isolated actual -wheel passes 241 cases using the original test configuration/conftest and -default-root isolation. All 1,185 loaded parent Core modules, 1,186 child CLI -routes and 1,199 Core-loading child import audits resolve to that wheel. -Real File/SQLite caller tests recover the full result, preserve one debit and -all receipts on replay, and keep future or actionable nested controls visible. -These are source/packaged output qualifications, not installed adoption or -whole C1 acceptance. Historical cohorts, failures and frozen budgets above -remain intact. The remaining recurring warm-input and total-cost gap is open. - -### Composed Vision budget recovery - -The existing Vision prepare owner now returns independent numeric budget -diagnostics together through the shared bounded request-error transport. -C1 consumes the same rule through its complete capture and returned composed -settlement command. Five independent numeric failures cause one refusal; -oversized enum text retains its budget error, while a short invalid enum still -rejects. No limits increase, authored-packet rewriting or new decision owner is -introduced. File/SQLite tests preserve the source state and run index on every -refusal. Explicit correction, independent history readback and replay retain -the complete packet, original Turn, three receipts and exactly one debit. - -A fixed caller compares the frozen preceding C1 head `75c05340b6ce` with the -integrated product code. Both sides correct only fields actually named in the -error, reach the same final packet and settle once without another guard. -Equal-width namespaces and the same Python isolate this retry segment. The -accounting child is included: seven Python processes before, three after, per -provider. Equal fixture setup, admission and independent verification are -outside both measured segments. - -| Provider | CLI attempts | Stdout B | RPC | Framed socket B | Observed Python read B | Observed Python write B | -| --- | ---: | ---: | ---: | ---: | ---: | ---: | -| File | 6 → 2 | 11,473 → 9,269 | 137 → 133 | 822,570 → 817,482 | 131,460 → 116,843 | 39,169 → 39,193 | -| SQLite | 6 → 2 | 11,499 → 9,279 | 137 → 133 | 823,294 → 818,206 | 131,962 → 117,297 | 39,285 → 39,309 | - -The first rejection is larger; the complete retry segment emits about 19.2% -less stdout, uses 2.92% fewer RPCs and about 0.62% fewer framed bytes. Observed -Python reads fall about 11.1%; writes increase by 24 B. Native provider IO, -latency, real model corrections, input/cache/generated output and billing are -not measured. This is a deterministic error-recovery improvement relative to -the preceding C1 head, not a new comparison with latest main, a new same-capture -BODY reduction or a qualification of the original quota workload's overall net -benefit. Its warm-input regression and all frozen holds above remain open. - -### Native ready handoff on the complete contract +## Current quota and managed-controller cutover -This integration includes main `bd79adc64968` and the existing Host ready-source -handoff. The unchanged handoff forced its ready recheck to `context-delivery -off`; inside C1 that replaced the enabled complete composer's combined -settlement with the older split plan. A new independent assertion fails in all -four real File/SQLite × App/SSH paths before the correction. The thin adapter -now preserves the enabled native profile and uses the existing deferred-display -option. It captures the complete ready source before the existing saved-capture -owner presents it once. No new flag, semantic owner, RPC or authority is added. +C1 removes normal quota presentation's duplicate v0 builder branch and aligns +managed `turn managed-step` fresh preview and `refresh-state --settle-turn` with +the same TypeScript decision, route, and `quota_settlement_plan_v2` owners. -| Actual caller | Replaced behavior | Shared owner and remaining boundary | +| Replaced caller / surface | Shared owner & deletion | Remaining boundary & obligation | | --- | --- | --- | -| Bound native execution preparation | Forced-off ready recheck | Existing complete composer retains mandatory context and combined settlement; Python only forwards the native directory/display mode | -| Host post-tool context | Model must recover the missing ready contract with another guard | Existing capture/reader publishes the verified same-Turn source and original claim reference | -| Prepared native closeout | Active prepared caller receives the split v1 plan | Existing v2 settlement owner supplies the combined operation and three receipts; old records and unbound/off callers retain their original recovery contracts | - -The complete Goal is checked against the independent original text, inline or -through an actually declared read. Off remains inert; identity mismatch, corrupt -source, replay and once-only accounting checks remain. This fixes consumer -adoption, not the separate requested semantic-rule-change exercise or the final -historical-reader retirement. Those C1 acceptance boundaries remain open. - -Seven complete affected source modules and the actual isolated wheel each pass -280 cases, with 70 existing opt-in skips. The wheel's 1,897 compared product -files match; 235 completed processes and 44,758 Core-module observations show -no checkout-origin violation. Abrupt exits remain outside exit-time auditing. -The initial source run retains 279 passes, one stale reader-program assertion -failure and 70 skips; the existing reader-program correction is reused, and its -whole 20-case module passes before the final full run. Failed caller pilots -requested the wrong legacy view or reused a capture directory; their failures -are retained, not counted as completed comparisons or fixed by relaxing capture -immutability. No active App/CLI installation is claimed. - -The new hard-lease cohort uses the frozen public numbered Task, stopping at -step three. Cold completes step one; warm/recovery first validate and settle -step one, release its lease, then admit and validate step two. Recovery runs -the actual PreCompact/PostCompact hooks before that second Turn. Both arms use -the original quota entrypoint, identical material, equal-width namespaces, one -Python and one observer, with each parent/child importing its pinned product. -This is separate from the historical soft-claim 36-condition cohort below. - -Three repeats across both providers, scenarios and arms give 36 conditions and -60 independently checked work Turns. Each reaches the same artifact within its -scenario, three committed receipts and one debit per Turn, including replay. -All 654 parent/completed-child source observations and 640,896 module origins -match their arm; product source hashes remain unchanged. Parent RPC totals -already include children. Whole columns include the completed preparation work; -current columns exclude it but retain compaction hooks. Tool output, all -necessary reads, Host execution, writeback, spend, readback and lease release -are included. Values are three-observation medians: - -| Provider / scenario | Whole stdout B | Current stdout B | RPCs | Framed RPC B | Python fixture read B | Python fixture write B | -| --- | ---: | ---: | ---: | ---: | ---: | ---: | -| file / cold | 57,597 → 45,996 | 57,597 → 45,996 | 423 → 288 | 2,938,704 → 1,929,733 | 720,046 → 662,664 | 302,925 → 272,952 | -| file / warm | 118,430 → 95,236 | 60,833 → 49,240 | 843 → 578 | 6,271,394 → 4,130,344 | 1,926,283 → 1,700,979 | 675,761 → 593,384 | -| file / recovery | 118,202 → 94,776 | 60,269 → 48,556 | 845 → 580 | 6,259,244 → 4,112,058 | 1,942,194 → 1,715,504 | 656,353 → 573,186 | -| sqlite / cold | 58,016 → 46,112 | 58,016 → 46,112 | 423 → 288 | 2,943,792 → 1,932,217 | 737,286 → 677,202 | 304,783 → 275,281 | -| sqlite / warm | 119,272 → 95,472 | 61,256 → 49,360 | 843 → 578 | 6,281,728 → 4,136,666 | 1,965,207 → 1,734,459 | 679,477 → 598,310 | -| sqlite / recovery | 119,040 → 95,008 | 60,688 → 48,672 | 845 → 580 | 6,269,816 → 4,117,784 | 1,981,156 → 1,748,980 | 660,103 → 577,919 | - -Warm whole stdout falls 19.58% / 19.95%, RPCs 31.44%, framed bytes 34.14% / -34.15%, and observed fixture Python read-plus-write bytes about 11.8%. Current -step stdout falls 19.06% / 19.42%. These are cumulative C1 comparisons, not -attribution of every reduction to this small integration correction. The warm -wire ranges are file: main 6,271,290–6,271,572; candidate 4,130,308–4,130,664; sqlite: main 6,281,492–6,281,936; candidate 4,136,236–4,136,704. No statistical significance is claimed. - -The primary metric uses each producer's original complete `decision.json`, not -an already projected recovery document. All 60 producer/BODY pairs verify the -original Turn and controls plus published recovery/selected digests: - -| Provider / scenario | Main producer F → BODY B (reduction) | Candidate producer F → BODY B (reduction) | -| --- | ---: | ---: | -| file / cold | 60,084 → 27,993 (53.41%) | 53,873 → 27,291 (49.34%) | -| file / warm | 75,126 → 28,022 (62.70%) | 61,271 → 27,230 (55.56%) | -| file / recovery | 75,342 → 28,135 (62.66%) | 61,465 → 27,376 (55.46%) | -| sqlite / cold | 60,310 → 28,201 (53.24%) | 54,091 → 27,436 (49.28%) | -| sqlite / warm | 75,352 → 28,195 (62.58%) | 61,491 → 27,434 (55.39%) | -| sqlite / recovery | 75,568 → 28,319 (62.53%) | 61,683 → 27,530 (55.37%) | - -Candidate warm BODY is smaller in absolute bytes, while its reduction percentage -is lower because its complete producer source is also smaller. Neither ratio -replaces the complete caller comparison. File-backed delta does not establish -model retention. Referenced RPC snapshot payload bytes are observed as zero in -this cohort; provider/native/SQLite-page and full-process IO remain unmeasured. -CPU/latency, actual model input/cache/generated output, fees, natural adoption -and long-horizon net benefit remain unqualified. All earlier positive/negative -cohorts, frozen budgets and original outcome requirements retain their versions; -this source/package result is neither merge readiness nor complete C1 acceptance. +| Quota `_project_quota_cli_payload` & `should-run` | Deletes v0 builder fallback branch; `should-run` emits composed `loopx_turn_envelope_v1` or original pre-decision failure diagnostic only. | Rejected composition (`quota_decision_transport_failed`) saves `source_diagnostic`, `composition_error`, and original `heartbeat_receipt` with `ok=false`/`should_run=false`, zero handoff, and zero spend. | +| Managed fresh preview & `managed-step` | `compose_turn_decision`, `completePlanningFacts`, and fused envelope/route call remove `TurnControllerInput`, `build_turn_controller_input`, and `build_controller_input`. | Failed Turn journals retain raw v0 decoding; injected signed v0 preview at live boundary is refused before Host/journal/spend. | +| Bound CLI, Kiro, DSH, SSH, EdgeBench & Windows bounded recovery | Explicit `--complete-turn` / bound Agent+Turn `should-run`, generated onboarding launchers, and Windows/PowerShell private-directory reservation (`1,700 B` cap passes; `96 B` refuses pre-admission). | Explicit `--turn-envelope` with `--context-delivery off` remains bounded v0 linked to immutable v1 capture; ordinary unbound/turnless adoption remains unapproved (§9 gate). | ### Executable required reads and native-runner attribution -A current complete source now validates explicitly executable required reads in -`assertInteractionRequiredReads`, beside the existing interaction owner. A read -that declares a command or ordering must retain a non-empty, NUL-free command; -its explicit ordering must be the registered `before_work`. Prose-only -obligations, unknown supporting metadata, quoted Unicode commands and an omitted -historical ordering remain unchanged. A valid unread obligation stays pending: -this check neither acknowledges reading nor creates a blanket material-read gate. - -| Changed boundary | Actual owner / caller change | -| --- | --- | -| Executable read semantics | One TypeScript interaction validator; one call from the existing complete-source validator. Quota, managed preview, planning and Host consumers retain their existing calls. No Python rule or extra RPC is added. | -| Unsupported direct complete source | The Python transport preserves an explicit `contract_binding`, including an unsupported version, for the typed planning reader instead of trying the legacy adapter. | -| Qualification callers | Move stale CLI fault injection from the removed envelope builder to actual complete composition; preserve explicit historical version negatives. Use real canonical hard-lease inventory and the actual artifact workspace instead of mocked admission or incidental Git checkout discovery. | - -On unchanged `f1614358ac13`, the eight new File/SQLite quota/managed refusal -cases fail while eight existing valid/unknown-action controls pass. The shared -rule reaches both entries without changing either caller. A first implementation -also rejects a legitimate prose-only obligation; its original full-text test -exposes that mistake, and the implementation is corrected without removing that -assertion. A separate real Turn CLI case checks unsupported version/codec and a -correctly hashed unsupported read order before Host launch or debit. This is a -bounded semantic-rule change, not independent review or proof of model compliance. -Registry hook admission and recorded-version readers retain their distinct owners; -a new registered ordering would still require that protocol's own review. - -After integrating main `92294e7245cb`, the final eight complete Python modules -pass 196 cases on both source and the actual isolated wheel; the wheel has 1,897 -byte-matching packaged source files, 325 completed-process and 103,615 Core-module -origin observations with no checkout contamination. Abrupt process exits are -outside that exit audit. The six relevant TypeScript modules pass 121 cases, -and full control-plane -typechecking and changed-file Ruff pass. The earlier broad 178-pass/7-failure -source and 168-pass/17-failure wheel runs remain recorded. Corrections preserve -the original assertions: actual composition injection replaces six stale -constructor hooks; the frontier fixture uses canonical authority; wheel helpers -are copied explicitly, and writeback names the real artifact workspace. -Repository worker scripts remain explicit test callers; the origin audit qualifies -packaged Core, not a separately installed scheduler. The ordinary bundle is -rebuilt before packaging; no candidate is installed. - -The earlier 20,533-character premerge failure now has a matched native-runner -counterexample on both immutable main `bd79adc64968` and candidate -`f1614358ac13`. With one parent root, direct output is 20,333 characters and the -native runner is 20,501: its isolation component adds 21 characters to eight -fixture-root occurrences (168 total). The original premerge layout adds another -four-character directory, producing 20,533 on both revisions. After substituting -only the owned fixture root and observation timestamps, payload facts agree. -Every original assertion runs against the original 20,500 ceiling; neither paths -nor output are shortened for those measurements. This character-budget diagnosis -is separate from the UTF-8 complete-capture-to-BODY metric. - -[The existing fixture-calibration proposal](https://github.com/loopx-project/loopx/pull/8069) -owns that separate budget question. No calibration, skip or waiver is included -here; the failed premerge observation remains a failure. The preceding matched -cost cohorts keep their exact measured revisions and are not relabeled as a -measurement of this added validation. CPU, model usage, natural adoption and -long-horizon net benefit remain unknown. - -The legacy constructor's remaining in-tree calls are the explicit composition -and model-behavior qualification fixtures. Original-version journal/recovery -readers still need their supported work/window reconciliation; none is removed -just to make a retirement count. This slice neither retires those readers nor -closes the complete C1 acceptance. - -### Latest-main matched hard-lease comparison - -A separate repetition freezes main `92294e7245cb` against candidate -`b3b3b232724d`, including the executable-read validation above. The original -numbered Task, fixture, observer, shared Python and cold/warm/compaction-recovery -protocol are unchanged. Three repeats per arm/provider again produce 36 -conditions and 60 work Turns. All 1,914 product source hashes per arm remain -unchanged; 654 parent/completed-child observations and 640,896 Core-module -origins match their source. The complete original Task appears in each actual -consumed read. Every Turn keeps its original identity, three committed receipts, -one debit and the same accepted artifact for its scenario. This is engineering -qualification, without a model or an installed App rollout. - -The complete workflow includes the completed preparation Turn, all required -reads, native Host preparation, compaction hooks where applicable, writeback, -spend, replay/readback and lease release. Parent totals already include children. -The current-step column excludes completed preparation. Three-sample medians: - -| Provider / scenario | Whole stdout B | Current stdout B | RPCs | Framed RPC B | Python fixture read B | Python fixture write B | -| --- | ---: | ---: | ---: | ---: | ---: | ---: | -| file / cold | 57,221 → 45,732 | 57,221 → 45,732 | 423 → 288 | 2,930,378 → 1,924,529 | 715,582 → 658,504 | 301,509 → 271,509 | -| file / warm | 117,662 → 94,692 | 60,441 → 48,960 | 843 → 578 | 6,254,008 → 4,120,060 | 1,916,435 → 1,691,969 | 672,788 → 590,508 | -| file / recovery | 117,450 → 94,248 | 59,893 → 48,292 | 845 → 580 | 6,241,950 → 4,101,350 | 1,932,262 → 1,706,384 | 653,451 → 570,267 | -| sqlite / cold | 57,640 → 45,848 | 57,640 → 45,848 | 423 → 288 | 2,935,504 → 1,927,053 | 732,814 → 673,042 | 303,374 → 273,849 | -| sqlite / warm | 118,504 → 94,928 | 60,864 → 49,080 | 843 → 578 | 6,264,426 → 4,125,624 | 1,955,379 → 1,725,427 | 676,528 → 595,288 | -| sqlite / recovery | 118,288 → 94,480 | 60,312 → 48,408 | 845 → 580 | 6,252,476 → 4,107,176 | 1,971,260 → 1,739,860 | 657,195 → 575,088 | - -Warm whole stdout falls 19.52% / 19.89%, RPCs 31.44%, framed bytes 34.12% / -34.14%, and observed Python fixture read-plus-write bytes 11.85% / 11.82%. -Current-step stdout falls 19.00% / 19.36%. Warm framed-byte ranges are file: -main 6,253,744–6,254,276, candidate 4,119,902–4,120,628; SQLite: main -6,264,262–6,264,682, candidate 4,125,580–4,125,850. No significance is inferred. -Observed warm request counts include `quota.turn_envelope.evaluate` 20 → 10, -`todo.context.page` 178 → 62, and capability-hook validation 8 → 4. These are -cumulative C1 differences, not savings attributable to the new read validator. - -The primary metric remains the same producer's complete capture F → selected -BODY. All 60 pairs match the published producer capture digest, recovery and -selected-file digests, original identity and control facts: - -| Provider / scenario | Main F → BODY B (reduction) | Candidate F → BODY B (reduction) | -| --- | ---: | ---: | -| file / cold | 59,828 → 27,845 (53.46%) | 53,649 → 27,120 (49.45%) | -| file / warm | 74,870 → 27,797 (62.87%) | 61,049 → 27,072 (55.66%) | -| file / recovery | 75,086 → 27,921 (62.81%) | 61,241 → 27,194 (55.60%) | -| sqlite / cold | 60,054 → 28,062 (53.27%) | 53,867 → 27,274 (49.37%) | -| sqlite / warm | 75,096 → 28,003 (62.71%) | 61,267 → 27,274 (55.49%) | -| sqlite / recovery | 75,316 → 28,131 (62.65%) | 61,459 → 27,403 (55.41%) | - -BODY is smaller while its reduction ratio is lower, because the full source is -also smaller. Saved-file delta is not model retention. This new cohort supports -lower measured engineering overhead at the same synthetic artifact outcome; -it does not replace older cohorts or establish lower model-generated output, -cached/uncached input, fees, native-provider/SQLite-page/full-process IO, CPU, -latency, natural adoption or long-horizon benefit. The original budget failure, -historical-reader obligations and complete C1 acceptance remain open. No gate, -default, scoring or runtime behavior changes in this measurement update. - -### Transitional journal intake - -The canonical resume loader checked a complete source only for current v1 -plans. Recorded v0 plans with a supplied `work_contract` instead took the raw -legacy identity branch, although the writer, ordinary inspection and settlement -lookup already rejected a changed source. The executing path still refused it -downstream; this is an inconsistent recovery intake, not evidence of an -unauthorized Host launch or debit. Explicit retry inspection likewise returned -its blocked observation instead of the v1 intake error. - -The loader now sends every supplied complete source through the existing -`turn_host_lineage`/TypeScript source owner, including the recorded transitional -source/adapter cross-check. Current v1 loads already use that call; transitional -loads add it. No normal-path RPC saving is claimed. Source-absent historical -plans retain their exact raw identity checks and original bytes. The change -does not impose whole-journal settlement consistency on plan loading: existing -recovery inspection remains responsible for those diagnostics. Plain invalid- -journal inspection still returns its structured blocked observation. - -The existing File/SQLite journal matrix now tests loader refusal for changed -content, unknown version, null/missing binding, conflicting adapter and signed -interaction/action/reference mutations. Numeric source values, current missing- -source refusal, bare historical loading and byte preservation remain controls. -The public `run-once --resume-turn-key` and explicit retry-inspection entries -exercise the same source refusal without rewriting history or spending quota. -The frozen pre-fix loader fails both transitional provider cases; after fixing -the CLI fixture's omitted required project argument, explicit retry inspection -also fails those two cases while both current-plan controls pass. Those are -distinct product and harness findings, not six product defects. - -The pre-integration recovery cohort passes 139 cases in both source and an -isolated installed wheel. Integration with main `2852eb453bef` preserves the -complete native handoff, both lifecycle assertions and shared TypeScript imports. -Its 81-case source cohort and 178 TypeScript cases pass. An interrupted source/ -wheel attempt has no terminal result and is not counted as a pass. - -The integrated wheel initially passes 67 cases and fails 14 settlement cases: -their subprocesses default to the source checkout, which accidentally satisfies -workspace verification there but cannot do so in an off-checkout installation. -A diagnostic observer identifies the real workspace refusal. The existing tests -now explicitly use their own producing project; all original assertions, bad- -workspace cases and once-only recovery controls remain. The complete affected -module then passes 23 cases in both source and the unchanged installed wheel; -58 unaffected cases passed in the earlier wheel cohort. This covers 81 distinct -cases across those cohorts, not one uninterrupted final 81-case run. All 1,898 -packaged source files match; the final 23-case wheel run observes 125 completed -processes and 64,109 Core module origins without checkout contamination. Sudden -exits remain outside that exit audit. Earlier failures remain recorded. - -This repairs a supported recovery consumer rather than deleting a reader to -increase retirement counts. Legacy constructors remain only in the named -historical/composition/model-behavior fixtures above; original outstanding work, -supported recovery windows, independent review and complete C1 acceptance still -govern retirement and adoption. The preceding cost cohort remains pinned to its -original main/candidate snapshots; this integrity change does not remeasure it. - -## Earlier integration evidence - -The integration preserves main's extracted quota-presentation owner and sparse -native journal transport. One existing numeric collector and validator replace -the candidate's duplicates. Acceptance, summary lanes, authoring and Vision -sharing reuse the existing source-identity/edit owners; ordinary JSON equality -cannot establish original numeric identity across the Python/JavaScript boundary. -Body-size decisions still compare serialized bodies, not identity framing. - -An independent 24-case Python-to-TypeScript regression first produced 16 failures -and eight passing controls. After the identity/edit repair, all 24 pass, including -integral floats, signed zero, unsafe integers, later exact authoring owners and -identical audit controls. The broader integration initially failed stale fixture -hash references and one absent-authoring CLI case; those failures remain evidence -and require separate corrected validation. This is source/transport evidence, -not installed adoption, accepted model outcomes or complete-cost qualification. - -The 2026-11-01 heartbeat consumer increment (`18b55e04d`) reuses the existing -heartbeat rule owner for routing, safety and complete work guidance in captured -native Goal input. Fresh on/off prompts share that wording; historical saved -bodies are not rewritten. Clause review retains the actor, authority, required -reads, original/cumulative outcomes, ordering, evidence, continuation and stops. -This removes a separately maintained prose copy, not a decision or settlement -owner, and changes no activation default or protocol. - -With the same CLI caller, 320-character scope, explicit CLI and five capability -flags, substituting only frozen `958eef4c` renderers gives 5,041/5,080 normalized -characters unbound/bound; the candidate gives 4,859/4,898 under the unchanged -4,900 allowance. Each candidate body saves 180 UTF-8 bytes. The longer-route -negatives remain over budget at 5,051/5,090. Captured native Goal input instead -grows 3,187→3,235 characters while staying below its unchanged 4,000 host limit. -These are generated-input measurements, not a full base-repository rerun, -control-packet compression, model adoption, token savings or outcome benefit. - -At that checkpoint, the consumer checks pass 114 prompt/platform cases with one platform skip and -12 real isolated File/SQLite CLI final-input/recovery cases using synthetic host -executables. The output/differential -matrix still has five failing tests: complete quota Markdown 30,462>10,000, -crowded plans 24,044/27,508>22,500, complete alias 24,252>13,000 and its separate -multi-agent probe 25,933>13,000. Its other 219 cases pass, with one skip. No -budget or population is relaxed, and the historical restoration allowance is -not inherited by the new wording. C1 cutover, remaining readers and the original -quota single-session outcomes/full-cost comparison remain open. - -The subsequent Markdown increment (`b852af5f7`, integrating target main -`035f7ac66`) removes nested pretty-print padding through the existing complete -Turn renderer used by both ordinary quota and the alias. Each root field has -its own line; every nested value, source clause and binding remains in one -parseable JSON block. JSON output, captures, native host input, legacy rendering -and decision/settlement owners are unchanged. The same-source comparison with -the frozen `f3ae16362` renderer includes the final stdout newline: - -| Synthetic source | Previous Markdown bytes | Current Markdown bytes | Saved bytes | Complete JSON bytes | -| --- | ---: | ---: | ---: | ---: | -| Small | 30,462 | 24,531 | 5,931 | 24,252 | -| Crowded | 47,237 | 37,846 | 9,391 | 37,555 | -| Crowded with Vision | 55,893 | 45,249 | 10,644 | 44,954 | - -Line counts fall from 860/1,214/1,361 to 69/72/73. Markdown still adds -279/291/295 bytes over the corresponding complete compact JSON; this removes -presentation padding, not semantic control-packet content. The complete-source -module passes 63 cases, including unknown facts, integral floats, signed zero, -unsafe integers and escaped instruction text. The integrated bounded-reader -buffer checks pass two cases. The output/differential matrix remains -219 passed, five failed and one skipped: small Markdown is now 24,531>10,000; -the other four failures retain their preceding sizes and limits. Historical -failures remain failures. No ceiling, fixture population or requirement changes, -and no model, invoice, installed-adoption or long-horizon benefit is qualified. - -The optional Host increment (`8316c9fa5`, subsequently integrating target main -`5a9c0a612`) moves Ark and MemT tool identity to the existing complete dispatch -owner through `extensions.turn_host.extract_turn_work_identity`. Complete input -uses the selected-work owner, including adaptive primary work; historical input -retains the providers' raw declared values and strict string/NUL checks. Session -lineage keeps its historical normalization. Fresh-context, source/projection -integrity and MemT exact-Goal-lifetime refusal remain in force. This retires two -provider-side identity decoders, not the remaining DSH, native-child, steward and -session-recovery compatibility readers or the executor's v0 transport. - -MemT candidate validation now retains the original request and complete source. -A real candidate conversion followed by source invalidation was previously -accepted by this local check; it now rejects. This does not establish that outer -Core settlement previously accepted that candidate. Actual CLI input still lacks -an admitted MemT lifetime and cannot open memory; converter tests do not invent -one. SDK tests use isolated synthetic protocol peers, not a GPU or model service. - -A matched comparison calls the actual Ark identity consumer at frozen -`46bdaddb3` and the candidate on identical synthetic File/SQLite CLI requests: - -| Cost observation | Before | Candidate | -| --- | ---: | ---: | -| Checked identity RPCs per request | 1 | 1 | -| Canonical JSON argument bytes, File / SQLite | 41,286 / 41,338 | unchanged | -| Canonical JSON result bytes | 211 | 324 | -| Complete-source deep copies for identity | 1 | 0 | - -The avoided copy's source is 28,432/28,458 canonical JSON bytes; this is a source -size proxy, not allocated-memory measurement. Every dispatch-context response -now carries the three identity facts, adding 113 bytes even for its other callers. -Model prompts remain byte-identical at 33,020/33,046 bytes, verified by digest. -These counts exclude RPC framing and establish neither latency nor net model, -token, invoice or long-horizon benefit. Complete packet compression is unchanged. - -Ark/MemT suites pass 41/43 cases after baseline 39/37 passes. The added tests first -failed on both providers' identity decoders and on MemT's invalidated-source -acceptance. Core capture/Host checks pass 58 cases, including File/SQLite actual -CLI input, adaptive identity, raw historical values and refusal without fallback. -After integrating main, the envelope/interaction/conversation owners pass 122 -TypeScript cases. The native steward fixture initially has ten startup failures -because it inherits an ambient conversation-provider override that its fake peer -does not echo. Removing only that override in the test child process gives ten -passes; no user configuration or production provider check is changed. The first -failure is retained as test-environment evidence, not a passing execution. -An initial assertion incorrectly imposed complete-input adaptive selection on -historical provider decoding; its two failures were corrected and remain recorded. -The broader local matrices expose six context-delivery and two driver-profile -failures, all eight reproduced at frozen `46bdaddb3`; the five output-budget -failures also remain. They are not qualifying passes. C1 still requires these -delivery gaps, supported-reader retirement, packaged/installed qualification and -the original-quota outcome/full-cost comparison. Both optional packages require -the same integrated Core checkout; a version floor alone cannot prove seam -availability in a previously published wheel. - -The bundled DSH follow-through (`e838e7594`) integrates target main `8ac384cdc` and replaces -its complete-input session/tool identity reads with the same checked selected-work -facts. Previously, adaptive complete work could select a different primary Todo -while DSH still bound tools and its reusable session to the old declared Todo. -The existing dispatch check now retains its already-returned identity privately -for that invocation; DSH reuses it for both bindings without another RPC. This -metadata is absent from final model input. The two historical DSH decoders are -consolidated into one raw-value adapter, preserving its false-like coercion, -component positions, Goal-instance hash and fresh-iteration hash. It remains -only for requests without `work_contract`, until their original-version recovery -window is reconciled; a supplied invalid complete contract never falls back. - -At frozen `ae8ee460a` and the candidate, four identical synthetic requests from -real File/SQLite CLI plans exercise normal and adaptive work through the actual -DSH adapter. Each retains one dispatch RPC; canonical argument/result JSON sizes -remain identical. Final prompts are byte-identical by digest: - -| Source | Normal prompt bytes | Adaptive prompt bytes | Added internal authority JSON bytes | -| --- | ---: | ---: | ---: | -| File | 32,377 | 32,517 | 114 / 115 | -| SQLite | 32,425 | 32,565 | 114 / 115 | - -The final column is a Python-object JSON size proxy, not allocations or wire -traffic. Ordinary session/tool identities remain identical; adaptive bindings -intentionally change from the old Todo to the selected primary Todo. The probe -leaves state unchanged and spends nothing. It qualifies this caller correction, -not packet compression, latency, model billing or accepted-outcome/full-cost benefit. - -The added regressions first produce four adaptive failures and seven passing -controls. The combined DSH and complete-source suites then pass 367 cases; -two additional real File/SQLite CLI cases pass through the built-in DSH runner, -independent validation, committed writeback and replay with one runner invocation -and one debit. Providers remain synthetic. The optional Ark/MemT suites pass -44/65 cases against the current Core. MemT initially lacked its pinned client; -after installing that client only in the isolated test overlay, five CLI cases -still imported an older installed Core from their task working directories. -The child import probe reproduced the missing seam, and explicitly binding the -test child's Python source path fixed those five cases without changing the -product or user configuration. Both initial failures remain evidence. -This uses the existing CLI/Chat Host owner and adds no capability, setting, -user step or activation default. No live SDK service or installed-host adoption -is qualified. Native-child, steward and -other historical consumers, the five output-budget holds, eight broader failures -and C1's original-quota acceptance remain open. - -The native-child metadata follow-through (`3d58796d7`) integrates target main `07149df68`. -`configured_native_child_limit`, called by request construction, durable Host -attempts and both Codex transports, now reads the original complete interaction -context when `work_contract` is present. Only historical requests read the v0 -context. The existing integer decoder, complete-source verification, launch -fences and native receipt admission are unchanged; this is a local transport -read, not a second authority or a new default. The shared source verifier already -rejects inconsistent projections, so this does not establish a prior wrong-child -admission. The remaining v0 envelope still supplies signed compatibility data. - -New on/off regressions first fail on the historical field access. Real subprocess -and durable readback checks then preserve the enabled observations, disabled -isolation, parent result and private-content exclusion. Corrupt complete input -is refused before another process or receipt. The first wider run passes 195 -cases but rejects both new fixtures at the complete Goal-source gate; delivering -the actual fixture file and full revision repairs the fixture, without changing -that product gate. The corrected native-child module passes 38 cases; the full -same three-module rerun passes 197 in 149.37 seconds. The owned -operation Host suite passes 34, with its two explicitly live-model qualification -cases skipped; no live host was launched. - -At frozen integration `5d9dbb811` and the candidate, eight fixed requests combine -the earlier real File/SQLite normal/adaptive CLI fixtures with synthetic on/off -capability context recomposed by the existing owner. Metadata reads use zero -RPCs; complete input preparation still uses one. Request bytes (40,202–40,778), -prompt bytes (30,744–31,030), schema hashes and canonical argument/result sizes -are identical in every matched case. This is no packet reduction, latency, -allocation, invoice or full-Host cost measurement. The five output-budget holds, -eight broader failures, other consumer/writer migration and original-quota -outcome/full-cost acceptance remain open; the historical failures are retained. - -The later source-checkout recheck at `d1046499a` runs both complete -`test_context_delivery_cli` and `test_loopx_turn_driver` modules: 253 pass and -only the two profile-alias cases fail. Their actual CLI response rejects capture -without a Turn identity before the test can inspect `scheduler_hint`; it is not -evidence of a scheduler-policy failure. The fixture now supplies an original -Turn and independently covers explicit delivery off and native delivery on for -both aliases. The on cases follow the declared original-capture reader through -contiguous UTF-8 pages, retaining all scheduler assertions. They verify one -admission, no spend and unchanged Goal/event-log bytes after recovery. - -The same complete modules then pass 257 cases in 118.43 seconds, with no skips -or errors; the focused four-case matrix also passes. This increment changes -tests only and introduces no production setting, default, caller protocol or -runtime behavior. The six older context-delivery failures remain historical -negative evidence; their individual causes were not reassigned by this recheck. -The five output-budget holds, remaining actual consumer/writer migration, -supported-reader exit and original-quota outcome/full-cost qualification remain -open. A passing source-checkout cohort proves neither installed-host adoption -nor packet-size, model-retention or net-cost benefit. - -The subsequent planning increment removes a redundant `consumer_version` RPC -only when `build_loopx_turn_plan` receives a complete contract. Its existing -`driver_lineage` operation already calls the same TypeScript version, integrity, -source/projection and selected-work owners. Historical inputs retain their -standalone version diagnostics. There is no new validation implementation, -cross-invocation cache, field, protocol version, activation default or authority. - -Eight fixed inputs originate from real isolated File/SQLite CLI plans and cover -complete/historical sources with fresh/resume session policies. Against frozen -`0cd09b46c`, all final plans, Host requests, Codex prompts and schemas remain -byte-identical. Complete planning uses one RPC instead of two; the measured -plan/request/prompt/schema sequence uses two instead of three. Its canonical -RPC argument-plus-result JSON changes from 92,598 to 81,554 bytes for File and -92,838 to 81,752 for SQLite, saving 11,044/11,086 bytes (11.93%/11.94%). Historical -controls retain their three RPCs and exact bytes. Every complete model input -still contains the full original contract and fixture Goal; the probes spend -nothing and invoke no model. CSV, SQLite integer totals and Decimal ratios -independently agree on the eight matched comparisons. - -The six-case planning matrix first has five duplicate-call failures and one -passing historical control; all six then pass. Unsupported adapter versions, -changed source content, a self-consistently rehashed but substituted adapter and -an explicitly null complete contract still refuse through the shared owner. -These are component transport costs, excluding framing, latency, allocations, -model usage and outcomes. Final model input is unchanged; the five output holds, -original-quota single-session comparison and complete C1 qualification remain -open. This saving cannot be added to the physical packet or selective-read -figures as though they shared a denominator. - -The full Turn driver, native Codex CLI and complete-source modules pass 334 -cases in 202.77 seconds, with no skips or errors. These include real File/SQLite -delivery, validation, failed-attempt recovery and original-Turn settlement; no -live Host was launched. This qualifies the bounded source increment, not the -remaining C1 cutover or a new exact-head merge-readiness receipt. - -The subsequent Host-transfer repair preserves a supplied `work_contract` even -when it is not an object. Request construction and original-capture publication -previously discarded these values, allowing the native prompt and shared Host -reader to interpret them as historical absence. Both transports now retain the -value for the existing TypeScript complete-source validator; genuine historical -absence still uses the old reader. No parallel validator or new field is added. -The ordinary executor's earlier source check remains; this does not establish -an outer settlement bypass. - -At frozen `42b842f93`, the corrected 18-case matrix has ten missing-refusal -failures and eight passing controls; the repair passes all 18. It covers both -transfers, absent/valid input, null, false, zero, list, text, empty object and -invalid integrity, including native/shared-reader refusal and no DSH runner load. -Two initial controls correctly refused an unfulfilled Goal read; delivering the -complete synthetic Goal fixes those fixtures, without relaxing that check. -Eight fixed File/SQLite fresh/resume inputs retain byte-identical plans, requests, -prompts and schemas, as well as unchanged RPC counts and argument/result bytes. -This is compatibility-boundary qualification, not a new compression or net-cost -result. The original five output holds and complete C1 acceptance remain open. - -The wider six-module run initially passes 522 and fails six Host-context cases -before dispatch. Frozen `42b842f93` reproduces all six. An independent child -import probe finds a different installed Core when cwd is the disposable Goal. -The test now binds and checks this checkout for its subprocesses and explicitly -selects delivery off for its historical direct-body control. That complete -Host-context module passes eight cases; the other five modules retain their -520 passes on unchanged product files. The combined 528 distinct passing cases -come from those two invocations, not a claimed single final six-module run. -Original failures remain recorded; no installed Core or user setting is changed. - -The managed Session's independent-validation reader now shares that same -complete-source owner. Preparation reuses the invocation-local identity already -checked by dispatch; after model work, the callback checks the current complete -source before running the original independent argv. Supplied invalid contracts -cannot enter the historical decoder. Actual absence retains the old selection -and diagnostics. Canonical declaration checks before and after argv, original -actor admission, leases and once-only settlement remain with their owners. - -At frozen `bd2ea9c58`, four File/SQLite changed/null-source cases incorrectly run -the independent argv; four valid/historical controls pass across two baseline -invocations. The repaired eight-case matrix passes in one invocation. Faults are -injected at the actual post-model callback; the native Session, canonical task, -independent argv and settlement remain real, with only synthetic model/provider -fixtures. Six earlier startup failures came from an ambient provider override; -the shared synthetic fixture now isolates it without changing installed settings. -This establishes the callback boundary, not an outer settlement bypass. - -A same-source native-fixture comparison substitutes the frozen baseline methods -without replacing their dependencies or validation command. Preparation adds no -Turn-envelope RPC; post-validation adds one, with 42,911/42,959 canonical argument -plus result JSON bytes for File/SQLite. A separate eight-input fixed CLI-source -comparison measures 36,320/36,404 bytes for complete inputs and no added RPC for -historical ones. These populations are separate. Both exclude framing, latency, -allocation, canonical task reads, argv, model usage and recovery; the extra -baseline argv is read-only fixture validation, not a production replay. This is -a measured component cost increase for source refusal, not compression or a -complete-net-benefit result. The original five output holds, remaining C1 readers -and original-quota single-session outcome/full-cost acceptance remain open. - -The wider attempt at `9baa678db` completes five native/steward/calendar modules -with 359 passes, then stops after 37 identical provider-startup failures in the -sixth private-conversation module, which also has 56 passes. This is an interrupted -run, not a six-module pass; its nameless interrupt record is not a test. Two -same-source environment-unset controls pass, then the same two cases pass with -only the neutral ordinary fixture isolated. The production provider check and -installed configuration remain unchanged. - -Target main `8a9e11628` is subsequently integrated. Its additional explicit -fixture caller is adapted at `4cdf977c3`; the runtime change remains `a49625e3a`. -On that integrated source, the complete native-validation/ordinary modules pass -68 cases in 335.058 seconds, and private-conversation/Antigravity modules pass -316 in 644.420 seconds. These are 384 distinct passing cases across two -invocations, not a new full six-module run. The shared conversation-binding -TypeScript suite passes 45 cases. There are no skips or errors in these final -checks. Earlier failures and component measurements retain their original -source; this integration does not remeasure full costs or qualify C1 cutover. - -The blocks below preserve the candidate narrative moved out of the normative -RFC during this integration. Their measurements, proposals and present-tense -statements belong to their original checkpoints; they are not fresh claims for -this integrated source. The current RFC and named owners govern current behavior. -In particular, the retired scope prototype does not restore a mandatory model -reading plan. Existing negative results, original-quota comparison and reader -retirement requirements remain in force. The directory's other dated entries -retain their own provenance and are not rewritten by this relocation. - -## Historical candidate block 1 - -The Agent-scoped implementation and measurements below remain an unmerged C1 -integration checkpoint. They do not describe default installed behavior. The -shipped acceptance-material slice and candidate-stage proposal follow separately. - -For cold delivery, use the current Agent's outcomes as the default expanded -scope. Other Agents' independent outcomes remain discoverable in an index with -identity, owner, objective, revision, work links, unmet requirement identities, -current review/check status and exact captured detail references. Global Goal -intent, shared requirements, permissions and stops always remain in the required -input. Expand cross-Agent dependencies, shared acceptance and material blockers -or conflicting evidence before the affected decision, regardless of ownership. -Goal-wide replanning and final acceptance widen the scope to every affected -outcome; a local delivery slice need not reread unrelated historical evidence. -Ownership is a default, not a permission boundary or sufficient relevance test. -Unbound work, unknown relations or unsupported source shapes retain complete -delivery until the existing typed owner can prove the narrower requirement set. - -The canonical contract still retains complete requirements and evidence. Reuse -the existing exact-capture outcome indexing and staged replan reader as the -starting point for one ordinary/replan/detail pipeline, extending its index with -current decision facts rather than merely outcome counts. Preserve full text -for the required scope; defer supporting provenance and review detail through -integrity-bound reads with explicit ordering. A dependent decision must consume -its required detail first. Keep current conclusions, freshness and unresolved -requirements inline; an Agent review must not become an independent check. -Interface folding alone does not reduce model input. The delivery projection, -required-read owner and host recovery contract must migrate together; existing -captures retain their original complete-read obligations. Missing detail or -uncertain retention selects the original capture's supported recovery, never a -new admission or an assumed read receipt. Do not shorten retained requirements, -prune declaration origins or infer relevance from prose to meet a byte target. - -Qualify this C2 change on the same cold, retained warm and context-loss sources: -default own work, cross-Agent dependency/constraint, unbound work, changed peer -evidence, broad replan and Goal acceptance. Count actual model input, paging and -detail round trips, recovery, latency and complete outcome cost. A smaller first -page is not a benefit when required follow-up reads or missed constraints erase -the saving. This is proposed delivery behavior; the current complete-source -reader remains authoritative until replacement and rollback are qualified. - -Current integration evidence: [navigation convergence checkpoint](2026-10-29-navigation-convergence.md). -The [journal source-fidelity checkpoint](2026-10-29-journal-source-fidelity.md) -separates the independently reviewable persistence repair from the still-open -numeric hash/context-codec qualification. The subsequent -[context source-fidelity checkpoint](2026-10-29-context-source-fidelity.md) -splits generic cold/delta/full-recovery repair into normal #7661 and reuses one -source-identity/edit owner in C1. Its component transport reduction does not -qualify canonical hashes, installed adoption or original-quota full-cost benefit. -Existing hash semantics remain unchanged. - -The current C1 branch reuses merged #7560's -`outcome_context_navigation_v1` and the generic same-capture `context-read --select` -reader. Registered relations guide reading order; ownership does not prove -independence, and limitations do not create a full-file model-reading gate. -Complete original requirements, current states, global constraints and contrary -evidence remain reachable in the original digest-bound capture. - -The earlier unmerged mandatory reading plan, `outcome_context_projection_v0` -wrapper, outcome-specific ordinary reader and fused native projection operation -are retired. Staged replan's existing decision-bound acceptance reference stays -with its owner. Native IO uses main's material planner and exact recovery codec; -it commits the current complete recovery before optional planning. This restores -two owner calls for a simple native capture instead of the prototype's fused -call, so the old call-count improvement is not a current qualification. - -Merged [#7627](https://github.com/loopx-project/loopx/pull/7627) supplies -saved-file-first delivery and file deltas without mandatory full model reading. -C1 adopts its reviewed implementation through the existing native owner, -without reintroducing the retired scope mechanism. Its installed adoption, actual -model decisions and accepted-outcome/full-cost qualification remain separate. -Historical captures retain their original identity and supported recovery. - -The following measurements and tests describe the retired prototype's exact -checkpoints. They remain historical evidence, not results for the current -navigation/planner integration. - -On one 24-outcome / 253-requirement synthetic snapshot, 61 alternating warm -real-provider owner calls against the prior implementation measured File median -5.890→6.317 ms and SQLite 2.239→2.521 ms; p95 was 15.267→17.580 and -6.504→9.412 ms respectively. All prior response fields were identical; plan -metadata added 405/415 serialized bytes. This isolates the acceptance owner in -one TypeScript process, excluding bridge, CLI, cold startup and model costs. -That foundation added cost before the native scope cutover; it was not an -efficiency win. At the scope-cutover checkpoint, native presentation additionally -allocates an exact required artifact and calls the same typed owner once before the existing codec. These -costs must be included with page, detail and recovery costs; a smaller first -input does not establish a net benefit. - -The native slice passes 406 real-entry Python tests (five explicit native/SDK -cases unqualified), 169 TypeScript tests and four actual Codex -`0.163.0-alpha.11.1` deterministic-loopback checks. The latter inspect actual -model-request bytes for cold/full, retained delta and same-capture recovery; -they do not establish free-form model behavior. Four new File/SQLite scope -assertions fail at `1ac29089f`. An integration recovery-reference failure was -repaired by replacing metadata only for explicitly scoped artifacts, preserving -ordinary original-file byte identity. -An interruption regression first failed with the preceding capture still -selected; publishing current recovery before the optional scope call fixes it. -At runtime `e1c69289a`, standard premerge failed two checks also reproduced on `8b37000b3`: -the existing oversized `run_loopx_turn_once` decision function and stale -`turn_route` producer coverage after the earlier owner convergence. The native -increment did not change those files; that historical result is not a pass or -an exception. The integration was rebased onto `b69021498`, then onto -`f63647e2e` with the target-main native output-budget behavior retained. It incorporates -the actual TypeScript producer/scanner repair from [#7520](https://github.com/loopx-project/loopx/pull/7520). -It also isolates original-capture restoration from run-once orchestration at -`fec9cd3af`, preserving the existing capture owner and session recovery. The -size thresholds remain unchanged. Current combined qualification belongs to -the exact integration head's PR evidence, not the old native-slice test counts. - -Final measurements include the recovery-publication fix at runtime commit -`e1c69289a`. Against immutable `8b37000b3` (the preceding C1 plus the same target-main large -page profile), three warmed cohorts per side supply 21 samples per provider and -phase on a 24-outcome / 253-requirement source. The warm case adds a real typed -dependency and verifies delivery of its previously unread body. Complete -serialized page output for File cold/warm/recovery is -105,380/40,473/103,372→37,908/33,495/38,594 bytes. Median latency is: - -| Phase | File, before→after ms | SQLite, before→after ms | -| --- | ---: | ---: | -| Cold full input | 72.856→48.749 | 67.237→46.477 | -| Warm scope expansion | 38.744→51.944 | 35.953→52.165 | -| Lost-context full recovery | 109.126→61.425 | 109.725→56.777 | -| Index plus one optional complete detail | 96.918→108.557 | 92.460→109.251 | - -In that measured version, the additional scope RPC remains: warm bridge calls rise from two to three. -File warm artifact files total 131,020→160,192 serialized bytes; the index/detail -operation still uses two calls and now revalidates the derived presentation. -Cold and recovery use one page instead of two. These measurements cover Python -native projection, pages and lifecycle with warmed runtime; machine load was -not controlled. They exclude initial acceptance collection, process startup, -child CPU, model/cache tokens, billing, human/setup work and accepted outcomes. -Cold/recovery transport improves while warm and detail medians regress. This -is not the original-quota comparison or a positive complete-cost verdict. - -At `85c235d29`, the native caller combines scope and encoding through the same -owners in one request and removes the unused full-wire copy. The former standalone -scope operation is retired; ordinary codecs and captured-detail readers remain. -Against `307d000a3`, the same frozen File/SQLite observations and three interleaved -warm cohorts per arm (21 samples per provider/phase) measure: - -| Phase | File median/p95, before→after ms | SQLite median/p95, before→after ms | -| --- | --- | --- | -| Cold full input | 37.438/60.718→28.516/38.941 | 34.263/39.924→26.966/39.054 | -| Warm scope expansion | 42.065/58.640→34.813/45.922 | 39.869/49.047→33.856/45.593 | - -Including page-lifecycle observation, these phases now use two rather than three -bridge calls. File cold artifact bytes fall 162,877→129,299; warm artifacts remain -160,192. Complete page output is unchanged. Six same-path ordinary/scoped/broad -File/SQLite comparisons preserve complete public pages and recovery values; -the one-call regression assertion fails on the baseline. Warm response payload -grows by 27 bytes despite lower request traffic. Detail/recovery keep their call -counts; SQLite detail p95 worsens 138.131→175.541 ms without a changed code path. -Machine load remains uncontrolled and the earlier exclusions still apply. -This removes demonstrated local transport/IO cost, not the original-quota -outcome/full-cost gap, short-source growth or all warm artifact overhead. - -Small sources provide a counterexample to size savings: four real-entry -File/SQLite fixtures with two outcomes and four requirements grow from -36,293–40,548 to 37,948–42,203 bytes, exactly 1,655 bytes each. Index and scope -metadata exceed their short optional bodies. The proposal does not derive a -semantic omission rule or production size threshold from the larger fixture. - -On the same 24-outcome / 253-requirement synthetic source, rendering the former -count-only index shape allocates 8,190 bytes; the staged state groups allocate -18,979 bytes. The old 12 KiB index budget fails. Retaining these decision facts -justifies a separate 20 KiB index ceiling; history, horizon, whole-envelope and -production performance limits stay unchanged. Grouping exact states avoids -repeating the same status fields for each requirement. These are serialized -bytes, not a token/latency/outcome benefit or an immutable base/head comparison. -The source-path scope checks and transport costs above do not qualify general -semantic independence or matched accepted-outcome/full-cost benefit. - -## Historical candidate block 2 - -The external scheduler candidate now validates a versioned complete input through -`assert_complete_turn_decision` and the existing TypeScript complete-reader owner -before reading cadence or wake permission. This is a pure reader: it neither -recomposes the captured host binding nor creates a legacy executor view. Missing -bindings, unsupported versions/required semantics, altered content and invalid -same-capture references fail before the wake command. Unversioned ordinary quota -packets retain their existing compatibility path; retiring that path requires -reconciling supported deployed workers. File/SQLite source-CLI-to-worker tests use -local child markers, not model execution. This qualifies that input boundary, -not attached-host task delivery, settlement or accepted-outcome/full-cost benefit. - -The optional Ark adapter reuses `extract_turn_authority` / `render_prompt` from -that same host-input owner; no optional-package contract builder is needed. -File/SQLite `turn plan --host generic-cli --iteration-context fresh` now feeds -its complete request through the real Ark SDK with a synthetic HTTP transport. -Checks compare the actual user-message contract with the original CLI source, -recover a persisted running receipt without a new input, replay completion -without provider calls, and reject altered source/version/binding or explicitly null -complete input before provider or receipt creation. Core state and spend remain -unchanged. Historical Ark request and recovery tests remain. This qualifies the -SDK wire boundary, not a deployed cloud session, model outcomes or Core settlement. -Ark and MemT now share the real File/SQLite CLI request fixture. MemT rejects -that complete input before provider IO because the executable legacy registry -supplies no exact `goal_ref`. The existing `source_session_v1` profile carries -an exact lifetime but is lifecycle-only: the real generic Turn planning entrypoint -rejects it before capture or execution. Supplying a synthetic reference after -planning would hide this producer/consumer gap. Complete-input corruption also -rejects before provider or receipt creation; historical MemT SDK/snapshot tests -remain, but they do not qualify end-to-end complete-input delivery. The owning -change on the MemT path must carry an admitted exact lifetime from an executable registry -through the shared Turn request and recovery owners, preserving recreation and -stale-instance rejection. Do not relax MemT's isolation or enable the -lifecycle-only profile as an adapter workaround. This is a demonstrated adoption -gap, not a qualified native-memory path. The operation-SDK native runtime and -packaged App adoption also remain unqualified. The internal effect envelope and historical request decoder -still serve settlement/result/session callers; remove them only after those -callers and outstanding receipts use the replacement, not merely because model -input no longer contains the old envelope. - -New Codex/DSH requests now read their shared dispatch session lineage from the -complete contract, reusing the TS complete-input validator and adaptive primary -work owner. Model-input validation uses the same owner and rejects mismatched -Goal/Agent/Todo identities between complete input and the internal effect adapter, -even when both digests are independently valid. The complete path no longer -repeats Python version/signature validation; historical requests keep their -original decoder, persisted session schema, path and scope. Real File/SQLite CLI -capture, failed-attempt recovery and once-only settlement replay pass. Ordinary -and adaptive work restore existing Codex/DSH sessions under Todo and Agent -scopes. The same fixture preserves legal baseline paths but fails the added -identity-conflict cases before migration and passes on the candidate. Native -operation SDK environment tests still include skips; its runtime is not qualified. -Session identity migration does not retire all result qualification and settlement -readers of the internal envelope. Full retirement and net-cost -benefit remain unproven. The MemT lifetime gap blocks its dependent path only, -not these independent migrations. - -Planning and failed-attempt session lookup now pass the original complete contract -through the same identity owner, including journal inspection. An omitted contract -still decodes historical records; an explicitly null contract rejects. Live and -cached vision-result normalization also use this shared identity read instead of -rebuilding Goal/Agent from the effect adapter. Session scope/lifetime fences and -the native app-server callback remain with their existing owners. This removes -those identity-only reads, not the full internal adapter: execution routing, -result evidence/profile interpretation and settlement still require migration. -Adaptive recovery fixtures are composed before signing: historical unverified -selections preserve primary-Todo writeback, while a conflicting verified task -source rejects before host execution or quota spend. The source fence is retained. -Completion-recovery qualification checks the original durable completion and spend -receipts without resubmitting completion. Four obsolete replay-call assertions -also failed on the prior baseline; their repaired oracle retains changed-task-text -and historical pre-source acceptance cases on real File/SQLite stores. - -Completion task-body resolution now lives with the existing TypeScript interaction -source owner. The same coarse read now supplies `run-once` with the original -selected work, task-body commitment, admitted action, replan and writeback -conditions. Complete-source validation reuses its already-checked effect -projection within that call; it adds neither another RPC nor a model-facing -contract. Adaptive primary selection and ordinary selection share the existing -interaction owner. The CLI no longer reads these execution facts from the -historical adapter; it still transports that adapter for source/signature checks -and consumers not yet migrated. Omitted complete contracts retain the old journal -decoder; supplied null or invalid sources never fall back. Exact Unicode and -whitespace bytes, missing/ambiguous-source refusals, original settlement identity -and accepted-receipt recovery remain protected. The old 48-case File/SQLite -capture/completion selection passes at -`599cf1f72`; candidate complete-source checks also reject altered bindings and -explicit null inputs. The initial task-hash migration added a TypeScript boundary -where the historical resolver was local Python; this broader read reuses that -boundary rather than canceling its cost. Full adapter retirement, remaining -effect/material consumers and original-quota outcome/full-cost qualification -remain open. - -Structured Host preparation now consumes the checked complete source directly; -it no longer flattens the old action, boundary, capsule and planning carriers for -new requests. The same typed source check supplies the executable-action alias -and admitted-replan fact, preserving capability-before-replan ordering without -reimplementing it in Python. Codex prompt construction also uses the complete -source for boundary guidance and the original model input's staged readers. -Original capture metadata still travels through the existing transport; its -source and adapter integrity checks remain. Historical-only requests retain the -old decoder and renderer. This is an internal consumer replacement, not another -model-facing view or a cache across attempts; the final complete model input and -its instruction obligations must remain unchanged. Other effect/session -consumers, packaged adoption and full-cost qualification remain open. - -Against rebased predecessor `4c4e9b346`, frozen real File/SQLite CLI requests -produce identical complete prompts, result contracts, historical-only outputs -and invalid-source diagnostics. Host preparation still makes two RPCs; total -request bytes decrease by five and responses grow by 190 bytes per group. Six -sequential cohorts, with separate verified runtime namespaces and 93 warm -samples per arm/case, observe these median/p95 values in milliseconds: - -| Request provenance / Host | Predecessor | Complete-source consumer | -| --- | --- | --- | -| File / Codex | 27.544 / 32.366 | 31.258 / 40.408 | -| File / structured | 25.948 / 32.642 | 30.007 / 39.242 | -| SQLite / Codex | 25.695 / 31.070 | 31.889 / 37.696 | -| SQLite / structured | 24.409 / 30.258 | 33.242 / 42.287 | - -These observations are negative local costs, not a speedup. Provider labels -identify request provenance; the measured groups perform no authority-store IO. -Machine/background load remains uncontrolled. Startup, other calls, complete -Turn/model/cache/billing/human costs and accepted outcomes are excluded. Earlier -overlapping, non-isolated exploratory timing is not qualified; neither source -convergence nor these samples establish original-quota net benefit. - -The next input-preparation increment shares one complete-source check between -prompt and result-schema construction within a single Codex launch. Both the -CLI process and operation-equipped app-server use this existing adapter boundary. -Standalone prompt/schema calls still check independently; structured result -conversion checks its source again after execution. No checked value is cached -across attempts, model work or result handling. The typed owner now returns only -action/replan/approval/profile applicability facts instead of echoing the full -source over the bridge. Python consumes its original checked input, retaining -the structured authority's detached values. Complete model input, original -readers, launch guards, result validation and outer settlement remain unchanged. - -An owned V8 capture of 500 baseline source checks locates substantial CPU work -in canonical hashing and Unicode key ordering. It excludes Python, transport and -provider IO; its inclusive weights are not elapsed-time savings. This motivates -removing duplicate checks at one preparation boundary, not weakening integrity -checks or sharing validation across execution. Earlier negative measurements -remain historical evidence; this increment does not close C1's original-quota -outcome/full-cost or adoption requirements. - -Against rebased predecessor `75bd69bf6` on target `ff9e97f8e`, six sequential interleaved cohorts -(93 warm samples per arm/case) retain identical complete prompt/schema/result, -historical output and invalid-source diagnostics. Codex preparation drops from -two RPCs to one; structured prompt plus post-execution candidate conversion -retains two. Codex request bytes are 86,293/86,399 → 43,144/43,197 for File/SQLite; -responses are 62,554/62,606 → 211. Structured requests decrease by five bytes and -responses become 422 bytes. These are internal JSON payloads, excluding framing. - -| Request provenance / Host | `75bd69bf6` median / p95 ms | Prepared input median / p95 ms | -| --- | --- | --- | -| File / Codex | 22.147 / 26.204 | 12.003 / 13.653 | -| File / structured | 22.269 / 26.310 | 23.124 / 27.843 | -| SQLite / Codex | 21.656 / 26.511 | 11.734 / 17.183 | -| SQLite / structured | 21.324 / 23.608 | 23.716 / 26.079 | - -Codex's local preparation improves; both structured timings remain negative -observations despite lower transport volume. The workload performs no store IO -or real model work. Separate owned runtimes and sequential arms avoid this -Agent's validation overlap, but background load remains uncontrolled. Startup, -other calls, full Turn, tokens/cache, billing, implementation/human cost and -accepted outcomes remain outside this measurement; it is not the original-quota -comparison or proof of overall benefit. - -The Codex result schema and shared candidate adapter now use one checked -complete-contract profile read for evidence applicability. They no longer decide -that requirement from the internal capsule on new requests. The existing -TypeScript integrity/source/lineage validator serves both this read and model -input validation; no new model-facing packet view or per-evidence-field call is -introduced. Omitted contracts retain historical capsule decoding; explicit null -or altered contracts reject. Empty/non-object profiles preserve their previous -non-applicability, stop results still need no evidence, and supplied evidence is -passed unchanged to the existing result validator. This migrates applicability, -not evidence-content validation, execution routing or all settlement consumers. -Each schema/material-candidate read adds one checked boundary call; this is a -semantic convergence step, not an established performance improvement. -In a 31-pair warm-boundary measurement using one real SQLite CLI host request -(45,405 JSON bytes, synthetic provider), schema construction plus material-result -conversion rose from a median 0.013 ms at `68223e337` to 19.6 ms in the candidate -(p95 0.019/22.8 ms); legitimate outputs matched. This local added cost is retained -as negative evidence. It excludes cold startup, model work and the full Turn; -overall outcome/cost qualification remains open. Checks cover real File/SQLite -capture/recovery plus Codex/shared-host consumers; they do not prove packaged App -adoption or a model-outcome improvement. - -The execution entry now checks complete-contract identity once before dispatch -or journal recovery. Settlement-plan fallback uses that checked identity, and -the recovery assessment reuses it within the same invocation instead of reading -the adapter's Agent again. Existing settlement plans and receipts are never -rebuilt, and omitted historical contracts retain their exact decoder. The value -is not cached across host attempts, source replacement or later invocations. -This also closes a recovery bypass: an existing settlement plan previously -skipped source validation, allowing a null/altered complete request to return an -existing journal outcome. On real File/SQLite CLI journals the new refusals leave -journal bytes and spend counts unchanged and invoke no host/settlement callbacks. -Ten targeted cases fail the new refusal assertions at `ce996ea0f`; the candidate's -32 capture/recovery cases and broader 605-case regression pass (overlapping). -The entry adds one checked boundary call, reused for both consumers. On the same -45,405-byte real SQLite CLI request, 31 alternating warm samples of the existing -settlement-plan read plus recovery identity preserve legitimate output parity: -median 0.016 to 12.382 ms, p95 0.024 to 14.883 ms. This is added local validation -cost, not an efficiency win; it excludes cold startup, full Turn and model costs. -Full-path performance and remaining routing/settlement retirement stay open. - -Codex CLI prompt construction now delegates valid complete requests directly to -that existing complete validator, removing its redundant standalone envelope -version call. Historical requests retain their version check; a failed complete -validation still checks the version to preserve diagnostic precedence when both -inputs are malformed. No validation cache, new wire field or second owner is -introduced, and prompt text is unchanged. This is a call-boundary consolidation, -not retirement of the remaining driver routing or settlement adapter. - -Against `e1dcd95dd`, complete and historical prompt bytes match, and six negative -input cases retain the same refusal diagnostics. On one 45,429-byte real SQLite -CLI request producing a 34,043-byte prompt, 61 alternating warm samples reduce -median prompt construction from 24.229 to 14.819 ms and p95 from 30.189 to -17.854 ms; bridge tracing confirms two calls become one. This local reduction -is about 39%, excluding cold startup, model execution and full-Turn cost. It does -not cancel the separately measured profile/settlement overhead or qualify the -original-quota outcome comparison. An earlier pre-diagnostic-refinement sample -was 21.279/12.994 ms median and 29.729/17.321 ms p95; retain it as earlier evidence, -not a second independent final qualification. - -Planning now receives the complete contract before route/session/transaction -construction, rather than attaching it after the plan is built. Planning and -failed-session reconciliation share the existing TypeScript complete-source -validator through one coarse lineage operation. It selects Goal/Agent/work -identity and returns the action-signature preimage in the same boundary call; -it replaces the previous signature-only call, without a per-field RPC or cache. -Explicit null, unsupported or altered complete contracts reject, including an -already-resumed request. Omitted historical contracts keep their exact decoder. -The receipt owner still supplies Todo-less replan identity. The route and launch -increments below describe the subsequent consumer migration. - -The Python JSON/hash transport codec remains deliberately unchanged. A direct -JavaScript hash trial failed numeric/exponent preimage parity and would have -changed persisted Turn keys; File/SQLite characterization now protects those -values, Unicode, adaptive work selection and resume idempotency. On one real -SQLite CLI request (45,380 JSON bytes), 31 alternating warm samples against -`088867421` preserve complete/historical plan and failed-session output parity. -Planning median/p95 changes from 39.632/47.964 to 42.608/53.270 ms; recovery changes -from 12.330/20.858 to 18.136/23.242 ms. These are local added validation costs, -not a full-Turn or original-quota outcome comparison. No model, installed App -or PostgreSQL authority qualification is implied. Remaining route/material -adapter retirement and end-to-end cost qualification keep C1 open. - -The live Host launch recheck now composes the receipt-bound live observation -through the same complete-contract owner as initial planning, then supplies that -contract to the shared planner. This replaces its raw-quota-to-historical-plan -shortcut. Stop and changed-action refusals still precede composition; the live -observation neither replaces the original captured model input nor mints another -receipt. Remaining effect/material adapter retirement is still migration work. - -The route classifier now lives in the existing TypeScript envelope owner. The -explicit registered action/frontier table is exhaustive at compile time; unknown -historical actions still reach the Host. Signature refusal, attempt, replan before -ordinary-delivery gating, capability intent identity, repair, user action and -quiet wait keep their ordering. Python retains a thin controller transport and -historical scalar-text encoding, not a second classification table. Complete -validation ignores historical decoding hints. The persisted Python action-hash -codec and historical selected-work reader are unchanged. - -Planning receives the route in its existing coarse lineage/signature call; -complete and historical ordinary plans still use two bridge calls. Against the -previous Python classifier, 1,152 action/gate combinations agree; complete and -historical plan outputs also agree on a fixed real SQLite CLI fixture. These -planner comparisons use the same current TypeScript endpoint and therefore are -not an exact old/head end-to-end latency experiment. The standalone controller -route now needs one bridge call: 61 alternating warm samples on a 44,891-byte -request increase median/p95 from 0.004792/0.010125 to 13.252792/15.855042 ms. -That is a measured regression for this caller, not an efficiency gain. It remains -an explicit cost gap for controller boundary consolidation; no cache or duplicate -classifier is introduced to hide it. File/SQLite entry, recovery and once-only -settlement qualification, remaining adapter retirement, packaged adoption and -original-quota outcome/full-cost qualification remain separate acceptance work. - -The production `turn managed-step` caller now combines envelope construction and -that same route evaluation in one TypeScript request. The Python adapter returns -a local immutable envelope snapshot paired with its route; this is neither a new -agent wire layout nor a second decision owner. Decoding or editing a returned -dictionary cannot change that snapshot or attach its qualification to another -wire dictionary. The controller retains its existing user-action precedence, -receipt/predecessor checks and journal-owned retry budget. Plain historical or -external envelopes still use the existing route reader and signature refusal. -The construction adapter shares host-binding and capture-argument preparation -with the ordinary envelope builder; the managed caller's redundant intermediate -builder has been removed. The standalone-reader regression above remains a -historical measurement; only the fresh production construction/consumption pair -can avoid that extra request. Remaining selected-work/effect/material decoding, -large cold-context recovery and packaged/outcome qualification remain open. -The local snapshot retires when this caller consumes the unified typed -controller result directly; it adds no persisted schema or compatibility wire. - -On one fixed 31,088-byte synthetic source, 61 alternating warm samples compare -the previous Python producer/controller functions at `ddf96b79c` with the fused -call, using the same current TypeScript server and unchanged build/route rules. -The final-source component median/p95 is 22.477/25.417 versus 13.739/17.479 ms. A separate -public `managed-step` CLI comparison uses real isolated File/SQLite stores and -21 alternating warm samples per arm/provider: median is 135.989 versus 137.316 ms -for File and 149.310 versus 146.081 ms for SQLite; p95 is 209.730 versus 192.544 ms -and 222.299 versus 240.848 ms respectively. A separate transport-count probe -observes 70 versus 69 total bridge requests on each provider; this removes one -route request, not the other live-decision calls. Complete outputs agree, the failed -journal remains byte-identical and neither arm spends quota. Request count -improves; mixed whole-CLI medians and tails do not establish a speedup. Small local samples and -shared host resources limit tail inference. These are source-bound observations, -not an entire immutable old-tree comparison, cold-start, installed App, model -outcome or original-quota full-cost qualification. - -Complete readers now also compare the adapter's signed action document with the -existing producer projection of the admitted complete source. Independent source -and adapter hashes previously proved only their separate integrity: a rehashed -adapter could retain Goal/Agent/Todo while changing execution or writeback facts. -The shared check covers the producer's existing signature dimensions without a -second field list, new RPC or wire view. Historical-only inputs keep their old -reader. Existing complete requests whose profile adapter disagrees with their -source now reject instead of silently reading the source profile; this deliberate -refusal change preserves the historical profile behavior separately. - -Against `b9e2c5120`, File/SQLite planning refusal assertions fail before the fix. -Six independently rehashed variants cover run eligibility, effective action, -delivery permission, user intervention, execution policy and spend permission; -the candidate rejects them before host/writeback/spend callbacks and leaves no -Turn journal or settlement receipt. An existing lane lock can still be allocated. -On a 44,891-byte real SQLite CLI fixture, 101 alternating warm in-process -TypeScript samples preserve legitimate lineage output; median validation changes -from 4.864 to 5.163 ms and p95 from 5.570 to 6.010 ms. These are added local costs, -excluding bridge transport, live composition, cold startup, models and full Turn -cost. They do not qualify the original-quota outcome comparison or C1 cutover. - -The candidate's ordinary planner and failed-session reconciliation now also -consume the selected work from the existing `driver_lineage` call. The shared -`selectedWorkTodo` owner places ordinary or adaptive selection into that call's -existing action-hash preimage; Python no longer selects it again or rewrites the -preimage. Python retains the persisted JSON/number and primary-ID scalar/whitespace codec. -The shared owner consumes already-decoded historical text without applying JS -trim again. Complete inputs -ignore those hints and retain full source/projection integrity checks. There is -no new bridge call, model-facing field, persisted schema or cross-attempt cache. -The public action-signature operation still describes the original envelope. - -This replaces selection in the actual plan and failed-session recovery callers, -including the native CLI's original-capture retry. The remaining v0 Host, -settlement and controller readers still use their historical selection decoder; -they retire only after their callers and outstanding receipts migrate and pass -equivalent recovery qualification. This increment does not qualify complete -adapter retirement, App/SDK/benchmark adoption or original-quota net benefit. - -Qualification against immutable `334c1a772` retains complete plan/recovery outputs -on frozen File/SQLite CLI inputs. Planning still uses two bridge calls and -reconciliation one, with equal request/response bytes on these ordinary inputs. -The actual CLI/provider/Host, completion and settlement modules pass 254 cases; -ten migration assertions fail on that predecessor while twelve historical-codec -cases pass there. The latter cover omitted/false/zero, whitespace, numeric, -boolean and collection-valued historical primary IDs, Unicode whitespace/BOM, version/mode applicability, -original Turn keys and resumed bindings. The candidate passes all of them. - -A temporary `ef479d2b5` trial changed three Unicode whitespace/BOM identities; -those semantic counterexamples fail there and pass on the corrected owner, -while the original predecessor preserves them. Its measurements below remain -historical trial evidence, not qualification of the corrected source. - -There is no qualified latency improvement. Three balanced sequential cohorts -give 93 warm samples per arm/case. The initial source-worktree versus archived -baseline comparison has higher candidate medians in all eight ordinary and -historical plan/recovery rows. Its generated-cache inventories differ. A second -control uses clean sibling source copies, identical inventories and disabled -bytecode generation in both arms; it still has mixed or slower observations: - -| Complete-source input / operation | Initial baseline → candidate median / p95, ms | Clean control baseline → candidate median / p95, ms | -| --- | --- | --- | -| File / plan | 35.129 / 40.776 → 46.227 / 57.355 | 24.174 / 30.183 → 25.330 / 30.443 | -| File / failed-session recovery | 14.941 / 17.957 → 19.440 / 24.477 | 11.259 / 13.196 → 12.582 / 15.495 | -| SQLite / plan | 36.979 / 46.065 → 46.461 / 54.795 | 23.820 / 30.178 → 26.408 / 30.523 | -| SQLite / failed-session recovery | 17.404 / 22.606 → 18.759 / 22.139 | 12.586 / 16.141 → 11.503 / 14.124 | - -The initial negative results are retained; the control is not a historical pass -or proof of their cause. These are raw-helper observations without store IO, -not full native CLI/Turn timings, cold startup, model cost or accepted outcomes; -background host load is uncontrolled. Separate owned V8 captures identify -existing Unicode key ordering/hash work, without proving the latency cause. -Python wait/IO stacks remain unprofiled because the optional profiler is absent. -Shared ownership and byte parity do not cancel these cost gaps or earlier -negative C1 measurements. - -The corrected three-file source has a separate clean-source comparison, again -93 warm samples per arm/case with all eight complete outputs equal and unchanged -RPC/ordinary-input traffic. It retains mixed results, including a worse SQLite -planning tail. The same exclusions and uncontrolled-load limits apply: - -| Input / operation | Baseline median / p95, ms | Corrected source median / p95, ms | +`assertInteractionRequiredReads` (called once from the complete-source +validator across quota, preview, planning, and Host) requires explicit +command-bearing required reads to carry a non-empty, NUL-free command with +`ordering == "before_work"`, while preserving prose-only obligations, quoted +Unicode commands, and pending unread states without inventing a blanket +material-read gate. Complete-source checks also enforce Goal narrative readiness +before automatic-start interval reservation (`5→2` / `6→3` RPCs on refusal so +subsequent valid Turns are not falsely delayed) and verify declared Vision audit +triggers in both structured and Codex prompts. + +In the frozen premerge budget counterexample, direct output was `20,333` chars +and the native runner emitted `20,501` chars (`20,533` in premerge layout, above +the unchanged `20,500` ceiling) solely because isolation adds `21` chars per +fixture root occurrence (`8 × 21 = 168` chars) on both main `bd79adc64968` and +C1 `f1614358ac13`. Budget ownership stays with `#8069`; no ceiling was raised. + +### Retained consumer & recovery obligations + +- **Initial-read Goal revision & inline diagnostics:** bound initial reads + deliver the provider-backed Goal objective, revision, and digest ahead of the + original Goal narrative (`+552 B` initial response, saving `1` reader call and + `629 B` over separate selection); bound inline `generic_cli` JSON reuses + compact projection rows and `_ref` references (`55.7–55.8 KB → 54.3–54.4 KB` + Off; `47.4 → 45.5 KB` initial replan), rejecting tampered compact captures + even with recomputed file digests. +- **Bounded Windows / PowerShell & Benchmark recovery:** Windows bounded restarts + and capped JSON guards (`1,700 B` passes; `96 B` refuses before capture or + receipt) use the shared private capture allocator and accept explicit + PowerShell script launchers without POSIX `+x` (tested on macOS PowerShell 7; + native Windows host DACL and Python execution remain untested). Non-native + Benchmark preflight prompts carry the saved action plus replan/writeback + reads (`47.4–47.5 KB` full vs `18.8 KB` Todo field select), while preserving + EdgeBench's explicit `--turn-envelope` compatibility toggle and detached + external-worker cancellation readback (`0` debit). +- **Relocated checkpoint debit readback:** `a1f34097805a` verifies copied local + debits against their original index row and committed receipt after moving the + source runs directory, rejecting symlinks or missing/altered artifacts/receipts. + +## Matched engineering cohorts & negative/mixed cost evidence + +All quantitative observations below use isolated synthetic File/SQLite tasks and +do **not** measure real model tokens, cache hits, billing, human attention, +controlled latency, or §9 single-session outcome/complete-cost benefit. + +| Cohort (revisions) | Positive / convergent observations | Negative, mixed & failed observations (unchanged) | | --- | --- | --- | -| File / complete plan | 38.529 / 48.381 | 38.504 / 47.134 | -| File / complete recovery | 17.821 / 22.029 | 18.244 / 21.857 | -| File / historical plan | 32.787 / 44.413 | 30.871 / 36.733 | -| File / historical recovery | 10.635 / 14.620 | 10.292 / 12.201 | -| SQLite / complete plan | 39.600 / 46.547 | 40.036 / 77.714 | -| SQLite / complete recovery | 18.034 / 28.685 | 18.552 / 25.223 | -| SQLite / historical plan | 32.061 / 42.789 | 32.447 / 38.962 | -| SQLite / historical recovery | 10.444 / 14.258 | 10.270 / 12.891 | - - -#### Native execution and completion source - -The native launch guard now consumes the selected Todo already returned by the -shared planner, rather than running the historical Python selector again. -The existing execution-context/task-commitment reader lives with the Turn -driver and serves both CLI preparation and completion-intent classification; -its CLI copy is removed. The semantic owner remains the existing TypeScript -`execution_context` operation, not a new view, schema or Python decision owner. - -After Host execution and independent task validation, a complete request checks -that source again before choosing terminal versus ordinary completion. A saved -writeback or terminal outcome does not bypass this check. Malformed complete -input and adapter facts inconsistent with its source reject before writeback or spend; -the original journal can then recover the already validated result without -another Host invocation and settle once. Omitted historical inputs retain their -exact decoder and receipt recovery. Completion-outcome validation and the -typed settlement/effect owner are unchanged; this does not retire every -historical completion or controller reader. - -The launch guard adds no bridge call. Complete validated-completion -classification adds one coarse source check at this later boundary, including -unfinished journal recovery; historical classification is unchanged. That is -an explicit additional cost, not a speedup or permission to cache a pre-execution -check across execution, attempts or recovery. Original-quota decisions, -accepted outcomes, complete costs and remaining consumer adoption stay open. - -The four affected capture/driver/completion/settlement modules pass 264 cases -with real isolated File/SQLite CLI consumers and synthetic Host/validator -processes; the two typed-owner modules pass 79 cases. Twenty-two migration -assertions fail on immutable `2a170247ba3` and pass on the candidate. Eight -additional native replacement cases commit on that baseline but reject before -writeback/spend on the candidate, then recover the original journal result -without rerunning the Host and debit once. These cover ordinary and final -completion on both backends; they do not establish live model or installed -consumer adoption. - -Three balanced sequential cohorts use clean sibling source copies and the same -fixtures. Each warm helper row has 93 samples per arm. Complete intent/recovery -classification changes from about 0.002 ms with no bridge call to these -median/p95 values: File 19.813/26.454 and 20.770/25.287 ms; SQLite -20.243/23.964 and 19.005/22.458 ms. Each adds one logical request with -43,200/43,253 request bytes respectively and 1,693 result bytes. Historical -classification retains zero requests and equivalent outcomes. Logical JSON -counts exclude framing and physical transport retries. - -The same cohorts also execute real CLI admission, capture, synthetic Host work, -independent validation and settlement, followed by native Todo readback and -committed replay. Each row has only three samples per arm; the table reports -median and observed range, not a p95 or causal speedup: - -| CLI completion | Baseline median [range], ms | Candidate median [range], ms | Logical requests, base → candidate | -| --- | --- | --- | --- | -| File / ordinary | 2303.0 [2001.9–3646.5] | 2173.5 [2051.4–2196.6] | 282 → 283 | -| File / final | 2306.0 [2283.4–2389.4] | 2818.4 [2338.2–2973.9] | 294 → 295 | -| SQLite / ordinary | 1888.5 [1758.5–2061.7] | 2513.5 [2086.5–2955.7] | 278 → 279 | -| SQLite / final | 2549.1 [2240.7–2681.2] | 2282.7 [2276.8–4064.8] | 294 → 295 | - -Native outcome observations agree, including the original settlement identity, -done readback and one debit. Committed replay retains five logical requests and -zero new effects in both arms. Readback/replay observations are retained -separately from the timed execution. Background host load is uncontrolled; -no other owned validation runs alongside these cohorts. The added source check -is a demonstrated cost, while whole-CLI timing remains mixed and default SQLite -performance is not qualified. Models/cache tokens, billing, evaluation, -implementation/human costs, accepted real-work outcomes and original-quota net -benefit remain unqualified; earlier negative observations remain valid. - -## Historical candidate block 3 - -The [numeric-integrity checkpoint](2026-10-29-complete-numeric-integrity.md) -binds producer number identity through one typed owner and all complete readers, -and removes an unused Host echo. The subsequent [sparse-transport integration](2026-10-29-sparse-numeric-integration.md) -adopts the existing context collector instead of retaining a separate complete-path -rule. Its changed experimental hash identity is explicit in codec v2; old bindings -retain unchanged captures and their pinned readers. Original capture-byte checks -remain separate. Component transport savings do not qualify original-quota outcomes, -full cost or a live writer cutover. - -## Historical candidate block 4 - -The acceptance-sharing increment in #7430 moves the original Python display -algorithm into the existing TypeScript composition owner, before hashing/capture; -the old display helper now delegates to that same implementation. Complete readers -and historical staged reads use one reference resolver. Equal contracts retain -one full owner; different revisions, JSON types, provenance and negative evidence -remain distinct. Existing references follow relocated owners. Dangling, cyclic -or unavailable references reject even with valid integrity hashes. Small objects -stay inline when a reference would cost more. - -Isolated File/SQLite quota and native-host fixtures cover complete acceptance at -the actual synthetic Codex subprocess input, failed-attempt recovery and original -once-only settlement; shared full/delta/lost-baseline reconstruction is also -exercised. These qualify transport semantics, not model compliance. The legacy -display adapter adds a transport call; complete composition shares inside its -existing call. No latency improvement is claimed. - -A fixed-source acceptance fixture with four identical carriers produces 23,432 -compact UTF-8 JSON bytes for the fused contract versus 22,237 for the original -non-staged CLI (+5.37%). With capture staging, fused bytes are 23,515 versus -24,509 for original entry/review/writeback together, excluding extra material -reads. The original display-sharing helper is frozen at `895f38fc5` for this -comparison. The acceptance-free workload above remains unchanged. This absorbs -an existing quota efficiency into the common path; it does not establish an -advantage over quota or full-cost benefit. The subsequent guidance increment below narrows that gap; next qualify the remaining -vision sharing in its existing owner after the title increment below, before deferred-detail choices. Keep cold and staged totals separate and retain negative results; do -not force a byte target by dropping unique instructions. - -The next #7430 increment shares replan vision-authoring instructions through -that same TypeScript composition boundary. Its retained owner is the existing -durable-writeback settlement step. The legacy Python display helper delegates -sharing and only adds its historical presentation metadata. The complete -reader and historical unstaged/staged adapters resolve the same exact reference; -no second authoring policy is introduced. JSON type, revision or instruction -differences stay inline, and a reference must be smaller. Conflicting inline/ref -values, wrong step kinds, missing targets and chains reject even if hashes match. -The settlement plan, all original instructions and the example remain intact in -the capture; the historical writeback stage retains its existing example omission. - -Two old CLI spellings now expose the same shared complete contract; material -readback, rejection before effects and native input are qualified separately. -The exercised native outer-controller inputs lack an inline settlement authoring -owner, so their authoring -remains inline; sharing never invents that owner or transfers settlement authority. -At the authoring checkpoint, four legacy projection tests expected multiline-title -or Explore-guidance sharing absent from the complete candidate and failed at both -the preceding and authoring heads. The guidance increment below resolves two; -the title increment below resolves the other two. Historical failures remain recorded, not waived or relabeled. -These slices do not qualify installed App adoption. - -For the fixed synthetic authoring fixture, the original non-staged CLI is 22,062 -compact UTF-8 JSON bytes and the fused contract is 23,266 (+5.46%). With capture -staging, original entry/review/writeback total 24,311 versus 23,349 fused bytes. -The original CLI projection module is frozen at `895f38fc5`; inputs and projected -read stages are held fixed. Additional reads, request framing, tokens/cache, -latency and model outcomes remain unmeasured. Sharing eliminates a duplicate -implementation and duplicate instructions in the candidate, but does not prove -an improvement over quota's existing sharing or a positive full-cost diff. - - -The Explore guidance increment removes the Python exact-match loop and reuses the -same TypeScript composition boundary for complete and legacy display callers. -Only identical instructions with an existing durable-writeback Explore attachment -share that same-capture owner when the reference is smaller. Unique/short text and -missing owners stay inline. Invalid, conflicting or chained references reject; -no instruction is shortened and an optional attachment gains no new obligation. -Historical staged and unstaged readers resolve the reference before moving context, -then reuse Explore's existing domain projection. Independent Explore reads still -return full guidance. The compatibility helper retires with the legacy display -callers; it owns no separate decision or sharing algorithm. - -Real isolated File/SQLite CLI captures now satisfy the two previously failing -Explore-sharing cases, including standalone material comparison, historical -readback and invalid-capture refusal without state/spend changes. Existing staged -CLI tests still exercise unavailable-registry reads, tamper refusal and actual -writeback/settlement. Delta reconstruction preserves changed instructions and -lost-baseline recovery; incomplete context falls back to full delivery. These are -transport and local integration results, not installed App or model-outcome proof. - - -Broader caller qualification also migrates old test assumptions to the admitted -complete contract: native subprocess capture/retry compares the entire original -contract, and generated settlement commands still settle only the original Turn. -Historical capability readers retain explicit canonical-fixture initialization, -refusal facts and scheduler information without granting execution authority. -Rejected capability admissions still emit their typed diagnostic/historical -projection, whereas admitted calls emit the complete contract. This remaining -failure-path migration belongs to C1 before full cutover; it is not a permanent -second contract. Synthetic native/stdio providers do not qualify model benefit. - -With the same original projection frozen at `895f38fc5`, the synthetic guidance -fixture uses 22,848 compact UTF-8 JSON bytes on the original non-staged path and -24,320 fused (+6.44%). Captured original entry/review/writeback total 26,081 versus -24,403 fused bytes. The guidance-free fixture remains 20,543 versus 21,738 bytes -non-staged. Required extra reads, framing, tokens/cache, latency and accepted model -outcomes remain unmeasured. Shared code and restored quota information efficiency -do not establish a positive complete-cost diff; C1 remains open. - -The current-Task title increment removes the Python exact-source matching algorithm. -Complete composition and the legacy display delegate now share its TypeScript -owner. Only an exact duplicate of `text` or `title` in the unique, verified, -complete current selected Task can become a same-capture `title_ref`; the full -original declaration and its provenance stay inline. Missing, differing, -incomplete, ambiguous, failed, done or archived sources do not qualify. The -historical character threshold, including Unicode code points, stays unchanged. -The old display-only label-prefix omission remains local and is not applied to -the complete contract. This delegate retires with the legacy display callers. - -Complete readers validate identity and reference ownership again, rejecting -conflicting inline values, chains, malformed paths and unavailable targets even -with valid hashes. Historical envelopes retain the full Task source, without a -relocated dangling lane reference. Real File/SQLite CLI with differential delivery -off now passes the two previous multiline-title cases; captured variants also -verify exact readback and refusal before state mutation or spend. Delta and -lost-baseline/full recovery preserve changed requirements. Existing independent -Todo detail still returns the full declaration. This qualifies local transport -semantics, not installed App adoption or model behavior. - -For a fixed synthetic current-Task fixture, the original non-staged CLI frozen -at `895f38fc5` is 28,585 compact UTF-8 JSON bytes and the fused contract is 29,780 -(+4.18%). Captured original entry/review/writeback total 29,906 versus 29,863 fused -bytes. The no-current-Task control remains 20,543 versus 21,738 non-staged bytes. -These totals exclude request framing, extra material reads, tokens/cache, latency -and accepted outcomes. They restore quota's existing sharing in the common path; -they do not establish positive full-cost benefit. - -The vision-audit increment now moves the nested exact-match algorithm from Python -into that same TypeScript owner. Complete and historical display callers share -only an identical full audit, including unknown facts, negative evidence and -ordered obligations, when its reference is smaller. Different JSON types are not -equal: the old Python `True == 1` comparison could erase a channel difference; -that case now stays inline. Short audits also stay inline. The root retains the -complete audit and judge; legacy display metadata remains in its adapter. - -Complete recovery rejects missing, malformed, chained or conflicting audit/judge -references even with recomputed valid hashes. Existing historical envelopes still -obtain their judge from the inline root, so no moved reference dangles; their -existing projection limits are unchanged. Real isolated File/SQLite CLI captures -with an active prior vision verify the full judge, exact capture readback and -rejection before state mutation or spend, without differential delivery enabled. -Delta/full and lost-baseline recovery retain changed requirements. Fixtures with -no active vision correctly emit no audit and cannot qualify this path. - -With the original CLI projection frozen at `895f38fc5`, the fixed synthetic audit -fixture uses 22,337 non-staged compact UTF-8 JSON bytes versus 23,333 fused (+4.46%). -Captured original entry/review/writeback total 23,658 versus 23,416 fused bytes. -The no-audit control remains 20,543 versus 21,738 non-staged bytes. These are not -tokens/cache, latency, extra reads, framing or accepted outcomes. Restored sharing -and fewer rule owners do not prove positive full-cost benefit. The legacy audit -delegate retires with its display callers; remaining consumer retirement and -packaged/outcome qualification still keep C1 open. - -Rejected admission now uses the same complete composer before immutable capture -when the decision has an interaction contract, including an unhealthy paused -source. A false `ok` still prevents host handoff and native context-baseline -publication and retains the failing exit status. Composition grants no delivery -or settlement authority. Invalid complete sources fail validation before capture. -Errors before a work contract exists retain their original typed diagnostic and -recovery facts, with either CLI flag spelling; they do not acquire a manufactured -work contract or pass through the historical envelope renderer. - -Isolated real File/SQLite CLI checks cover missing work, unavailable capability -and selection-required reentry under both App-heartbeat and generic profiles. -They preserve the original receipt on reentry and create no spend, baseline or -unauthorized state mutation. Capture consumers are being moved to exact complete -readback while keeping explicit historical long-route recovery coverage. This -qualifies local transport and refusal semantics, not installed App adoption or -all-provider/full-path delivery. Remaining consumer retirement and packaged -single-session outcome/cost qualification still keep C1 open. - -Subsequent observation qualification separates two issues. #7464 repairs the -cache test's comparison of independent live observation clocks while retaining -all other facts. #7468 preserves the existing authority owner's typed rejection -and backup/migration recovery in `quota status/plan`, whose early failure return -had hidden that information. Unmigrated ordinary reads remain refused under the -accepted #7032 cutoff; File/SQLite retain their scope-isolation checks. The new -recovery assertions fail on the previous implementation and the corrected -scope/diagnostic/authority selection passes 156 tests. These independently -reviewable fixes are absorbed by the integration candidate, not evidence of -installed adoption or improved outcomes/cost. Earlier failed runs remain -historical evidence; these diagnosed failures are no longer open investigations. - -For an unhealthy-paused synthetic source, the original CLI projection frozen at -`895f38fc5` uses 6,325 compact UTF-8 JSON bytes and the complete contract uses -6,639 (+4.96%). The extra binding preserves common validation; this is no efficiency -win. Tokens/cache, latency, extra reads, framing and accepted outcomes remain -unmeasured for this case. No live model experiment is implied by these checks. - -The shared reference owner is merged in #7457. Its -Task-title and Explore operations use one coarse legacy projection call; complete -composition reuses those same functions inside its existing call. The integration -branch absorbs the prerequisite commits rather than carrying a copied owner. -New `should-run` emission accepts the already-composed contract or original -predecision diagnostic only; it no longer falls back to legacy packet/envelope -projection. Historical capture recovery remains explicit. Component measurements -show reduced bridge cost versus two calls, but higher cost than the original -Python projection; this is not evidence of a positive full-path quota comparison. - -The [packaged heartbeat comparison](2026-10-28-packaged-heartbeat.md) -now exercises real isolated File/SQLite CLI cold, warm and same-capture recovery -against original quota. The first result grew default context and stdout. The -follow-through shares one typed diagnostic owner across legacy and scoped native -callers and removes the replaced Python algorithms. Its independently usable -legacy-reader slice is proposed in [#7557](https://github.com/loopx-project/loopx/pull/7557); -the integration uses the identical module. Unknown fields/lists, complete retained -records, candidates and portfolio remain intact. The repeated comparison reduces -cold/recovery context by about 5.3 KB, but warm context still grows about 2.8 KB; -all-peer expansion still adds 13,940 bytes and ten CLI calls. The public v4 budget -probe still fails on both preceding and current integration wheels. No positive -complete-cost diff, default performance or model benefit is qualified. Continue -within C1 on warm reconstruction/metadata cost and remaining consumers; this does -not promote the candidate by default or qualify the separate controller experiment. - -The integration also adopts the merged [#7528](https://github.com/loopx-project/loopx/pull/7528) -overlay in that same context codec. Relocated exact evidence can share one base -subtree while current and unknown controls remain literal, including through the -scoped C1 wrapper. The ledger separates the positive relocation-only byte result -from the repeated packaged comparison: ordinary warm input still grows about -2.8 KB and the v4 budget failure remains. This removes a demonstrated transport -redundancy without establishing a positive full-cycle or outcome result. - -These cost and budget results remain pinned to their ledger revisions. The -[later mainline integration](2026-10-28-packaged-heartbeat.md#mainline-integration-and-immutable-reader-identity) -repairs native projection and original-capture reader wiring; it does not rerun -or qualify those model/full-cost comparisons. The subsequent -[signed-material checkpoint](2026-10-28-packaged-heartbeat.md#signed-complete-material-staging) -extends the same material owner to validated complete inputs and preserves -original detail positions through scope filtering. This removes that consumer's -full-material fallback when staging earns its transport bytes. It does not -change the Host's default reading policy or qualify model retention, full costs, -remaining caller/writer migration or historical-reader retirement. C1 and its -original quota-baseline gate stay open. - -## Historical candidate block 5 - -### Local registered Goal material checkpoint - -The complete Turn writer and existing native context-delivery opt-in now request -full registered Goal material before capture. The source adapter returns original -UTF-8 text for unmarked or mixed files; the existing TypeScript context owner -checks the full-file revision and fulfills that read. Existing marked-region -lineage and canonical Todo authority remain. Ordinary quota with delivery off -keeps progressive reads. The bridge requires a `complete_goal_v1` acknowledgement; -an older runtime cannot silently ignore the request. - -Automatic business-work Host context uses `host_dispatch_context`, which refuses pending or -invalid Goal material before provider loading. Historical `host_context` metadata -reads remain available for original-version interpretation and necessary result -finalization; stored captures are not rewritten. This is a bounded material -delivery prerequisite. General capability-read interlocks, current-condition -revalidation, packaged adoption, real-model adherence and complete costs still -need their own evidence. Replan material-reading invocations retain their staged -reader and work restrictions. C1 remains unqualified. - -### Current preference initial-read integration - -The C1 candidate incorporates the existing selector repair from -[#7935](https://github.com/loopx-project/loopx/pull/7935): the initial read carries -the preference owner's complete current scoped view, including corrections, -retirement, empty replacements, provenance and advisory authority. It reuses the -same selector and source owner. It does not change activation, grant authority, -or replace a later action's required fresh scoped read. - -Integration checks reuse the native capture reader and executor projection, -rather than requiring the retired capsule at the complete-source root or treating -navigation as an inline decision. The checks retain the delivery-off progressive -Goal read and verify the native default's complete inline Goal, canonical task, -later requirement change, damaged preference storage and signature refusal. -Five old layout assumptions fail on the pre-integration candidate too; after -adapting the tests, six complete modules pass 143 cases. Actual native exec and -CodeMode paths pass two cases with a deterministic loopback provider; six -TypeScript modules pass 124 cases. These counts describe those scopes only. - -The complete CLI budget module still has four failing test groups, 39 passes -and one environment-dependent skip. Its observed small Markdown, crowded plans -and compatibility-view limits remain exceeded; the original five size holds and -their historical measurements are retained. No ceiling, fixture workload or -production prompt was reduced to hide a failure. This is source integration, -not a passing whole-C1 quality receipt, merge readiness, installed adoption, -natural-model behavior or a full-cost benefit claim. - -### Canonical Todo projection cost qualification - -A matched observation at main `f941b5939` and C1 `c59777597` uses the existing -`todo project-markdown` operation with its freshly read provider revision. -File/SQLite each cover one Todo, 36 Todos with/without Vision and 18 Todos across -three agents: 16 projection transitions, 32 surface conditions and 64 before/after -quota/plan responses. Complete canonical rows remain identical within every -transition. Independent full-file and excluded-region hashes reconstruct the -delivered Goal narrative, including its final stop. Unmarked source remains full; -only the normal writer's generated regions become excluded. No source-adapter, -projection policy, output threshold or fixture workload changed. - -The measured component is normalized parsed CLI argv JSON plus actual stdout, -including the emitted Goal `cat` command when that response requires it. At C1, -projection reduces a crowded plan observation by 7,698 bytes without Vision and -7,697 with Vision; the multi-agent plan decreases by 3,697. Small quota/plan -observations instead grow by 364/75 bytes. Projection itself costs 1,667–1,700 -measured bytes; counting both complete canonical readbacks as one-time audit cost -moves the positive cases' conditional break-even to 7–9 repeated observations. -This is an accounting scenario, not a recommendation to regenerate each Turn. - -The existing projection also benefits main. With both snapshots' generated Goal -regions, C1 plans remain 23–24 measured bytes larger; quota is 959 bytes larger in -the small case and 1,958/1,759 larger in the crowded cases without/with Vision. -The ordinary multi-agent quota observation supplies neither inline Goal nor a -Goal read in either snapshot, so it is excluded from Goal-equivalent cost claims. -These observations qualify the existing source/projection route, not a new C1 -optimization, identical complete decision semantics, model adoption or full net -benefit. RPC, CPU, invoices, outcome value and natural-model use remain unmeasured. - -The original unmarked-source budget cases and all five historical holds remain -unchanged. Crossing a limit on this separately projected workload does not repair -or relabel those failures. Continue through the existing writer/reader owner and -the original quota single-session acceptance; do not delete unmarked Goal text, -relax signed-source fallback or add another compaction algorithm for these bytes. - -### Generic Host dispatch and saved-result recovery - -The shared executor now calls the existing TypeScript `host_dispatch_context` -owner before a new Host attempt is recorded, confirmed or launched. A valid -complete-source commitment with an unfinished Goal narrative read previously -reached a custom callback or external argv through this generic path; named -adapters already had their own check. The repair adds no decision owner, state, -vocabulary, general capability-read obligation or activation setting. - -Fourteen File/SQLite cases cover callback and real argv dispatch for valid, -pending-Goal and historical requests, plus saved typed-result recovery. The -pending cases have no Host effect; valid and historical controls reach the Host. -Saved results continue through their original validator without another Host -attempt. The existing staged replan material-read exception remains owned by -the same TypeScript rule. Two actual native exec/CodeMode paths pass with the -deterministic loopback provider. This is synthetic source-checkout qualification, -not natural-model adoption, installed behavior or whole-C1 acceptance. - -The three complete capture, Turn-driver and manager-context consumer modules -pass 345 cases on the integrated source, including that new coverage. This does -not rerun every earlier adapter, budget or backend qualification. - -A paired component observation adds one `host_dispatch_context` RPC for a new -complete-source attempt: normalized params JSON plus result JSON totals 42,771 -bytes on File and 42,828 on SQLite in the fixed fixture. Saved-result recovery -retains its existing single lineage RPC and identical measured bytes. Historical -requests without a complete source add no RPC. The baseline function is read -from the frozen pre-repair commit and runs with the same owner and fixture; -this isolates the dispatch component rather than replaying a whole branch run. -RPC framing, CPU, model input, invoices, outcomes and full net benefit are not -measured. This correctness check increases fresh-attempt cost; it is not a byte -saving, a same-capture body-size measurement or a repair of the five size holds. -The shared existing phase/helper is sufficient; a second wrapper or policy owner -would add no bounded refactoring value. Writer/reader retirement and the original -quota single-session outcome and complete-cost comparison remain open. - -### Goal refusal before automatic-start reservation - -The generic dispatch check now runs after original-capture staging selects the -input and before automatic-start reservation, publication or new journal writes. -It uses the staged original plan when present and the current request otherwise. -The previous ordering could reject a pending Goal without launching a Host yet -still reserve its interval and write a journal/capture. A subsequent valid Turn -then waited for that interval. The same TypeScript rule is relocated; there is -no new rule, state, configuration, bypass, persistent cache or extra RPC. - -Four File/SQLite refusal cases reproduce that waiting state on the frozen -pre-repair source; six valid/historical controls pass. The strengthened public -matrix covers callback and real argv, staged capture, actual cadence state and -saved-result recovery in 22 passing cases. Two actual native exec/CodeMode cases -pass with the deterministic loopback provider. Existing result recovery retains -its metadata/finalization route without reserving or starting another attempt. - -The four complete capture, Turn-driver, manager-context and cadence modules -pass 357 cases. The first combined run retains 356 passes and one old root-layout -failure, also reproduced in a clean frozen pre-repair checkout. That cadence -test now reads its scheduler field through the actual immutable capture reader; -its original floor and refused-reduction assertions remain unchanged. - -Ten paired synthetic conditions compare frozen executor functions with the -candidate through the same real owners, fixed source inputs and separate -equal-width namespaces. Socket observation counts complete JSON request/response -lines, including errors and framing, without retaining credentials. Refused -non-capture paths use 5 to 2 RPCs; capture paths use 6 to 3. Their measured bytes -decrease by 95,293/95,405 and 97,665/97,777 on File/SQLite, respectively. The removed -calls are one cadence admission and two journal writes. Refusal leaves no new -journal/capture and keeps the lane eligible; all four subsequent valid attempts -start where their frozen controls wait. - -The six valid/historical conditions retain identical RPC counts and measured -bytes, with identical Host inputs after substituting only the separate capture -namespace. Complete-source dispatch validation still costs its existing RPC. -This is warmed RPC component qualification with an intentionally stopped Host, -not a whole-branch model/outcome experiment, same-capture body reduction, CPU, -invoice or full net-benefit result. The original five size holds and whole-C1 -writer/reader and outcome acceptance remain open. Consolidating journal writes -needs its own interruption/recovery qualification; this ordering fix does not -coalesce the durable Host-attempt checkpoint or confirmation boundary. - - -### Current main integration and the original quota workload - -The complete-source path now reuses main's Progressive and Delta owners. The -existing complete-decision owner checks the original source before presentation -plans are applied. Saved-capture transport options change only the derived -selection recipe; they do not mutate the signed original or create another -admission. The shared source-preserving edit transport retains sparse numeric -identity, current requirements, explicit-off behavior and same-capture recovery. -The replaced native-quota and bounded-settlement adapters are retired rather -than retained as competing production paths. - -The original fixed quota task is repeated against main `24f46874bc97` and the -integrated runtime `675cd9d23b5b`: three repetitions of cold, warm and compaction -recovery on File and SQLite (36 conditions). All conditions produce the same -independently checked artifact and one debit, including replay. Both arms use -the same Python executable and unchanged workload/observer. The provenance -check covers 252 parent and internal-child observations. Counts include all -caller output, accounting-child RPC directions and observed Python regular-file -IO. Concurrent validation prevents a latency/CPU conclusion; native provider IO, -model input/cache/output, billing and natural effectiveness remain unmeasured. - -| Provider / scenario | All caller stdout, main → candidate (bytes) | RPCs | RPC wire bytes | -| --- | ---: | ---: | ---: | -| File / cold | 55,754 → 35,834 | 242 → 209 | 1,468,459 → 1,474,720 | -| File / warm | 68,136 → 62,107 | 334 → 292 | 2,151,083 → 2,217,775 | -| File / recovery | 89,861 → 61,384 | 336 → 294 | 2,156,745 → 2,214,069 | -| SQLite / cold | 56,155 → 35,908 | 242 → 209 | 1,470,295 → 1,476,592 | -| SQLite / warm | 68,557 → 62,249 | 334 → 292 | 2,153,959 → 2,218,459 | -| SQLite / recovery | 90,349 → 61,522 | 336 → 294 | 2,159,660 → 2,216,837 | - -These are medians, not an efficiency promotion. Warm output including baseline -preparation falls about 9%, but current-step output excluding that preparation -increases 7.0% on File and 6.2% on SQLite. Warm wire bytes increase about 3%; -observed Python read-plus-write bytes increase about 4%. The primary -same-capture full-to-selected-body reduction is about 87.8% on main and -82.6% / 85.4% on the candidate's File / SQLite warm paths. Candidate cold and -recovery select the full body (0% primary reduction); this is not zero net value. -Fewer RPCs and a complete checked source do not establish overall net benefit. -Original quota, writer/reader retirement and long-horizon acceptance remain open; -these observations do not erase earlier negative cohorts or frozen size holds. - -The integrated source suites pass 448 complete-caller/settlement cases, 156 -context cases and 14 work-acceptance cases; their five and ten skipped cases -remain explicitly outside this run. The two focused TypeScript modules pass -67 tests and the control-plane typecheck passes. The isolated installed wheel -passes 258 cases with one platform skip. Its 476 completed process observations -and 136,450 Core-module observations show no source-origin violations; abrupt -exit probes do not emit the audit's exit-time observation. All 1,897 compared -packaged source files match the measured product source. This qualifies the -packaged paths above, not live installation or the outstanding net-benefit gate. - - -### Selected-reader and settled-record transport - -The explicit reader now sends only the source containers along the requested -literal escaped addresses. The existing TypeScript selector still validates -RFC 6901, array indexes, failed batches and their recovery parent; Python renders -the original digest-checked values. Array lengths, container kinds, initial -navigation, full discovery, historical pinned order and native section-read -verification are retained. No additional cache, metadata file, pointer parser, -read obligation or retention claim is introduced. Main's selected-source IO and -shared native replay owner are reused. - -The combined refresh caller also requests a smaller final read from the existing -TypeScript settlement owner. After that owner verifies a settled Turn, this -explicit projection returns the same identity, controls and three receipts with -six unused Run/event bodies set to null. Default/full reads and all pending -recovery retain their complete original bodies. The optional internal RPC field -changes neither admission nor accounting, and adds no CLI or product workflow. - -The unchanged original quota workload is repeated against main `886f2cdff4b2` -with the same Python, materials, independent artifact check and replay: three -repetitions of cold, warm and compaction recovery on File and SQLite, 36 conditions. -All produce the same artifact and one debit. The 252 parent/accounting-child -source observations are clean; the measured product source remains unchanged -through the run. Medians include both RPC directions and all required reads: - -| Provider / scenario | All caller stdout, main → candidate (bytes) | RPCs | RPC wire bytes | -| --- | ---: | ---: | ---: | -| File / cold | 55,946 → 35,930 | 241 → 208 | 1,465,253 → 1,429,981 | -| File / warm | 68,364 → 62,287 | 332 → 290 | 2,143,831 → 2,147,306 | -| File / recovery | 90,181 → 61,556 | 334 → 292 | 2,149,657 → 2,143,784 | -| SQLite / cold | 56,343 → 36,004 | 241 → 208 | 1,467,027 → 1,431,735 | -| SQLite / warm | 68,793 → 62,429 | 332 → 290 | 2,146,719 → 2,149,912 | -| SQLite / recovery | 90,666 → 61,694 | 334 → 292 | 2,152,475 → 2,146,508 | - -Warm RPC count falls 12.7%, but wire bytes still rise 0.16% / 0.15%. Current-step -stdout excluding preparation rises 7.0% / 6.2%; observed Python read-plus-write -bytes rise about 4%. The primary same-capture full-to-body reduction is 82.6% -for the candidate's warm paths versus 87.8% for main. Candidate cold/recovery -still select the complete body: 0% primary reduction does not mean zero net value. -The earlier topology-only cohort also remained negative; it is not combined with -this cohort. Lower cold/recovery transport does not establish overall benefit. -CPU/latency, native provider IO, model input/cache/generated output, invoices and -natural long-horizon outcomes remain unqualified. Earlier cohorts and frozen -size holds retain their original results; original C1 acceptance stays open. - -Real public CLI replay preserves all 15 successful/rejected selection observations -against main, including exact large integers, escaped keys, invalid indexes and -whole-batch rejection. A dropped-source-structure mutation fails the independent -value oracle through that same entrypoint. The settlement suite checks complete -parity by default and throughout six recovery states; its 137 TypeScript tests -and control-plane typecheck pass. Final installed-wheel and premerge readback -are recorded with the submitted exact head, separately from live installation. - -The final isolated installed wheel passes 325 tests with one Linux-only skip; -1,897 packaged source files match the measured product source. Completed-process -module-origin audits are clean; abrupt exits remain outside that audit. The -expanded source settlement run has 274 passes, four failures and one platform -skip. Both File and SQLite failures reproduce unchanged on main `886f2cdff4b2`: -a receipt-bound task becoming deferred returns `quota_skip` instead of its -original closeout recovery, and due successor-replan replay loses its action. -The initial report interpreted the guard's `should_run`/`delivery_allowed` facts -as conflicting. The follow-up below corrects that diagnosis while preserving -the failed run. The smaller record projection is not used on those failing paths; -no relaxed receipt rule is used to turn them into passes. - -### Preparation and original-Turn recovery - -An ordinary guard may require a claim while forbidding business delivery. -`should_run=true` and `delivery_allowed=false` are consistent in that state: -the existing claim postcondition requires same-Turn reentry and an explicit -`execution_preparation.state=ready`. Two earlier File/SQLite tests omitted that -step before producing their artifact. They now follow the existing caller -contract and verify append-only negative-to-positive guard lineage under the -same settlement identity. Neither the earlier negative event nor native result -admission is weakened or rewritten. - -The other two failures expose a product bug. The selected-Todo IO adapter applied -ordinary execution preparation to a planning operation whose canonical -obligation already forbade delivery. A deferred task then suppressed the due -successor replan and lost its original action on replay. The adapter now consumes -that same explicit `delivery_allowed=false` fact used by the TypeScript -interaction owner before reading execution leases. Planning still permits no -ordinary delivery or debit. Omitted facts retain all existing preparation checks; -ordinary claims, conflicts, receipt identity and once-only recovery keep their -existing owners. No new decision owner, protocol field, permission, cadence -ordering or RPC is introduced. - -With the same corrected test harness, frozen pre-repair product source passes -the two ordinary-delivery cases and fails both planning cases. The candidate -passes all four and the complete 30-case execution-preparation matrix. The -original four-failure cohort remains historical evidence; fixing caller ordering -and fixing product routing are distinct results. This closes the demonstrated -planning-route defect, not whole-C1 acceptance or overall efficiency. - - -The unchanged original quota task is also repeated against the same main source -for three repetitions of each File/SQLite cold, warm and recovery condition. -All 36 conditions preserve the independent artifact and one debit with replay; -252 parent/accounting-child source observations are clean and product hashes -remain unchanged. Warm RPCs are still 332 to 290. Wire bytes rise 0.165% on File -and 0.073% on SQLite; current-step stdout excluding preparation rises 9.5% and -6.2%, and observed Python read-plus-write bytes rise 4.1% and 3.8%. The primary -same-capture full-to-body reductions are 84.1% / 85.5% on the candidate versus -89.2% / 87.8% on main. Candidate cold/recovery still select the complete body. -This is a separate cohort, not a causal subtraction from the preceding cohort. -Planning-route correctness does not resolve the ordinary warm-path cost tradeoff. -Native provider IO, latency/CPU, model/cache/generated output, invoices and -natural long-horizon effectiveness remain unmeasured. - -The expanded source settlement suite now passes 278 tests with one native -Windows PowerShell skip. A fresh isolated installed wheel passes 246 tests, -including the four corrected CLI cases, ordinary/native preparation, settlement, -combined closeout and runtime integration. Its Windows PowerShell and Linux -thread-group exit cases are skipped on this host. All 1,897 compared packaged -source files match, including the changed adapter; 227 completed processes and -102,420 Core-module observations show no source-origin violations. Abrupt exits -remain outside the exit-time audit. The original isolation guards are retained; -this does not install or promote the candidate on the active runtime. The shared -IO adapter is the bounded change; another contract projection or lifecycle -wrapper would add ordering risk without a required caller. - - -### Native quota capture publication - -The qualified native quota caller now reuses the complete decision it has just -published as its source-recovery reference. Previously it wrote an identical -complete projection before asking the same TypeScript owner for optional -presentation. Thirty saved capture pairs in the preceding qualified workload -are byte-identical. The adapter now passes that producer-owned reference into -the existing native preparation; external continuity input cannot supply it. -Derived required views still receive separate captures when their content -differs. Standalone APIs and uninitialized native fallback keep their existing -publication paths. There is no hard link, persistent cache, new file format, -semantic owner, read obligation, permission or RPC. Existing historical paths -remain readable under their original identity and digest. - -The original quota workload is repeated against main `6a9264034605`, with three -repetitions of File/SQLite cold, warm and compaction recovery. All 36 conditions -produce the same independently checked artifact and one debit including replay. -The 252 parent/accounting-child source observations are clean; product hashes -remain unchanged during measurement. All 30 candidate captures avoid the -redundant complete projection. This removes a duplicate producer write; it does -not omit the complete source or claim retained model input. - -| Provider / scenario | All caller stdout, main → candidate (bytes) | RPCs | RPC wire bytes | Observed Python reads | Observed Python writes | -| --- | ---: | ---: | ---: | ---: | ---: | -| File / cold | 55,429 → 35,654 | 241 → 208 | 1,459,302 → 1,424,420 | 336,589 → 287,832 | 127,933 → 120,437 | -| File / warm | 67,723 → 61,768 | 332 → 290 | 2,133,937 → 2,137,552 | 552,218 → 511,741 | 238,580 → 201,925 | -| File / recovery | 89,316 → 61,059 | 334 → 292 | 2,139,532 → 2,134,660 | 580,809 → 519,604 | 233,054 → 195,818 | -| SQLite / cold | 55,826 → 35,728 | 241 → 208 | 1,461,076 → 1,426,174 | 344,133 → 295,172 | 129,145 → 122,147 | -| SQLite / warm | 68,136 → 61,910 | 332 → 290 | 2,136,689 → 2,141,039 | 560,254 → 519,489 | 240,008 → 204,526 | -| SQLite / recovery | 89,801 → 61,197 | 334 → 292 | 2,142,354 → 2,137,296 | 588,955 → 527,354 | 234,484 → 197,664 | - -Warm observed Python read-plus-write bytes fall 9.75% / 9.53%, and writes fall -15.36% / 14.78%. RPCs fall 12.65%, while wire bytes still rise 0.169% / 0.204%. -Current-step stdout excluding preparation rises 7.02% / 6.24%. The primary -same-capture full-to-body reduction is 86.1% / 84.7% on the candidate versus -87.9% on main; candidate cold/recovery still select the complete body. Tool -stdout is not model-generated output. Native/provider IO, latency/CPU, model -input/cache/output, invoices and natural long-horizon outcomes remain -unqualified. Earlier cohorts retain their original negative observations; -these separate cohorts are not subtracted to claim a causal cost reduction. - -The same test harness on frozen pre-repair C1 source retains four semantic -controls and fails four duplicate-storage assertions. The candidate passes the -full 265-case native/lifecycle/reader/cost suite; its final advertised-reference -mutation also rejects changed bytes without changing the native journal. The -64-case public capture/model/recovery run passes. A fresh isolated installed -wheel passes 493 cases with one Linux thread-group exit skip. Its 1,897 compared -packaged source files match the measured product, including both changed IO -adapters; 278 completed processes and 45,049 Core-module observations have no -source-origin violations. Seventeen undistributed tracked assets/dev fixtures -remain separately listed, and abrupt exits remain outside the exit-time audit. -This qualifies the packaged paths, not active installation or independent PR -approval. The bounded change reuses the existing recovery reference rather than -adding a writer, helper framework or second semantics owner. - -### Settled result-value transport - -The existing combined-closeout caller requests `include_record_bodies=false` -after the TypeScript settlement owner verifies the original identity and all -receipts. That projection previously removed the top-level Run records but -still returned the same writeback/spend bodies inside four result values. -Those values are unused by this caller. The existing bundle helper now clears -them in that already requested, fully settled projection; identity, receipt -payloads, failures and all other controls retain their values. Default complete -reads and every pending recovery retain their original bodies. The persisted -Runs, historical readers, accounting and public CLI result are unchanged. -There is no new option, schema, RPC, cache, Python rule or model-read obligation. - -This is an intentional change to the existing internal opt-in read projection, -not to the default reader. The only production opt-in consumer remains the -combined refresh/spend adapter. The same TypeScript harness first rejects the -old duplicate-body behavior, then passes all 137 cases on the repair, including -complete-read and pending-state parity. Real File/SQLite CLI tests independently -check the omitted bodies, unchanged receipts, persisted readback and one debit -through replay. A test-local variable collision discovered after those new -assertions was corrected without changing an assertion or the product rule; -the failed cohort remains recorded. - -The wider source run retains 276 passes, one native Windows rendering skip and -those two fixture failures; the corrected File/SQLite cases pass. The isolated -wheel retains 387 other passes, two platform skips and the same two failures, -then passes both corrected cases without a product change. Its 1,897 compared -packaged sources match the measured product, including the changed TypeScript -owner; 17 undistributed assets/dev fixtures are separately listed. Across both -wheel runs, 1,297 completed-process observations and 535,308 Core-module -observations show no source-origin violations. Abrupt exits remain outside the -exit-time audit. This qualifies the tested installed-wheel paths, not active -installation, independent review or merge authority. - -The unchanged original-quota workload is repeated three times per provider and -scenario against frozen main `0423908e9cf4`. The candidate includes that target -and the earlier C1 changes. All 36 conditions reach the same independently -checked artifact with one debit, including replay. All 252 parent/child source -observations match their pinned arm, and product hashes remain stable through -measurement. Child RPCs are already included in parent accounting. - -| Provider / scenario | All caller stdout, main → candidate (bytes) | RPCs | RPC wire bytes | Observed Python reads | Observed Python writes | -| --- | ---: | ---: | ---: | ---: | ---: | -| File / cold | 55,472 → 35,678 | 241 → 208 | 1,459,815 → 1,400,685 | 336,894 → 288,097 | 128,010 → 120,512 | -| File / warm | 67,892 → 61,813 | 332 → 290 | 2,135,559 → 2,114,908 | 552,831 → 512,164 | 238,851 → 202,786 | -| File / recovery | 89,386 → 61,102 | 334 → 292 | 2,140,392 → 2,111,166 | 581,330 → 520,030 | 233,207 → 195,945 | -| SQLite / cold | 55,868 → 35,752 | 241 → 208 | 1,461,586 → 1,402,351 | 344,435 → 295,437 | 129,221 → 122,222 | -| SQLite / warm | 67,403 → 61,955 | 332 → 290 | 2,136,570 → 2,116,685 | 559,999 → 519,924 | 239,399 → 203,919 | -| SQLite / recovery | 89,875 → 61,240 | 334 → 292 | 2,143,241 → 2,113,734 | 589,491 → 527,788 | 234,645 → 197,795 | - -These are three-observation medians, not a significance claim. Warm wire bytes -fall 0.97% / 0.93%; the observed ranges are 2,134,771–2,135,559 versus -2,113,851–2,115,192 for File, and 2,136,570–2,138,375 versus -2,115,544–2,117,498 for SQLite. Warm Python read-plus-write bytes fall -9.69% / 9.45%, and RPCs fall 12.65%. These cumulative C1 comparisons do not -attribute the earlier RPC/IO reductions to this small projection change. - -Current-step stdout excluding preparation still grows 6.66% / 8.73%. -The primary same-capture full-to-selected-body reduction is 84.7% / 86.1% -versus 87.7% / 89.2% on main; its three-repeat ranges are 84.6%–86.2% / -84.7%–87.6% for the candidate and 87.7%–87.9% / 87.7%–89.2% for main. -Candidate cold/recovery still select the full body. This projection changes -internal transport, not model-generated output. CPU/latency, native/provider -IO, model input/cache/output, invoices, natural adoption and whole-workflow -net benefit remain unqualified. Earlier positive and negative cohorts retain -their original versions and results; separate cohorts are not subtracted for -causal attribution. C1, its final reader exits and overall acceptance remain open. - -During qualification main advanced to `7f550aef58a8`, changing the Chat -original-conversation fallback and its two frontend fixtures. That later -combination has not been qualified; the cohort and integration base remain -`0423908e9cf4` rather than being relabeled as the moving target. - -### Main integration and independent context layers - -Implementation `6f00db17c654` integrates main `918844a01746`. It retains the -invocation-local initial plan while adopting main's independent Delta path: -explicit Progressive off plus Delta auto does not publish progressive navigation -or observed-field reuse. Digest-bound file deltas and complete current recovery -remain available. Normal quota presentation and managed preview already consume -the shared complete-source owner; this integration does not repeat their cutover -or retire version-pinned historical journals. C1's RFC increments follow main's -annex layout without dropping either language's obligations. - -Actual Codex with static loopback inference qualifies default Progressive and -independent Delta in both source and isolated wheels. Complete unchanged large -acceptance fields still reduce the matched warm selected BODY from 14,386 to -2,583 bytes; unverified observed-field continuity restores 14,386 bytes. The -independent-Delta case reconstructs every original field and reads complete -current recovery through the actual client. Saved-source identity refusals, -explicit off and lost-predecessor/compaction recovery also pass from the wheels. -These are transport checks, not a new model experiment or installed adoption. - -A new matched engineering cohort uses the same synthetic three-step Task with -main's original quota product entry: File/SQLite, cold/warm/recovery, three -repetitions and the same checked artifacts and single debits. It records 36 -scenarios and 60 Turns, including preparation and child RPC/IO once. BODY is -reconstructed from returned pages in byte-offset order, not the backing file's -size. SQLite warm current-step BODY is 23,617 → 22,970 bytes (−2.74%), CLI stdout -58,949 → 48,401 bytes (−17.89%), RPCs 294 → 290 and framed RPC bytes about −3.74%. -Including preparation, stdout is 115,568 → 93,613 bytes, RPCs 586 → 578 and framed -traffic about −4.01%; observed Python regular-file reads/writes fall about -8.80%/26.18%. Node/kernel/provider IO and model costs are not measured. File warm -instrumented CLI time increases about 7.5%; this is not latency qualification. -The lightweight quota fixture does not contain the large acceptance bodies, so -its result does not attribute savings to field reuse. It validates the measured -steps, not completion of the original three-step Task, natural model adoption or -whole-C1 net benefit. Historical failures and the remaining reader, quality and -independent-acceptance obligations remain open. - -### First-read convergence after main adoption - -The subsequent integration `339f01e08782` adopts main `39770a960483`, including -the landed first-read producers/readers. The last `project_codex_context` test -caller now uses `prepare_codex_context`; the unused Python wrapper is removed. -Recorded source versions and journal recovery codecs retain their separate -support obligations. Benchmark preflight tests follow the emitted first BODY -through EOF, verify its reference/source/selection digests and required fields, -and retain the complete original source instead of expecting a navigation reply. - -A fresh, source-stable 36-scenario cohort against that main retains the same -synthetic Task, artifacts, single debits and cost boundaries. SQLite warm BODY -is 24,016 → 23,285 bytes (−3.04%), CLI stdout 59,898 → 49,136 (−17.97%) and RPCs -292 → 290. Framed RPC bytes **increase 2.93%**. Including preparation, stdout is -117,466 → 95,041 (−19.09%), RPCs 582 → 578, framed bytes **increase 2.14%**, and -observed Python reads/writes fall 9.12%/26.28%. These results supersede neither -the preceding cohort nor natural-model qualification. The current-main native -control still delivers 14,386 warm BODY bytes versus 2,583 with field reuse; -that large-field component is absent from the lightweight quota fixture. - -Configured Python typing remains non-passing: the prior C1 has 4,809 diagnostics -and this integration 4,814. The five additions are in unchanged main-owned -modules, verified by identical Git objects; they are not waived. Reader exits, -independent review, installed adoption and whole-C1 net benefit remain open. - -### Complete-source qualification and native execution ordering - -The no-write behavior qualifier now accepts Core-validated complete v1 sources -in either experimental arm and reports the actual packet version. Retained and -counterfactual candidates use the existing complete composer by default; an -already captured complete source keeps its original host binding and settlement -composition. Raw fixtures use the Core's default composition, without inferring -a different binding from candidate metadata. The versioned v0 state matrix -remains an explicit historical control, including action aliases refused by the -current owner. This does not retire supported historical codecs. - -Pair preflight checks both confidentiality boundaries before either actor call. -Complete candidates retain source/integrity validation and exact paired origin; -provider instructions and encoded scheduler scanning follow the actual packet -layout rather than the arm name. Current-format ablations are refused before -actors. Semantic-negative fixtures are changed at their original source and -composed by Core, so a validly bound pair still has to pass the independent -fixed strategic-chain oracle. Tampered bindings remain separate negative cases. - -The integrated native Host exposed an ordering gap: its delivery guard required -the Task lease that the model callback would acquire only after launch. Explicit -non-report Tasks now enter the existing lease lifecycle before that guard; the -managed callback reuses and checks that same Task. Canonical missing work still -reaches the kernel's structured refusal, unavailable authority fails closed, and -a conflicting execution lease is not borrowed. Report and recorded-resume -paths retain their existing lifecycle. No guard or independent validator is -relaxed, and this does not qualify automatic selection without an explicit Task. - -The frozen main integration first recorded 646 passing and 22 failing tests. -Development runs retained their 292/4 and 356/1 results; the latter caught an -early-lease exception replacing the missing-work refusal. After correction, a -new source-stable eight-module cohort passed all 357 tests, including the 61 -native File/SQLite, original-session, HTTP, refusal and independent-validation -cases. The main conversation-binding TypeScript module passed 59 tests; the -five changed qualification Python modules passed typing. These are local -synthetic actor/provider checks, not live-model behavior or full-cost evidence. - -A fresh verified Chat bundle and isolated wheel contain 1,815 Python/TypeScript -sources matching the tested product bytes. Installed complete requests, current -and explicit historical pairs, wrong-source refusal and the real adapter with -a local transport double passed with 300 observed LoopX modules and no checkout -Core imports. Native Host was imported, not exercised as an installed journey. -The first stale/missing-bundle build, harness preparation failure and historical -v0 large-integer source mismatch remain recorded; the legacy positive control -uses its original representable fixture, while current-format large integers -remain checked. No active installation, live model run, whole-C1 acceptance, -quality/readiness or net-benefit qualification follows from these results. - -The subsequent direct-writer audit found the public task-orchestration smoke -still creating v0 input, and an unused scenario packet builder with no caller. -The smoke now composes each host's complete source with its original scheduler -context and reads back the final Codex and Claude Host requests. Both preserve -the complete source and primary Task selection, alongside the existing child -context and native-operation assertions. The unused builder is removed rather -than replaced by another unused abstraction. The explicit versioned v0 state -matrix and supported historical writer/reader remain. The audit of Python -callers in product code and examples now finds only that historical matrix -calling the retained writer; it does not certify dynamically constructed calls. - -The public smoke passed before and after migration. Default configured Mypy -passed all 17 roots at the preceding `a706379f70` checkpoint and after this -change; this updates the current typing qualification without rewriting the -earlier 4,809/4,814 failures. These checks do not exercise real child creation, -prove live-model adoption or qualify a new installed package. - -One source-stable four-module regression cohort passed all 247 cases, covering -the real Turn driver, the active portfolio sources, the retained historical -corpus and replan Host-context projections. This is a separate current caller -qualification, not an extension of the earlier 357-case or installed run. - -### Installed native lifecycle after main integration - -Integration `5091fb82a9` adopts main `9d276f6cb9`'s original-context answer -repair. One source-stable cohort of the native Turn Host and private-conversation -modules passed all 466 cases. After rebuilding and verifying the Chat bundle, -the same two modules ran against an isolated installed package with unchanged -fixtures, real File/SQLite state, native protocol and HTTP, original sessions, -independent Task validation, source/permission refusal and recovery. The model -and external provider remain synthetic; this is no longer an import-only native -check, but it does not qualify an active App or live-model adoption. - -The first installed cohort recorded 459 passes and seven preparation failures: -the seven explicitly activated account-routing cases lacked their separately -distributed optional package. After installing its same-commit 0.15.3 wheel, a -new complete cohort passed all 466, without combining partial reruns. The first -failures and 61 audit-helper deprecation warnings remain recorded; the helper's -keyword argument was corrected separately from product code. - -All 1,815 packaged Core Python/TS files and the optional distribution's 24 files -match committed and installed bytes. The existing private fault-process test -driver is outside this wheel qualification. Across 48 observed Python processes, -1,228 Core modules, seven optional-provider modules and four observed subprocess -source paths came from the installed distributions, with no checkout Core or -provider imports. Fixtures and installed sources stayed unchanged. Default -17-root Mypy and the integrated conversation-binding TS module's 60 tests passed. -Earlier 357/247-case and PostgreSQL evidence retain their own versions; these -synthetic correctness and provenance checks do not establish full-cost benefit. - -### Visible Goal reads and declared acceptance audits - -Integration `d80b3860ab` adopts main `ac62962255`. Independent review found -that visible Goal prompts added an unconditional full-capture prerequisite, -including ordinary/off inputs, and rejected three previously legal 4,000-character -configurations. Captured prompts now require the needed original sections; -ordinary/off prompts gain no capture prerequisite. Work-context and required -reads, explicit full-read duties, original identity/recovery, transport flags, -settlement and stop rules remain. The 4,000-character host limit is unchanged. -Across 24 matched builder inputs, main accepts 21 and the candidate 23, losing -none of main's legal inputs; one oversized input remains rejected in both. - -Both complete structured and Codex Host inputs now share the declared audit's -original trigger: read it before judging Goal acceptance or proposing closeout. -The eight File/SQLite counterfactuals cover both hosts with and without an audit; -absence tests caught and rejected an initial unconditional instruction. Twelve -synthetic historical structured-renderer cases retain exact output and input -parity. This is scoped instruction qualification, not model-retention proof. - -Heartbeat consumers now validate the complete source and read the caller-owned -original capture through its digest-checked paged reader. Original scheduler, -selection, receipt and once-only settlement oracles remain. Installed execution -exposed a test caller's implicit checkout working directory: refresh must run -from its actual disposable project. The first installed cohort recorded 60 -passes and 18 failures; an unchanged-wheel control passed after correcting only -that caller directory. No production workspace guard was weakened. - -The final source-stable nine-module cohort records **855 passes, two failures**; -the complete three-module installed rerun records **80 passes, two failures**. -Both failures retain the original raw-JSON budget: 5,519 characters exceeds -5,400 for the two long-scope backend cases, whereas matched main passes all -four original budget cases. No budget, fixture size or useful duty was reduced -to hide this regression. Earlier failed cohorts and a private audit-directory -preparation failure remain recorded. Default 17-root Mypy, six changed-path -Ruff checks and the limited semantic advisory pass. All 1,815 Core wheel sources -match the frozen tested and installed bytes; five observed Python processes, -1,179 modules and six observed subprocess source paths show no checkout Core -imports. Some children override the audit environment, so this is not an -observation of every process. These synthetic checks qualify the repaired -Goal/audit/caller slice; whole-C1 acceptance, the remaining budget regression, -live App/model adoption and complete-cost benefit remain open. - -### Preserve producer-bound heartbeat Turn identities - -Runtime `3736048363` removes an inapplicable wake instruction after the existing -producer has actually replaced the timestamp placeholder. A bound prompt already -contains its original concrete assignment and separate guard; asking the model -to replace a new wake timestamp is redundant and risks losing that identity. -Reusable unbound templates retain the original guidance. The existing binding -owner handles all four prompt modes; no new field, switch or reader is added, -and saved bodies, commands, transport flags, required reads and recovery/stop/ -settlement rules are unchanged. - -Eight mode/shell counterfactuals fail before the repair and pass afterward; -Windows syntax is emulated, not an installed Windows qualification. Thirty-two -actual-builder characterizations retain exact unbound default/off output in -16 cases and remove only the fulfilled instruction in 16 bound cases, with -unchanged other generator fields and limits. The original four real-CLI budget -cases retain their paths, scopes and assertions: the long cases change from -5,519 to **5,379 raw JSON characters**, removing 139 body characters and one -additional JSON escape character. Matched main remains 5,363. This repairs the -candidate regression; it does not establish a whole-workflow saving over main. -The 5,400/5,500/4,000 limits and independent overflow cases remain unchanged. - -A new source-stable nine-module cohort passes all **865** cases; a complete -three-module isolated installed cohort passes all **90**. These include the -original worker selection, repair, capture, replay and once-only settlement -oracles. Earlier 855/2 and 80/2 cohorts retain their original versions. Default -17-root Mypy and changed-path Ruff pass. Fresh bundle verification and wheel -source checks bind 1,815 Core sources and 24 optional-provider files to the -frozen tested bytes; five observed Python processes, 1,179 Core modules and six -observed subprocess paths show no checkout Core imports. The same audit-coverage -limits, synthetic providers, unqualified live-model adoption and complete-cost -claims apply. Independent review and whole-C1 acceptance remain open. - -### Visible host scheduler observations - -Pi, OpenCode and OpenCode 2 now read the existing scheduler observation for a -bound Agent. The same Core decision supplies the runnable state, reset token, -wait limits and terminal-source proof. This replaces those callers' ordinary -model-context reads, which could return a progressive navigation reference -without the fields their scheduler needs. OpenCode and OpenCode 2 read the -current cold-path cadence and still accept the historical cadence shape. Their -explicit host poll receipt uses its existing writer once per probe. - -The observation has no Turn, capture or settlement effect. Work delivery uses -its original context policy. Older host bindings without an Agent ID use the -explicit full observation until they acquire an Agent binding. Keep the host -adapter and CLI on the same build when upgrading or rolling back. The retained -original-version Turn readers still cover outstanding work in their supported -recovery window. - -### Recover rejected complete-source composition - -Failed composition now records the existing transport-failure contract at the -capture root, with `ok=false` and `should_run=false`. Every original input fact -is retained under `source_diagnostic`, beside the exact original receipt and -the runtime's typed composition diagnostic. Both semantic rejection and runtime -startup failure follow this path. The regular digest-checked selected reader -provides diagnostic recovery. - -Current-source consumers require a successfully composed decision before -publishing work or native claim preparation. This closes the path where a -rejected current input could be mistaken for an unversioned historical capture. -Genuine historical captures use their explicit recovery readers. A failure in -delivery after successful composition retains the validated original capture. - -Focused synthetic File/SQLite cases cover unknown actions, unknown interaction -versions and composition unavailability after admission. Their independent -oracles check full diagnostic readback, rejected execution projection, native -journal and claim-source effects, one original receipt and zero spend. Existing -pause, capture, handoff and historical recovery coverage qualifies the adjacent -boundary. Whole-C1 acceptance and live-model effectiveness remain open. - -### Codex SSH guard and managed retry - -New Codex SSH Goal prompts and onboarding guards select the complete Turn -source with the existing native begin-Turn identity. A saved bootstrap that -invokes the generator with the previous display argument can still regenerate -its guard. Explicit context-delivery Off returns the complete inline source. -With delivery enabled the prompt follows the returned same-capture reader and -the original Turn's settlement plan. The full and standalone installations -execute the owed quota command through their shared CLI entry and grammar. - -Managed-step requires a fresh complete decision at the TypeScript controller -boundary. A saved failed Turn journal still uses its original decoder. A -signed v0 preview injected at the live boundary is refused before launching the -Host, modifying the journal or spending quota. Retry uses the original Turn. - -Source and isolated-wheel File/SQLite cases cover enabled delivery, explicit -Off, regeneration from the old bootstrap, same-capture reading and settlement -replay. The native Turn test also covers a lost spend response. - -### Benchmark and MCP live reads - -New benchmark heartbeat workers request the complete decision with either -context-delivery setting. Fresh checkpoint selection requires its signed source. -Historical checkpoint recovery uses its original capture reader and Turn -identity. The explicit v0 benchmark display still needs caller retirement. - -The shared MCP live read requests the complete decision and returns its original -JSON plus the MCP guidance block. A missing or altered source binding is rejected -before delivery. The live unversioned MCP projection is removed. The existing -`complete_task` transaction continues to own claim validation and settlement. -The real stdio boundary, replay and historical recovery tests run on isolated -authority. Installed MCP clients still need end-to-end readback. - -Ordinary quota, installed App adoption, the remaining settlement callers, -and single-session outcomes and full costs remain open. - -### Staged Host dispatch and stale-work retry - -Staged dispatch reuses the last TypeScript source check before publishing the -capture or reserving a start. Current plans assemble only the complete Host -request. The external process and in-process Host then receive the same checked -transport; the external stdin writer does not reconstruct a legacy adapter. -The legacy conversion remains at the boundary for saved transitional plans. - -An exact native retry still reads the original capture. A refusal on entry to -the launch guard records a contract rejection for the attempt with no model -dispatch. This covers a missing required capability and changed work. The -journal retains the original session recovery requirement. If the operation -Host has already bound a session before the model launch guard refuses, the -next explicit retry must resume that session. Restoring the original work and -its capabilities permits that retry through the current guard. Changed work -requires a fresh eligible Turn. Unknown dispatch outcomes still require -reconciliation of the original attempt. - -Native and external stdio launch checks bind the original hard-lease execution -key. Renewal retains that key. Release and reacquisition require a fresh Turn, -even when the same Agent still owns the same Todo. File/SQLite runs through -Codex CLI and the operation-equipped app-server verify that a replacement -lease rejects the initial dispatch and explicit retry before model work or -settlement. The stdio adapter also refuses to spawn on a retry after replacement. -Renewal permits dispatch on each of those paths. - -The current check and dispatch share the canonical Todo and lease writers' -lock. For the ordinary Codex CLI, the operation Host and the external stdio -retry, an independent lease release must wait if it arrives after the current -check and before the process spawn or `turn/start` handoff. Release can finish -while Host work is running. These races exercise the real File and SQLite -owners with a synthetic Host. A registry lock held by another operation -refuses dispatch before sending the request and leaves the original attempt -available for retry. - -The writer lock cannot pause a lease's clock. The launch scope retains the -current expiry of the admitted generation and carries it to the native spawn -or `turn/start` write. The stdio bridge checks the deadline before spawning -the Host after it receives the frame. An expired lease refuses dispatch before -task work, work writeback or spending, including when the adapter has already -bound a session for the original Turn. - -After the bridge acknowledges that no Host was launched, the parent drains its -normal exit without sending a termination signal. This preserves the original -lease-expiry refusal while still requiring confirmed cleanup. File/SQLite -regressions check the refusal, the clean bridge exit and zero termination calls. - -File/SQLite cases exercise unchanged retries, capability and task changes, -recovery in the original session, historical formats, and subprocess stdin. -Visible Codex CLI JSON follows the complete source through the generated -Turn-binding command, including when complete output is implicit. The generic -quota control retains its compact response. The tests use isolated synthetic -Hosts. Installed Hosts and model outcomes require separate acceptance. - -### Bound generic CLI heartbeat - -DSH launches a generated thin heartbeat for an explicit Agent and Turn under -`generic_cli`. That JSON route now composes its current capture through the -same complete-source owner as Codex. The bound route exits the ordinary -unversioned quota writer and compactor. Selection and settlement recovery use -the existing transport binding and Agent-owned heartbeat spend. Explicit Off -stays active through selection and the original Turn's recovery. Unbound -probes and the explicit EdgeBench v0 comparison still have live callers. -Original-version capture readers serve pinned historical work. - -The same synthetic work was exercised through main `f7e3f427197b`, the prior -C1 head `6415e3607502`, and the changed product code `0057a1dbd129`. Each arm -ran three times per delivery setting and backend. The eight measured CLI -operations cover thin bootstrap, choice, binding, same-capture required -readback, writeback, recovery of the owed debit, spend and replay. All 36 runs -produced the same independently checked fixture artifact, two receipts for -initial admission and selection on the same Turn, and one debit. - -| Delivery / backend | Main stdout median (B) | Prior C1 (B) | Current (B) | -| --- | ---: | ---: | ---: | -| On / File | 48,950 | 48,819 | 48,644 | -| On / SQLite | 48,998 | 48,867 | 48,692 | -| Off / File | 127,838 | 127,707 | 126,327 | -| Off / SQLite | 127,926 | 127,795 | 126,377 | - -Main's unedited Off selection omitted both delivery flags and resumed -progressive delivery. Its File and SQLite totals were 73,710 and 73,758 bytes. -For the Off comparison above, the probe restored both Off flags on baseline -selection and recovery. The candidate's generated command already carried -them. End-to-end CLI time moved in both directions across the four cases. -The fixture counts CLI outputs and calls and exercises same-capture recovery. -RPC and filesystem IO totals, actual model decisions, model costs and adoption -in an installed DSH or App session require further evidence. - -### Complete contract for new EdgeBench heartbeat work - -The EdgeBench CLI, SForge/Harbor launch settings, ordinary worker wake and -checkpoint preflight now use the same complete contract for new heartbeat work. -The explicit legacy display request fails before registration or creation of a -new wake. An explicit context-delivery Off still reaches the quota guard and -preserves its complete source and settlement identity. - -Native checkpoint recovery still checks the recorded presentation and exact -pending command, including original v0 records. Archived reproduction uses the -product and runner revisions already recorded by the source pin. Retire the -historical reader after the supported recovery window and outstanding records -no longer require it. The remaining product callers of the explicit legacy CLI -and actual installed adoption have separate acceptance. - -### Complete contract for captured heartbeat loaders - -The shared thin heartbeat renderer now sends the complete guard for a captured -wake that uses the former `--turn-envelope` option. New saved loaders write -`--complete-turn`; the managed upgrade still recognizes byte-exact earlier -loaders and carries their explicit binding, capture and delivery settings. The -same thin budget allowance covers both spellings of an explicit captured Turn. - -The direct quota compatibility route remains available for existing raw -callers. Those callers must migrate before the raw writer exits. Original -captures and pending commands retain their versioned readers during recovery. - -Six matched local CLI pairs used the same selected Todo on File and SQLite -with context delivery Off. The first guard grew from 22.1 KB to 37.9 KB. For -complete readback, loader, guard and original-capture pages together changed -from 71.7–71.9 KB to 42.9–43.0 KB across the two backends. Every arm kept one -heartbeat receipt and the same settlement identity. Model outcomes, selective -read costs and actual installed adoption still need qualification. - -### Kiro CLI thin heartbeat uses the complete Turn source - -The generated Kiro activation enters the shared complete-source composer for -JSON work with an Agent and Turn. Explicit Off puts the full decision inline. -The visible-Goal writeback, recovery and spend retain the original Todo and -Turn. The turnless probe keeps its compact observation. Kiro's MCP tool already -uses the complete composer. - -Against the preceding candidate `3f527c468b2f`, three pairs per backend and -delivery setting exercised the generated activation, bound guard, presentation -readback, verified fixture result, writeback, debit and replay. The original -Kiro captures produced by the preceding revision recovered on both backends. -Recovery refused a mismatched Agent and settled the original Turn once. The -CLI stdout medians include full recovery when the guard returns a reference. - -| Delivery / backend | Prior candidate (B) | Current (B) | -| --- | ---: | ---: | -| Default / File | 70,190 | 71,182 | -| Default / SQLite | 70,252 | 71,244 | -| Off / File | 61,578 | 61,142 | -| Off / SQLite | 61,640 | 61,204 | - -A separate direct raw Off trial substituted inline complete output for the -bounded v0 view. On the same fixture, JSON grew from 23.1 KB to 48.4–48.5 KB, -and Markdown grew from 2.4 KB to 48.2 KB. This explicit route retains its -bounded writer until its callers have a qualified replacement. Historical -decoders serve unsettled original records during the supported recovery window. -The original-quota model outcome and full-cost comparison and live Kiro -session adoption require separate validation. - -### Complete work for generated external CLI launchers - -Manual shell and custom external drivers now receive the existing -`generic_cli` profile from onboarding and bootstrap. The normal generated -guard for a selected Agent and Turn takes the shared complete-source path. -The prior launch command emitted follow-up text without a bound settlement -plan. The new guard carries the original Todo and Turn through writeback -and one heartbeat debit. Explicit Off returns the full source inline. - -Against `e3d470c1903f`, sixteen local pairs ran generated onboarding and -heartbeat commands, captured and read the selected work, checked the same -fixture result, and wrote back, debited and retried. The baseline harness -supplied the original Turn explicitly during settlement. File and SQLite -also recovered the old unversioned captures. A wrong Agent was refused -and the original Turn debited once on each backend for each launcher. - -Per-turn CLI output, including full reference reads and settlement, grew from -58.3 KB to 71.2–71.3 KB with default delivery and from 50.3 KB to 61.2–61.3 KB -with explicit Off. The comparison starts at the generated heartbeat -invocation. The Full installation generates the command through -`agent-onboard`. The standalone Core runs that generated heartbeat and -its quota, capture and settlement commands. Refresh copied launchers using -the existing onboarding entry to adopt the complete source for new work. -Handwritten raw CLI and the explicit bounded v0 route retain their -compatibility surface. Model adoption and full cost require the original-quota -single-session comparison. - -### Complete source for direct bound quota CLI work - -JSON `quota should-run` with an explicit Agent and Turn now uses the complete -source even when the caller omits a scheduler profile or spells out the -`generic_cli` host fields. The ordinary CLI uses the same settlement plan -builder as the declared generic CLI. Its emitted writeback and heartbeat spend -carry the receipt's original Todo and Turn and run as separate commands. A -missing scheduler declaration still carries no scheduler authority. Explicit -Off gives the complete source inline. Turnless ordinary reads and the -explicit bounded v0 display keep their compatibility routes. - -Eight matched File and SQLite pairs compared the direct command with main -`f3bdad238739`; the preceding C1 candidate `6cbc9a4aa56a` also served as a -control. The harness supplied the original Turn at baseline closeout -because the older response did not provide its bound plan. Both arms -accepted the same synthetic result and appended one debit. The candidate -read back the original captures and rejected a different Agent without -another admission. Guard, full display read when referenced, writeback, -spend and replay used the same number of calls. Against main, observed CLI -stdout grew from 52.0 KB to 64.3 KB with default delivery and from -44.0–44.1 KB to 55.8 KB with explicit Off. The display comparison excludes -the separate recovery probe. The long-path explicit v0 budget and the -existing complete diagnostic carrier both pass their original checks. -Model outcomes, selective read costs and installed Host adoption still -require qualification. - -### Preserve the explicit EdgeBench short-view control - -The same heartbeat adapter configuration accepts `--turn-envelope` on -main `f3bdad238739`, and C1 `efa342224084` rejects it before the first -wake. The EdgeBench runner now carries that explicit choice through SForge, -Harbor, wake receipts and checkpoint preflight. A bound `generic_cli` -heartbeat preserves the flag through selection reentry. Explicit Off uses -the existing v0 projection and links to the original complete v1 capture. -With delivery enabled, the native reader presents that same source. The -complete default retains its original settlement route. - -The File and SQLite tests exercised live renderer, selection, private -handoff and checkpoint preflight with both delivery settings. They verify -the original claim and signed capture, recover it from the actual emitted -reference, settle the original identity once and reject incompatible view -choices before launch. An isolated standard wheel passed the 24-case -worker matrix. The external worker cancellation regression now consumes a -real scheduler observation, then launches and reaps a detached fixture -process and reads back its cancellation receipt with zero quota debit. - -Historical comparisons remain pinned to their original runner and LoopX -revisions. Retire this explicit compatibility view after the named caller's -replacement and rollback qualify. The synthetic operations leave installed -Host adoption and matched single-session model outcomes and complete costs -open. - -### Share diagnostics in direct inline quota delivery - -Ordinary bound generic CLI JSON now uses the existing compact projection rows and -Todo summary references when the complete decision is delivered inline -with context delivery disabled. Validation reconstructs source rows at -the original serving time and restores literal Todo lanes in their original -order. The complete capture holds the task, boundaries, and original -settlement plan. - -Against `f8d0eb588c7e`, matched File and SQLite fixture runs reduced -explicit Off stdout per normal Turn from 55.7–55.8 KB to 54.3–54.4 KB. -The comparison includes guard, writeback, debit, and debit replay. Both -versions recovered the original capture, refused a mismatched Agent, and -debited once. A modified compact capture failed the complete source -integrity check even with its file digest recomputed. An initial replan -without a selected Todo used 47.4 KB before and 45.5 KB after, with the same -Turn and no debit. Same-source reconstruction of small and multi-Agent -decisions matched all diagnostic facts after decoding the signed capture. - -With default delivery, full stdout including the reference read remained -64.0–64.1 KB, against 51.7–51.8 KB on main `f3bdad238739` for this -normal-work fixture. Actual selective reads and matched model outcomes and -costs remain part of the default-adoption qualification. - -### Deliver the current Goal revision on the initial read - -The shared initial reader now delivers the provider-backed Goal objective, -revision, and digest before the original Goal narrative. The existing Goal -acceptance owner supplies the revision and continues to decide adoption. -Supporting history and peer adoption are readable from the same capture. - -Bound generic CLI and Codex App CLI tests use the ordinary guard and its -emitted reader commands on File and SQLite. All four cases omitted the -current objective from the initial selection at `7a37d7d02e79`. Reading the -three fields from that same capture required a separate selection. The new -initial responses are 552 bytes larger in this fixture. Reading the same -facts costs one fewer reader call and 629 fewer response bytes in each -case. The objective arrives before the original narrative and reading it -leaves the original receipt intact with no additional quota effect. - -The separate direct CLI fixture without a revised Goal still attributes -about 10.6 KB of the full-read difference against main to the added -settlement plan. These observations measure CLI output and reader calls. -Matched model outcomes and complete costs still require qualification. - -### Recover bounded context reads through a private Windows reference - -When a stale selection cursor requires a restart and the output cap excludes -the full command, the Windows path uses the existing private capture -allocator. It checks the source file and its containing directory before -emitting a reference. The reference preserves the capture digest, reader -route, and selection so the reader can restart at offset zero. - -The CLI fixture used the Windows branch with private macOS files and a -700-byte cap. At `dead3c8ce709` the refusal for the owned capture omitted -the restart command. The updated reader returned and followed that command -through every page of the original selection. Shared source files and -directories produced no reference, and modifying the original bytes caused -the emitted command to refuse the read. Native Windows DACL and PowerShell -execution still require verification on a Windows host. - -### Reserve private recovery before capped Windows quota guards - -The JSON quota guard reserves room for a recovery reader before admission -when the caller supplies an output cap. This reservation now shares the -private directory allocator with restarts of a saved selection. The Windows -branch uses a physical temporary directory and applies the existing -owner-only access policy to the new directory. - -The File and SQLite fixtures exercise Windows branch selection on macOS. -At `e9339babfc71`, both guards refused a 1,700-byte cap before admission. -The updated guard admits once. After an injected Host delivery failure, the -returned command reads the original capture and receipt within the output -cap. Both guards refuse a 96-byte cap before writing a capture or receipt. -The fixtures record zero debits. Native Windows execution remains open. - -### Follow the saved action after a Benchmark checkpoint preflight - -The non-native checkpoint prompt tells the worker to follow the saved -view's action along with its required reads and settlement instructions. -At `e9339babfc71`, the prompt omitted the action clause in four explicit -legacy view cases across File and SQLite. The same cases verify the returned -reader command, its saved source, and the prompt after one guard. - -At `f220690bef2f`, the default full-view prompt omitted the instruction to -follow the interaction contract. The explicit Off short view needed a -bounded route to its original Todo selection command. The prompt now -preserves the full view's replan review and writeback reads when present. -The v0 prompt supplies a digest-checked reader for specific fields in the -original capture. - -On File and SQLite, a direct read of the complete original capture returned -31,497–31,509 bytes. The reader returned the Todo selection command in -2,049–2,055 bytes. Including the preflight prompt and saved-view pages, -the full-source route used 47,449–47,479 bytes and the field selection used -18,756–18,782 bytes. The CLI cases followed the selected command on the -original Turn, refused an incorrect digest, and recorded zero debits. Model -outcomes and end-to-end costs remain open. - -### Use the explicit PowerShell launcher for bounded quota recovery - -The shared command resolver accepts an existing script at an explicit -PowerShell path. PowerShell can launch that script without a POSIX execute -bit. The quota guard uses the supplied launcher to reserve the recovery -reader before admitting work. - -In both File and SQLite fixtures, a 1,700-byte budget now permits admission -and the emitted recovery command runs verbatim in PowerShell 7 on macOS. -The fixtures use launcher paths containing spaces and straight and typographic -apostrophes. They read the original receipts within the limit and retain -one guard and zero debits. At 96 bytes, both providers refuse before admission. -Windows filesystem access control and the native Windows Python route -still require a Windows host. - -### Read a committed debit after moving a checkpoint - -Exact settlement readback can use a debit copied into a different runs -directory. The accounting reader matches the copied committed transaction -receipt to the original index row, verifies the recorded artifact name, -then checks the local debit against the receipt. Spend and void operations -use their existing active-directory checks. - -Four File and SQLite cases failed at `a1f34097805a` because the copied -index still pointed to the source directory. After the fix, they read the -same settlement identity and debit after the source runs directory moves -away. The reader rejects a missing artifact or committed receipt, an altered -record, and a symbolic link to the original debit. The copied checkpoint -and its receipts retain their original bytes. +| Original quota vs C1 (`5f1a9d78ba` / `b8c2bf1dc`; `f04ec308f6` / `4ef428767c`; `6a92640346`; `0423908e9c`) | Warm RPCs `-12.65%`–`-12.88%` (`332→290` / `326→284`); duplicate capture projection removed (`30/30` captures, Python warm IO `-9.5%`); `refresh-state` settles/replays all 3 receipts. | Recurring warm stdout **+6.66% to +8.73%** (`~+7 KB` excl. prep); cold/recovery BODY reduction `0%`; warm framed bytes `+1.17%` in earlier cohorts (`-0.93%` only after clearing unused result-record bodies); observed Python IO `+3.2%–4%` before dedup. | +| Three-step Task after main field reuse (`d602248c53` / `b90e711cdb`; `918844a017` / `6f00db17c6`; `39770a9604` / `339f01e087`) | Complete 3-step stdout `-18.39%` (SQLite `225,841→184,316 B`), canonical correction BODY `-28.50%` (`149,223→106,688 B`), warm large-field BODY `14,386→2,583 B` in loopback Codex. | Warm 3-step BODY only `-2.09%` (`102,836→100,691 B`); framed RPC bytes **+0.83%** / **+2.14%–2.93%** after `39770a9604`; File instrumented time `+7.5%`; small 2-outcome sources grow `+1,655 B` each. | +| Hard-lease 3-step (`92294e7245cb` / `b3b3b232724d`) & bound CLI / Kiro / DSH (`f3bdad2387` / `0057a1dbd1`) | Hard-lease warm whole stdout `-19.5%`/`-19.9%`, RPCs `-31.44%` (`843→578`), framed bytes `-34.1%`; Goal revision initial-read saves 1 call/`629 B`; relocated-debit readback passes. | Direct bound CLI stdout grows `51.7–52.0 KB → 64.0–64.3 KB` (explicit Off `44.0 → 54.3–55.8 KB`, `~10.6 KB` from settlement plan); Kiro raw inline grows `2.4 → 48.2 KB` (Markdown) / `23.1 → 48.5 KB` (JSON). | +| Component boundaries & presentation budgets | Codex prompt single-call consolidation (`24.2→14.8 ms` median, `-39%`); Vision retry `6→2` CLI attempts (`11,473→9,269 B`). | Boundary checks add local cost: Host prep (`25.7→31.9 ms`), schema/material (`0.013→19.6 ms`), settlement recovery (`0.016→12.4 ms`), standalone route (`0.005→13.3 ms`), completion intent (`0.002→19.8–20.8 ms`). Budget holds FAIL: small Markdown `24,531 > 10,000`, crowded plans `24,044`/`27,508 > 22,500`, complete alias `24,252 > 13,000`, multi-agent `25,933 > 13,000`; thin prompt `5,519 > 5,400` repaired to `5,379` vs `5,363` main. | + +## Verification status & open gates + +- **Passed (recorded checkpoint cohorts):** `196`–`865` affected Python cases and + `45`–`6,161` TypeScript cases across checkpoints; isolated `1,815`–`1,914` + file wheel runs with zero checkout core contamination; default 17-root strict + Mypy and changed-path Ruff pass; control-plane TypeScript typecheck passes. +- **Historical failures retained:** broad historical mypy runs (`4,809`–`4,831` + diagnostics across 485 files), interrupted `9baa678db` 6-module run (`37` + provider-startup failures), `2,015`-char long-namespace hook failures, and + the five unrelaxed output-budget holds above remain open records. +- **Untested / remaining gates:** MemT end-to-end complete-input adoption + blocked on missing `goal_ref` lifetime (`source_session_v1` must not be + enabled as an adapter workaround); native Windows host DACL/PowerShell runtime; + installed App/DSH/Kiro/MCP/Ark/PostgreSQL validation; real model tokens, + invoices, and §9 matched single-session outcomes & complete costs; ordinary + CLI default adoption approval; exact-head review, maintainability ratchet, + and merge readiness. diff --git a/docs/architecture/rfcs/ledger/controller-executor-unified-contract-v0/2026-10-30-c1-source-convergence.zh-CN.md b/docs/architecture/rfcs/ledger/controller-executor-unified-contract-v0/2026-10-30-c1-source-convergence.zh-CN.md index 32a6b52a32..9d03822d89 100644 --- a/docs/architecture/rfcs/ledger/controller-executor-unified-contract-v0/2026-10-30-c1-source-convergence.zh-CN.md +++ b/docs/architecture/rfcs/ledger/controller-executor-unified-contract-v0/2026-10-30-c1-source-convergence.zh-CN.md @@ -1,2525 +1,94 @@ # C1 来源收敛与历史集成检查点 -- **日期:** 2026-10-30 -- **状态:** 未合入的集成证据;C1 仍未完成。 -- **来源:** 原候选 `648104978fdd67176cccdbb765c5bc3f36bf2ca3`,集成目标 `e8f4c6f8125e3cc0ef912afac653d5542671392f`。 +- **日期:** 2026-10-30(覆盖至 `#8266` 的滚动集成检查点) +- **状态:** 未合并的集成证据;C1 仍处于开放状态。 +- **来源:** 尚未合入的 C1 统一分支及其对 `main` 各检查点的集成(另见 [打包 heartbeat 对照](2026-10-28-packaged-heartbeat.zh-CN.md))。 - **语言镜像:** [English](2026-10-30-c1-source-convergence.md) -## 当前调用方退役边界 +## 已合入与未合入的收敛边界 -当前 #8266 候选通过普通 quota、原 envelope 参数、生成的 heartbeat 入口、 -Benchmark 唤醒及 checkpoint、managed 与 stdio Host 请求交付完整 v1。 -上下文交付 Off 内联同一完整来源。Benchmark 运行指南现按该行为说明。 -原 quota 对照臂使用固定的 pre-C1 runner 与 LoopX 版本,已保存捕获按原版本读取。 - -| 保留边界 | 当前调用方及退出条件 | -| --- | --- | -| 完整来源组合与校验 | 当前 quota、Turn、heartbeat 和 Host 消费方共用既有 TypeScript owner。普通 v0 renderer 及按参数选择来源的分支已退出这些调用方。 | -| 版本化 plan、capture 与回执恢复 | 历史记录保留原来源、绑定及一次结算。退役需核清支持恢复窗口和未结记录去向。 | -| 旧对照构造器 | Python `build_turn_envelope` 的树内调用仅在 `model_behavior_corpus.py`。保留的 raw/v0 用例与版本化状态矩阵沿用原对照,完整 v1 用例消费原校验来源。最后一个受支持对照调用方退出后,再退役该构造器。 | -| 模型成果与安装采用 | 原 quota/C1 单会话对照、完整成本、受支持实装 Host 及原生 Windows 沿原验收继续。 | - -旧构造器现直接调用同一 TypeScript 操作,删除只有一个调用方的 Python 包装。 -一项完整捕获测试与另一项的前十三条语句重复,使用相同 actor 和种子。 -保留用例还验证坏绑定在调用 actor 前拒绝,因此删除重复用例并保留覆盖。 -冻结对照和公开构造器的行为保留。这批改动核清调用边界并减少重复维护, -模型成果与完整成本继续待验。 - -## 连续恢复时保留已独立核验的原生选区 - -原有单次恢复修复能在完整捕获回放失败时保留独立选区。在 C1 -`043463500ddd`,生成下一份捕获前再恢复一次,会丢掉这个选区的已读状态。 -生命周期 owner 将已核验的选区检查点带入新周期。后续恢复会再核对原生输出, -变化的停止条件按当前捕获和范围交付。 - -真实 Codex 0.167.0-alpha.4.1 Code Mode 和本地固定 provider 对照中, -连续恢复两次后,下一次首读选区正文从 11,978 降至 631 字节,页数从两页降至 -一页。选读输出缺失、Todo/来源/正文变化或实际压缩时须重读。全量回放失败后 -仍建立新的完整捕获基线。本次夹具度量 reader 交付,模型成本与长程成果仍待验证。 - -## Quota packet 体积与重复的续跑验收审计 - -以主干 `f38fae05bb9a1` 与 C1 `1f2f10539117` 对照,File quota -合成流程使用同一任务、验收成果和 Turn 身份。guard、完整读取、写回、扣额 -和重复提交共五次调用,stdout 由 53,248 字节升至 65,554 字节。SQLite -分别为 53,310 和 65,616 字节。拆解选读发现,新增结算计划的紧凑 JSON 为 -10,646 字节,写回条件占 3,209 字节,Vision 写回的结构与示例占 2,939 -字节。校验、原结算身份和恢复命令还占用其余空间。 - -原生 hook 在同一上下文周期内完整观察过审计正文后,首读投影才允许按当前 -Goal、已绑定 Todo 和 agent 复用逐字相同的审计。审计变化、缺少完整观察、 -绑定变化、压缩或出现材料引用时均须读取当前内容。当轮写回命令和结算身份 -单独交付。显式恢复仍可从同一份 capture 读回原审计正文。 - -File 与 SQLite 的双 Turn CLI 对照覆盖普通与完整选择、实际分页读取、写回 -和结算。四组对照中,第二轮首读 stdout 均少 2,226 字节,调用次数相同; -File 普通路径的第二轮完整流程从 54,093 降至 51,827 字节,均为八次调用。 -隔离安装 wheel 复现了复用、原 capture 回读和有效结算。改动前后的冷启动 -默认流程分别维持在 File 65,554 与 SQLite 65,616 字节。显式 off、分段 -读取和原捕获恢复也交付同一合成验收成果,并且只扣额一次。当前证据是本地 -CLI stdout 字节数,实际模型 token、任务效果和线上采用仍待验证。 - -## 当前修复:按依赖读取 capture 并迁移消费者 - -C1 集成 main `3a0c9608cc06`。共享 thin heartbeat renderer 曾把完整 capture 的 -可用性变成行动前无条件通读整份 capture 的义务。普通/App × 默认/显式 context-off -四种同输入真实 CLI 对照实际 main 与修复前 C1 集成 `c6d7d0a573f0`:main 未新增此 -义务,修复前 C1 四种入口均新增。 -修复后仍要求当前工作上下文、必读材料及适用目标、验收、约束和停止条件;原 capture -按决策依赖读取。显式全读、所供 flags 以及完整原来源/身份恢复义务继续有效。 -四种入口在读取条款之外的文字修复前后逐字相同,指导文字增加 347 个 UTF-8 字节。 -这是语义纠正,不是测得的 token 或完整任务节省。 - -冻结 C1 `c37bd8d0d9` 的 selected-work 因导入已删除 helper 无法收集;native-child -与独立 delegation 记录 62 通过、八个失败。既有夹具现采用当前 context reader 和 -v1 request/work-contract owner;仍故意注入矛盾的第二 carrier 和损坏的 owner -身份,要求副作用前拒绝。原材料、off 隔离、响应丢失恢复、重放及一次结算断言保留。 -读取范围/来源预检 141 通过、四个跳过,native/delegation 70 通过。扩展运行先记 -104 通过、28 失败,迁移后的完整 delegation/示例运行记录 139 通过、两个示例旧断言 -失败;迁移显式选择和 typed 副作用前拒绝后,两个完整 canonical-delivery 用例在源码 -及安装包均通过。拒绝断言核对原 subject,以及 Host、状态、scheduler 和扣额均无效果。 -这 28 项没有全部在未改动 `c37` 上独立复现,不能统称为该冻结基线的回归。 - -首次安装 wheel 运行记录 88 通过、32 个 setup error:示例初始化器沿 checkout -相对路径导入 TypeScript。既有 Python launcher 现将实际加载包的根目录传给同一 -初始化器;canonical authority、独占创建可丢弃 runtime 和拒绝已有状态保持。 -harness 不复制 Core 源码。修复后安装运行记录 148 通过及两个残留旧结算字段断言, -修正后新的一次完整运行 150 项通过。包内 1,815 个 Python/TypeScript 源 -与实测候选一致,374 个已观测 Python 进程仅从隔离安装包导入。 -原失败与局部重放均保留各自证据。 - -配置内空缓存 Mypy(17 入口)、全控制面 TypeScript 及改动路径 Ruff 通过,未放宽 -配置。精确 head 的 premerge 及评审/readiness 仍须独立取得,本文不声明已通过。 -本片不建立父 PR 已显著缩小、完整 provider、独立评审、自然采用、模型费用或整体 -C1 资格。实际 main 已有预期普通读取范围,不为 C1 此回归重复修改 main。 -下方历史实验及冻结 base/head 成本分母继续保留。 - -## 上一次依赖修复:来源传输位于 driver 下层 - -C1 集成 main `5a58635028fb`,包含已合入的独立提案 #8192 和 #8186。 -配置内 Python 检查原先报 463 文件中的 4,562 条错误: -低层捕获和 journal 读取器为薄的来源与身份 helper 导入了 driver/Host 结果转换器。 -这七个 helper 现直接使用既有 `quota.turn_envelope` 传输层;删除三个旧私有实现, -已发布导出保留别名。TypeScript 决策 owner、wire 版本、来源拒绝、精确数字、 -历史恢复和只结算一次保持不变。 - -同一配置的 17 个入口在禁用增量检查、隔离空缓存后通过,未放宽严格配置或 import -跟随。完整控制面 TypeScript 检查也通过。这是依赖边界修复,不表示修完此前可达的 -全部模块类型,也不宣称运行性能收益。较广源码运行记录 627 通过、六个夹具失败、 -四个跳过;干净集成基线复现相同六个失败,均为夹具访问已退役的第二份 -`turn_envelope` carrier。修正后真正检验当前 producer 的缺 witness 恢复和故意注入 -混合 authority,模块 36 项全部通过。重建的独立安装 wheel 在捕获/Host、会话/journal、 -authoring 和完成路径共 136 项通过。包内 1,815 个 Python/TypeScript 源与候选一致, -141 个已观测 Python 进程全部从安装包导入,没有借用 checkout 源码。 -较早的 100 项安装包运行及原六个夹具失败保留各自证据身份。 - -本依赖修复前,集成已使父 PR 从 201 文件(`49a621c9b8` 对 main `546c08c0d3`, -+18,429/−2,042)降到 197 文件(`2fe98521f1` 对 main `5a58635028`, -+17,928/−1,989)。这是有限缩小,显著降低评审范围的交付仍待继续。 - -独立评审、质量/readiness、完整 provider、自然采用和整体 C1 验收仍开放。 -本修复不建立新的效率结果,也不资格整个父 PR。历史双语实验继续整组保留; -旧成本数据保持冻结 base/head,不改记为本次集成的测量。 - -## 上一次拆分:完整重规划 authoring - -两个作者提案均集成 main `d0985c35aa`。[PR #8192](https://github.com/loopx-project/loopx/pull/8192) -把 C1 既有的同响应 authoring owner 独立提到 main,删除 Python 重复比较,恢复普通、 -staged 及真实 CLI 读取器的 authoring。三个完整正文断言在原 main `a9485073f2` 均失败, -在修复后通过。缺少 stride 声明仍拒绝语义写回;Host 读取实际交付契约后可声明决策, -后续任务消费经过独立验证的计划。C1 在读取捕获内容前保留现代源版本与绑定校验。 - -main 修复的集成源码 30 项、隔离 wheel 30 项通过;C1 定向源码 180 项、TypeScript -96 项、隔离 wheel 30 项通过。Canonical fixture 从实际加载的包定位 TypeScript; -C1 fixture 使用实际结构化 Host prompt 和版本化 capture 绑定,不再假定正文内联或 -沿用历史 digest。先前夹具失败继续保留。main 修复的冻结 standard 机械检查通过, -但严格质量收据仍缺失;独立评审及整体 C1 仍开放。此修复在冻结夹具中增加一次父 -RPC(2 到 3,未计 CLI 子进程),不是净效率结果。两个独立提案均未落地,不宣称父 -PR 已缩小。 - -## 最新字段复用:main 独立提案与 C1 同步 - -[PR #8186](https://github.com/loopx-project/loopx/pull/8186) 将原生渐进 reader 修复 -独立提出:`9df99f042b5f` 基于 main `62e234c93999`。C1 在 `2f1c91085` 集成该 main, -在 `dde48f084b` 同步同一修复。既有 TypeScript owner 依次考虑精确要求列表、大条目 -及其大正文;已改状态和未知控制条件使相应记录失效,当前修订号及完整恢复仍可读取。 -完整当前返页与已认证的精确继承字段可合成为下一次 section coverage,不变成完整 -模型输入基线。Native hook 使用已匹配的事件会话,而不假定继承 shell 会话环境。 -没有新增准入、模型调用、配置或存储 schema。 - -下表是 **main base/head** 对照,不是 C1 的独有增量。File/SQLite、base/head、冷/温/ -恢复/canonical 修订各一例,共 16 场景、40 Turn;12 个完成原三步合成 Task,4 个冷态 -只执行第一步。核验当前/此前实际交付的要求、完整 UTF-8 返页、独立产物、原身份、 -三回执、一次扣额和重放;准备、故意重试分列,完成子进程只计一次。提交 head 的产品 -字节与实测源一致。 - -| SQLite 普通完整任务 | main 基线 | main 提案 | 变化 | -| --- | ---: | ---: | ---: | -| 温态三步 BODY | 147,059 B | 109,016 B | −25.87% | -| 修订后三步 BODY | 147,793 B | 113,819 B | −22.99% | -| 温态三步 stdout | 268,953 B | 230,730 B | −14.21% | -| 温态/修订 RPC | 863/867 | 863/867 | 不变 | -| 温态/修订 framed RPC 字节 | 基线 | +2.42%/+0.98% | 额外成本 | - -File 同方向。冷态及本组恢复 BODY 不变。SQLite 温态观测的 Python 普通文件读/写增加 -11.94%/19.06%,修订增加 5.73%/3.31%;不含 Node、内核、provider 和 CLI 外 fixture IO。 -单次插桩样本不资格稳定延迟、模型保留、自然采用、token/cache、账单或整体净收益。 -只拆正文的原型没有减少代表性任务 BODY,积极索引小条目的原型显著增加 IO;这些 -负结果继续保留,不改记为最终修复通过。 - -源码反例覆盖已改正文/状态/未知控制、低收益拆分、部分与伪造观察、压缩、off 和 -精确恢复;同一新增用例在未改 main 上失败。两条源码与隔离安装包的原生路径使用 -同一 owner;真实 Codex 静态回环旅程各十次请求,覆盖下一次整块复用及未验证 resume -后的完整恢复,没有收费模型。记录的 `dde48f084b` 集成点 C1 配置内 mypy 有 4,818 条诊断,main 配置内 17 个 -源文件检查通过;先前另一集成 head 的 C1 为 4,814,不豁免也不归因新增四条。 -main standard premerge 的六项直接和十四项选中检查机械通过,但严格 Goal quality -receipt 缺失。独立评审、CQR、精确 head readiness、维护者合并权限及整体 C1 验收仍开。 -提案尚未让 main 上的父 PR 变小,仍需维护者采用独立可评审切片;早期双语实验继续 -整组保留在下方。 - -后续作者集成包含 main `910ff3bca5`,产品头分别为 main `a8902b05b`、C1 `7e52f3a1e`。 -上表固定成本不改标为这个后续组合的实测。真实入口定向检查 main 102 项、C1 104 项 -通过,两端 typed reader/报告投影各 66 项及 typecheck 通过。main 配置内 mypy 通过; -C1 当前为 485 文件中的 4,831 条诊断,新增诊断不归因、不豁免。standard premerge 的 -直接/选中机械检查分别为 main 6/14、C1 7/19 项通过;两者仍缺严格 quality receipt, -C1 的人工评审门保留。 - -## 上一集成:字段复用进入主干后的增量成本 - -实测产品版本 `b90e711cdb81` 已集成 main `d602248c5329`,包括 #8124 字段复用、 -Vision 审计引用、首读消费者和 Chat 观察更新。C1 在共享 TypeScript owner 中保留完整源 -校验,原生导航与历史来源拒绝仍走同一路径;此检查点的后续修改只有验证和文档。 -下方早期 cohort 保持原版本的历史证据身份。 - -当前工程对照使用原三步合成 Task 和两组 canonical 验收。File/SQLite × 冷/温/恢复 -× 三次重复,共 36 场景、84 个已结算 Turn:12 个冷态场景只走一步,另 24 个完成原 -Task,独立校验的产物一致。实际返回 BODY 连续重建到 EOF;每个省略 outcome 同时与 -当前不可变来源、此前完整交付逐字核对。核验原身份、三回执、一次扣额及产品源稳定; -准备和故意重试探针单列,完成子进程成本只计一次。 - -| SQLite 普通路径,三次均值 | 已获字段能力的 main | C1 | 变化 | -| --- | ---: | ---: | ---: | -| 温态第二步 BODY | 27,874 B | 27,159 B | −2.57% | -| 完整三步 BODY | 102,836 B | 100,691 B | −2.09% | -| 完整三步 stdout | 225,841 B | 184,316 B | −18.39% | -| 完整三步 RPC | 863 | 866 | +3 | -| 完整三步 framed RPC 字节 | 11,754,471 B | 11,852,055 B | +0.83% | -| 已观测 Python 普通文件读/写 | 基线 | −10.39%/−13.83% | 有限 IO 边界 | - -File 同方向。恢复时先完整重送当前要求,含回退的三步 BODY 仅少 1.78%;不能把相对 -字段复用落地前主干的大幅下降,继续当作 C1 独有增量。 - -另有经真实 refine 追加一项条件的 canonical 修订探针,保留原条件。四个 File/SQLite -用例完成 12 Turn、四个 Task。main 保守重读两块正文;C1 第二步复用一块未变 outcome, -第三步复用两块,新条件完整显示。SQLite 第二步 BODY 为 52,169→32,905 B(−36.93%), -完整 Task 为 149,223→106,688 B(−28.50%),RPC 867→870、framed 字节 −0.23%。 -每个 provider/arm 只有一个合成修订案例,不代表自然反馈采用或科学成果收益。 - -最终源码按唯一用例对账为 1,065 通过/四项跳过,包含实际 Codex 的静态回环。112 项 -原生用例经过定向复验:修正输出预算缩页后仍按预设偏移读取、未读选择项就选择的 fixture,并将 -八页压力循环与静态恢复资格隔离。原失败保留,不冒充一次全原生套件通过。全量 TS 为 -6,161 通过/77 跳过,控制面类型检查通过。隔离 wheel 的 1,809 个 Python/TS 打包源 -逐字匹配,24 项保存源/默认/off/恢复通过,实际客户端默认 Progressive 与独立 -Delta 验证通过,无源码导入污染。 - -配置内 Python typing 仍有 4,814 项诊断,同样 17 根在 main 通过;不能以历史扩展范围 -或传输验证豁免。PostgreSQL/完整受影响 provider 资格、独立评审、精确 head readiness、 -安装态采用及完整 C1 验收仍开放。BODY、stdout 与 Python IO 分开;Node/kernel/provider -IO、模型输入/缓存/输出 token、账单和持续延迟未资格。本工程 cohort 未启动模型/ -科学运行、活动安装、CI 查询/手动触发或合并。 +| 边界/Owner | 当前 C1 状态 | 保留兼容性与退出门禁 | +| --- | --- | --- | +| 完整来源 `work_contract`(`compose_turn_decision`、`completePlanningFacts`) | **C1 未合入:** 统一守卫、Host、driver、MCP、Benchmark、Kiro、DSH、SSH 及已绑定 `generic_cli`(`quota_settlement_plan_v2`、沿 `#8691` 共享 `task_context`)。 | 无 Turn 观察(`--scheduler-observation`)、显式 `--turn-envelope` v0 短视图(`EdgeBench` 及显式兼容调用方)与历史 v0 捕获保留显式读取器,直至替代路径与恢复窗口验收完毕。 | +| 文件优先渐进/差分与字段复用(`#7560`、`#7627`、`#7935`、`#8186`) | **已合入 `main` 并由 C1 采用:** 单次调用初始计划、已观测字段复用与摘要绑定文件差分替代已退役的未合入原型 `outcome_context_projection_v0` 强制阅读计划。 | 部分或截断读取永不建立基线;`context_delivery=off` 配 `delta_delivery=auto` 不发布渐进导航;普通 CLI 默认采用仍须 §9 验收。 | +| 数值保真(`#7557`、`#7633`、`#7643`、[数值检查点](2026-10-29-complete-numeric-integrity.zh-CN.md)) | **主干 owner + C1 传输:** 稀疏数值标记(`1.0` 与 `1`、`-0.0`、大整数)与 `hash_codec` v1/v2 经 TypeScript 修改计划保留原 Python JSON 值。 | 持久化 Python JSON/action-hash 原像保持不变以兼容既有 Turn key;精确字节 capture 摘要仍与 JS 归一化哈希分离。 | +| 原生选区与重放检查点(`codex_context_history.py`) | **C1 未合入:** 将 hook 重放(`native_resume`/`selected_resume`)绑定物理 inode/区间摘要与仅追加记录字节覆盖,支持连续 resume 保留已核验选区。 | 缺少输出、Todo/正文变更、非仅追加尾部或压缩强制重读;`cli_version` 仅表征原写入者版本,不证明模型保留。 | ## 当前私有 plan 边界 -新的完整源 Turn 写 `loopx_turn_plan_v1`:一份原始 `work_contract`、源摘要与 capture -header。完整 planner 不再生成 v0 executor adapter。`planning_facts`、Host 输入与 -`turnPlanWorkSource` 复用既有 TypeScript 来源/投影、路由和结算 owner;Python -保留已持久化 action hash 的数值编码。 - -| 生产链路 | 替换/保留的兼容路径 | -| --- | --- | -| Turn CLI 与当前 launch decision → plan | 直接传完整源。私有 planner 不再接收完整源与 v0 executor adapter 的组合。 | -| 默认 CLI plan inspection | 保留一份完整源及 portfolio、writeback;即使恢复 transport 元数据,inspection 也不可执行。 | -| 不可变 capture → Host | 绑定原来源与 header,不重建 adapter;保留 capture 拒绝、原读取命令和 Host v1。 | -| Journal 写入、检查、结算查询与 CLI resume | v1 经共享来源 reader 校验;保留 GoalRef、Agent、Turn、scoped identity、原生 Session 及一次性 effect。 | -| 原生报告恢复、capability context、reward-memory 激活与子任务结果 context | 读取相同 work facts,恢复证明携带原稀疏数值拼写;原有 experiment/capability gate 仍必需,关闭 memory 时不读来源或 provider;Host/provider 和权限规则仍由原 owner 负责。 | -| 已记录的 v0 journal | 显式保留 transitional 来源/adapter 交叉校验及历史 adapter-only 解码;错误 v1 不降级。 | - -在此私有 plan 检查点,quota presentation 与 managed controller 的 quota preview -仍是独立 v0 调用方;后续替换记在下文。回退期间,未结 v1 工作仍须保留兼容 reader;停止 -新的 v1 准入不表示旧 binary 可以重写或恢复它。历史工作及受支持恢复窗口核清后, -才退役历史 reader。没有新增 capability、设置、缓存或执行授权。 - -同源重放在实际冻结实现 `0eb0042191d5` 与候选上运行 14 个相同的合成 File/SQLite -plan 输入及 16 个原 Host 恢复输入。路由/Session/transaction/topology 与执行事实 -全部一致,其中四个 plan 用例使用已有无 Todo replan 或 request binding。Capture -发布、真实 journal 写入、load/query 和幂等重放均经过生产 owner。相等比较只替换 -两个实现各自的 capture 存储目录,不归一化来源条款或值。 +新完整来源 Turn 写入含单一原始 `work_contract`、来源摘要与 capture 头的 +`loopx_turn_plan_v1`;完整 planner 不再生成重复的 v0 executor adapter +(`planning_facts`、Host 输入与 `turnPlanWorkSource` 共用 TypeScript owner, +Python 保留持久化 action-hash 数值编码)。 -| 实测组件,14 个 plan 用例合计 | 修改前 | 候选 | -| --- | ---: | ---: | -| Capture 后 canonical plan JSON 字节 | 528,364 | 373,372(−29.33%) | -| 实际 journal 文件字节 | 698,776 | 500,880(−28.32%) | -| 最终 canonical Host 输入字节 | 335,446 | 335,446 | - -30 项同源调用及其被测链路步骤的原生 RPC 为 162→158,canonical 参数/结果 JSON -为 4,645,847→3,536,656 字节。Planning 少 18 次调用;校验 plan load 多 14 次,该读取 -步骤从 7,052 增至 340,486 字节。Capture 前,新 plan 的源摘要使未绑定 Host header -多 97 字节;capture 后两个实现已有相同绑定,最终模型正文一致。这些组件测量不含 -framing、CPU、模型 token、账单、冷/温态 context 成本与验收成果,既不改善“原始 -capture 到所选正文”的 control packet 主指标,也不证明整条工作流净收益。 - -过去默认 plan inspection 删除完整源后保留有界 legacy 视图;删除 adapter 暴露了 -这一遗漏,包括 portfolio 与 writeback context。当前 inspection 保留一份完整源。 -另一个真实只读 File 夹具在两个实现的独立 store 上均通过,实际 JSON stdout 从 -12,388 增至 26,524 字节(+14,136)。这是明确披露的读回成本,与持久化 plan 缩小及 -最终模型正文不变分别统计,不声称 CLI 读取字节减少。 - -新增无 adapter 用例先在冻结 writer 上失败。随后集成还发现真实无 Todo 恢复 reader -仍读取已移除 adapter;现在改用完整源的原结算身份。当前未知版本、缺失/null 来源、 -混合载体和错误来源/capture 绑定均是拒绝用例,并保留显式历史/transitional 对照。 -修正读回、capability 与历史夹具后,当前源码的七个相关完整 Python 模块共 403 项全部通过。 -TypeScript 类型检查与全量 6,053 通过/77 跳过的测试通过。PR 记录精确 source/wheel -矩阵、保留的失败/跳过及标准 gate。扩大源码运行的 1,367 通过、37 失败、22 跳过 -保留为历史:它暴露默认 inspection 遗漏,以及 reward-memory gate 仍读取已不存在 -adapter 的真实断点。后者现绑定 checked work facts;当前缺源拒绝与显式历史对照仍 -独立。这是私有 plan 迁移提议,不是 installed 推广、 -相对原 quota 的成果/完整成本资格或 C1 完成。 - -## 当前 quota 与 managed-controller 切换 - -源码候选删除剩余普通 quota presentation builder 分支,让 managed controller 的 -fresh preview 使用与执行 Turn 相同的完整源。复用 `compose_turn_decision` 与 -`completePlanningFacts`;后者在既有 `turn.controller` RPC 中完成校验及 work/lineage -派生。精确数值 token 跨越此边界,不增加投影 RPC。未知支持事实保留;未知的当前执行 -动作在 dispatch 或结算前拒绝。 - -| 替换的机制/调用方 | 共享 owner 与实际删除 | 剩余消费者与退出条件 | +| 生产链路 | C1 行为与 Owner | 保留兼容性 | | --- | --- | --- | -| Quota `_project_quota_cli_payload` 与 renderer 选择 | 删除 v0 builder import、ordinary/envelope 格式分支、软降级及闲置 scheduler/capture 参数;既有完整 composition 和 renderer 负责 should-run 输出。 | Status、plan、monitor 保持诊断投影;request owner 原本就只在 should-run 接受 `--turn-envelope`,此 alias 不选择第二份当前契约;不把删除不可达分支记为字节收益。 | -| Managed fresh quota preview → loop disposition | 携带实际 scheduler context 组合完整源;删除 `TurnControllerInput`、其私有 JSON 副本、`build_turn_controller_input` 及 TypeScript `build_controller_input` 操作;disposition 复用 checked complete planning facts。 | Managed controller 保留 observation/retry 与 journal 归属;只有历史 v0 decision 继续使用原 scalar route codec。 | -| 完整 plan/capture/journal → reader 与 resume | 保留此前单源 v1 迁移及原来源/header 校验;普通 preview 不再重建 v0 adapter。 | 已记录的 v0、transitional journal 保留显式 reader,直到未结工作及受支持恢复/回退窗口核清;错误 v1 不能降级。 | -| 显式 legacy envelope builder 与历史 renderer | Legacy builder 已无新的普通产品调用方;完整渲染仍复用既有 renderer 模块。 | `control_plane_composition_scenarios`、`model_behavior_corpus` 与原版本对照仍构造 legacy 输入;最后一个受支持 fixture/replay caller 和版本窗口迁移后,才删除对应 constructor/decoder,同时保留独立历史负例。 | - -可复现维护演练在既有完整源 validator 中临时加入一项合成缺材料检查,结束后逐字节 -还原 owner 文件。同样四个真实 CLI/provider 用例在集成基线 `856faed423620` 与候选运行: -File/SQLite quota 拒绝在两者均通过;两个 managed 拒绝在基线失败、候选通过。现在只改 -一个生产 owner、零个 caller 即可到达两个入口,旧 managed 路径需要另行迁移。临时检查 -没有作为新生产读取 gate 保留。这证明的是维护边界,不是自然模型遵循或 Goal 验收。 - -持久八项完整源/未知动作矩阵同样先在基线得到四项 managed 失败、四项 quota 对照通过, -候选八项全部通过。它覆盖真实隔离 provider、原支持事实及不安全整数/整数形浮点, -验证不改 journal、不扣额。相关源码矩阵有 408 项 Python、76 项聚焦 TypeScript 通过。 -另有 22 项旧集成夹具失败先在未修改基线复现:retry 注入仍瞄准旧 helper 语句,完整 -planning 已换操作,sender 校验提前,历史对照误用了当前 v1 producer。修正保留 receiver -拒绝、原版本和 retry 负例,不抹去这些历史失败,也不把它们误算为候选新增回归。 - -集成 main `d4aaaaefbd37` 后,扩大源码矩阵 427 项通过,覆盖公开 lane fence 与完整 -journal 恢复。集成同时保留 main 的 typed cast 和完整源 Goal/Agent 校验;lane 检查 -先暴露缺少 `cast` import,随后修复。隔离实际安装的 wheel 通过八项矩阵,并在 -File/SQLite 各完成两次原生合成事务及一次性重放;生产包来源与只供测试的源码 helper -独立核验。首次 wheel 构建被过期 frontend bundle 阻止,重建既有 bundle 后恢复。 - -Standard premerge 仍有 maintainability hold,且缺少精确 scope 的 quality receipt。 -同一 main 的真实 Git checkout 复现四项 module-metric finding;候选另有 quota emitter -超过既有 decision-function 限制,实测 62 decision points/74 statements。本次不 -提高 ceiling 或 exception;原有大小限额失败同样保留,聚焦矩阵通过不等于整 PR -merge gate 通过。 - -这仍是未合入的源码提议,不因上述检查安装候选、改变默认、运行模型、放宽预算或关闭 -C1。下述原 quota 成本对照独立于此前相邻 plan/journal 节省,也独立于仍开放的自然 -验收成果门。 - -### 原 quota 产品路径成本观察 +| Turn CLI 与启动决策 → plan | 直接传递完整来源;planner 拒绝同时携带完整来源和 v0 adapter 的输入。 | 默认检查保留完整来源、portfolio 与写回且不可执行(`12,388 → 26,524 B` 读回增量)。 | +| Capture → Host / `turn_driver` / MCP / DSH / Ark | `host_dispatch_context` 与 `driver_lineage` 在派发、session 谱系或完成意图前一次校验完整来源与 `selectedWorkTodo`。 | 省略合同保留历史 v0 解码;显式 `null`、非对象、畸形或与来源不一致的 `work_contract` 在 Host/写回/扣额前拒绝。 | +| Journal 写入、检查与恢复 | 通过共享 TypeScript reader 校验 v1 与过渡期 `v0+work_contract`;在 `turn/start` 前施加 hard-lease 执行键与锁共享。 | 缺来源的 v0 记录在支持恢复窗口内保留原身份校验与原字节(`14` 组 File/SQLite plan JSON `-29.33%`,journal 字节 `-28.32%`,最终 Host 字节相等)。 | -冻结的原 main 基线为 `5f1a9d78ba7ac`,不是相邻 private-plan 基线。候选 runtime 内容 -固定在后续 mainline 集成前的 `b8c2bf1dc`,之后的源码验证不重测此 cohort。两份源码均用 -Python 3.12.15、同一冻结编号产物任务、隔离 File/SQLite store、等长目录和原生 -context delivery。十二个场景均读取返回入口及全部必需续页,创建相同产物,通过 -独立 validator,写回、扣额一次并验证幂等扣额重放;十二份产物 SHA-256 相同。 -这只验收该小型合成任务,不证明两种 packet 版本有相同自然模型成果或完全相同 -决定义务。 - -冷态启动隔离 runtime;温态计入准备 guard/read;压缩后场景还先运行实际 -PreCompact/PostCompact CLI hook,再准入下一次工作。后者测 baseline 失效,不是 -恢复被中断的业务 effect。搭建成本排除;准备阶段失败单独保留,表格仅用完整跑完 -的最终对照 cohort。 - -主指标为 `1 - 所选 BODY 文件字节 / 同次完整 capture 字节`,不混入 reader 包装或 -其他输出;后者单列。 - -| Provider/场景 | 原 quota:capture → BODY(缩减率) | 候选:capture → BODY(缩减率) | -| --- | ---: | ---: | -| File/冷态 | 59,033 → 28,446(51.81%) | 55,416 → 55,416(0%) | -| File/温态 | 58,464 → 6,419(89.02%) | 54,849 → 9,411(82.84%) | -| File/压缩后 | 58,582 → 28,562(51.24%) | 54,963 → 54,963(0%) | -| SQLite/冷态 | 59,121 → 28,530(51.74%) | 55,500 → 55,500(0%) | -| SQLite/温态 | 58,552 → 6,344(89.17%) | 54,937 → 9,397(82.89%) | -| SQLite/压缩后 | 58,674 → 28,648(51.17%) | 55,055 → 55,055(0%) | - -候选 full fallback 保留完整源;BODY 缩减为 0% 不表示净收益为零。实际 initial read -选择必需材料,不打印整份 BODY。反过来,温态 delta 较小也不保证初读便宜:候选的 -当前 initial read 仍提供完整必需上下文。 - -| Provider/场景 | 全部 stdout 字节,原 → 候选 | RPC 次数,原 → 候选 | 含 framing 的 socket 字节,原 → 候选 | -| --- | ---: | ---: | ---: | -| File/冷态 | 55,815 → 48,709 | 236 → 237 | 1,454,525 → 1,547,159 | -| File/温态 | 67,522 → 76,353 | 325 → 327 | 2,128,926 → 2,348,959 | -| File/压缩后 | 89,968 → 75,700 | 327 → 329 | 2,132,977 → 2,343,467 | -| SQLite/冷态 | 56,212 → 49,086 | 236 → 237 | 1,456,277 → 1,548,893 | -| SQLite/温态 | 67,849 → 76,806 | 325 → 327 | 2,131,180 → 2,351,673 | -| SQLite/压缩后 | 90,461 → 76,149 | 327 → 329 | 2,135,847 → 2,346,351 | - -全部 stdout 包括 guard header、必需 reader 页、准备/hook、写回及扣额/重放响应。 -两份源码在冷态/温态/压缩后均用 5/7/9 个 CLI 进程及一个独立 validator;最终 cohort -内部没有 help 或失败重试。RPC 次数/字节包含 readiness ping 与 framing;两者都 -没有使用 referenced RPC snapshot。 - -一次准备成本不能在每个稳定温态步骤重复计费。拆开已测准备后,当前温态操作的 -stdout 增加 File 15,936/SQLite 16,083 字节,单个冷态操作则少 7,106/7,126 字节。 -在此负载上,一次实测冷态节省不够支付一次实测温态增量。这是有条件的字节记账, -不预测真实会话事件比例、token、账单或成果价值。 - -Capture IO 同样增加。File 上 Python 可见 capture 读/写字节分别为:冷态 -186,399/189,228 → 277,768/238,234,温态 -387,693/392,774 → 664,229/495,634,压缩后 -430,659/378,418 → 664,963/475,336;SQLite 方向相同。同场景的可见 journal 字节与 -provider-state 留存体积一致,capture 留存体积则多 24,503–51,506 字节。这些是 -Python 常规文件流量与留存大小,不是物理 IO 或写放大;Node/provider IO 与原生 -SQLite page IO 仍未测。进程墙钟包含 Python 启动与 wrapper,每条件一次观察不能 -资格化延迟;本次未测模型请求、cache/账单覆盖或人工注意力成本。主路径字节/RPC -回归及原大小限额失败继续保留,不能用相邻 plan/journal 节省宣告抵消。 - -### 初读复用已解析 cursor 的传输改进 - -后续 reader 增量与集成基线 `86081b142c62` 对照,不替换上文原 quota cohort。 -Capture 生成本已请求 TypeScript selection owner 规划当前 initial navigation; -现用既有不可变 selection cursor 固定该 owner 解析的地址,opaque 首读直接复用。 -每页仍检查完整源和所选视图 digest,原值从 Python JSON 原文取出,保留不安全整数; -未选正文不再第二次经过 runtime bridge。原始 `--initial-read` recipe、显式 reader -及完整恢复路线保留。可选 metadata 写失败时沿用原 recipe;不支持的历史 schema -走 generic discovery,多一次有界 selection RPC。启动/传输失败不重试 runtime。 - -独立同-capture oracle 验证所选正文及未知义务逐字相同,不为此变化记新增 BODY -压缩或模型输入节省。温态初读仍需当前必读事实;旧 delta 或保存的 cursor 不授予 -retention 或 freshness。 - -同一编号产物夹具、Python 版本、provider、准备、压缩 hook、validator 和一次结算 -在十二个隔离场景重放,全部产物一致。完整路径 socket 流量小幅减少;冷态/温态/ -压缩后两版本 RPC 次数均为 237/327/329,包含 ping。 - -| Provider/场景 | 全部 stdout 字节,基线 → 候选 | 含 framing 的 socket 字节,基线 → 候选 | -| --- | ---: | ---: | -| File/冷态 | 48,258 → 48,293 | 1,541,169 → 1,509,780 | -| File/温态 | 75,583 → 75,664 | 2,337,709 → 2,275,365 | -| File/压缩后 | 74,963 → 75,033 | 2,333,325 → 2,270,641 | -| SQLite/冷态 | 48,635 → 48,670 | 1,542,959 → 1,511,454 | -| SQLite/温态 | 76,036 → 76,117 | 2,341,764 → 2,276,882 | -| SQLite/压缩后 | 75,412 → 75,482 | 2,336,165 → 2,273,331 | - -每对当前 initial reader 的 stdout 字节完全相同,该 reader 的 socket 流量约从 -60 KB 降至 30 KB。更长 cursor 路径使冷态/温态/压缩后完整流程 stdout 多 -35/81/70 字节。SQLite Python 可见 capture 读/写字节为:冷态 -276,540/236,976 → 280,522/237,574,温态 -661,271/492,992 → 669,177/490,960,压缩后 -662,043/472,836 → 669,965/474,028;File 同样增加读取成本,可见 journal 字节 -一致。准备 cursor 增加本地工作和留存 metadata。原生 provider IO、模型/cache 账单 -及自然成果仍未测,单次墙钟观察不能资格化延迟。该相邻传输改进不能清除原 quota -温态回归,也不清除既有大小/质量 hold。 - -冻结基线上的同-capture 传输回归失败,raw reader 对照通过。首次十一模块源码运行 -记录 647 pass、78 skip、4 fail:两项 navigation 测试把已准备的 model cursor 当作 -fresh recipe 调用,另两项历史 staged-reader 夹具在未改基线上同样失败。原 raw/ -历史负例保留,最终三个受影响模块 103 项通过。实际隔离安装的 wheel 同样 103 项 -通过,并检查已加载模块及 CLI 子进程的安装包来源。首次 wheel 尝试漏载仓库的 -runtime 隔离夹具,该结果不采用;现 default-route 夹具在写入前要求两根目录都属于 -可丢弃 test base,修正后的打包资格检查加载原隔离夹具。源码隔离模块 21 项通过, -缺隔离负例保持合成目录未动。Standard premerge 七项 direct 通过,十九项 selected -中十八项通过;相同五项 maintainability finding 仍阻止通过。不改变 ceiling、 -exception、merge authority 或自然成果验收。 - -### 原生命令归属与已结算回执 - -本次普通 native caller 采用已经交付的 `refresh-state --settle-turn` adapter。 -完整来源 plan 使用 `quota_settlement_plan_v2`:写回命令调用该 adapter 并明确请求 -receipt 输出,quota spend 由 runtime 执行,不再无条件要求 Agent 另跑一条命令。 -Completion、claim/lease、原身份、Vision authoring 与 terminal 条件保留原义务。 -部分失败仍返回 canonical 原 `settlement_owed`;不增加准入、自动重试或直接扣额旁路。 -Native-off/manual v1、历史 reader、replan successor 创建及 callback runner 保留原路径。 - -Receipt 是显式选择的操作后结果投影,不是新的准入输入,也不声称上下文保留。 -精确回执、未解决/失败/未知控制仍可见;已知 supporting snapshot 完整保存在不可变 -结果中,由原 CLI reader 读取。Capture 交付失败保留已提交回执,可按原身份恢复。 -真实 replay 测试还发现旧 combined adapter 虽报告 settled,refresh replay 却只返回 -前两步回执;现独立读回原三步回执,不再次执行 child 或扣额。Quota 展示 IO 也在 -既有 owner 内分离。 - -三组实现使用相同冻结的编号产物任务与 Python3.12.15:原 quota `5f1a9d78ba7a`、 -集成 C1 `898aaa9d0c33` 和本次 runtime 增量。十八个隔离的 File/SQLite cold、warm、 -post-compaction 场景都交付相同独立校验产物,且各只扣额一次。子 CLI 的 RPC 与 -Python IO 也计入;import observer 等待 pinned package 加载,不从工作目录抢先导入 -LoopX。Agent CLI 调用为 5/7/9 → 4/6/8,但内部仍有一个 CLI child,因此 CLI 进程 -总数保持 5/7/9。RPC 次数包含 ping 与该 child。 - -| Provider / 场景 | 全部 stdout B:原 quota/集成 C1/本增量 | RPC:原 quota/集成 C1/本增量 | Socket B:原 quota → 本增量 | -| --- | ---: | ---: | ---: | -| File / cold | 55,622 / 48,556 / 39,643 | 236 / 237 / 231 | 1,452,338 → 1,577,844 | -| File / warm | 67,302 / 76,098 / 66,385 | 325 / 327 / 321 | 2,125,470 → 2,350,007 | -| File / post-compaction | 89,643 / 75,454 / 65,676 | 327 / 329 / 323 | 2,129,249 → 2,345,468 | -| SQLite / cold | 56,020 / 48,933 / 39,982 | 236 / 237 / 231 | 1,454,093 → 1,579,746 | -| SQLite / warm | 67,723 / 76,551 / 66,792 | 325 / 327 / 321 | 2,128,276 → 2,352,873 | -| SQLite / post-compaction | 90,133 / 75,903 / 66,079 | 327 / 329 / 323 | 2,132,085 → 2,348,364 | - -主指标仍是各完整 capture 到其所选 BODY 文件的字节缩减;与上表 initial-read 页面和 -全部 stdout 的分母分别保留。 - -| Provider / 场景 | 原 quota F → BODY B | 本增量 F → BODY B | -| --- | ---: | ---: | -| File / cold | 58,907 → 28,329 | 54,498 → 54,498 | -| File / warm | 58,338 → 6,408 | 53,925 → 8,605 | -| File / post-compaction | 58,458 → 28,446 | 54,027 → 54,027 | -| SQLite / cold | 58,995 → 28,414 | 54,578 → 54,578 | -| SQLite / warm | 58,426 → 6,420 | 54,005 → 8,613 | -| SQLite / post-compaction | 58,546 → 28,530 | 54,107 → 54,107 | - -Warm 同次 capture 的 BODY 缩减率,File/SQLite 为84.04%/84.05%,原 quota 为89.02%/ -89.01%;候选的 cold 与 post-compaction 仍为0%。 - -Full BODY 回退仍是 0% 缩减,不代表净益为零。扣除一次准备后,当前 warm 步骤仍为 -File 33,603 → 40,558 B、SQLite 33,932 → 40,901 B,比原 quota 多约7KB。 -Warm 全流程 stdout 约少1.4%包含较小的一次准备,不能抵销这项重复开销。 -Warm Python CLI 可见总读/写为 File 636,750/451,370 → 919,810/591,486 B, -SQLite 645,056/454,206 → 928,728/595,466 B。Node/provider/native page IO、模型 -usage/cache/账单及自然成果仍未知;并行字节对照不资格化延迟。独立 validator 的调用与输出已计入,其文件 IO 未测。最终集成头重测的 warm BODY -为8,605/8,613B,前次为7,799/7,807B,而实际 stdout 相同;各自分母保留,不把 -单次比例当作稳定保证。完整净收益与 C1 继续开放,下一重点是重复 warm 控制输入与重复 snapshot/transport IO,不是再造 runner -或减弱义务。 - -集成 runtime `5aa46dc27de8` 的十个完整相关 Python 模块为419通过、10跳过, -TypeScript typecheck 与243项 focused 测试通过。实际隔离 wheel 为245通过、10跳过; -1,181个已加载 Core module 和392条 CLI child 路由来自该安装。前次 fixture 失败保留: -旧 v0 断言、依赖 metadata 长度的 UTF-8 offset、隐含 producing cwd 已按独立的当前 -语义修正。真实 CLI 覆盖结果 capture 失败、超大未知控制、错误绑定/workspace、 -响应丢失与精确 replay。Standard premerge 报告7项 direct 和19项 selected checks, -其中1项 inherited maintainability advisory;raw ratchet 仍因4个未改动基线模块失败, -原 quota emitter finding 已消失。未更改 ceiling、exception 或历史失败;这不构成 -exact-scope quality receipt,也不授予 merge/readiness 权限。 - -### 已结算快照重放与重复原 quota 对照 - -`4ef428767ce9` 的输出 IO 增量,让已完成 `current` Todo 投影与原本支持的 -`delivered` 使用同一按需读取路径。严格已知、无待办动作的 runtime route、shared -projection 与 Explore 快照也保留在原不可变完整结果中。不增加 RPC、缓存、权限 -owner 或设置;Python 只处理既有 TypeScript 事实的文件/输出 IO,结算、freshness -及权限仍归原 typed owner。未结算/错误/dry-run、未知嵌套字段、route 冲突、 -投影重试、产物复制及阻塞 postcondition 保持直接可见。原身份、三项回执及未满足 -Vision checkpoint 保留;读完完整结果既不证明验收,也不证明 retention。 - -新对照冻结 main `f04ec308f6e7` 与当前候选,使用相同 numbered-artifact Task、 -必要材料、独立检查与一次扣额。File/SQLite × 冷/温/压缩恢复各重复三次, -共 36 项、252 次父/子实际源码及解释器核验。下表为三次观测的中位数,单位字节; -current 排除一次性 baseline 准备,全部 stdout 仍计入该准备成本。 - -| Provider/场景 | 全部 stdout B:main → 候选 | 当前 stdout B:main → 候选 | RPC | Framed socket B | -| --- | ---: | ---: | ---: | ---: | -| File / cold | 55,570 → 36,270 | 55,570 → 36,270 | 236 → 203 | 1,451,832 → 1,437,675 | -| File / warm | 67,892 → 62,991 | 34,239 → 37,183 | 326 → 284 | 2,127,817 → 2,152,912 | -| File / recovery | 89,549 → 62,276 | 55,764 → 36,392 | 328 → 286 | 2,131,374 → 2,147,978 | -| Sqlite / cold | 55,963 → 36,344 | 55,963 → 36,344 | 236 → 203 | 1,453,556 → 1,439,471 | -| Sqlite / warm | 68,313 → 63,133 | 34,568 → 37,261 | 326 → 284 | 2,130,625 → 2,155,458 | -| Sqlite / recovery | 90,038 → 62,414 | 56,165 → 36,466 | 328 → 286 | 2,134,204 → 2,150,686 | - -温态重复步骤仍分别**多 8.60%/7.79%**(File/SQLite),RPC 少 12.88%, -framed 字节仍多 1.18%/1.17%。温态 Python 可观测读+写为 -787,482 → 813,035 B 与 796,984 → 822,778 B(各方向中位数相加),仍多约 3.2%。 -其它验证并行期间,调用次数/字节不资格化 CPU/延迟;原生 provider/SQLite page -IO、真实模型缓存/输入/生成输出、账单及自然成果均未知。 - -本增量修改结算返回,不修改 guard BODY 选择。第一遍温态完整 capture F → 所选 -BODY 为 File 的 58,306 → 7,082 B 对 53,899 → 8,579 B,及 SQLite 的 -58,396 → 7,094 B 对 53,979 → 8,609 B;每个比例只使用其同次 capture 的 UTF-8 -文件。候选冷态/恢复仍选择完整 BODY,主缩减为 0%,不表示工作流净价值为零。 -三次候选温态比例分别在 82.62–84.08%/82.64–85.44% 间变化;本次仅改输出, -不把这些变化记作新增 BODY 收益。 - -另用旧 `9380173c` 与当前输出 IO 消费相同已捕获结算 payload。温态首次+重放 -分别少 3,347/3,612 B;若消费者实际将两份结果中新延后的字段全部补读,真实 -selected reader 多返回 5,434/5,723 B、增加 2 RPC,此组件反多约 2.1 KB。 -等概率需求的纯字节近似在约 62%/63% 处持平;需求频率未知,不能由近似或固定 -Task 宣称模型/费用净收益;没有新增强制补读门。 - -七个受影响完整 Python 模块共 360 通过;实际隔离 wheel 使用原测试配置、conftest -与 default-root 隔离,241 通过。1,185 个已加载父 Core 模块、1,186 条 child CLI -route 及 1,199 个加载 Core 的 child import 审计均指向该 wheel。真实 File/SQLite -caller 验证完整结果恢复、重放仍仅一次扣额/三回执,以及未来或可执行嵌套控制不能 -被隐藏。这是 source/packaged 输出资格,不是 installed 采用或完整 C1 验收; -以上历史 cohort、失败和冻结预算均保留,重复温态输入及完整成本缺口仍开放。 - -### 组合结算中的 Vision 预算恢复 - -既有 Vision prepare owner 通过共享、有界的 request-error 传输集中返回独立数值 -预算诊断。C1 沿完整 capture 及其返回的组合结算命令使用同一规则。五项独立数值 -错误一次拒绝;超长 enum 文本保留原预算错误,短而非法的 enum 仍拒绝。不提高限制、 -不改写撰写包、不新增决策 owner。File/SQLite 测试在每次拒绝后保持来源状态及 run -index 不变;明确修正、独立 history 回读及重放保留完整包、原 Turn、三回执和一次扣额。 - -固定调用者比较冻结的上一 C1 head `75c05340b6ce` 与集成后的产品代码。两边只修正 -错误实际点名的字段,得到同一最终包,只结算一次,不另取 guard。使用等长 namespace -和同一 Python 隔离重试片段;包含记账 child,每 provider 的 Python 进程从七个减至 -三个。两边相同的 fixture 初始化、admission 与独立验证均在测量片段之外。 - -| Provider | CLI 尝试 | Stdout B | RPC | Framed socket B | Python 观测读 B | Python 观测写 B | -| --- | ---: | ---: | ---: | ---: | ---: | ---: | -| File | 6 → 2 | 11,473 → 9,269 | 137 → 133 | 822,570 → 817,482 | 131,460 → 116,843 | 39,169 → 39,193 | -| SQLite | 6 → 2 | 11,499 → 9,279 | 137 → 133 | 823,294 → 818,206 | 131,962 → 117,297 | 39,285 → 39,309 | - -首条拒绝更大,但完整重试片段的 stdout 少约 19.2%、RPC 少 2.92%、framed 字节 -少约 0.62%;Python 观测读少约 11.1%,写反增 24 B。未测原生 provider IO、延迟、 -真实模型修正、输入/缓存/生成输出或账单。它只证明相对上一 C1 head 的确定性错误 -恢复改善,不是相对最新 main 的新对照、同 capture BODY 新缩减或原 quota 完整任务 -整体净收益资格;以上温态输入回归与冻结门仍开放。 - -### 完整契约上的原生 ready 交接 +## 当前 quota 与 managed-controller 切换 -本次整合 main `bd79adc64968` 与既有 Host ready 来源交接。原交接把 ready 复查强制 -设为 `context-delivery off`,在 C1 内将已启用完整 composer 的组合结算换回旧分步 -计划。新的独立断言在真实 File/SQLite × App/SSH 四条路径上均先失败。薄 adapter -现保留启用的原生 profile,使用既有延后展示选项:先捕获完整 ready 来源,再仅由 -既有 saved-capture owner 展示一次。不增加 CLI 开关、语义 owner、RPC 或权限。 +C1 删除普通 quota 展示的重复 v0 builder 分支,并使 `turn managed-step` 新鲜 +预览及 `refresh-state --settle-turn` 统一走同一 TypeScript 决策、路由与 +`quota_settlement_plan_v2` owner。 -| 实际调用方 | 替换行为 | 共享 owner 与保留边界 | +| 被替代调用方/界面 | 共享 Owner 与删除项 | 保留边界与义务 | | --- | --- | --- | -| 绑定的原生执行准备 | 强制 off 的 ready 复查 | 既有完整 composer 保留必需上下文和组合结算;Python 只转交 native 目录与展示模式 | -| Host post-tool 上下文 | 模型须再取 guard 恢复缺失的 ready 契约 | 既有 capture/reader 交付验证过的同 Turn 原件与原 claim 引用 | -| 已准备的 native 收尾 | 活跃调用方收到分步 v1 计划 | 既有 v2 owner 提供组合操作与三回执;旧记录及 unbound/off 调用者保留原恢复契约 | - -完整 Goal 仍对照独立原文核验,允许完整内联或真正声明的读取;off 无效果,身份错配、 -来源损坏、重放和一次记账检查保留。这修复消费方采用,不代替另需验收的语义规则变更 -演练或最后历史 reader 退役;原 C1 验收边界保持开放。 - -七个完整受影响源码模块及真正隔离安装的同一 wheel 均为 280 项通过、70 项既有 -opt-in skip。1,897 个比较的打包产品文件逐字匹配;235 个完成进程、44,758 次 Core -模块观察无 checkout 来源污染,突然退出仍不在退出时审计范围。初次源码运行保留 -279 通过、一项旧 reader 程序假设失败及 70 skip;复用既有 reader 程序修正,完整 -20 项模块先通过,再得到最终全范围结果。caller pilot 曾误请求旧展示或重复使用 -capture 目录;失败保留,不计入完整对照,也未放宽 capture 不可变规则。未活动安装 -App/CLI。 - -新的 hard-lease cohort 使用冻结的公开编号 Task,停止于第三步。冷态完成第一步; -温态/恢复先验证并结算第一步、释放 lease,再准入和验证第二步;恢复在第二 Turn 前 -执行真实 PreCompact/PostCompact hook。两端使用原 quota 入口、相同材料、等长 -namespace、同一 Python 和 observer,父/child 均从各自固定产品导入。它与下方旧 -soft-claim 36 条件 cohort 分开,不混合比较分母。 - -两后端、三场景、两端各重复三次,共 36 条件、60 个独验工作 Turn;每场景产物相同, -每 Turn 三回执 committed,含重放只扣一次。654 次父/完成 child 来源观察与 -640,896 次模块观察均匹配所属端,测量期间产品摘要不变。父 RPC 已含 child,不再 -重复相加。whole 包含已完成的准备工作,current 排除它但保留 compaction hook; -计入工具输出、全部必需读取、Host 执行、写回、扣额、回读和 lease 释放。下表均为 -三次中位数,单位 B,main → 候选: - -| Provider / scenario | Whole stdout B | Current stdout B | RPCs | Framed RPC B | Python fixture read B | Python fixture write B | -| --- | ---: | ---: | ---: | ---: | ---: | ---: | -| file / cold | 57,597 → 45,996 | 57,597 → 45,996 | 423 → 288 | 2,938,704 → 1,929,733 | 720,046 → 662,664 | 302,925 → 272,952 | -| file / warm | 118,430 → 95,236 | 60,833 → 49,240 | 843 → 578 | 6,271,394 → 4,130,344 | 1,926,283 → 1,700,979 | 675,761 → 593,384 | -| file / recovery | 118,202 → 94,776 | 60,269 → 48,556 | 845 → 580 | 6,259,244 → 4,112,058 | 1,942,194 → 1,715,504 | 656,353 → 573,186 | -| sqlite / cold | 58,016 → 46,112 | 58,016 → 46,112 | 423 → 288 | 2,943,792 → 1,932,217 | 737,286 → 677,202 | 304,783 → 275,281 | -| sqlite / warm | 119,272 → 95,472 | 61,256 → 49,360 | 843 → 578 | 6,281,728 → 4,136,666 | 1,965,207 → 1,734,459 | 679,477 → 598,310 | -| sqlite / recovery | 119,040 → 95,008 | 60,688 → 48,672 | 845 → 580 | 6,269,816 → 4,117,784 | 1,981,156 → 1,748,980 | 660,103 → 577,919 | - -温态 whole stdout 少 19.58%/19.95%,RPC 少 31.44%,framed 字节少 -34.14%/34.15%,Python 夹具观测读写合计少约 11.8%;current stdout 少 -19.06%/19.42%。这是累计 C1 对照,不把全部下降归给此小集成修复。温态 wire 范围 -为 file: main 6,271,290–6,271,572; candidate 4,130,308–4,130,664; sqlite: main 6,281,492–6,281,936; candidate 4,136,236–4,136,704。不声明统计显著性。 - -主指标以生产者原始完整 `decision.json` 为 F,不能用已经投影的 recovery 文档代替。 -60 组生产者/BODY 均核对原 Turn、控制及公布的 recovery/selected 摘要: - -| Provider / scenario | Main producer F → BODY B (reduction) | Candidate producer F → BODY B (reduction) | -| --- | ---: | ---: | -| file / cold | 60,084 → 27,993 (53.41%) | 53,873 → 27,291 (49.34%) | -| file / warm | 75,126 → 28,022 (62.70%) | 61,271 → 27,230 (55.56%) | -| file / recovery | 75,342 → 28,135 (62.66%) | 61,465 → 27,376 (55.46%) | -| sqlite / cold | 60,310 → 28,201 (53.24%) | 54,091 → 27,436 (49.28%) | -| sqlite / warm | 75,352 → 28,195 (62.58%) | 61,491 → 27,434 (55.39%) | -| sqlite / recovery | 75,568 → 28,319 (62.53%) | 61,683 → 27,530 (55.37%) | - -候选温态 BODY 的绝对字节更少,缩减百分比却较低,因为它的完整生产来源也更小; -两种比率都不能替代完整调用对照。文件差分不证明模型保留。本 cohort 观测到的 RPC -引用快照 payload 为零;provider/native/SQLite page 及完整进程 IO 仍未测。CPU/延迟、 -真实模型输入/缓存/生成输出、费用、自然采用和长程净收益仍未资格化。旧正负 cohort、 -冻结预算及原成果要求保留其版本;源码/打包结果不等于 merge readiness 或完整 C1 验收。 +| Quota `_project_quota_cli_payload` 与 `should-run` | 删除 v0 builder 回退分支;`should-run` 仅输出已组合的 `loopx_turn_envelope_v1` 或原始前置诊断。 | 组合拒绝(`quota_decision_transport_failed`)保存 `source_diagnostic`、`composition_error` 与原 `heartbeat_receipt`,保持 `ok=false`/`should_run=false`、零 handoff 与零扣额。 | +| Managed 新鲜预览与 `managed-step` | `compose_turn_decision`、`completePlanningFacts` 与合并调用移除 `TurnControllerInput`、`build_turn_controller_input` 与 `build_controller_input`。 | 失败 Turn journal 保留原 v0 解码;现场边界注入签名 v0 预览在 Host/journal/扣额前拒绝。 | +| 绑定 CLI、Kiro、DSH、SSH、EdgeBench 与 Windows 有界恢复 | 显式 `--complete-turn`/绑定 Agent+Turn `should-run`、onboarding 启动器与 Windows/PowerShell 私有目录预留(`1,700 B` 上限通过;`96 B` 准入前拒绝)。 | `--turn-envelope` 配 `--context-delivery off` 仍输出链接不可变 v1 捕获的有界 v0;普通未绑定/无 Turn 默认采用仍待 §9 审批。 | ### 可执行必读义务与原生 runner 的体积归因 -当前完整来源在既有 interaction owner 旁通过 `assertInteractionRequiredReads` 校验 -显式可执行的必读义务。声明 command 或 ordering 的读取必须保留非空、无 NUL 的命令; -显式顺序必须是已注册的 `before_work`。纯文字义务、未知支持元数据、带引号的中文路径 -以及历史省略的 ordering 保持原样。合法未读义务仍待执行;这项校验不补造已读确认, -也不增加全部材料先读完的通用门。 - -| 改变的边界 | 实际 owner/调用方变化 | -| --- | --- | -| 可执行读取语义 | 一个 TypeScript interaction validator,由既有完整来源 validator 调用一次;quota、managed preview、planning 与 Host 沿原调用进入,不增加 Python 规则或 RPC。 | -| 不支持的直接完整来源 | Python 运输保留显式 `contract_binding`,包括未知版本,交 typed planning reader 拒绝,不尝试旧 adapter。 | -| 验证调用方 | 将过期 CLI 故障注入从已删除的 envelope builder 移到实际完整 composition;保留显式历史版本负例。采用真实 canonical hard-lease inventory 和实际产物工作区,代替伪造准入或偶然的 Git checkout 发现。 | - -在未改的 `f1614358ac13` 上,新增八个 File/SQLite quota/managed 拒绝用例失败,八个 -既有合法/未知动作对照通过。共同规则无需修改两个调用方即可到达两入口。首版实现 -误拒一个合法纯文字义务,由原有完整原文测试发现;修正实现而不删除该断言。另一组 -真实 Turn CLI 在 Host 启动或扣额前验证未知版本/codec 和摘要正确但顺序不支持的 -读取。这是一项有界语义规则变更,不代表独立评审或模型遵从。Registry hook 准入及 -原版本 reader 保留各自 owner;新增注册顺序仍须该协议自身的评审。 - -整合 main `92294e7245cb` 后,最终八个完整 Python 模块在源码及实际隔离 wheel 均 -196 项通过;1,897 个打包来源文件逐字匹配,325 个完成进程及 103,615 次 Core 来源 -观察无 checkout 污染,突然退出不在退出审计范围。六个相关 TypeScript 模块 121 项 -通过,完整 control-plane -类型检查和变更文件 Ruff 通过。之前源码 178 过/7 败及 wheel 168 过/17 败均保留。 -修正保留原断言:六处过期 constructor 注入改为实际 composition;frontier fixture -使用 canonical authority;wheel 明确复制测试 helper,写回指定真实产物工作区。 -仓库 worker 脚本仍是显式测试调用方;来源审计资格针对打包 Core,不代表独立 scheduler -已经安装。正常重建 bundle 后打包,没有安装候选。 - -之前 20,533 字符的 premerge 失败,现在于不可变 main `bd79adc64968` 与候选 -`f1614358ac13` 上取得匹配的原生 runner 反例。固定同一父目录,直接输出为 20,333, -原生 runner 为 20,501:隔离目录在八处 fixture 根引用中各增加 21 字符,共 168。 -原 premerge 布局再增加四字符目录,两版本均为 20,533。只替换所属 fixture 根和 -观测时间后,payload 事实一致。实测仍以原 20,500 上限运行全部原断言,没有缩短路径 -或输出;这项字符预算诊断与完整 capture 到 BODY 的 UTF-8 主指标分开。 - -[既有 fixture 预算提案](https://github.com/loopx-project/loopx/pull/8069) 负责该独立问题。 -这里不校准、不 skip、不豁免;原失败仍失败。前述完整成本 cohort 保持各自精确版本, -不改称新增校验后的实测。CPU、模型用量、自然采用和长程净收益仍未知。 - -旧 constructor 的树内调用仍是显式 composition 与 model-behavior 验证 fixture。 -原版本 journal/recovery reader 仍需核清已接纳工作和支持窗口;不为增加退役数量而 -删除。本切片不退役这些 reader,也不关闭整体 C1 验收。 - -### 最新 main 的匹配 hard-lease 对照 - -另一次独立重复固定 main `92294e7245cb` 与候选 `b3b3b232724d`,纳入上面的可执行 -读取校验。原编号 Task、fixture、observer、共同 Python 和 cold/warm/压缩恢复协议 -均保持原样。每个 arm/provider 三次重复,共 36 条件、60 个工作 Turn。每端 1,914 个 -产品源码摘要未变;654 个父/完成 child 和 640,896 次 Core 来源观察均匹配原版本。 -完整原 Task 出现在每次实际消费的读取正文中;每 Turn 保留原身份、三份 committed -回执和一次扣额,同场景交付同一合格产物。这是工程资格,没有调用模型或安装 App 候选。 - -完整流程计入已完成的准备 Turn、所有必读、原生 Host 准备、适用的压缩 hook、写回、 -扣额、重放/读回和 lease 释放。父指标已含 child;当前步骤列只排除已完成的准备工作。 -以下为三次中位数: - -| Provider/场景 | 完整 stdout B | 当前 stdout B | RPC 次数 | Framed RPC B | Python fixture 读 B | Python fixture 写 B | -| --- | ---: | ---: | ---: | ---: | ---: | ---: | -| file/cold | 57,221 → 45,732 | 57,221 → 45,732 | 423 → 288 | 2,930,378 → 1,924,529 | 715,582 → 658,504 | 301,509 → 271,509 | -| file/warm | 117,662 → 94,692 | 60,441 → 48,960 | 843 → 578 | 6,254,008 → 4,120,060 | 1,916,435 → 1,691,969 | 672,788 → 590,508 | -| file/recovery | 117,450 → 94,248 | 59,893 → 48,292 | 845 → 580 | 6,241,950 → 4,101,350 | 1,932,262 → 1,706,384 | 653,451 → 570,267 | -| sqlite/cold | 57,640 → 45,848 | 57,640 → 45,848 | 423 → 288 | 2,935,504 → 1,927,053 | 732,814 → 673,042 | 303,374 → 273,849 | -| sqlite/warm | 118,504 → 94,928 | 60,864 → 49,080 | 843 → 578 | 6,264,426 → 4,125,624 | 1,955,379 → 1,725,427 | 676,528 → 595,288 | -| sqlite/recovery | 118,288 → 94,480 | 60,312 → 48,408 | 845 → 580 | 6,252,476 → 4,107,176 | 1,971,260 → 1,739,860 | 657,195 → 575,088 | - -温态完整 stdout 减少 19.52%/19.89%,RPC 减少 31.44%,framed 字节减少 -34.12%/34.14%,观测到的 Python fixture 读写合计减少 11.85%/11.82%;当前步骤 -stdout 减少 19.00%/19.36%。温态 framed 范围:File main 6,253,744–6,254,276, -候选 4,119,902–4,120,628;SQLite main 6,264,262–6,264,682,候选 -4,125,580–4,125,850。不推断统计显著性。实际温态请求包括 -`quota.turn_envelope.evaluate` 20 → 10、`todo.context.page` 178 → 62、capability -hook 校验 8 → 4;这些属于累计 C1 差异,不能全部归因给新增必读 validator。 - -主指标仍为同一次生产者完整 capture F → 所选 BODY。60 组逐一核对公布的原生产者 -capture 摘要、recovery/所选正文摘要、原身份和控制事实: - -| Provider/场景 | Main F → BODY B(缩减率) | 候选 F → BODY B(缩减率) | -| --- | ---: | ---: | -| file/cold | 59,828 → 27,845(53.46%) | 53,649 → 27,120(49.45%) | -| file/warm | 74,870 → 27,797(62.87%) | 61,049 → 27,072(55.66%) | -| file/recovery | 75,086 → 27,921(62.81%) | 61,241 → 27,194(55.60%) | -| sqlite/cold | 60,054 → 28,062(53.27%) | 53,867 → 27,274(49.37%) | -| sqlite/warm | 75,096 → 28,003(62.71%) | 61,267 → 27,274(55.49%) | -| sqlite/recovery | 75,316 → 28,131(62.65%) | 61,459 → 27,403(55.41%) | - -候选 BODY 绝对值更小,缩减率更低,因为完整来源也更小。文件 delta 不证明模型保留。 -新 cohort 支持“同一合成产物下测得的工程开销更低”,不替换旧 cohort,也不证明模型 -生成输出、cached/uncached 输入、费用、native provider/SQLite page/完整进程 IO、 -CPU、延迟、自然采用或长程收益。原体积失败、历史 reader 义务及完整 C1 验收仍开放; -本次测量更新不改变门、默认、评分或运行时行为。 - -### 过渡期 journal 的恢复入口 - -canonical resume loader 原先只对当前 v1 plan 校验完整来源。已记录的 v0 plan -即使带有 `work_contract`,仍走原始 legacy 身份分支;writer、普通 inspection -和 settlement lookup 已会拒绝被改动的来源。执行路径仍在下游拒绝它,因此这是恢复 -入口不一致,不能据此声称 Host 越权启动或扣额。显式 retry inspection 同样返回 -blocked 观察,而非 v1 的入口错误。 - -loader 现在把所有显式完整来源交给既有 `turn_host_lineage`/TypeScript source -owner,包含已记录过渡格式的 source/adapter 交叉校验。当前 v1 加载本就使用该调用; -过渡格式增加这次调用,不宣称普通路径 RPC 节省。没有完整来源的历史 plan 仍保留原始 -身份精确比较和原字节。plan 加载不新增整个 journal 的 settlement 一致性门,相关 -诊断仍归既有 recovery inspection;普通坏 journal inspection 继续返回结构化 blocked -观察。 - -既有 File/SQLite journal 矩阵补入 loader 对内容改动、未知版本、null/缺失 binding、 -冲突 adapter 及已重签名 interaction/action/reference 改动的拒绝。数值来源、当前 -版本缺源拒绝、纯历史格式加载及字节保留继续作为控制。公开 -`run-once --resume-turn-key` 与显式 retry-inspection 入口验证相同来源拒绝,不改写历史 -或扣额。冻结的修复前 loader 在两个 provider 的过渡格式用例均失败;修正 CLI fixture -遗漏的必填 project 参数后,显式 retry inspection 的两个过渡用例也失败,两个当前 -plan 控制通过。这些是分别记录的产品与 harness 问题,不是六个产品缺陷。 - -整合前的恢复 cohort 在源码和隔离实际 wheel 中均有 139 个用例通过。整合 main -`2852eb453bef` 时保留完整原生交接、两侧 lifecycle 断言及共享 TypeScript import; -随后源码 81 个、TypeScript 178 个用例通过。被中断的源码/wheel 尝试没有终态结果, -不计作通过。 - -整合后的 wheel 首次有 67 个用例通过、14 个 settlement 用例失败:其子进程默认在 -源码 checkout 工作,恰好借用了该目录的 workspace 资格,离开 checkout 安装后便无法 -验证。诊断 observer 确认实际 workspace 拒绝。既有测试现显式使用各自的真实产物 -project,全部原断言、坏 workspace 负例和 once-only 恢复控制保留;完整受影响模块在 -源码及字节未变的安装 wheel 中各有 23 个用例通过,另 58 个未改用例已在前一 wheel -cohort 通过。这覆盖跨 cohort 的 81 个独立用例,并非一次未中断的最终 81 用例运行。 -1,898 个打包源文件逐字一致;最终 23 用例 wheel 运行观察到 125 个完成进程、64,109 -次 Core 模块来源,无 checkout 污染。突然退出仍不在退出审计范围;旧失败继续保留。 - -本次修复实际仍受支持的恢复 consumer,不为退役数量删除 reader。legacy constructor -只剩前述具名历史/composition/model-behavior fixture;原未结工作、支持恢复窗口、 -独立审阅及完整 C1 验收继续约束退役和采用。前述成本 cohort 仍固定于原 main/候选 -快照,本次完整性修复没有重新测量该 cohort。 - -## 较早的集成证据 - -集成保留 main 已抽取的 quota-presentation owner 与稀疏原生 journal 运输。 -候选中的重复数值 collector/validator 由既有实现替代。验收、summary lane、 -authoring 和 Vision 共享既有来源身份及编辑 owner;普通 JSON 相等不能证明跨 -Python/JavaScript 边界的原数值身份。正文大小判断仍比较序列化正文,不比较身份 framing。 - -独立的 24 项 Python 到 TypeScript 回归先得到 16 项失败、8 项对照通过。修复身份/编辑 -后 24 项全部通过,覆盖整数形浮点、带符号零、不安全整数、稍后的精确 authoring owner -及相同 audit 对照。扩大集成验证最初还暴露旧 fixture 的 hash 引用和一项 authoring -缺失的 CLI 用例;这些失败保留为证据,须另行完成修正后的验证。这是来源/运输证据, -不证明 installed 采用、模型验收成果或完整成本资格。 - -2026-11-01 的 heartbeat 消费切片(`18b55e04d`)让 captured native Goal 输入 -复用既有 heartbeat 规则 owner 的路由、安全与完整工作指引。新生成的 on/off -提示共享这段文案;历史保存正文不重写。逐条复核保留 actor、权限、必读来源、 -原始/累计成果要求、顺序、证据、接续与停止条件。删除的是独立维护的文案副本, -没有新增决定或结算 owner,也不改变激活默认值或协议。 - -在同一 CLI 调用方、320 字符 scope、显式 CLI 和五项能力参数下,仅替换成冻结 -`958eef4c` renderer 得到未绑定/绑定正文 5,041/5,080 个归一化字符;候选为 -4,859/4,898,满足原 4,900 限额。两种候选正文均少 180 UTF-8 字节;更长路径 -负例仍以 5,051/5,090 超限。Captured native Goal 正文反而从 3,187 增至 3,235 -字符,仍低于原 4,000 宿主硬限。这些是生成输入的测量,不是整份 base 仓库 -重跑、control packet 压缩、模型采用、token 节省或成果收益。 - -在该检查点,消费检查有 114 项提示/平台用例通过、1 项平台跳过,以及 12 项真实隔离 -File/SQLite CLI 最终输入/恢复用例通过,宿主 executable 为合成实现。 -输出/差分矩阵仍有 5 项失败:完整 quota -Markdown 30,462>10,000,拥挤 plan 24,044/27,508>22,500,完整 alias -24,252>13,000,另一个 multi-agent probe 25,933>13,000;其余 219 项通过、 -1 项跳过。预算和样本规模均不放宽,新文案不继承历史 restoration 展示豁免。 -C1 切换、剩余 reader 及原 quota 单会话成果/完整成本对照继续开放。 - -后续 Markdown 切片(`b852af5f7`,集成目标 main `035f7ac66`)在普通 quota -和 alias 共用的完整 Turn renderer 中移除嵌套 pretty-print 缩进。每个根字段 -独占一行;全部嵌套值、来源条款和 binding 仍保存在同一个可解析 JSON 区块。 -JSON 输出、capture、原生宿主输入、legacy 展示及决定/结算 owner 均未改变。 -与冻结 `f3ae16362` renderer 的同源对照计入 stdout 最后一个换行: - -| 合成来源 | 原 Markdown 字节 | 当前 Markdown 字节 | 减少字节 | 完整 JSON 字节 | -| --- | ---: | ---: | ---: | ---: | -| Small | 30,462 | 24,531 | 5,931 | 24,252 | -| Crowded | 47,237 | 37,846 | 9,391 | 37,555 | -| Crowded with Vision | 55,893 | 45,249 | 10,644 | 44,954 | - -行数从 860/1,214/1,361 降为 69/72/73。Markdown 仍比对应的完整 compact -JSON 多 279/291/295 字节;减少的是展示缩进,不是语义 control packet 内容。 -完整来源模块 63 项通过,覆盖未知事实、整数形浮点、带符号零、不安全整数及 -转义指令原文;集成的有界 reader buffer 检查 2 项通过。输出/差分矩阵仍为 -219 项通过、5 项失败、1 项跳过:small Markdown 当前为 24,531>10,000, -另四项失败保留上一检查点的大小和门槛。历史失败仍是失败,未改变上限、 -fixture 规模或要求;不据此认证模型、费用、安装采用或长程收益。 - -可选 Host 切片(`8316c9fa5`,随后集成目标 main `5a9c0a612`)让 Ark、MemT -的工具身份通过 `extensions.turn_host.extract_turn_work_identity` 读取既有完整 -dispatch owner。完整输入复用 selected-work owner,包含 adaptive 主任务;历史 -输入保留 provider 原始声明值及严格 string/NUL 检查。Session lineage 保持原有 -归一化方式。Fresh context、来源/投影完整性及 MemT 精确 Goal 生命周期拒绝门 -均保留。本次退出两个 provider 自行解码身份的调用点;DSH、native-child、steward、 -session-recovery 的兼容 reader 和 executor 的 v0 运输仍未退出。 - -MemT 候选校验现在保留原请求与完整来源。真实候选转换完成后再使来源失效,原本 -仍被该本地检查接受的结果现在会被拒绝;这不证明外层 Core 结算此前会接受它。 -实际 CLI 输入仍没有已准入的 MemT 生命周期,不能打开记忆;converter 测试没有 -补造该身份。SDK 用例使用隔离合成协议对端,不运行 GPU 或模型服务。 - -同源对照在冻结 `46bdaddb3` 与候选上调用真实 Ark 身份消费函数,输入是完全相同的 -合成 File/SQLite CLI 请求: - -| 成本观察 | 原实现 | 候选 | -| --- | ---: | ---: | -| 每个请求的身份检查 RPC | 1 | 1 | -| Canonical JSON 参数字节,File/SQLite | 41,286/41,338 | 未改变 | -| Canonical JSON 返回字节 | 211 | 324 | -| 为读取身份进行的完整来源深拷贝 | 1 | 0 | - -省去的拷贝来源为 28,432/28,458 canonical JSON 字节;这是来源大小代理,不是 -内存分配测量。全部 dispatch-context 返回现在携带三个身份事实,其他调用方也 -多付 113 字节。模型提示经 digest 核对仍逐字节相同,为 33,020/33,046 字节。 -上述数字不含 RPC framing,不认证延迟、模型净收益、token、费用或长程收益; -完整 packet 压缩没有变化。 - -Ark/MemT 基线分别 39/37 项通过,修复后 41/43 项通过。新增用例先在两个 -provider 的身份 decoder 及 MemT 失效来源接受行为上失败。Core capture/Host -检查 58 项通过,包含 File/SQLite 真实 CLI 输入、adaptive 身份、历史原始值及 -禁止回退的拒绝路径。集成 main 后,envelope/interaction/conversation owner -的 TypeScript 用例 122 项通过。Native steward fixture 最初有 10 项启动失败, -因为继承的会话 provider 环境覆盖未被合成对端回显;只在测试子进程移除该覆盖后 -10 项通过,未改变用户配置或生产 provider 检查。首轮失败保留为测试环境证据, -不算通过。初始断言曾把完整输入的 adaptive 选择强加给历史 provider -解码,已修正这两项失败并保留记录。扩大本地矩阵暴露 6 项 context-delivery、 -2 项 driver-profile 失败;冻结 `46bdaddb3` 可复现全部 8 项,原有 5 项输出预算失败 -也继续保留,均不算资格通过。C1 仍需解决这些交付缺口、supported reader 退出、 -打包/安装资格及原 quota 成果/完整成本对照。两个可选包须使用同一份已集成的 -Core 源码;版本下限不能证明已发布旧 wheel 含有所需接缝。 - -随包 DSH 后续切片(`e838e7594`)集成目标 main `8ac384cdc`,让完整输入的 Session/工具身份 -复用同一次已校验的 selected-work 事实。此前完整契约的 adaptive 工作可能选择另一 -主 Todo,DSH 却仍把工具和可复用会话绑定到旧声明 Todo。既有 dispatch 检查现在 -仅为本次调用保留已经返回的私有身份事实,DSH 两处绑定复用它,不增加 RPC;该 -元数据不进入最终模型输入。两个历史 DSH decoder 合并为一个 raw-value adapter, -保留 false-like 转换、组件位置、Goal-instance hash 和 fresh-iteration hash。 -它只用于未携带 `work_contract` 的历史请求,待原版本恢复窗口对账后退出;已提供 -但无效的完整契约不会回退。 - -冻结 `ae8ee460a` 与候选使用同四份真实 File/SQLite CLI plan 生成的合成输入, -通过实际 DSH adapter 对照普通与 adaptive 工作。每份仍只有一次 dispatch RPC, -canonical 参数/返回 JSON 大小均未改变;最终提示经 digest 核对逐字节相同: - -| 来源 | 普通提示字节 | Adaptive 提示字节 | 内部 authority JSON 增加字节 | -| --- | ---: | ---: | ---: | -| File | 32,377 | 32,517 | 114/115 | -| SQLite | 32,425 | 32,565 | 114/115 | - -最后一列是 Python 对象 JSON 大小代理,不是内存分配或 wire 流量。普通会话/工具 -身份保持相同;adaptive 绑定有意从旧 Todo 改为当前所选主 Todo。探针未改状态、 -未扣额;它验证该 caller 修正,不认证 packet 压缩、延迟、模型费用或同等成果/ -完整成本收益。 - -新增回归先得到 4 项 adaptive 失败、7 项对照通过,随后 DSH 与完整来源组合有 -367 项通过;另加 2 项真实 File/SQLite CLI 用例,经过随包 DSH runner、独立 -校验、已提交写回及重放,runner 调用与扣额均只有一次。Provider 为合成实现。 -可选 Ark/MemT 用例针对当前 Core 分别有 44/65 项通过。MemT 最初缺少已固定的 -client;仅在隔离测试 overlay 安装该 client 后,5 项 CLI 用例仍从任务工作目录 -导入旧 installed Core。子进程 import 探针复现缺失接缝,显式绑定测试子进程的 -Python 源路径后这 5 项通过,未改变产品或用户配置;两次初始失败均保留。 -切片复用既有 CLI/Chat Host owner,不增加能力、设置、用户步骤或激活默认值; -未认证实际 SDK 服务或 installed Host 采用。Native-child、steward 等历史消费者、 -原 5 项输出预算门、8 项扩大矩阵失败,以及 C1 的原 quota 验收继续开放。 - -Native-child 元数据后续切片(`3d58796d7`)集成目标 main `07149df68`。请求构造、持久 Host -attempt 及两种 Codex transport 调用的 `configured_native_child_limit`,在存在 -`work_contract` 时改读原始完整 interaction context;只有历史请求读取 v0 -context。既有整数 decoder、完整来源校验、launch fence 和原生 receipt 准入 -不变;这是本地运输读取,不是第二个 authority 或新默认值。共享来源校验原本就会 -拒绝不一致的投影,不能据此认定此前放行过错误子任务。v0 envelope 仍保留用于 -签名兼容数据,其整体运输尚未退出。 - -新增 on/off 回归先因读取历史字段失败。真实子进程与持久读回保留启用时的观测、 -关闭时的隔离、父任务结果和私有正文排除;损坏完整输入在第二次进程或 receipt -之前被拒绝。首轮扩大验证有 195 项通过,两个新 fixture 被完整 Goal 来源门拒绝; -补齐 fixture 的真实文件及完整 revision 后修正的是夹具,产品门禁未改。 -修正后的 native-child 模块 38 项通过;相同三个模块的最终完整重跑 197 项通过, -用时 149.37 秒。Owned operation Host 模块 34 项通过, -两个明确要求真实模型 opt-in 的资格用例跳过,没有启动 live Host。 - -冻结集成 `5d9dbb811` 与候选的八份固定请求,来自前述真实 File/SQLite -普通/adaptive CLI fixture,并通过既有 owner 重组加入合成 on/off capability -context。元数据读取仍为零 RPC,完整输入准备仍为一次 RPC。全部配对的请求 -字节(40,202–40,778)、提示字节(30,744–31,030)、schema 摘要及 canonical -参数/返回大小都相同。这不是 packet 缩减、延迟、内存分配、账单或完整 Host -成本测量。原 5 项输出预算门、8 项扩大矩阵失败、其他 consumer/writer 迁移及 -原 quota 成果/完整成本验收继续开放,历史失败保留。 - -后续在源码 `d1046499a` 完整复跑 `test_context_delivery_cli` 与 -`test_loopx_turn_driver` 两个模块,得到 253 项通过,仅两个 profile alias 用例 -失败。实际 CLI 返回先因 capture 缺少 Turn 身份拒绝请求,测试才无法读取 -`scheduler_hint`;这不能证明调度策略失败。现为 fixture 提供原始 Turn,两个 -alias 分别验证显式 delivery off 与 native delivery on。开启用例沿声明的原始 -capture reader 连续读取 UTF-8 页,保留全部调度断言,并验证只有一次 admission、 -恢复后没有 spend、Goal 与事件账本字节不变。 - -相同两个完整模块随后 257 项通过,用时 118.43 秒,无跳过或错误;聚焦的四项 -矩阵也通过。本次增量仅修改测试,不引入生产设置、默认值、caller 协议或运行时 -行为。原六项 context-delivery 失败保留为历史负例,本次未重新归因其逐项原因。 -原五项输出预算门、其他实际 consumer/writer 迁移、supported reader 退出及原 -quota 成果/完整成本资格继续开放。源码用例通过不证明 installed Host 采用, -也不证明 packet 体积、模型保留上下文或净成本收益。 - -后续 plan 切片仅在 `build_loopx_turn_plan` 收到完整契约时删除重复的 -`consumer_version` RPC。既有 `driver_lineage` 已调用同一 TypeScript 版本、 -完整性、source/projection 和 selected-work owner;历史输入仍保留独立版本诊断。 -不增加校验实现、跨调用缓存、字段、协议版本、激活默认值或权限。 - -八份固定输入来自真实隔离 File/SQLite CLI plan,覆盖完整/历史来源及 -fresh/resume 会话策略。相对冻结 `0cd09b46c`,最终 plan、Host 请求、Codex -提示和 schema 全部逐字节相同。完整 plan 的 RPC 从两次变为一次,测量的 -plan/request/prompt/schema 序列从三次变为两次;规范 RPC 参数加返回 JSON -在 File 下为 92,598→81,554B,SQLite 下为 92,838→81,752B,分别少 -11,044/11,086B(11.93%/11.94%)。历史对照仍为三次且字节完全相同。 -四份完整模型输入都保留完整原契约和 fixture Goal;探针未扣额或调用模型。 -CSV、SQLite 整数合计和 Decimal 比率独立复核八组对照一致。 - -六项 plan 矩阵先有五项重复调用失败、一项历史对照通过,修改后六项通过。 -不支持的 adapter 版本、改动的来源正文、自洽重签却替换原动作的 adapter、显式 -null 完整契约仍经同一 owner 拒绝。这只是运输组件成本,不含 framing、延迟、 -内存分配、模型用量和成果;最终模型输入没有缩减。五项原输出预算门、原 quota -单会话对照和完整 C1 资格继续开放,不能把本次缩减与不同分母的物理包或选择 -读取数字直接相加。 - -完整 Turn driver、原生 Codex CLI 和完整来源三个模块有 334 项通过,耗时 -202.77 秒,无跳过或错误,包含真实 File/SQLite 交付、验证、失败 attempt -恢复和原 Turn 结算;未启动 live Host。这验证有界源码切片,不结清其余 C1 -cutover,也不产生新的精确 head merge-readiness 回执。 - -后续 Host 运输修复保留显式提供的 `work_contract`,即便它不是对象。请求构建与原 -capture 发布此前会丢弃这些值,使原生提示和共享 Host reader 将其解释成历史缺省。 -两处运输现在保留原值,交既有 TypeScript 完整来源校验器拒绝;真正未提供的历史 -请求仍用旧 reader。不新增平行校验器或字段。普通 executor 更早的来源检查仍在, -本次证据不表明外层结算可被绕过。 - -冻结 `42b842f93` 上,纠正后的 18 项矩阵有十项未拒绝失败、八项对照通过;修复后 -18 项全部通过。覆盖两处运输、缺省/有效、null、false、零、列表、文本、空对象和 -完整性错误,核原生/共享 reader 拒绝且 DSH runner 未加载。最初另有两项对照因 -Goal 尚未完整读取而被正确拒绝;实际交付完整合成 Goal 后修正夹具,不放宽该校验。 -八份固定 File/SQLite fresh/resume 输入的 plan、请求、提示、schema 仍逐字节 -相同,RPC 次数和参数/返回字节也不变。这是兼容边界资格,不是新的压缩或净成本 -结果;原五项输出失败和完整 C1 验收继续开放。 - -扩大六模块运行最初为 522 过、六项 Host-context 在 dispatch 前失败;冻结 -`42b842f93` 重现相同六项。独立子进程 import 探针发现,cwd 为一次性 Goal 时 -实际导入另一份已安装 Core。夹具现为子进程绑定并核对当前 checkout,且为历史 -直接正文对照显式选择 delivery off。完整 Host-context 模块八项通过,产品文件 -未变的另五模块保留 520 项通过;合并为 528 个不同的通过 case,来自上述两次 -运行,不冒称最终一次六模块全过。原失败保留;未改变已安装 Core 或用户设置。 - -受管 Session 的独立验收 reader 现在复用同一个完整来源 owner。准备阶段复用 -dispatch 在本次调用内刚核过的身份;模型工作后,回调在运行原独立 argv 前核验 -当前完整来源。显式非法契约不能进入历史 decoder;真正缺省保留旧选择与诊断。 -argv 前后的 canonical 声明复核、原 actor 准入、lease 和一次性结算仍由原 owner -负责。 - -冻结 `bd2ea9c58` 上,两次基线运行覆盖的八项中,File/SQLite 的四项来源改动/ -置空反例仍错误执行独立 argv,四项正常/历史对照通过;修复后一次运行八项全过。 -故障注入实际模型后回调边界;原生 Session、canonical Task、独立 argv 与结算 -保持真实,仅模型/provider 为合成夹具。更早六项启动失败来自继承的 provider -override;共享合成夹具现隔离该环境值,不改变已安装设置。这验证回调边界, -不表明外层结算可被绕过。 - -原生夹具的同来源对照替换冻结基线方法,依赖和验收命令保持原样。准备阶段没有 -新增 Turn-envelope RPC;模型后验收增加一次,File/SQLite 的规范参数加返回 -JSON 为 42,911/42,959B。另八份固定 CLI 来源对照中,完整输入为 -36,320/36,404B,历史输入没有新增 RPC;两组分母分开。均不含 framing、延迟、 -分配、canonical Task 读取、argv、模型用量及恢复;额外基线 argv 仅对一次性夹具 -做只读验证,不是生产重放。这是来源拒绝带来的组件成本增加,不是压缩或完整净 -收益结论。原五项输出失败、剩余 C1 reader 及原 quota 单会话成果/完整成本验收 -继续开放。 - -`9baa678db` 上的扩大运行完成五个原生/管家/日历模块,共359项通过;第六个 -私聊模块在56过/37项相同provider启动失败后主动停止。这是未完成运行,不能称为 -六模块全过;无名中断记录不计测试。同源码移除环境override的两项控制通过,随后 -仅隔离ordinary合成夹具,原环境下同两项也通过。生产provider检查与安装配置不变。 - -随后集成目标main `8a9e11628`,在`4cdf977c3`适配其新增的另一处显式夹具调用; -运行时修复仍为`a49625e3a`。该集成源码的原生验收/普通会话完整模块68项通过, -335.058秒;私聊/Antigravity完整模块316项通过,644.420秒。两次运行合计384个 -不同的通过case,不是一次新的六模块全跑。共享conversation-binding TypeScript -45项通过。最终检查没有跳过或错误;原失败与组件测量保留各自源码版本。这次集成 -未重测完整成本,也不认证C1切换。 - -以下区块保存本次集成从规范 RFC 移出的候选叙述。测量、提议和现在时陈述属于各自原 -检查点,不是对本次集成源码的新结论。当前行为以规范 RFC 和具名 owner 为准。尤其不能 -由已退出的 scope 原型恢复强制模型阅读计划。既有负结果、原 quota 对照与 reader 退出 -要求继续有效。目录内其他日期条目保持自身来源,不因这次迁移而被改写。 - -## 历史候选区块 1 - -下述按 Agent 范围交付的实现与测量仍是未合并的 C1 集成检查点,不代表默认安装行为。 -已交付的验收材料切片与按候选决策阶段交付的提案在后文分别说明。 - -冷态交付默认展开当前 Agent 的成果。其他 Agent 的独立成果保留可发现索引,包含 -身份、owner、目标、revision、工作关联、未满足要求标识、当前 review/check 状态及 -精确 capture 正文引用。全局 Goal 意图、共同要求、权限与停止条件始终进入必读输入。 -跨 Agent 依赖、共同验收,以及影响当前决策的阻塞或矛盾证据,须在相关决策前自动 -展开,不受 owner 限制。Goal 级重规划和整体验收扩大到所有受影响成果;局部交付 -无需重读无关历史证据。Owner 只是默认范围,不是权限边界或充分的相关性判断。 -工作未绑定、关联未知或来源形状不受支持时,保持完整交付,直至既有 typed owner -能够证明较窄的必读范围。 - -Canonical 契约仍保留完整要求和证据。以现有同 capture 成果索引及 replan 分阶段 -reader 为起点,合并普通/replan/detail 管线;索引须补足当前决策事实,不能只有成果 -数量。必读范围保留要求全文,支持性来源和 review 细节通过绑定完整性、顺序明确的 -reader 按需交付;依赖该材料的决策须先读完它。当前结论、新鲜度与未满足要求仍 -内联,Agent review 不能变成独立检查。界面折叠本身不会减少模型输入;交付投影、 -required-read owner 与 host 恢复契约须一起迁移,已有 capture 保留原完整读取义务。 -正文缺失或保留情况不确定时,执行原 capture 支持的恢复,不能重新准入或假定已读。 -不能为字节目标缩短保留要求、裁剪声明来源或靠正文关键词推断相关性。 - -C2 须在相同冷态、已保留温态及上下文丢失来源上验证:默认自己工作、跨 Agent -依赖/约束、未绑定工作、同伴证据变化、广域 replan 和 Goal 验收。计入实际模型输入、 -分页及正文读取往返、恢复、延迟和完整成果成本;首屏变小不能抵消必要补读或漏掉 -约束的成本。这是拟议交付行为,替换与回滚完成资格验证前,仍以当前完整来源 reader -为准。 - -当前集成证据:[导航收敛检查点](2026-10-29-navigation-convergence.zh-CN.md)。 -[Journal 来源保真检查点](2026-10-29-journal-source-fidelity.zh-CN.md) -将可独立评审的持久化修复与尚未完成的数值 hash/上下文 codec 资格分开记录;既有 -hash 语义保持不变。 -后续[上下文来源保真检查点](2026-10-29-context-source-fidelity.zh-CN.md) -将通用冷态、差分和全量恢复修复拆为普通 #7661,C1 复用同一来源身份/修改 owner。 -组件传输缩减不证明 canonical hash、安装采用或原 quota 完整成本收益;历史 hash -语义仍保持。 - -当前 C1 分支复用已合入 #7560 的 `outcome_context_navigation_v1` 和通用同 capture -`context-read --select`。注册关系建议读取顺序;归属不证明独立性,覆盖限制也不 -新增模型全文读取门。原完整要求、当前状态、全局约束和反证仍可从原 digest 绑定的 -capture 取得。 - -此前未发布的强制阅读计划、`outcome_context_projection_v0` wrapper、普通读取的 -专用成果 reader 和融合 native projection 操作均已退役。Staged replan 原本的 -decision 绑定验收引用仍归其 owner。Native IO 复用主干材料 planner 与精确恢复 -codec,在可选规划前先提交当前完整恢复引用。简单 native capture 因而恢复为两次 -owner 调用,而非原型的一次融合调用;旧调用数优化不构成当前资格。 - -已合入 [#7627](https://github.com/loopx-project/loopx/pull/7627) 提供文件优先交付及文件 -差分,无需强制模型全文读取。C1 沿既有 native owner 采用其评审后的精确实现,不再 -引入已退役的 scope 机制。实际安装采用、模型决定和验收成果/完整成本仍须分列。 -历史 capture 保留其原身份与受支持的恢复。 - -以下测量和测试对应已退役原型的精确检查点,作为历史证据保留,不代表当前导航/ -planner 集成的结果。 - -同一 24 成果/253 要求合成快照,以 61 组交替温态真实 provider owner 调用对照 -旧实现:File 中位数 5.890→6.317 ms,SQLite 为 2.239→2.521 ms;p95 分别为 -15.267→17.580 和 6.504→9.412 ms。原响应字段全等,计划元数据增加 405/415 个 -序列化字节。此对照仅隔离同一 TypeScript 进程的 acceptance owner,不含 bridge、 -CLI、冷启动或模型成本;此基础在 native 范围切换之前增加成本,不是效率提升。 -在范围切换检查点,native 展示还增加精确必读产物及既有 codec 之前的一次 typed owner 调用,必须与 -分页、补读和恢复成本一起计入;首包缩小不证明净收益。 - -native 切片通过 406 项真实入口 Python(五项显式 native/SDK 案例未资格)、169 项 -TypeScript 和四项真实 Codex `0.163.0-alpha.11.1` 静态 loopback 检查。后者核实际 -模型请求中的冷态全文、保留差分与同 capture 恢复字节,不证明自由生成模型行为。 -四个新增 File/SQLite 范围断言在 `1ac29089f` 失败。集成中发现的恢复引用回归已修复: -只为显式 scoped 产物替换 metadata,普通恢复保留原文件字节身份。 -中断回归最初因仍选中前次 capture 而失败;将当前恢复发布前移到可选 scope 调用之前 -后通过。在运行源码 `e1c69289a`,标准 premerge 有两项在 `8b37000b3` 同样复现的失败:既有 -`run_loopx_turn_once` 决策函数过大,以及前序 owner 收敛后 `turn_route` 的 producer -覆盖过期。本 native 增量未修改这些文件;历史结果不是通过或例外。集成已先 rebase -到 `b69021498`,再到 `f63647e2e`,保留目标主干的原生输出预算行为,并采用 [#7520](https://github.com/loopx-project/loopx/pull/7520) -对真实 TypeScript producer/scanner 的修复,并在 `fec9cd3af` 将原 capture 恢复从 -run-once 编排中分离,保留既有 capture owner 与 session 恢复。大小阈值不变。当前 -完整组合的资格归精确集成 head 的 PR 证据,不能沿用旧 native 切片的测试计数。 - -最终运行源码 `e1c69289a` 的成本含上述恢复发布顺序修复;对照不可变 `8b37000b3`(前序 C1 与相同 target-main 大页配置),24 成果/253 要求 -来源上,每侧三组温态 cohort、每 provider/阶段 21 样本。温态新增真实 typed 依赖并核 -先前未读正文的交付。File 冷态/温态/恢复的完整分页序列化输出为 -105,380/40,473/103,372→37,908/33,495/38,594 字节。延迟中位数: - -| 阶段 | File,原→新 ms | SQLite,原→新 ms | -| --- | ---: | ---: | -| 冷态全文输入 | 72.856→48.749 | 67.237→46.477 | -| 温态范围扩大 | 38.744→51.944 | 35.953→52.165 | -| 上下文丢失后全文恢复 | 109.126→61.425 | 109.725→56.777 | -| 索引加一项可选全文 | 96.918→108.557 | 92.460→109.251 | - -在该次测量版本中,新增 scope RPC 仍在,温态 bridge 调用由二增三;File 温态产物文件共 -131,020→160,192 个序列化字节。索引/详情仍为两调用,但增加派生展示重验;冷态和恢复由两页 -变一页。测量含温态 runtime 下 Python native 投影、分页与生命周期,未控制机器负载; -不含首次验收收集、进程启动、子进程 CPU、模型/缓存 tokens、账单、人工/实施及验收 -成果。冷态/恢复传输改善,温态及详情中位数退化;这不是原 quota 对照或完整成本正向结论。 - -在 `85c235d29`,native 调用方经同一批 owner 在一次请求中组合 scope 与编码,并删除 -未被使用的全文 wire 副本;原独立 scope operation 已退役,普通 codec 和 capture -详情 reader 保留。相对 `307d000a3`,使用相同冻结 File/SQLite 观察、每侧三组交错 -温态 cohort(每 provider/阶段 21 样本)测得: - -| 阶段 | File 中位/p95,原→新 ms | SQLite 中位/p95,原→新 ms | -| --- | --- | --- | -| 冷态全文输入 | 37.438/60.718→28.516/38.941 | 34.263/39.924→26.966/39.054 | -| 温态范围扩大 | 42.065/58.640→34.813/45.922 | 39.869/49.047→33.856/45.593 | - -计入分页生命周期观察,两阶段 bridge 调用均由三减二。File 冷态产物字节由 -162,877 降至 129,299,温态仍为 160,192;完整分页输出不变。六组同路径的 -普通/scoped/广域 File/SQLite 对照保留完整公开分页与恢复值,单调用回归断言在 -基线失败。温态请求流量降低,但响应 payload 增加 27 字节。详情/恢复调用数不变; -SQLite 详情 p95 在未改代码路径下由 138.131 退化到 175.541 ms。机器负载仍未控制, -前述成本排除项仍适用。这去除了已证明的局部传输/IO 成本,不闭合原 quota 的成果/ -完整成本缺口、短来源增长或全部温态产物开销。 - -小来源给出体积节省的反例:四个真实入口 File/SQLite 夹具各含两成果、四要求, -由 36,293–40,548 增至 37,948–42,203 字节,每项恰好增加 1,655 字节,索引和范围 -元数据超过短可选正文。提案不从大夹具推导语义省略规则或生产体积阈值。 - -同一 24 成果/253 要求的合成来源,按旧的仅数量索引形状渲染分配 8,190 字节, -staged 状态分组分配 18,979 字节,原 12 KiB 索引预算失败。保留这些当前决策事实, -据此将独立索引上限调整为 20 KiB;history、horizon、完整 envelope 与生产性能 -限额均不变。完全相同状态分组避免逐要求重复状态字段。这里只测序列化字节, -不是 token/延迟/成果收益或不可变 base/head 对照。上述源码范围检查和传输成本不证明 -一般语义独立性或匹配验收成果/完整成本收益。 - -## 历史候选区块 2 - -External scheduler 候选在读取节奏或唤醒许可前,通过 -`assert_complete_turn_decision` 复用现有 TypeScript 完整 reader owner 验证带版本输入。 -这是纯读取:不重组已捕获的 host binding,也不生成旧 executor 视图。缺失 binding、 -不支持的版本/必需语义、内容篡改和无效同 capture 引用均在 wake command 前拒绝。 -无版本普通 quota packet 暂保留原兼容路径,退役须核对受支持的已部署 worker。 -File/SQLite 源码 CLI 到 worker 验证使用本地子进程标记,不执行模型;这里只取得 -该输入边界资格,不代表 attached host 任务交付、结算或验收成果/完整成本收益。 - -可选 Ark adapter 复用同一宿主输入 owner 的 `extract_turn_authority`/ -`render_prompt`,无需在可选包里新增契约 builder。File/SQLite 的真实 -`turn plan --host generic-cli --iteration-context fresh` 已将完整请求送入 -真实 Ark SDK,并使用合成 HTTP transport 验证。检查对照实际 user-message -中的契约与原 CLI 来源,恢复持久化 running receipt 时不重新提交输入,重放完成 -结果时不再调用 provider;来源/版本/binding 被篡改或完整输入显式为 null 时,在调用 -provider 或创建 receipt 之前拒绝。Core 状态与记账保持不变,历史 Ark 请求和恢复 -测试继续保留。这验证了 SDK wire 边界,尚未验证实际云端 session、模型成果或 -Core 结算。Ark 与 MemT 现共用真实 File/SQLite CLI 请求夹具。MemT 在 provider IO -之前拒绝该完整输入,因为可执行的 legacy registry 不提供精确 `goal_ref`。 -现有 `source_session_v1` 虽有精确生命周期,但属于 lifecycle-only;真实通用 Turn -规划入口会在 capture 或执行前拒绝它。规划后补造引用会掩盖这一生产者/消费者缺口。 -完整输入损坏也会在 provider 或 receipt 创建前拒绝;历史 MemT SDK/snapshot 测试 -继续保留,但不能证明端到端完整输入送达。MemT 路径的所属边界修复须将可执行 registry -准入的精确生命周期沿共享 Turn 请求与恢复 owner 传递,并保留重建及旧实例拒绝。 -不能通过放松 MemT 隔离或启用 lifecycle-only profile 来绕过。这是已证实的采用缺口, -尚未取得原生记忆路径资格。operation-SDK 原生 runtime 与打包 App 采用也仍待验。 -内部 effect envelope 与历史请求 decoder -仍服务结算/结果/会话 caller;只有这些 caller 和未结 receipt 已采用替代契约后 -才能移除,不能仅因模型输入不再包含旧 envelope 就删除。 - -新请求的 Codex/DSH 共享 session lineage 已从完整契约读取,复用 TS 的 -完整输入校验与自适应主任务选择 owner。模型输入校验使用同一 owner,并拒绝完整 -输入与内部 effect adapter 的 Goal/Agent/Todo 不一致,即使两份摘要各自有效。 -完整路径不再重复调用 Python 的版本与签名校验;历史请求继续使用原 decoder, -持久化 session schema、路径与 scope 不变。File/SQLite 真实 CLI capture、失败恢复 -和一次结算重放通过;普通/自适应任务在 todo/agent scope 均能读回 Codex/DSH -原 session。相同夹具在迁移前基线保留合法路径通过,但新增身份冲突用例失败, -在候选通过。原生 operation SDK 环境仍有跳过,不能宣称其 runtime 已验证。 -会话身份迁移未移除全部结果资格与结算的内部 envelope caller,尚未达到完整退役 -或净成本收益结论。MemT 生命周期缺口仅阻塞 -其依赖路径,不阻塞这些独立迁移。 - -规划与失败重试的 session 查找现在传递原始完整契约,journal inspection 也复用 -同一身份 owner。缺省契约仍解码历史记录;显式 null 契约会拒绝。实时与缓存 vision -结果的归一化也复用该身份读取,不再从 effect adapter 重建 Goal/Agent。 -会话 scope/生命周期门与原生 app-server callback 仍由既有 owner 负责。 -本片移除这些仅用于读取身份的旧调用,尚未删除内部 adapter:执行路由、结果证据/ -profile 判定与结算仍须迁移。 -自适应恢复夹具在签名前构造:历史未验证选择仍按 primary Todo 写回;冲突的已验证 -任务来源在 host 执行和额度支出前拒绝。既有来源校验门保持有效。 -完成恢复验证读取原始持久完成及支出回执,不重新提交完成。四项过时的重复调用断言 -在前一基线同样失败;修正后的验收保留真实 File/SQLite 中后续任务文本变化和历史 -未带来源凭据但已经接受完成的恢复场景。 - -完成任务正文的解析现由既有 TypeScript interaction 来源 owner 统一负责。 -同一次粗粒度读取现在向 `run-once` 提供原始选定工作、正文摘要、已准入动作、replan -与写回条件。完整来源校验在本次调用内复用已核对的 effect 投影,不新增 RPC 或面向 -模型的契约。自适应 primary 与普通选择共用既有 interaction owner。CLI 不再从历史 -adapter 读取这组执行事实,仍传递该 adapter 供来源/签名校验及尚未迁移的消费者使用。 -缺省完整契约保留旧 journal decoder;显式 null 或无效来源不回退。Unicode/空白原始 -字节、缺失/重复来源拒绝、原结算身份及已接受完成回执恢复继续受保护。 -迁移前 `599cf1f72` 的 48 项 File/SQLite 捕获及完成检查通过;候选完整来源检查也 -拒绝被修改的 binding 和显式 null 输入。最初正文摘要迁移将本地 Python 解析变为 -一次 TypeScript 边界调用;本次扩展读取复用该边界,不抵销原新增成本。 -完整 adapter 退役、其余 effect/material 消费者及原 quota 成果/完整成本资格仍开放。 - -结构化 Host 准备现在直接消费经过校验的完整来源,不再为新请求展开旧 action、 -boundary、capsule 与 planning 载体。同一次 typed 来源校验提供可执行行动别名和 -已准入 replan 事实,保留能力动作优先于 replan 的顺序,不在 Python 重写判断。 -Codex prompt 的边界指导也读取完整来源,分阶段 reader 读取原始模型输入。 -原 capture 元数据仍沿既有 transport 传递,来源及 adapter 完整性校验保持。 -只有历史请求继续使用旧 decoder 与 renderer。这是内部消费者替换,不是另一份 -面向模型的视图或跨 attempt 缓存;完整最终模型输入及其全部指令义务须保持一致。 -其他 effect/session 消费者、打包采用及完整成本资格仍开放。 - -相对重基后的前序 `4c4e9b346`,冻结的真实 File/SQLite CLI 请求产生完全一致的 -完整提示、结果契约、仅历史输入输出与无效来源诊断。Host 准备仍为两次 RPC;每组 -请求合计减少五字节,响应增加 190 字节。六组顺序 cohort 使用各自经过核验的独立 -runtime namespace,每个 arm/case 93 次温态采样,median/p95 毫秒值为: - -| 请求来源 / Host | 前序 | 完整来源消费者 | -| --- | --- | --- | -| File / Codex | 27.544 / 32.366 | 31.258 / 40.408 | -| File / structured | 25.948 / 32.642 | 30.007 / 39.242 | -| SQLite / Codex | 25.695 / 31.070 | 31.889 / 37.696 | -| SQLite / structured | 24.409 / 30.258 | 33.242 / 42.287 | - -这些是局部负向成本观察,不是加速。provider 标签只说明请求来源,计量组不执行 -authority-store IO;机器及后台负载仍未控制。不含启动、其他调用、完整 Turn/模型/ -缓存/账单/人工成本及验收成果。早期与验证重叠且未独立隔离的探索计时不作资格; -源码收敛和这些样本均不能证明相对原 quota 的净收益。 - -后续输入准备增量在同一次 Codex 启动内,由提示词和结果 schema 共用一次完整 -来源校验。CLI 进程与启用 operation tools 的 app-server 都消费这一既有 adapter -边界。独立调用提示词/schema 仍各自校验,结构化结果转换在执行后重新校验来源; -不跨 attempt、模型执行或结果处理缓存校验值。typed owner 只返回行动、replan、 -approval 和 profile 适用性事实,不再通过 bridge 原样回传完整来源。Python 消费 -自己持有的原始已校验输入,并保留结构化 authority 值的独立副本。完整模型输入、 -原 reader、启动 guard、结果验证和外层结算不变。 - -自有 V8 进程捕获 500 次基线来源校验,显示 canonical hash 与 Unicode key -排序占用明显 CPU;未覆盖 Python、transport 或 provider IO,inclusive 权重不是 -节省时延。它支持移除同一次准备中的重复校验,不支持弱化完整性或跨执行复用。 -原负面测量按历史保留;本增量不关闭 C1 相对原 quota 的成果/完整成本及采用要求。 - -相对重基到目标 `ff9e97f8e` 的前序 `75bd69bf6`,六组顺序交错 cohort、每 arm/case 93 次温态样本, -完整 prompt/schema/result、历史输出和无效来源诊断完全一致。Codex 输入准备从 -两次 RPC 降为一次;结构化提示与执行后 candidate 转换仍保留两次。File/SQLite 的 -Codex 请求字节为 86,293/86,399 → 43,144/43,197,响应为 62,554/62,606 → 211; -结构化请求各减少五字节,响应变为 422 字节。这里是内部 JSON payload,不含 framing。 - -| 请求来源 / Host | `75bd69bf6` median / p95 毫秒 | 输入准备增量 median / p95 毫秒 | -| --- | --- | --- | -| File / Codex | 22.147 / 26.204 | 12.003 / 13.653 | -| File / structured | 22.269 / 26.310 | 23.124 / 27.843 | -| SQLite / Codex | 21.656 / 26.511 | 11.734 / 17.183 | -| SQLite / structured | 21.324 / 23.608 | 23.716 / 26.079 | - -Codex 局部准备成本改善,两个结构化时延仍是负向观察,不能被传输量下降抵销。 -负载没有 store IO 或真实模型工作;各自有独立 runtime、顺序执行避免本 Agent 的 -验证重叠,但后台负载仍未控制。不含启动、其他调用、整轮、tokens/缓存、账单、 -实施/人工与验收成果;不是原 quota 对照,也不证明整体净收益。 - -Codex 结果 schema 与共享 candidate adapter 现通过同一经过校验的完整契约 -profile 读取判断证据要求是否适用;新请求不再从内部 capsule 决定该要求。 -该读取与模型输入校验复用既有 TypeScript 完整性/来源/身份校验器,没有新增 -模型侧 packet 视图或按证据字段分别调用。缺省契约仍解码历史 capsule; -显式 null 或被修改的契约会拒绝。空/非对象 profile 保持原来的不适用行为, -停止结果仍不要求证据,已提供证据原样交给既有结果验证器。此次迁移的是适用性 -判断,未改写证据内容校验,也尚未迁移全部执行路由和结算消费者。 -schema/material candidate 每次读取各新增一次校验边界调用;这是语义收敛, -尚不能据此宣称性能改善。 -使用同一真实 SQLite CLI host 请求(JSON 45,405 字节、合成 provider)进行 -31 组交替热边界测量,schema 构造加 material 结果转换的中位耗时从 -`68223e337` 的 0.013 ms 增至候选的 19.6 ms(p95 为 0.019/22.8 ms), -合法输出一致。保留这一局部新增成本的负向证据;测量不包括冷启动、模型工作或 -完整 Turn,总体成果/成本资格仍开放。检查覆盖真实 File/SQLite 捕获恢复与 -Codex/共享 host 消费者,不能证明打包 App 已采用或模型成果改善。 - -执行入口现在在 dispatch 或 journal 恢复前校验一次完整契约身份。结算计划缺失时 -用该身份补建,恢复检查在同一次调用内复用它,不再读取 adapter 的 Agent。 -已有结算计划与回执不重建;缺省完整契约的历史记录保留原解码与字符串处理。 -该值不会跨 host 尝试、来源替换或后续调用缓存。此举同时关闭一个恢复绕过点: -此前已有结算计划会跳过来源校验,null/被修改的完整请求仍可返回已有 journal -结果。真实 File/SQLite CLI journal 的新拒绝保留 journal 字节与扣额数, -不调用 host 或结算 callback。十个定向用例在 `ce996ea0f` 的新增拒绝断言处失败; -候选 32 项捕获/恢复检查和扩大后的 605 项回归通过(相互重叠)。入口新增一次 -校验边界调用,由两个消费者共用。同一份 45,405 字节真实 SQLite CLI 请求, -31 组交替热测已有结算计划读取与恢复身份,合法输出一致:中位数从 0.016 增至 -12.382 ms,p95 从 0.024 增至 14.883 ms。这是新增局部校验成本,不是效率收益; -不含冷启动、完整 Turn 与模型成本。完整路径性能及其余路由/结算退役仍开放。 - -Codex CLI 构建提示词时,有效完整请求现在直接调用既有完整校验 owner,删除重复的 -单独 envelope 版本调用。历史请求保留版本检查;完整校验失败时仍检查版本,以保留 -两处同时损坏时的诊断优先级。未引入校验缓存、新 wire 字段或第二 owner,提示词正文 -不变。这是调用边界合并,不代表剩余 driver 路由或结算 adapter 已退役。 - -对照 `e1dcd95dd`,完整与历史提示词字节一致,六类无效输入保留相同拒绝诊断。 -同一份 45,429 字节真实 SQLite CLI 请求生成 34,043 字节提示词;61 组交替热测中, -提示词构建中位数从 24.229 降至 14.819 ms,p95 从 30.189 降至 17.854 ms; -桥接追踪确认两次调用变为一次。局部降幅约 39%,不含冷启动、模型执行和完整 Turn -成本,不抵销单独测得的 profile/结算开销,也不证明相对原 quota 的成果收益。 -诊断补充前的较早样本为中位 21.279/12.994 ms、p95 29.729/17.321 ms;保留其 -早期证据身份,不作为第二份独立的最终资格。 - -规划现在在构建路由、会话和事务之前接收完整契约,不再在计划完成后附加它。 -规划与失败会话恢复通过一个粗粒度身份操作复用既有 TypeScript 完整来源校验; -同一次边界调用选择 Goal/Agent/工作身份并返回动作签名前像,替代原先仅取签名的 -调用,不增加逐字段 RPC 或缓存。显式空值、不支持版本、被修改的完整契约均拒绝, -已处于 resume 的请求也一样;缺省完整契约的历史输入保留原 decoder。 -Todo-less replan 身份仍由回执 owner 提供;下文路由与启动增量记录后续消费者迁移。 - -Python JSON/hash 传输编码特意保持不变。直接采用 JavaScript 哈希的试验未通过 -小数/指数前像一致性检查,会改变已持久化的 Turn key;File/SQLite 特征化现在 -覆盖这些数值、Unicode、自适应工作选择和重复恢复。一个真实 SQLite CLI 请求 -(45,380 JSON bytes)相对 `088867421` 的 31 组交替热态采样,完整/历史计划及 -失败恢复输出保持一致。规划 median/p95 从 39.632/47.964 变为 42.608/53.270 ms; -恢复从 12.330/20.858 变为 18.136/23.242 ms。这是局部增加的校验成本,不是完整 -Turn 或原 quota 成果对照,也不代表模型、已安装 App 或 PostgreSQL authority -资格。剩余路由/材料 adapter 退役及端到端成本资格继续使 C1 保持开放。 - -Host 启动前实时复查现在将回执绑定的实时观察交给初始规划所用的同一完整契约 -composition owner,再把完整契约传入共享 planner,替换原先 raw quota 直接进入历史 -规划的捷径。Stop 和动作变化仍先于 composition 拒绝;实时观察不替换原始 capture -中的模型输入,也不生成另一份回执。剩余 effect/材料 adapter 仍需退役。 - -路由分类现在归既有 TypeScript envelope owner 所有。显式注册 action/frontier 表在 -编译期检查穷尽性,历史未知 action 仍进入 Host;签名拒绝、attempt、先 replan 后 -普通 delivery 门、能力 intent 身份、repair、用户行动和安静等待保留原顺序。 -Python 仅保留 controller 薄传输与历史 scalar-text 编码,不再拥有第二份分类表。 -完整契约校验忽略历史解码提示;已持久化动作 hash 的 Python 编码及历史工作选择 -reader 均保持不变。 - -规划在既有粗粒度身份/签名调用中同时取得 route;完整与历史普通计划仍各需两次 -桥接调用。相对旧 Python 分类器,1,152 组 action/gate 组合一致;固定真实 SQLite -CLI fixture 的完整与历史计划输出也一致。计划对照共用当前 TypeScript endpoint, -因此不是精确旧版/新版端到端延迟实验。controller 单独读取 route 现在新增一次 -桥接:44,891 字节请求的 61 组交替热测,median/p95 从 0.004792/0.010125 升至 -13.252792/15.855042 ms。这是该 caller 的实测回归,不是效率收益;作为 controller -调用边界合并的明确成本缺口保留,不引入缓存或重复分类器掩盖它。File/SQLite -入口、恢复、一次结算资格,剩余 adapter 退役、打包采用和原 quota 成果/完整成本 -资格仍分别验收。 - -生产 `turn managed-step` caller 现在将 envelope 构造与同一路由求值合并在一次 -TypeScript 请求中。Python adapter 返回绑定 route 的本地不可变 envelope 快照;它 -不是新的 Agent wire 版式,也不拥有第二份决策规则。读取或修改返回的字典不会 -改变快照,也不能把它的资格附到另一份 wire 字典。controller 保留既有用户行动 -优先级、回执/前驱校验和 journal 所有的重试预算;普通历史或外部 envelope 仍走 -原 route reader 与签名拒绝。构造 adapter 和普通 envelope builder 共用宿主绑定及 -capture 参数准备,删除 managed caller 原本多余的中间 builder。上段独立 reader -回归保留为历史实测;只有生产中新生成与消费的调用对能够省去这次额外请求。 -剩余工作选择/effect/材料解码、大型冷上下文恢复、打包与成果资格继续开放。 -caller 直接消费统一 typed controller 结果后,本地快照随之退役;它不新增持久化 -schema 或兼容 wire。 - -固定 31,088 字节合成来源的 61 组交替热测,将 `ddf96b79c` 的原 Python producer/ -controller 函数与合并调用比较;共用当前 TypeScript 服务和未变的 build/route 规则。 -最终源码的组件 median/p95 为 22.477/25.417 对 13.739/17.479 ms。另以真实隔离 File/SQLite -store 经公开 `managed-step` CLI,各 provider/arm 取 21 组交替热测:File median -为 135.989 对 137.316 ms,SQLite 为 149.310 对 146.081 ms;p95 分别为 -209.730 对 192.544 ms、222.299 对 240.848 ms。另行传输计数探测发现每个 provider -的桥接总请求数从 70 降为 69:省去一次 route 请求,其余 live-decision 调用仍在。 -完整输出一致,失败 journal 逐字节不变,两臂均不扣额。请求数改善,但整条 CLI 的 -median 和尾部结果混合,尚不能证明加速;本地小 -样本及共享机器资源限制尾部推断。这是具名源码边界的观察,不是整个不可变旧树 -对照、冷启动、已安装 App、模型成果或原 quota 完整成本资格。 - -完整 reader 现在还将 adapter 的已签名动作文档,与原完整来源经过既有 producer -投影的结果比较。原先来源和 adapter 各自的 hash 只能证明各自完整:重新计算 hash -后的 adapter 可以保留 Goal/Agent/Todo,却改变执行或写回条件。共享校验复用既有 -签名维度,不新增第二份字段清单、RPC 或 wire 视图。仅含历史输入时保留旧 reader。 -完整请求的 profile adapter 与来源不一致时,现在明确拒绝,替代此前忽略冲突、直接 -采用来源 profile 的行为;这是有意的拒绝语义变化,历史 profile 行为另行保留。 - -相对 `b9e2c5120`,File/SQLite 的规划拒绝断言在修复前失败。六类独立重算 hash 的 -反例覆盖运行资格、有效动作、交付许可、用户介入、执行策略和扣额许可;候选在 -host/写回/扣额回调前拒绝,不产生 Turn journal 或结算回执。既有 lane 锁仍可能 -先分配。一个 44,891-byte 真实 SQLite CLI fixture 的 101 组交替热态进程内 -TypeScript 采样保持合法身份输出一致;校验 median 从 4.864 增至 5.163 ms,p95 从 -5.570 增至 6.010 ms。这是局部新增成本,不含桥接、实时 composition、冷启动、模型 -或完整 Turn 成本,不证明相对原 quota 的成果收益或 C1 切换资格。 - -候选的普通 planner 与失败会话恢复现在也从既有 `driver_lineage` 调用消费选中工作。 -共享 `selectedWorkTodo` owner 将普通或自适应主任务选择写入该调用已有的动作 hash -preimage;Python 不再重选或重写 preimage。Python 保留已持久化 JSON/数字编码, -同时运输历史 primary-ID scalar/空白编码;共享 owner 消费已解码历史文本,不再重复 -执行 JS trim。完整输入忽略该提示,并保留 -完整来源/投影一致性校验。不新增 bridge 调用、模型侧字段、持久化 schema 或跨 -attempt 缓存;公开动作签名操作仍描述原 envelope。 - -这替换了实际规划和失败会话恢复 caller 中的选择解释,包括原生 CLI 使用原 capture -重试的路径。剩余 v0 Host、结算和 controller reader 仍使用历史选择 decoder,只有其 -caller 与未结 receipt 已迁移且通过等价恢复资格后才可退役。本片不验收完整 adapter -退役、App/SDK/benchmark 采用或优于原 quota 的净收益。 - -对不可变 `334c1a772` 的资格保留了冻结 File/SQLite CLI 输入上的完整规划/恢复 -输出;规划仍为两次 bridge 调用,恢复为一次,普通输入的请求/响应字节量相同。 -实际 CLI/provider/Host、完成及结算模块 254 项通过;十个迁移断言在前序失败, -十二个历史编码用例在前序通过,候选全部通过。后者覆盖缺省/false/zero、空白、 -数字、布尔与 collection-valued 历史 primary ID、Unicode 空白/BOM、版本/mode -适用性、原 Turn key -及恢复绑定。 - -临时 `ef479d2b5` 试验改变了三种 Unicode 空白/BOM 身份:语义反例在该版本失败, -在修正 owner 后通过,而原始前序保留这些身份。下述该版本测量仍是历史试验, -不作为修正源码的资格。 - -尚无延迟改善资格。三组平衡顺序对照使每 arm/case 有 93 个温态样本。最初以 -实际 source worktree 对比归档基线,八个普通/历史规划和恢复行的候选 median -均升高,但两侧生成缓存清单不同。第二组控制使用干净同级来源副本、相同清单并在 -两侧关闭 bytecode 生成,仍观察到混合或更慢结果: - -| 完整来源输入/操作 | 初始基线 → 候选 median / p95,ms | 干净控制基线 → 候选 median / p95,ms | -| --- | --- | --- | -| File/规划 | 35.129 / 40.776 → 46.227 / 57.355 | 24.174 / 30.183 → 25.330 / 30.443 | -| File/失败会话恢复 | 14.941 / 17.957 → 19.440 / 24.477 | 11.259 / 13.196 → 12.582 / 15.495 | -| SQLite/规划 | 36.979 / 46.065 → 46.461 / 54.795 | 23.820 / 30.178 → 26.408 / 30.523 | -| SQLite/失败会话恢复 | 17.404 / 22.606 → 18.759 / 22.139 | 12.586 / 16.141 → 11.503 / 14.124 | - -初始负结果保留;控制对照不追认历史通过,也不证明负结果的原因。这些是不含 store -IO 的直接 helper 观察,不是完整原生 CLI/Turn、冷启动、模型成本或验收成果;后台 -宿主负载未控。另对自有进程取得的 V8 capture 指向既有 Unicode key ordering/hash -计算,但未证明延迟根因。可选 profiler 未安装,Python wait/IO stack 仍未观察。 -归属统一和字节相同不能抵销这些成本缺口或此前 C1 的负测量。 - -修正后的三个源码文件另有干净来源对照,同样每 arm/case 93 个温态样本,八项 -完整输出相同,RPC 与普通输入传输量不变。结果仍混合,SQLite 规划尾延迟更差; -同样保留上述未测范围和后台负载未控限制: - -| 输入/操作 | 基线 median / p95,ms | 修正源码 median / p95,ms | +`assertInteractionRequiredReads`(由完整来源校验器在 quota、预览、规划与 +Host 边界统一调用)要求声明命令或顺序的可执行必读项保持非空、无 NUL 且 +`ordering == "before_work"`,同时完整保留纯文本义务、带引号 Unicode 命令与未读 +挂起状态,不新增泛化材料读取门禁。完整来源校验还在自动启动间隔预留前执行 Goal +正文就绪拒绝(拒绝场景 RPC 由 `5→2` / `6→3`,避免误伤后续合法 Turn),并在 +结构化与 Codex 提示中统一核验已声明的 Vision 审计触发条件。 + +在冻结的 premerge 预算反例中,直接输出为 `20,333` 字符而原生 runner 为 `20,501` +字符(premerge 布局为 `20,533`,超过未改动的 `20,500` 上限),唯一原因是在 +`bd79adc64968` 主干和 C1 `f1614358ac13` 上隔离组件均会向 8 处夹具根路径各追加 +`21` 字符(共 `168` 字符)。该预算问题归属 `#8069`,未提高任何阈值。 + +### 保留的消费者与恢复义务 + +- **首读 Goal 修订与内联诊断:** 已绑定首读先交付权威存储的 Goal 目标、修订号与摘要, + 再交付原 Goal 正文(首读 `+552 B`,读完相同事实少 `1` 次调用与 `629 B`);已绑定 + 内联 `generic_cli` JSON 复用紧凑投影行与 `_ref`(显式 Off `55.7–55.8 KB → + 54.3–54.4 KB`,初次 replan `47.4 → 45.5 KB`),篡改紧凑捕获即使重算摘要也拒绝。 +- **有界 Windows / PowerShell 与 Benchmark 恢复:** Windows 有界重启与带上限 JSON + 守卫(`1,700 B` 通过;`96 B` 在捕获或回执前拒绝)共用私有目录分配器,并接受无需 + POSIX 可执行位的显式 PowerShell 启动脚本(已在 macOS PowerShell 7 验证;原生 + Windows 宿主 DACL 与 Python 执行仍待验证)。非原生 Benchmark 预检提示保留保存动作 + 及 replan/写回必读(读全文 `47.4–47.5 KB` 对按字段选题 `18.8 KB`),同时保留 + EdgeBench 显式 `--turn-envelope` 兼容开关与外部 worker 零扣额取消读回。 +- **搬迁检查点扣额读回:** `a1f34097805a` 在移走来源 runs 目录后仍按原索引行、已提交 + 回执与工件名校验本地扣额副本,拒绝符号链接或缺失/篡改的工件及回执。 + +## 匹配工程 Cohort 与负向/混合成本证据 + +下列量化观测均来自隔离合成 File/SQLite 任务,**不测量**真实模型 token、缓存、 +账单、人工注意力、受控延迟或 RFC §9 单会话成果与完整成本收益。 + +| Cohort(对应版本) | 正向/收敛观测 | 负向、混合与失败观测(均未改判) | | --- | --- | --- | -| File/完整规划 | 38.529 / 48.381 | 38.504 / 47.134 | -| File/完整恢复 | 17.821 / 22.029 | 18.244 / 21.857 | -| File/历史规划 | 32.787 / 44.413 | 30.871 / 36.733 | -| File/历史恢复 | 10.635 / 14.620 | 10.292 / 12.201 | -| SQLite/完整规划 | 39.600 / 46.547 | 40.036 / 77.714 | -| SQLite/完整恢复 | 18.034 / 28.685 | 18.552 / 25.223 | -| SQLite/历史规划 | 32.061 / 42.789 | 32.447 / 38.962 | -| SQLite/历史恢复 | 10.444 / 14.258 | 10.270 / 12.891 | - - -#### 原生执行与完成来源 - -原生启动 guard 现在消费共享 planner 已返回的选中 Todo,不再调用历史 Python -selector 重选。既有执行上下文/任务承诺 reader 归 Turn driver 所有,同时供 CLI -准备和完成意图分类使用;CLI 副本已删除。语义 owner 仍为既有 TypeScript -`execution_context` 操作,没有新增视图、schema 或 Python 决策 owner。 - -Host 执行和独立任务验证之后,完整请求在判断终态或普通完成前重新检查该来源。 -已保存的 writeback 或 terminal outcome 不能跳过检查。无效完整输入或 -与来源冲突的 adapter 事实在写回/扣额前拒绝;原 journal 随后可以恢复已有验证结果, -不再次调用 Host,并只结算一次。省略完整输入的历史请求保留精确 decoder 和 -回执恢复。完成 outcome 验证及 typed 结算/effect owner 不变;本片没有退役所有 -历史完成或 controller reader。 - -启动 guard 不增加 bridge 调用。完整 validated-completion 分类在此后续边界增加 -一次粗粒度来源检查,包括未完成 journal 恢复;历史分类不变。这是明确新增成本, -不代表提速,也不能据此跨执行、attempt 或恢复缓存执行前检查。原 quota 的实际 -决策、验收成果、完整成本及剩余消费者采用仍保持开放。 - -四个受影响的 capture/driver/completion/settlement 模块共 264 项通过,使用 -真实隔离 File/SQLite CLI 消费者及合成 Host/validator 进程;两个 typed owner -模块 79 项通过。22 个迁移断言在不可变 `2a170247ba3` 失败、候选通过。新增的 -8 个原生替换反例在基线会提交完成结果,候选在写回/扣额前拒绝,随后从原 -journal 恢复已有结果,不重跑 Host 并只扣额一次;覆盖两后端的普通/最终完成。 -这些不证明真实模型或已安装消费者采用。 - -三组平衡顺序对照使用干净同级来源副本与相同夹具,每个温态 helper 行各有 -93 个样本。完整 intent/recovery 分类从约 0.002 ms、零 bridge 请求变为: -File median/p95 分别 19.813/26.454 和 20.770/25.287 ms;SQLite 分别 -20.243/23.964 和 19.005/22.458 ms。每次新增一个逻辑请求,File/SQLite -请求分别 43,200/43,253 字节,结果均 1,693 字节。历史分类仍零请求、结果等价。 -逻辑 JSON 计量不含 framing 或物理传输重试。 - -同组对照还运行真实 CLI 准入、捕获、合成 Host 工作、独立验证与结算,再通过 -原生入口回读 Todo 并重放已提交结果。每行每 arm 仅三个样本;下表为 median -和实际范围,不推 p95 或因果提速: - -| CLI 完成 | 基线 median [范围],ms | 候选 median [范围],ms | 逻辑请求,基线 → 候选 | -| --- | --- | --- | --- | -| File/普通 | 2303.0 [2001.9–3646.5] | 2173.5 [2051.4–2196.6] | 282 → 283 | -| File/最终 | 2306.0 [2283.4–2389.4] | 2818.4 [2338.2–2973.9] | 294 → 295 | -| SQLite/普通 | 1888.5 [1758.5–2061.7] | 2513.5 [2086.5–2955.7] | 278 → 279 | -| SQLite/最终 | 2549.1 [2240.7–2681.2] | 2282.7 [2276.8–4064.8] | 294 → 295 | - -原生结果观察一致,包括原结算身份、done 回读和一次扣额;两侧已提交重放均为 -五次逻辑请求、零新增 effect。回读/重放观察与执行计时分别保留。后台宿主负载 -未控,这些对照未与其他自有验证并行。新增来源检查是实测成本;完整 CLI 时延 -仍混合,默认 SQLite 性能尚未资格。模型/缓存 tokens、账单、评测、实现/人工 -成本、真实工作验收成果和优于原 quota 的净益仍未知,所有既有负结果保持。 - -## 历史候选区块 3 - -[数值完整性检查点](2026-10-29-complete-numeric-integrity.zh-CN.md) -让 producer 数值身份与全部完整 reader 共用一个 typed owner,并删除无用 Host echo。 -后续[稀疏运输整合](2026-10-29-sparse-numeric-integration.zh-CN.md) -采用既有 context collector,不保留完整路径专用的第二规则。变化的实验 hash 身份由 -codec v2 明示;旧 binding 的 capture 不变,保留对应版本固定的 reader。原 capture -字节仍单独校验。组件运输减少不认证原 quota 成果、完整成本或 live writer 切换。 - -## 历史候选区块 4 - -#7430 的验收共享增量把原 Python 展示算法移入既有 TypeScript composition owner, -在 hash/capture 前执行;旧展示 helper 只委托同一实现。完整契约 reader 与历史分阶段 -读取共用一个引用解析器。相同契约保留一份完整 owner;不同 revision、JSON 类型、来源 -和负面证据分别保留。已有引用随 owner 的迁移同步调整;即使完整性 hash 正确,悬空、 -循环或不可用引用也会拒绝。引用比原对象更大时仍保留短对象原文。 - -隔离 File/SQLite 的 quota 和 native host fixture 覆盖真实合成 Codex 子进程输入中的 -完整验收、失败后恢复和原身份一次性结算,也验证共享后的 full/delta/丢失基线重建。 -这些证明传输语义,不证明模型遵从。旧展示 adapter 增加一次传输调用;完整契约在原有 -composition 调用内部完成共享。未声称延迟改善。 - -固定 source 的四份相同验收 fixture 中,融合契约为 23,432 个紧凑 UTF-8 JSON 字节, -原未分阶段 CLI 为 22,237(+5.37%)。启用 capture 分阶段时,融合契约为 23,515, -原 entry/review/writeback 合计为 24,509,未计追加材料读取。对照冻结 `895f38fc5` -的原展示共享 helper;上述不含验收副本的 workload 数字不变。这把 quota 已有的效率 -吸收到共同路径,不能证明优于 quota 或完整成本获益。下述 guidance 增量进一步缩小缺口;下一步先在既有 owner 验证剩余 -vision 共享;标题由下述增量处理,然后再评估延后详情。冷启动与分阶段总量分别保留, -保留负结果,不能靠删除独有指令达到字节目标。 - -#7430 后续增量通过同一个 TypeScript composition 边界共享 replan 的 vision-authoring -指令,保留的 owner 是既有 durable-writeback 结算步骤。旧 Python 展示 helper 委托 -共享判断,仅添加历史展示元数据。完整 reader 和历史未分阶段/分阶段 adapter 解析同一个 -精确引用,不另建 authoring 策略。JSON 类型、版本或指令不同则保留原文,引用必须更小。 -即使 hash 匹配,冲突的原文/引用、错误步骤类型、缺失目标和引用链也会拒绝。 -结算计划、全部原指令和示例保留在 capture 中;历史 writeback 阶段维持原有的示例省略。 - -两个旧 CLI 参数写法现在暴露同一份共享完整契约;材料回读、产生效果前拒绝和 native -输入分别验证。已验证的 Native 外层 controller 输入没有内联结算 authoring owner,authoring 仍保留原文; -共享不会虚构该 owner 或转移结算权。authoring 检查点的四项旧 projection 测试期待 -完整候选尚未采用的多行标题或 Explore 指导共享,在此前及 authoring head 都失败。 -下述 guidance 增量解决其中两项,标题增量解决另外两项。历史失败继续保留,不豁免或改写。 -这些切片不证明已安装 App 的采用。 - -固定的合成 authoring fixture 中,原未分阶段 CLI 为 22,062 个紧凑 UTF-8 JSON 字节, -融合契约为 23,266(+5.46%)。启用 capture 分阶段时,原 entry/review/writeback 合计 -24,311,融合为 23,349。原 CLI projection 模块冻结在 `895f38fc5`,输入及投影读取阶段 -保持一致。追加读取、请求包装、tokens/cache、延迟和模型成果尚未测量。共享消除了 -候选中的重复实现和重复指令,但不能证明优于 quota 已有共享或完整成本 diff 正向。 - - -Explore guidance 增量删除 Python 的精确匹配循环,完整契约与旧展示调用者复用同一个 -TypeScript composition 边界。仅当指令完全一致、已有 durable-writeback Explore -附件 owner 且引用更小时,才共享同一 capture 的 owner。独有/短文本及缺失 owner -保留原文。非法、冲突或成链引用拒绝;不缩短指令,也不给可选附件新增义务。 -历史分阶段及未分阶段 reader 在移动上下文前解析引用,再复用 Explore 既有领域投影。 -独立 Explore 读取仍返回完整指导。兼容 helper 随旧展示调用者退役,不拥有独立决策或共享算法。 - -真实隔离 File/SQLite CLI capture 现在通过此前失败的两项 Explore 共享用例, -包括独立材料对照、历史回读及非法 capture 在状态/额度不变时拒绝。 -既有分阶段 CLI 测试仍执行 registry 不可用时读取、篡改拒绝及实际写回/结算。 -差分重建保留变化后的指令并支持 baseline 丢失恢复;不完整上下文回退完整交付。 -这些证明传输及本地集成,不证明已安装 App 或模型成果。 - - -扩大调用者验证也将旧测试假设迁移到准入后的完整契约:native 子进程 capture/重试 -比较整份原始契约,生成的结算命令仍仅结算原 Turn。历史 capability reader 维持 -显式初始化隔离 canonical fixture、拒绝事实及 scheduler 信息,不因此授予执行权。 -capability 准入被拒时仍交付 typed diagnostic/历史投影,准入成功才交付完整契约。 -这个失败路径迁移仍属于 C1 切换前缺口,不是永久第二套契约。 -合成 native/stdio provider 不证明模型收益。 - -同样冻结 `895f38fc5` 原投影,合成 guidance fixture 的原未分阶段路径为 22,848 个 -紧凑 UTF-8 JSON 字节,融合为 24,320(+6.44%)。启用 capture 后,原 -entry/review/writeback 合计 26,081,融合为 24,403。不含 guidance 的 fixture -未分阶段仍为 20,543 对 21,738 字节。必需追加读取、请求包装、tokens/cache、延迟及 -模型验收成果尚未测量。代码共享及恢复 quota 已有的信息效率不能证明完整成本 diff 正向; -C1 继续保持未完成。 - -当前 Task 标题增量删除 Python 的精确来源匹配算法,完整 composition 和旧展示委托 -共用 TypeScript owner。只有与唯一、已核验、完整的当前选中 Task 的 `text` 或 `title` -精确重复时,才转换为同一 capture 的 `title_ref`;完整原始声明及来源继续内联。 -来源缺失、不同、不完整、歧义、失败、已完成或已归档均不符合共享条件。历史字符阈值 -(包括 Unicode 码点计数)保持不变。旧展示按 label 前缀省略标题的逻辑留在展示层, -不应用于完整契约;委托 helper 随旧展示调用者退役。 - -完整 reader 再次验证身份及引用归属,即使 hash 有效,也拒绝冲突原文、引用链、 -非法路径及不可用目标。历史 envelope 保留完整 Task 来源,不携带移动后悬空的 lane -引用。真实 File/SQLite CLI 在差分关闭时已通过此前两项多行标题用例;capture 变体 -还验证精确回读及状态/额度变化前拒绝。差分及 baseline 丢失/全量恢复保留变化后的要求; -独立 Todo detail 仍返回完整声明。这证明本地传输语义,不证明已安装 App 或模型行为。 - -固定合成当前 Task fixture 中,冻结 `895f38fc5` 的原未分阶段 CLI 为 28,585 个紧凑 -UTF-8 JSON 字节,融合契约为 29,780(+4.18%)。启用 capture 后,原 -entry/review/writeback 合计 29,906,融合为 29,863。不含当前 Task 的控制样例 -未分阶段仍为 20,543 对 21,738 字节。这些总量未含请求包装、追加材料读取、tokens/cache、 -延迟及验收成果;它们将 quota 已有共享恢复到共同路径,不能证明完整成本收益正向。 - -vision audit 增量现已将 Python 嵌套精确匹配算法迁入同一 TypeScript owner。完整契约 -和历史展示只在引用更小时共享完全相同的 audit,包括未知事实、负面证据及有序义务。 -不同 JSON 类型不相等:旧 Python 的 `True == 1` 比较可能抹掉 channel 差异,现保留 -该差异原文;短 audit 也保持内联。根保留完整 audit 和 judge,旧展示 metadata 留在 adapter。 - -完整恢复即使面对重新计算的有效 hash,也拒绝缺失、非法、链式或冲突的 audit/judge -引用。历史 envelope 仍从内联根取得 judge,不产生移动后的悬空引用;其已有投影限制 -不变。真实隔离 File/SQLite CLI 在含活动历史 vision、差分关闭时,验证完整 judge、 -精确 capture 回读及状态/额度变化前拒绝。差分/全量及 baseline 丢失恢复保留变化的 -要求。没有活动 vision 的 fixture 正确地不产生 audit,不能用来验收这条路径。 - -冻结原 CLI projection 于 `895f38fc5`,固定合成 audit 样例的未分阶段紧凑 UTF-8 JSON -为原 22,337 字节对融合 23,333(+4.46%);capture 原 entry/review/writeback 合计 -23,658 对融合 23,416。不含 audit 的控制样例仍为 20,543 对 21,738。它们不计 -tokens/cache、延迟、追加读取、请求包装及验收成果。恢复共享、减少规则 owner 仍不 -证明完整成本正向。旧 audit 委托随展示调用者退役;剩余 consumer 退役及打包/成果 -资格继续使 C1 保持开放。 - -拒绝准入现在只要已有 interaction contract,就在不可变 capture 前使用同一完整 -composer,包括 health 为 false 的暂停来源。`ok=false` 仍阻止 host handoff 和原生 -context baseline 发布,保留失败退出码;组合不授予交付或结算权限。非法完整来源在 -capture 前验证失败。工作契约形成前的错误则在两种 CLI flag 写法下保留原 typed -诊断及恢复事实,不补造工作契约,也不再经过历史 envelope renderer。 - -真实隔离 File/SQLite CLI 覆盖 App heartbeat 和 generic 两种 profile 下的工作 -缺失、能力不可用及 selection-required reentry。重入保留原 receipt,不产生额度 -记账、baseline 或越权状态修改。Capture consumer 正迁向完整原件精确回读,同时 -显式保留历史长路径恢复覆盖。这验收本地传输和拒绝语义,不代表已安装 App 采用或 -全部 provider/入口交付。剩余 consumer 退役及打包后的单会话成果/完整成本资格 -继续使 C1 保持开放。 - -后续观察验证区分了两个问题。#7464 修复测试对两次独立实时观察时钟的误比,同时 -保留其他全部事实。#7468 让 `quota status/plan` 保留既有权威 owner 的 typed 拒绝 -及备份/迁移指引,修复提前返回错误时丢失这些信息的问题。按照已接受的 #7032 -截止规则,未迁移 Goal 的普通读取继续拒绝;File/SQLite 保留范围隔离断言。 -新的恢复断言在旧实现上失败,修复后的范围/诊断/权威集合 156 项通过。这些可独立 -评审的修复已由集成候选吸收,不代表安装采用或成果/成本改善。早期失败运行仍作为 -历史证据保留;这几项已归因失败不再列为未完成调查。 - -固定 unhealthy-paused 合成来源在原 CLI projection `895f38fc5` 下为 6,325 个 -紧凑 UTF-8 JSON 字节,完整契约为 6,639(+4.96%)。新增 binding 保留统一验证, -这不是效率收益;该样例的 tokens/cache、延迟、追加读取、请求包装及验收成果仍未 -测量。这些检查不代表启动过真实模型实验。 - -共享 reference owner 已通过 #7457 合入。Task 标题与 Explore 操作在旧投影中合用 -一次粗粒度调用;完整 composition 在既有调用内部复用相同函数。集成分支吸收 -前置提交,不复制一份 owner。新的 `should-run` emission 只接受已组合契约或 -原始 predecision 诊断,不再回退旧 packet/envelope 投影;历史 capture 恢复 -仍为显式路径。组件测量显示桥接成本比两次调用更低,但高于原 Python 投影, -不能作为完整 quota 路径净收益的证据。 - -[打包 heartbeat 对照](2026-10-28-packaged-heartbeat.zh-CN.md) -已使用真实隔离 File/SQLite CLI,相对原 quota 核对冷态、温态和同 capture 恢复。 -首组默认上下文和 stdout 增长。后续让旧调用方和 scoped native 复用同一个 typed -诊断 owner,删除对应 Python 算法;可独立使用的旧读取方切片已在 -[#7557](https://github.com/loopx-project/loopx/pull/7557) 提案,集成版本使用相同模块。 -未知字段/列表、完整保留条目、候选和 portfolio 不变。重跑后冷态/恢复约少 5.3 KB, -温态仍多约 2.8 KB;全部 peer 补读仍增加 13,940 字节和十次 CLI。公开 v4 预算探针 -在前一版及当前集成 wheel 上仍失败。完整成本正向、默认性能及模型收益均未资格化。 -继续在原 C1 诊断温态重建/元数据成本及剩余消费者,不提升默认,也不验收独立的 -controller 实验。 - -集成版本也在相同 context codec 内采用已合入的 -[#7528](https://github.com/loopx-project/loopx/pull/7528) overlay:搬移的精确证据可共用 -一份基线子树,当前及未知控制仍字面交付,包含 C1 scoped wrapper。Ledger 将局部 -搬移的正向字节结果与重跑的打包对照分开:普通温态输入仍多约 2.8 KB,v4 预算仍失败。 -这移除了已证实的传输冗余,尚不能证明完整周期或成果收益正向。 - -上述成本与预算结果仍绑定各自 ledger 版本。[后续主线集成](2026-10-28-packaged-heartbeat.zh-CN.md#主线集成与不可变-reader-身份) -修复原生投影及原 capture reader 的接线,未重跑或认证那些模型/完整成本对照。 -后续[签名完整输入材料分阶段检查点](2026-10-28-packaged-heartbeat.zh-CN.md#签名完整输入的材料分阶段) -让已验证完整输入复用相同材料 owner,并在范围筛选后保留材料的原始位置。 -当分阶段呈现的传输字节更少时,该消费者不再回退完整材料。这不改变 Host 默认阅读 -策略,也不认证模型保留、完整成本、剩余调用方/writer 迁移或历史 reader 退役。 -C1 及相对原 quota 基线的验收保持开放。 - -## 历史候选区块 5 - -### 本地注册 Goal 材料交付检查点 - -完整 Turn writer 和现有 native context-delivery 显式启用路径,现在在 capture 前 -请求完整的注册 Goal 材料。源 adapter 为未标记或混合文件返回原始 UTF-8 全文; -现有 TypeScript context owner 核对完整文件 revision 后完成该项读取。已标记区域 -的 lineage 和 canonical Todo 权威保留。普通 quota 在 delivery 关闭时继续渐进读取。 -桥接要求 `complete_goal_v1` 回执;旧 runtime 不能静默忽略这个要求。 - -自动业务执行的 Host 上下文使用 `host_dispatch_context`,在加载 provider 前拒绝未完成或无效的 -Goal 材料。历史 `host_context` 元数据读取继续用于按原版本解释与必要结果收尾; -已保存的 capture 不被重写。本项是范围有限的材料交付前置。通用 capability 必读 -强制、当前条件复核、安装采用、真实模型遵守和完整成本,仍各需独立证据。C1 未获 -完整资格。Replan 材料读取调用仍按原有阶段与工作限制执行。 - -### 当前偏好首读集成 - -C1 候选接入 [#7935](https://github.com/loopx-project/loopx/pull/7935) 的既有 selector -修复:首读交付偏好 owner 完整的当前作用域视图,包含纠偏、退役、空替换、来源和 -advisory 权限边界。仍复用同一 selector 与来源 owner;不改变启用设置、不授予 -权限,也不替代后续动作要求的精确作用域新读。 - -集成验证复用 native capture reader 和 executor 投影,不再要求完整来源根部携带 -旧 capsule,也不把导航当作内联决策。验证保留 delivery-off 的渐进 Goal 读取, -并核 native 默认路径的完整内联 Goal、canonical Task、后续要求更新、偏好存储 -损坏和签名拒绝。五处旧布局假设在集成前候选上同样失败;适配测试后,六个完整 -模块 143 项通过。确定性 loopback provider 下实际 native exec、CodeMode 两项 -通过,六个 TypeScript 模块 124 项通过;这些计数只对应各自范围。 - -完整 CLI 预算模块仍有四个测试组失败、39 项通过和一个环境相关跳过。实测小型 -Markdown、拥挤 plan 和兼容视图仍超限;原五个体积门及历史测量均保留。不降低 -上限、不缩 fixture 负载或生产指令来隐藏失败。本项只交付源码集成,不代表完整 -C1 质量回执通过、merge readiness、安装采用、自然模型行为或完整成本收益。 - -### Canonical Todo 投影成本资格 - -在 main `f941b5939` 与 C1 `c59777597` 上做匹配观察,使用既有 -`todo project-markdown` 操作及新读到的 provider revision。File/SQLite 各覆盖 -一个 Todo、36 个 Todo 的无/有 Vision,以及三个 Agent 的 18 个 Todo:共 16 次 -投影转换、32 个表面条件、64 份前后 quota/plan 响应。每次转换的完整 canonical -记录逐一相同;独立核对完整文件及被排除区域 hash,重建实际交付的 Goal 正文, -包括末尾停止条件。未标记来源仍保留全文;只排除正常 writer 生成的区域。不改变 -source adapter、投影策略、输出阈值或 fixture 负载。 - -所测组件为解析后的规范 CLI argv JSON 加实际 stdout,并计入响应要求的 Goal -`cat` 命令。在 C1,投影使拥挤 plan 的一次观察在无/有 Vision 时分别少 -7,698/7,697 字节,multi-agent plan 少 3,697 字节;小型 quota/plan 反而增加 -364/75 字节。投影本身的所测成本为 1,667–1,700 字节;若将两次完整 canonical -读回也作为一次性审计成本,正向样本的条件回本点推迟到重复 7–9 次相关观察。 -这是记账情形,不是每 Turn 重新生成的建议。 - -既有投影也使 main 获益。两快照均使用生成 Goal 区域后,C1 plan 仍多 23–24 -个所测字节;quota 的小样本多 959,拥挤无/有 Vision 分别多 1,958/1,759。 -普通 multi-agent quota 在两个快照均没有内联 Goal 或 Goal 读取,故不纳入 Goal -等价成本主张。上述结果资格化既有来源/投影路径,不是 C1 新优化、完整决策语义 -相同、模型采用或整体净收益证明。RPC、CPU、账单、成果价值及自然模型使用未测。 - -原未标记来源的预算 case 和五项历史门保持不变。另行投影的负载越过阈值,并不 -修复或改写那些失败。继续沿原 writer/reader owner 和相对原 quota 的单会话验收, -不删除未标记 Goal 正文、不放宽签名来源回退,也不为这些字节新造压缩算法。 - -### 通用 Host 派发与已保存结果恢复 - -共享 executor 现在在记录、确认或启动新 Host 尝试前,调用既有 TypeScript -`host_dispatch_context` owner。此前,一个来源承诺有效但 Goal 正文仍有未完成 -读取的完整契约,可以经通用路径到达自定义回调或外部 argv;具名 adapter 已有 -各自检查。修复不新增决策 owner、状态、词汇、通用 capability 必读义务或启用设置。 - -十四项 File/SQLite case 覆盖回调及真实 argv 的合法、Goal 待读、历史请求,以及 -已保存 typed result 恢复。待读 case 没有 Host 副作用;合法与历史对照能到达 Host。 -已保存结果仍经原 validator 收尾,不新开 Host 尝试。既有分阶段 replan 材料读取 -例外仍由同一 TypeScript 规则管理。确定性 loopback provider 下,两条真实 native -exec/CodeMode 路径通过。这只资格化合成源码入口,不证明自然模型采用、安装行为 -或完整 C1 验收。 - -完整 capture、Turn-driver 与 manager-context consumer 三个模块在集成源码上 -共 345 项通过,已包含上述新增覆盖;未重跑所有历史 adapter、预算或 backend 资格。 - -匹配的组件观察显示:完整来源的新尝试多一次 `host_dispatch_context` RPC。在固定 -fixture 中,规范 params JSON 加 result JSON 在 File 为 42,771 字节,SQLite 为 -42,828 字节。已保存结果恢复仍为原有一次 lineage RPC,所测字节完全相同;不含 -完整来源的历史请求不增加 RPC。基线函数从冻结的修复前 commit 读取,使用同一 -owner 与 fixture 运行;这是派发组件隔离观察,不是完整分支重放。未测 RPC framing、 -CPU、模型输入、账单、成果或整体净收益。该正确性检查增加新尝试成本,不是字节 -节省、同 capture 正文体积测量,也未修复原五项体积门。共享的既有 phase/helper -已足够;另造 wrapper 或策略 owner 没有局部重构价值。writer/reader 退役,以及 -相对原 quota 的单会话成果与完整成本比较保持开放。 - -### Goal 拒绝先于自动启动间隔预留 - -通用派发检查现在位于原始 capture staging 选定输入之后、自动启动间隔预留、 -发布或新 journal 写入之前。有 staging 时检查其原始 plan,否则检查当前 request。 -此前的顺序可以在未启动 Host 的情况下拒绝 Goal 待读,却已预留间隔并写入 -journal/capture,导致后续合法 Turn 仍须等该间隔。本次只移动同一 TypeScript -规则,不新增规则、状态、配置、豁免、持久缓存或额外 RPC。 - -四项 File/SQLite 拒绝 case 在冻结的修复前源码复现了该等待状态,六项合法/历史 -对照通过。加强后的公开矩阵覆盖回调及真实 argv、staged capture、真实 cadence -状态与已保存结果恢复,共 22 项通过。确定性 loopback provider 下,两条真实 -native exec/CodeMode case 通过。已有结果仍走元数据校验与收尾,不另预留或 -启动尝试。 - -完整 capture、Turn-driver、manager-context 与 cadence 四个模块共 357 项通过。 -首次合跑的 356 过及一处旧根布局失败保留,后者也在干净的冻结修复前 checkout -复现。该 cadence 测试现在经真实不可变 capture reader 取得 scheduler 字段, -原周期下限及拒绝降低周期的断言均保持不变。 - -十个匹配的合成条件用冻结 executor 函数与当前函数,经同一真实 owner、固定 -来源输入及等长隔离 namespace 对照。socket 观察计完整 JSON 请求/响应行, -包含错误与 framing,不保留凭证。拒绝的非 capture 路径从 5 次 RPC 降至 2 次, -capture 路径从 6 次降至 3 次;File/SQLite 所测字节分别减少 95,293/95,405 与 -97,665/97,777。消除的是一次 cadence admission 和两次 journal 写入。拒绝后 -不新建 journal/capture,lane 保持 eligible;四个后继合法尝试均可启动,而其 -冻结对照仍等待间隔。 - -六个合法/历史条件的 RPC 次数及所测字节完全相同,Host 输入在只替换独立 -capture namespace 后相同。完整来源派发检查的原有 RPC 成本仍在。这只资格化 -暖态 RPC 组件,Host 被有意停止;不是完整分支的模型/成果实验、同 capture -正文缩减、CPU、账单或整体净收益。原五项体积门、完整 C1 writer/reader 退出 -及成果验收保持开放。合并 journal 写入仍需独立的中断/恢复资格;本次没有合并 -Host attempt 的持久 checkpoint 或确认边界。 - - -### 当前 main 集成与原 quota 完整任务 - -完整来源路径现复用 main 的 Progressive 与 Delta owner。既有完整决策 owner 先校验 -原始源,再应用展示计划。保存 capture 后选择的 transport 参数只改变派生视图中的 -selection recipe,不修改签名原件,也不重新准入。共享的保源 edit transport 保留 -稀疏数字身份、当前完整要求、显式关闭行为及同次 capture 恢复;被替代的 native quota -与有界结算 adapter 已退役,不保留两条竞争的生产路径。 - -原固定 quota 任务对照 main `24f46874bc97` 与集成运行时 `675cd9d23b5b`,在 File 和 -SQLite 上各做三次冷读、温态与压缩恢复,共 36 个条件。各条件交付同一份独立校验 -artifact,含重放均只扣一次额度。两边使用同一 Python 可执行文件及未修改的任务/ -observer;来源检查覆盖 252 次父进程与记账子进程观察。统计包含完整调用者输出、 -记账子进程双向 RPC 及可观察的 Python 普通文件 IO。并行验证使延迟/CPU 不具资格; -provider 原生 IO、模型输入/缓存/输出、账单与自然效果仍未测量。 - -| Provider/场景 | 完整调用者 stdout,main → 候选(字节) | RPC 次数 | RPC 线上字节 | -| --- | ---: | ---: | ---: | -| File/冷读 | 55,754 → 35,834 | 242 → 209 | 1,468,459 → 1,474,720 | -| File/温态 | 68,136 → 62,107 | 334 → 292 | 2,151,083 → 2,217,775 | -| File/恢复 | 89,861 → 61,384 | 336 → 294 | 2,156,745 → 2,214,069 | -| SQLite/冷读 | 56,155 → 35,908 | 242 → 209 | 1,470,295 → 1,476,592 | -| SQLite/温态 | 68,557 → 62,249 | 334 → 292 | 2,153,959 → 2,218,459 | -| SQLite/恢复 | 90,349 → 61,522 | 336 → 294 | 2,159,660 → 2,216,837 | - -以上为中位数,不代表效率晋升。温态连同基线准备的总输出少约 9%,但排除准备后的 -当前步骤输出在 File 增 7.0%、SQLite 增 6.2%;温态线上字节增约 3%,可观察的 Python -读写合计增约 4%。主指标“同次完整 capture 到所选正文文件”的缩减率在 main 温态 -约 87.8%,候选 File/SQLite 分别约 82.6%/85.4%。候选冷读与恢复选择完整正文, -主指标为 0%,不等于净收益为零。RPC 次数减少及完整源校验都不能证明整体净收益; -原 quota、writer/reader 退役及长程验收保持未闭合,既有负面对照及冻结体积失败不改判。 - -集成源码验证通过 448 个完整调用者/结算用例、156 个 context 用例及 14 个验收绑定 -用例;其中分别保留的五个、十个跳过用例不在本次通过范围内。两个相关 TypeScript -模块 67 项测试及 control-plane typecheck 通过。隔离安装的 wheel 通过 258 项,另有 -一个平台跳过;476 次已完成进程与 136,450 次 Core 模块观察没有来源污染,突然退出 -探针不产生该审计的退出时观察。比较的 1,897 个打包源码文件与本次测量产品源一致。 -这些结果只验收上述打包路径,不代表正式安装或尚未成立的净收益门通过。 - - -### 所选读取与已结算记录的传输 - -显式 reader 现在只传送所请求的字面转义地址沿途的来源容器。既有 TypeScript -selector 仍独占 RFC 6901、数组下标、整批失败与恢复父节点的校验;Python 只从 -完整摘要校验的原件渲染原值。数组长度、容器类型、初读导航、完整发现、历史固定 -顺序和 native section-read 核验均保留。不新增缓存、metadata 文件、pointer parser、 -读取义务或 retention 声明;复用 main 的 selected-source IO 和共享 native 回放 owner。 - -组合 refresh 调用方也向既有 TypeScript 结算 owner 请求更小的最终读取。该 owner -核验 Turn 已结算后,显式投影保留相同身份、控制与三张回执,将六个未消费的 Run/event -正文置为 null。默认/完整读取以及全部待恢复状态保留完整原正文。这个内部 RPC -可选字段不改变 admission 或记账,也不增加 CLI 或产品流程。 - -未修改的原 quota 完整任务对 main `886f2cdff4b2` 重复三次:同一 Python、材料、独立 -产物检查和重放,覆盖 File/SQLite 的冷读、温态与 compaction 恢复,共 36 条件。 -两边均产生相同产物并只扣一次。252 次父进程/记账 child 来源观察无污染;测量期间 -产品源码摘要不变。以下中位数包括双向 RPC 和全部必要读取: - -| Provider/场景 | 全部调用方 stdout,main → 候选(字节) | RPC 次数 | RPC wire 字节 | -| --- | ---: | ---: | ---: | -| File/冷读 | 55,946 → 35,930 | 241 → 208 | 1,465,253 → 1,429,981 | -| File/温态 | 68,364 → 62,287 | 332 → 290 | 2,143,831 → 2,147,306 | -| File/恢复 | 90,181 → 61,556 | 334 → 292 | 2,149,657 → 2,143,784 | -| SQLite/冷读 | 56,343 → 36,004 | 241 → 208 | 1,467,027 → 1,431,735 | -| SQLite/温态 | 68,793 → 62,429 | 332 → 290 | 2,146,719 → 2,149,912 | -| SQLite/恢复 | 90,666 → 61,694 | 334 → 292 | 2,152,475 → 2,146,508 | - -温态 RPC 少 12.7%,但 wire 仍增 0.16%/0.15%;不含准备的当前步骤 stdout 增 -7.0%/6.2%,已观测 Python 读写合计增约 4%。主指标“同次完整 capture 到所选正文” -在候选温态约 82.6%,main 约 87.8%;候选冷读/恢复仍选完整正文,主指标 0% 不表示 -净收益为零。先前仅精简结构的 cohort 也仍是负数,不能与本 cohort 相加。冷读/恢复 -传输减少不构成整体净益;CPU/latency、原生 provider IO、模型输入/缓存/生成输出、 -账单和自然长程成果仍未资格化。此前 cohorts、冻结体积失败与原 C1 验收继续保留。 - -真实公开 CLI 与 main 对照保留 15 个成功/拒绝观察,覆盖精确大整数、转义键、非法 -下标及整批拒绝;同入口丢弃所选来源结构的 mutation 会使独立原值 oracle 失败。 -结算套件覆盖默认完整读取及六种恢复状态的完整等价,137 个 TypeScript 测试和 -control-plane typecheck 通过。最终安装 wheel 与 premerge 的读回随提交的精确 head -单独记录,不代表正式安装。 - -最终隔离安装 wheel 通过 325 项,另有 1 项 Linux-only skip;1,897 个已打包源码文件 -与测量产品源相符。完成进程的模块来源审计无污染,突然退出不在该审计观察内。 -扩大后的 source 结算运行有 274 passed、4 failed、1 项平台 skip。四项 File/SQLite -失败在 main `886f2cdff4b2` 原样复现:回执绑定任务转 deferred 后返回 `quota_skip`, -未保留原 closeout recovery;到期 successor-replan 的重放也丢失动作。正向 guard -中的 `should_run`/`delivery_allowed` 事实曾被初步解释为互相矛盾。下文修正该诊断, -保留原失败运行。更小记录投影不在这些失败路径上执行;不放宽回执规则来换取通过。 - -### 执行准备与原 Turn 恢复 - -普通 guard 可以要求领取任务,同时禁止业务交付。此时 `should_run=true` 与 -`delivery_allowed=false` 一致:已有领取后置条件要求在同一 Turn 重新进入,并明确 -取得 `execution_preparation.state=ready`。此前两个 File/SQLite 测试在产出 artifact -前遗漏了这一步。现在测试遵循已有调用契约,并核验同一结算身份下从负向到正向的 -追加式 guard lineage;既不改写原负向事件,也不放宽 native result admission。 - -另外两个失败暴露了产品缺陷:selected-Todo IO adapter 对 canonical obligation 已经 -禁止交付的规划操作,仍应用普通执行准备。任务为 deferred 时,到期 successor replan -因此被压制,重放也丢失原动作。adapter 现在先消费 TypeScript interaction owner -使用的同一明确 `delivery_allowed=false` 事实,再决定是否读取执行租约。规划仍不 -授予普通交付或扣额;省略该事实时保留全部原执行准备检查。普通领取、冲突、回执身份 -及 once-only 恢复仍由原 owner 管理,不新增决策 owner、协议字段、权限、cadence -顺序变更或 RPC。 - -使用同一套修正后的测试 harness,冻结的修复前产品源码通过两个普通交付用例, -仍失败于两个规划用例;候选四项全部通过,完整执行准备矩阵共 30 项通过。原四失败 -cohort 保留为历史证据,调用者顺序修复与产品路由修复分别记账。这只闭合已复现的 -规划路径缺陷,不代表完整 C1 验收或整体效率成立。 - - -未修改的原 quota 任务也再次与同一 main 源码对照,File/SQLite 的冷读、温态与恢复 -条件各重复三次。36 个条件均保留同一独验产物及含重放的一次扣额;252 次父进程/ -记账 child 来源观察无污染,产品源摘要不变。温态 RPC 仍为 332 → 290,wire 在 -File 增 0.165%、SQLite 增 0.073%;排除准备后的当前步骤 stdout 分别增 9.5% 和 -6.2%,已观测 Python 读写合计增 4.1% 和 3.8%。主指标“同次完整 capture 到所选正文” -候选为 84.1%/85.5%,main 为 89.2%/87.8%;候选冷读/恢复仍选完整正文。这是 -独立 cohort,不能与前一 cohort 相减作因果归因。规划路径正确性未解决普通温态路径 -的成本取舍;provider 原生 IO、latency/CPU、模型/缓存/生成输出、账单及自然长程 -效果仍未测量。 - -扩大后的 source 结算套件现有 278 项通过,另跳过一项原生 Windows PowerShell 用例。 -新建的隔离安装 wheel 通过 246 项,覆盖四个修正后的 CLI 用例、普通/native 执行 -准备、结算、组合收尾及 runtime 集成;原生 Windows PowerShell 与 Linux thread-group -exit 两项不适用于当前 Host。1,897 个比较的打包源码文件与本次源码一致,包括修改的 -adapter;227 个已完成进程及 102,420 次 Core 模块观察无来源污染。突然退出不在退出时 -审计的观察范围内。原隔离 guard 保留;这不代表活动 runtime 的安装或晋升。局部改动 -复用共享 IO adapter,另造 contract projection 或 lifecycle wrapper 会增加顺序风险, -没有必要调用者。 - - -### Native quota 的 capture 发布 - -已具备资格的 native quota 调用方现在复用刚发布的完整 decision,作为 source recovery -引用。此前,它在向同一个 TypeScript owner 请求可选展示前,还会保存一份逐字节相同 -的完整 projection;前一轮合格工作负载的 30 对 capture 均确认字节一致。adapter 现将 -生产者自有的原始引用传入既有 native preparation,外部 continuity 输入不能提供该引用。 -内容确实不同时,required view 仍单独保存;独立 API 与未初始化 native fallback 保留 -原发布路径。不新增 hard link、持久缓存、文件格式、语义 owner、读取义务、权限或 RPC。 -历史路径仍按原身份和摘要读取。 - -原 quota 工作负载与 main `6a9264034605` 对照,File/SQLite 的冷读、温态和 compaction -恢复各重复三次。36 个条件均产出同一份独验 artifact,含重放只扣一次;252 次父进程/ -记账 child 来源观察无污染,测量期间产品源摘要不变。30 个候选 capture 均不再保存 -重复的完整 projection。这消除了重复生产写入,未省略完整来源,也不声明模型保留。 - -| Provider/场景 | 全部调用方 stdout,main → 候选(B) | RPC 次数 | RPC wire B | 已观测 Python 读 B | 已观测 Python 写 B | -| --- | ---: | ---: | ---: | ---: | ---: | -| File/冷读 | 55,429 → 35,654 | 241 → 208 | 1,459,302 → 1,424,420 | 336,589 → 287,832 | 127,933 → 120,437 | -| File/温态 | 67,723 → 61,768 | 332 → 290 | 2,133,937 → 2,137,552 | 552,218 → 511,741 | 238,580 → 201,925 | -| File/恢复 | 89,316 → 61,059 | 334 → 292 | 2,139,532 → 2,134,660 | 580,809 → 519,604 | 233,054 → 195,818 | -| SQLite/冷读 | 55,826 → 35,728 | 241 → 208 | 1,461,076 → 1,426,174 | 344,133 → 295,172 | 129,145 → 122,147 | -| SQLite/温态 | 68,136 → 61,910 | 332 → 290 | 2,136,689 → 2,141,039 | 560,254 → 519,489 | 240,008 → 204,526 | -| SQLite/恢复 | 89,801 → 61,197 | 334 → 292 | 2,142,354 → 2,137,296 | 588,955 → 527,354 | 234,484 → 197,664 | - -温态已观测 Python 读写合计少 9.75%/9.53%,写入少 15.36%/14.78%;RPC 少 -12.65%,wire 仍增 0.169%/0.204%,排除准备后的当前步骤 stdout 增 7.02%/6.24%。 -主指标“同次完整 capture 到所选正文”在候选为 86.1%/84.7%,main 为 87.9%;候选 -冷读/恢复仍选完整正文。工具 stdout 不代表模型生成输出;原生/provider IO、 -latency/CPU、模型输入/缓存/输出、账单及自然长程成果仍未资格化。历史 cohort -保留原负数,不把不同 cohort 相减当成此次改动的因果成本收益。 - -同一测试 harness 在冻结的修复前 C1 源码上保留四项语义对照,并失败于四项重复存储 -断言。候选完整 native/lifecycle/reader/cost 套件 265 项通过;最终按实际公布的 -引用修改正文后,reader 拒绝变化字节且不改 native journal。公开 capture/model/ -恢复运行 64 项通过。新隔离安装 wheel 有 493 项通过,另有一项 Linux thread-group -exit skip;1,897 个比较的打包源与实测产品相符,包括两个修改的 IO adapter。278 个 -已完成进程和 45,049 次 Core 模块观察无来源污染;17 个未分发 tracked assets/dev -fixtures 另列,突然退出不在退出时审计范围内。这只资格化上述打包路径,不代表活动 -安装或独立 PR 批准。有界改动复用既有 recovery 引用,没有新增 writer、helper 框架 -或第二语义 owner。 - -### 已结算 result value 的传输 - -既有组合收尾调用方在 TypeScript 结算 owner 验证原身份及全部回执后,请求 -`include_record_bodies=false`。此前该投影删除顶层 Run 记录,却仍在四个 result -value 中重复返回相同的写回/扣额正文;调用方并不使用这些 value。现在既有 bundle -helper 在已经请求且完全 settled 的投影中清空这些正文,身份、回执 payload、失败 -及其它控制保持原值。默认完整读取和全部待恢复状态保留原正文;持久 Run、历史 -reader、记账及公开 CLI 结果不变。不新增选项、schema、RPC、缓存、Python 规则 -或模型读取义务。 - -这是既有内部 opt-in 读取投影的有意变化,默认 reader 不变。唯一生产 opt-in -消费者仍是组合 refresh/spend adapter。同一 TypeScript harness 先拒绝旧版的 -正文重复,修复后 137 项全过,包含完整读取与 pending 状态等价。真实 File/SQLite -CLI 独立核对正文省略、回执不变、持久读回及重放只扣一次。新增断言通过后暴露了 -测试局部变量覆盖问题;修正未改变任何断言或产品规则,原失败 cohort 保留。 - -较广源码运行保留 276 项通过、一项 native Windows 渲染 skip 及上述两项 fixture -失败;修正后的 File/SQLite 两例通过。隔离 wheel 保留其它 387 项通过、两项平台 -skip 及相同两项失败,随后在产品不变时通过修正后的两例。其 1,897 个比较的打包源 -与实测产品一致,包含修改的 TypeScript owner;17 个未分发 asset/dev fixture 另列。 -两次 wheel 运行合计 1,297 次已完成进程观察、535,308 次 Core 模块观察,无来源 -污染;突然退出不在退出时审计范围内。这只资格化已测安装包路径,不代表活动安装、 -独立评审或合并权限。 - -原 quota 工作负载不变,以冻结 main `0423908e9cf4` 为基线,各 provider/场景重复 -三次;候选包含该目标及此前 C1 改动。36 个条件均达到同一份独验 artifact,含重放 -只扣一次。252 次父/child 来源观察匹配各自固定版本,测量期间产品摘要不变。 -父进程记账已包含 child RPC,不再重复相加。 - -| Provider/场景 | 全部调用方 stdout,main → 候选(B) | RPC 次数 | RPC wire B | 已观测 Python 读 B | 已观测 Python 写 B | -| --- | ---: | ---: | ---: | ---: | ---: | -| File/冷读 | 55,472 → 35,678 | 241 → 208 | 1,459,815 → 1,400,685 | 336,894 → 288,097 | 128,010 → 120,512 | -| File/温态 | 67,892 → 61,813 | 332 → 290 | 2,135,559 → 2,114,908 | 552,831 → 512,164 | 238,851 → 202,786 | -| File/恢复 | 89,386 → 61,102 | 334 → 292 | 2,140,392 → 2,111,166 | 581,330 → 520,030 | 233,207 → 195,945 | -| SQLite/冷读 | 55,868 → 35,752 | 241 → 208 | 1,461,586 → 1,402,351 | 344,435 → 295,437 | 129,221 → 122,222 | -| SQLite/温态 | 67,403 → 61,955 | 332 → 290 | 2,136,570 → 2,116,685 | 559,999 → 519,924 | 239,399 → 203,919 | -| SQLite/恢复 | 89,875 → 61,240 | 334 → 292 | 2,143,241 → 2,113,734 | 589,491 → 527,788 | 234,645 → 197,795 | - -以上是三次观察的中位数,不声明统计显著性。温态 wire 少 0.97%/0.93%;File 范围 -为 2,134,771–2,135,559 对 2,113,851–2,115,192,SQLite 为 -2,136,570–2,138,375 对 2,115,544–2,117,498。温态已观测 Python 读写合计少 -9.69%/9.45%,RPC 少 12.65%;这些是累计 C1 对照,不将既有 RPC/IO 下降 -归给此次小投影变化。 - -排除准备后的当前步骤 stdout 仍增 6.66%/8.73%。主指标“同次完整 capture 到所选 -正文”中位数为 84.7%/86.1%,main 为 87.7%/89.2%;三次范围分别为候选 -84.6%–86.2%/84.7%–87.6%,main 87.7%–87.9%/87.7%–89.2%。候选冷读/恢复 -仍选择完整正文。本次改动减少内部传输,不等于模型生成输出下降。CPU/latency、 -原生/provider IO、模型输入/缓存/输出、账单、自然采用及完整净收益仍未资格化。 -历史正负 cohort 保留原版本与结果,不跨 cohort 相减作因果归因。原 C1、最后 reader -退出及整体验收保持开放。 - -验证期间 main 推进到 `7f550aef58a8`,修改 Chat 原会话 fallback 及两个前端 fixture。 -该后续组合尚未资格化;本 cohort 和集成基线仍为 `0423908e9cf4`,不改记为移动后的 -实际目标。 - -### Main 集成与独立上下文层 - -实现 `6f00db17c654` 集成 main `918844a01746`,保留调用内首读计划复用,并接入 -main 的独立 Delta 路径:显式关闭 Progressive、开启 Delta auto 时,不发布渐进导航 -或已见字段复用;绑定 digest 的文件差分及当前完整恢复仍可用。普通 quota presentation -与 managed preview 已消费共享完整源 owner;本次不重复其迁移,也不退役绑定原版本的 -历史 journal。C1 的 RFC 增量随 main 迁到附录,两种语言的义务均保留。 - -实际 Codex 配合静态本地回环,在源码及隔离 wheel 中验证默认 Progressive 与独立 -Delta。完整未变大验收字段的匹配温态所选 BODY 仍由 14,386 降至 2,583 字节; -未经验证的已见字段连续性恢复 14,386 字节。独立 Delta 用例重建全部原字段,并通过 -实际客户端读取当前完整恢复。wheel 中的保存源身份拒绝、显式 off、前驱丢失及压缩 -恢复也通过。这些是传输检查,不是新增模型实验或安装态采用。 - -新的匹配工程 cohort 沿 main 原 quota 产品入口使用同一合成三步骤 Task:File/SQLite、 -冷/温/恢复各三次,成果由同一独立检查验证,扣额各一次。共 36 场景、60 Turn,包含 -准备及子进程 RPC/IO,后者只累计一次。BODY 按返回页的字节顺序重建,不取后备文件 -大小。SQLite 温态当前步骤 BODY 为 23,617 → 22,970 字节(−2.74%),CLI stdout -58,949 → 48,401(−17.89%),RPC 294 → 290,framed RPC 字节约少 3.74%。含准备时, -stdout 为 115,568 → 93,613,RPC 586 → 578,framed 流量约少 4.01%;已观测 Python -普通文件读/写约少 8.80%/26.18%。未测 Node/kernel/provider IO 与模型费用。File 温态 -带观测 CLI 时间反增约 7.5%,不据此资格化延迟。此轻量 quota fixture 没有大型验收 -正文,不能将其收益归因于字段复用。它只验证已测步骤,不代表原三步骤 Task 完成、 -自然模型采用或整体 C1 净益;历史失败、剩余 reader、质量和独立验收义务仍开放。 - -### Main 采用后的首读收敛 - -后续集成 `339f01e08782` 接入 main `39770a960483` 及已落地的首读生产者/读取器。 -最后一个 `project_codex_context` 测试 caller 改用 `prepare_codex_context`,删除未再 -使用的 Python wrapper;已记录源版本与 journal 恢复 codec 仍保留各自支持义务。 -benchmark 预检测试沿实际首份 BODY 读到 EOF,核 reference/source/selection 摘要及 -必要字段,并保留完整原件,不再把首个回复当成导航。 - -以该 main 重跑的 36 场景 cohort 全程保持产品源字节不变,沿用同一合成 Task、成果、 -一次扣额及成本边界。SQLite 温态 BODY 为 24,016 → 23,285 字节(−3.04%),CLI -stdout 59,898 → 49,136(−17.97%),RPC 292 → 290;framed RPC 字节反增 **2.93%**。 -含准备时,stdout 117,466 → 95,041(−19.09%),RPC 582 → 578,framed 字节反增 -**2.14%**,已观测 Python 读/写少 9.12%/26.28%。这些结果不改写上一 cohort,也不 -替代自然模型资格。当前 main 的原生对照温态 BODY 仍为 14,386 字节,字段复用为 -2,583;此大字段组件不在上述轻量 quota fixture 中。 - -配置内 Python 类型检查仍未通过:原 C1 为 4,809 条,本组合为 4,814 条。新增五条 -位于与 main Git 对象逐一相同的模块,保留失败,不予豁免。reader 退出、独立审阅、 -安装态采用及整体 C1 净益仍开放。 - -### 完整来源资格与 native 执行顺序 - -无写入行为资格工具现可在两个实验臂接收经 Core 校验的完整 v1 来源,并报告实际 -packet 版本。保留材料与反事实候选默认调用既有完整 composer;已捕获的完整来源 -保留原 Host 绑定与结算组合。原始 fixture 使用 Core 默认组合,不从候选元数据推断 -另一绑定。版本化 v0 状态矩阵继续作为明确的历史对照,包括当前 owner 拒绝的旧 -action 别名;这不退役仍受支持的历史 codec。 - -配对预检在任一 actor 调用前检查两臂的保密边界。完整候选继续校验来源、完整性与 -精确配对出处;provider 提示与编码 scheduler 扫描依实际 packet 布局选择字段, -不再依实验臂名称推断。当前格式删字段负例在 actor 前拒绝。语义负例改动原始 -source 后由 Core 组合,因此即使两侧绑定有效且彼此一致,仍须通过独立的固定 -战略链 oracle;签名篡改保留独立负例。 - -集成后的 native Host 暴露执行顺序缺口:delivery 守卫要求 Task 租约,而模型回调 -要等启动后才申请它。显式非报告 Task 现于守卫前进入既有租约生命周期,managed -回调复用并核对同一 Task。canonical 中不存在的工作仍进入 kernel 的结构化拒绝, -权限来源不可用时拒绝执行,也不借用冲突的执行租约。报告与已记录 resume 路径 -保留原生命周期;未放宽守卫或独立验收,也未资格化未显式指定 Task 的自动选择。 - -冻结的 main 集成先记录 646 通过、22 失败;开发运行保留 292/4 和 356/1,其中 -后一次发现过早申请租约的异常取代了缺失工作的原拒绝。修正后,新的一次八模块 -运行全程保持源码稳定,357 项全部通过,包含 61 项 native File/SQLite、原会话、 -HTTP、拒绝与独立验收。main conversation-binding TypeScript 模块通过 59 项, -五个改动资格 Python 模块通过类型检查。这是本地合成 actor/provider 检查,不是 -真实模型行为或完整成本证据。 - -新鲜校验的 Chat bundle 与隔离 wheel 中,1,815 个 Python/TypeScript 源与实测 -产品字节一致。安装环境中的完整请求、当前与显式历史配对、错源拒绝及实际适配器 -配合本地 transport double 均通过;已观测 300 个 LoopX 模块,无 checkout Core -借用。native Host 仅做安装导入,未作为安装态旅程执行。首次旧/缺 bundle 构建、 -harness 准备失败和历史 v0 大整数来源不匹配均保留;旧格式正向对照回到原可表示 -fixture,当前格式的大整数检查仍保留。这些结果不构成活动安装、真实模型运行、 -整体 C1、质量/readiness 或净收益资格。 - -后续直接 writer 审计发现,公开 task-orchestration smoke 仍生成 v0 输入,另有一个 -场景 packet builder 已无调用方。示例现以各自原 scheduler context 组合完整来源, -并读回 Codex、Claude 的最终 Host 请求:完整来源、主 Task 选择及原有子任务 -上下文与原生操作断言均保留。闲置 builder 直接删除,不再添加无人调用的替代 -抽象。明确版本化的 v0 状态矩阵及受支持历史 writer/reader 继续保留;产品代码与 -示例中的 Python 直接调用审计只剩该历史矩阵调用旧 writer,不声称覆盖动态调用。 - -公开示例在迁移前后均通过。默认配置的 Mypy 在前一 `a706379f70` 检查点及本次 -改动后均通过全部 17 个入口;这更新当前类型资格,不重写较早 4,809/4,814 的 -失败。这些检查没有执行真实子任务创建,不证明真实模型采用或新安装包资格。 - -新的一次四模块回归全程源码稳定,247 项全部通过,覆盖真实 Turn driver、活动 -portfolio 来源、历史 corpus 及重规划 Host-context 投影。这是本次调用方资格, -不与较早的 357 项或安装运行合并记账。 - -### 集成 main 后的安装态 native 生命周期 - -集成 `5091fb82a9` 接入 main `9d276f6cb9` 的原上下文补答修复。native Turn Host 与 -私有会话两个模块的新一轮源码回归全程源码稳定,466 项全部通过。重建并校验 -Chat bundle 后,同样两个模块在隔离安装包上以原样夹具运行,覆盖真实 File/SQLite、 -native 协议与 HTTP、原会话、独立 Task 验收、来源/权限拒绝及恢复。模型与外部 -provider 仍为合成实现;这已超出 native 只做导入的范围,但不资格化活动 App 或 -真实模型采用。 - -首轮安装运行保留 459 通过、7 项准备失败:明确启用账户路由的七个用例缺少单独 -分发的可选包。安装同提交的 0.15.3 wheel 后,新的一次完整回归 466 项全部通过, -未将局部复跑拼接成全绿。原失败及审计 helper 的 61 条弃用警告保留;helper 改用 -关键字参数,与产品代码分开处理。 - -Core 包内 1,815 个 Python/TS 文件及可选分发的 24 个文件,均与提交和安装字节 -一致;已有私有故障进程测试 driver 不在此 wheel 资格范围。48 个已观测 Python -进程中的 1,228 个 Core 模块、7 个可选 provider 模块及 4 个已观测子进程源码 -路径均来自安装分发,无 checkout Core/provider 导入。夹具与安装源保持不变。 -默认配置 17 入口 Mypy、集成后的会话绑定 TS 模块 60 项通过。较早 357/247 项及 -PostgreSQL 证据保留各自版本;这些合成正确性与来源检查不能证明完整成本收益。 - -### 可见 Goal 读取与已声明的验收审计 - -集成 `d80b3860ab` 接入 main `ac62962255`。独立审阅发现,可见 Goal 提示新增了 -无条件完整 capture 前置读取,连普通/off 输入也受影响,并拒绝了三个原本合法的 -4,000 字符配置。捕获提示现要求读取所需原始章节;普通/off 不新增 capture -前提。work_context 与 required_reads、明确完整读取义务、原身份/恢复、传输 -flags、结算和停止规则均保留,4,000 字符 Host 上限不变。24 个同条件 builder -输入中,main 接受 21 个、候选接受 23 个,没有丢失 main 的合法输入;一个过大 -输入在两侧仍被拒绝。 - -完整 structured、Codex Host 输入复用已声明审计的原触发条件:判断 Goal 验收 -或提出关闭前先读取。八个 File/SQLite 反事实覆盖两种 Host 和有/无审计;缺失 -审计的负例捕获并否决了首次无条件提示。十二个合成历史 structured renderer -用例保持输出逐字一致、输入不变。这是限定范围的指令资格,不证明模型记忆保留。 - -heartbeat 消费方现校验完整来源,通过带摘要校验的分页 reader 读取调用方原本 -持有的 capture。原 scheduler、选择、回执及一次结算 oracle 保留。安装运行暴露 -测试调用方隐含借用 checkout 工作目录:refresh 应在其实际 disposable project -执行。首次安装全组 60 通过、18 失败;同一 wheel 仅修正调用目录的对照通过, -没有放宽生产工作区守卫。 - -最终九模块源码运行全程来源稳定,记录 **855 通过、2 失败**;三个模块的完整 -安装复跑记录 **80 通过、2 失败**。两侧失败均保留原始 JSON 预算:两个长 scope -后端用例 5,519 字符超过 5,400,而同条件 main 的原四个预算用例全部通过。 -没有调高预算、缩小夹具或减少有用义务来隐藏回归。早期失败组及一次私有审计目录 -准备失败保留。默认 17 入口 Mypy、六个改动路径的 Ruff 和有限语义 advisory -通过。1,815 个 Core wheel 源与冻结实测及安装字节一致;五个已观测 Python -进程、1,179 个模块和六处已观测子进程来源无 checkout Core 导入。部分子进程 -覆盖审计环境,故不声称观测了所有进程。这些合成检查资格化修复后的 Goal/审计/ -调用方切片;整体 C1、剩余预算回归、真实 App/模型采用及完整成本收益继续开放。 - -### 保留生产者已绑定的 heartbeat Turn 身份 - -运行时 `3736048363` 在既有生产者实际替换时间戳占位符后,移除不再适用的唤醒 -指令。绑定后的提示已包含原具体赋值及独立 guard,再要求模型换成新唤醒时间戳 -既重复又可能丢失原身份。未绑定的可复用模板保留原指引。四种提示模式共用既有 -绑定 owner,不增字段、开关或 reader;历史正文、命令、传输 flags、必读内容和 -恢复/停止/结算规则不变。 - -八个模式/宿主语法反事实在修复前失败、修复后通过;Windows 语法为模拟,不是 -Windows 安装资格。32 个实际 builder 对照中,16 个未绑定的默认/off 输出逐字 -一致,16 个已绑定输入只移除已履行的指令,其余生成字段和上限不变。原四个真实 -CLI 预算用例的路径、scope 和断言保持:长用例从 5,519 降至 **5,379 个原始 JSON -字符**,正文少 139 字符,另少一个 JSON 转义字符;同条件 main 仍为 5,363。 -这是修复候选回归,不证明相对 main 的完整流程节省。5,400/5,500/4,000 上限及 -独立溢出负例保持。 - -新的一次九模块回归全程源码稳定,**865 项全过**;三个模块的隔离安装完整运行 -**90 项全过**,保留原 worker 选择、修复、capture、重放及一次结算 oracle。 -较早 855/2、80/2 保留各自原版本。默认 17 入口 Mypy 和改动 Ruff 通过。新鲜 -bundle 校验及 wheel 来源检查将 1,815 个 Core 源、24 个可选 provider 文件绑定 -到冻结实测字节;五个已观测 Python 进程、1,179 个 Core 模块及六处已观测子进程 -来源无 checkout Core 导入。审计覆盖限制、合成 provider、真实模型采用和完整 -成本尚未资格的边界沿用;独立审阅和整体 C1 验收仍开放。 - -### 可见宿主的调度观测 - -Pi、OpenCode 和 OpenCode 2 已绑定 Agent 时,共用现有调度观测。可运行状态、重置 -标记、等待限制和终止来源均取自同一 Core 决定。此前三个调用方用普通模型上下文 -接口做调度探测,收到渐进导航时读不到续跑所需字段。OpenCode 和 OpenCode 2 读取 -当前的按需调度详情,继续接受历史调度形状。两者显式请求的宿主轮询回执每次探测 -沿既有写入方记录一次。 - -调度观测不启动 Turn,不捕获模型上下文,不触发结算。工作交付仍按原上下文策略。 -旧宿主绑定缺 Agent ID 时沿显式完整观测,绑定 Agent 后切换。升级或回退时使用 -同一构建的宿主适配器和 CLI。原版本 Turn reader 在受支持的恢复窗口继续服务尚未 -结清的工作。 - -### 恢复被拒绝的完整来源组合 - -组合失败时,capture 根记录既有传输失败契约,明确 `ok=false` 和 -`should_run=false`。原始输入的全部事实保存在 `source_diagnostic`,同时保留 -原回执及运行时的类型化组合诊断。语义拒绝和运行时启动失败共用这一路径,诊断 -恢复沿现有带摘要校验的按需 reader。 - -当前来源经成功组合后才能发布工作或原生认领准备。这修复了被拒绝的当前输入 -可能被误当成未版本化历史 capture 的路径。真实历史 capture 沿显式恢复 reader。 -成功组合后才发生的交付失败,保留已验证的原 capture。 - -限定范围的合成 File/SQLite 用例覆盖准入后未知 action、未知交互版本和组合 -不可用。独立 oracle 检查完整诊断回读、执行投影拒绝、原生 journal 与认领来源 -副作用、一个原回执及零 spend。既有暂停、capture、handoff 和历史恢复覆盖共同 -资格化相邻边界。整体 C1 验收及真实模型效果继续开放。 - -### Codex SSH 准入命令与 managed retry - -新生成的 Codex SSH Goal prompt 和 onboarding guard 使用完整 Turn 来源,并沿用 -原生 begin-Turn 身份。已保存的 bootstrap 若带旧显示参数调用生成器,仍可生成 -当前 guard。显式关闭 context delivery 时直接返回完整来源。启用时按返回命令 -读取同一 capture,并按原 Turn 的结算计划执行。标准包和独立 Core 包使用共有 -的 CLI 入口和参数语法执行待结算命令。 - -TypeScript controller 的 managed-step 入口要求新鲜的完整决定。已保存的失败 -Turn journal 仍沿原版本读取。在实时入口注入签名有效的 v0 preview 会在启动 -Host、改写 journal 或扣额前拒绝。重试继续使用原 Turn。 - -源码和隔离安装包的 File/SQLite 用例覆盖启用、显式关闭、旧 bootstrap 重生、 -同一 capture 读取和结算重放。原生 Turn 测试还覆盖丢失扣额响应。 - -### Benchmark 和 MCP 实时读取 - -新 benchmark heartbeat 在两种 context-delivery 设置下都请求完整决定。 -新 checkpoint 选择要求带签名的来源。历史 checkpoint 接续沿用原捕获 reader 和 -Turn 身份。Benchmark 的显式 v0 展示入口仍待退役。 - -共用 MCP 实时读取请求完整决定,返回原始 JSON 和 MCP 指引块。来源绑定缺失或 -被改动时拒绝交付,实时无版本投影已移除。现有 `complete_task` 事务继续负责 -认领校验及结算。真实 stdio、重放与历史恢复测试在隔离 authority 运行。 -MCP 客户端的安装态验收仍待完成。 - -普通 quota、App 安装态采用、剩余结算调用方及单会话成果与完整成本仍待验证。 - -### 分阶段派发与过期任务重试 - -分阶段派发沿用发布捕获与预留启动前最后一次 TypeScript 来源校验。当前 plan -只组装完整 Host 请求。外部进程与进程内 Host 收到同一份已检查的请求; -stdin 写入不再重建旧版适配器。已存过渡格式的转换仍保留在历史读取边界。 - -原生重试仍读原捕获。启动检查拒绝进入时,日志为未派发模型的尝试记录明确的 -契约拒绝,覆盖缺少所需能力和任务变更。日志保留原会话的恢复要求。若操作 Host -已经绑定会话,模型启动检查随后拒绝派发,下一次显式重试必须恢复该会话。任务 -与所需能力恢复后,重试须通过当前启动检查。变更后的任务须取得新的合格 Turn。 -派发结果不明时仍须沿原尝试对账。 - -原生和外部 stdio 派发检查绑定原硬租约的执行标识。续租保留该标识。释放后重新取得 -租约必须使用新的 Turn,即使同一 Agent 仍负责同一 Todo。File/SQLite 上的 -Codex CLI 和操作模式 app-server 实跑确认,换租约会在模型派发和结算前拒绝首次派发 -与显式重试。stdio 适配器在换租约后的重试中也拒绝启动进程。以上路径在原租约续期后 -仍可派发。 - -当前检查和派发共用 Todo 与租约权威写入锁。在普通 Codex CLI、操作型 Host -和外部 stdio 重试中,如果独立进程在检查完成后、进程创建或发送 `turn/start` -前请求释放租约,写入会等派发完毕。Host 仍在执行时即可完成释放。竞态用例 -使用真实 File 与 SQLite 和合成 Host。若 registry 正被其他操作锁定,当前派发会 -在发送请求前拒绝,原尝试可供重试。 - -写入锁期间,租约计时仍继续。启动作用域保留原准入代的当前到期时间,将它传到 -原生进程启动或写入 `turn/start` 的位置。stdio 桥收到请求后,在启动 Host 前 -再次校验该时间。租约已到期时,在任务执行、工作写回和扣额前拒绝派发,包括 -适配器已为原 Turn 绑定会话的情况。 - -桥确认尚未派发 Host 后,父进程等待它正常退出。该分支保留原租约到期错误,继续 -要求清理确认。File/SQLite 回归同时断言派发拒绝、桥正常退出及终止调用次数为零。 - -File/SQLite 用例覆盖任务不变时重试、能力和任务变更、原会话恢复、历史格式及 -子进程 stdin。可见 Codex CLI 的 JSON 默认使用完整来源,生成的 Turn 绑定命令 -继续沿用该来源。通用 quota 对照保留精简输出。用例使用隔离的合成 Host,实际 -安装态与模型成果仍需另行验收。 - -### 绑定 Turn 的通用 CLI 心跳 - -DSH 在 `generic_cli` 配置下为明确的 Agent 和 Turn 启动生成的薄心跳。该 JSON 路径 -现在由 Codex 已有的完整来源组合器生成当前捕获,绑定路径退出普通无版本 quota -writer 和 compactor。选题与结算恢复沿用已有的传输绑定,扣额仍由 Agent 执行。 -显式 Off 在选题和原 Turn 恢复中持续生效。未绑定的探测和 EdgeBench 的显式 v0 -对照仍有活跃调用方。原版本捕获读取器用于固定版本的历史工作。 - -同一合成任务在主干 `f7e3f427197b`、前一个 C1 头 `6415e3607502` 和本次产品代码 -`0057a1dbd129` 上实跑。每组交付设置及后端重复三次,计入薄心跳、选择、绑定、 -从原捕获读回必需内容、写回、恢复待扣额、扣额和重放八步。36 次均取得同一经独立 -检查的夹具产物,同一 Turn 留下首次准入和绑定两条回执,扣额一次。 - -| 交付设置和后端 | 主干 stdout 中位数(B) | 前一个 C1(B) | 当前(B) | -| --- | ---: | ---: | ---: | -| On / File | 48,950 | 48,819 | 48,644 | -| On / SQLite | 48,998 | 48,867 | 48,692 | -| Off / File | 127,838 | 127,707 | 126,327 | -| Off / SQLite | 127,926 | 127,795 | 126,377 | - -主干原 Off 选题命令遗漏两个交付参数,后续恢复使用默认渐进交付。File 和 SQLite -全程输出分别为 73,710 和 73,758 字节。表内 Off 对照在基线的选题与恢复中补齐 -两个 Off 参数,候选由生成命令直接带齐。四个场景的 CLI 端到端耗时有升有降。 -夹具计入 CLI 输出与调用次数并实跑原捕获恢复。RPC、文件 I/O 总量、模型实际决策与 -费用,以及已安装 DSH 或 App 会话的采用还需补证。 - -### EdgeBench 新 heartbeat 统一使用完整契约 - -EdgeBench CLI、SForge/Harbor 启动配置、普通 worker 唤醒与 checkpoint -预检使用同一份完整契约。显式请求旧展示会在登记试验或创建新唤醒前拒绝。 -显式关闭上下文交付仍传到 quota guard,原完整来源与结算身份保留。 - -原生 checkpoint 恢复继续核对记录的展示方式和精确待完成命令,覆盖旧 v0 -记录。归档重跑使用已记录的产品及 runner 固定版本。支持恢复窗口结束且 -无未结记录需要旧 reader 后,再退役它。通用旧 CLI 的其他调用方与实际安装态 -采用仍需各自验收。 - -### 已绑定捕获的 heartbeat 入口统一使用完整契约 - -薄 heartbeat 共享生成器为使用旧 `--turn-envelope` 参数的捕获唤醒输出完整 guard。 -新保存的入口写 `--complete-turn`。托管升级按原字节核对旧入口,携带显式身份、 -捕获和交付设置。显式捕获 Turn 的两种入口拼写共用原薄提示词余量。 - -直接 quota 兼容入口继续服务现有原始调用方,待这些调用方迁移后退出旧 writer。 -原捕获和待完成命令在恢复窗口内使用各自版本的读取器。 - -六组本地 File/SQLite 对照使用同一选定 Todo,显式关闭上下文交付。首个 guard -从 22.1 KB 增至 37.9 KB。读取完整契约时,两种后端上入口、guard 和捕获分页的 -总输出由 71.7–71.9 KB 降至 42.9–43.0 KB。每组都保留同一结算身份,每臂仅一份 -心跳回执。选读成本、模型实际成果及实装采用仍需验证。 - -### Kiro CLI 薄心跳使用完整 Turn 来源 - -生成的 Kiro 启动指令为绑定 Agent 和 Turn 的 JSON 工作调用共享的完整来源组合器。 -显式关闭交付时,完整决定以内联方式返回。可见 Goal 的写回、恢复和扣额沿用原 Todo -与 Turn。无 Turn 的普通探测保留紧凑输出。Kiro 的 MCP 工具此前已使用完整来源组合器。 - -对照前一候选 `3f527c468b2f`,每个后端及交付设置各跑三组,实跑生成的启动指令、 -绑定 guard、交付读回、合成成果检查、写回、扣额和重放。两个后端也在新版本上恢复了 -前一版本保存的 Kiro 原捕获。恢复时拒绝身份不符的 Agent,原 Turn 只扣额一次。 -下表的 CLI 标准输出中位数在 guard 返回引用时计入完整读回。 - -| 交付设置和后端 | 前一候选(B) | 当前(B) | -| --- | ---: | ---: | -| 默认 / File | 70,190 | 71,182 | -| 默认 / SQLite | 70,252 | 71,244 | -| 关闭 / File | 61,578 | 61,142 | -| 关闭 / SQLite | 61,640 | 61,204 | - -直接 quota 的显式关闭入口另做了短 v0 改为内联全量的试验。同一夹具的 JSON 从 -23.1 KB 增至 48.4–48.5 KB,Markdown 从 2.4 KB 增至 48.2 KB。该显式入口保留有界 -writer,待实际调用方的替代路径通过验收再退役。历史解码器在受支持的恢复窗口内继续 -服务未结原记录。实际 Kiro 会话采用,以及和原 quota 的模型成果与完整成本对照仍需验证。 - -### 生成的外部 CLI 启动器使用完整工作契约 - -手动 shell 和自定义外部驱动现在从 onboarding 与 bootstrap 获得既有的 -`generic_cli` 配置。Agent 和 Turn 均已绑定时,生成的 guard 走共享完整来源。 -上一版本的启动命令返回后续操作文字,缺少绑定的结算计划。新的 guard 携带原 Todo -与 Turn 做持久写回和一次心跳扣额。显式关闭交付时以内联方式返回完整来源。 - -相对 `e3d470c1903f` 的十六组本地对照实跑生成的 onboarding 和 heartbeat 命令、 -捕获与读回、相同夹具产物的验证、写回、扣额及重试。基线夹具在结算时显式提供 -原 Turn。两类启动器均在 File 和 SQLite 上恢复旧版无版本捕获,错误 Agent 被拒绝, -原 Turn 只扣额一次。 - -从执行生成的 heartbeat 命令起计,计入完整引用读回和结算后,默认交付每轮的 CLI 输出 -从 58.3 KB 增至 71.2–71.3 KB,显式关闭从 50.3 KB 增至 61.2–61.3 KB。Full 安装通过 -`agent-onboard` 生成命令,独立 Core 可运行生成的 heartbeat 及其 quota、捕获和结算命令。 -已复制的启动器可经原 onboarding 入口重新生成,为新工作采用完整来源。手写 raw CLI 和 -显式有界 v0 保留兼容入口。模型实际采用和完整成本仍需原 quota 单会话对照。 - -### 绑定的直接 quota CLI 使用完整来源 - -携带显式 Agent 和 Turn 的 JSON `quota should-run` 现在共用完整来源,包括未声明 -调度配置和逐项写出 `generic_cli` 宿主字段的直接调用。普通 CLI 复用已声明 -generic CLI 的结算计划生成器。发出的写回、心跳扣额命令绑定回执中的原 Todo 和 -Turn,并分别执行。缺少调度声明仍不授予调度权限。显式 Off 内联完整来源。无 Turn -的普通读取与显式有界 v0 显示沿用兼容入口。 - -八组 File/SQLite 同条件对照比较直接命令与主干 `f3bdad238739`,并另以前一 C1 -候选 `6cbc9a4aa56a` 对照。旧响应缺少绑定的结算计划,基线夹具在结算时显式提供 -原 Turn。两臂验收相同合成成果,各扣额一次。候选读回原捕获,拒绝错 Agent,期间 -没有重新准入。guard、完整引用读回、写回、扣额和重试的调用次数相同。相对主干, -默认交付的 CLI 标准输出从 52.0 KB 增至 64.3 KB,显式关闭从 44.0–44.1 KB 增至 -55.8 KB。该输出比较不计额外的恢复探测。长路径显式 v0 预算和已有完整诊断格式 -均通过原检查。模型成果、选读成本与实装宿主采用仍需验证。 - -### 保留 EdgeBench 显式短视图对照 - -同一 heartbeat 适配器配置在主干 `f3bdad238739` 接受 `--turn-envelope`, -在 C1 `efa342224084` 的首次唤醒之前拒绝。EdgeBench 现将显式选择传到 -SForge、Harbor、唤醒回执和 checkpoint 预检。绑定的 `generic_cli` -心跳在选题重入时保留此参数。显式 Off 使用既有 v0 投影并链接原始完整 v1 -捕获。启用交付时原生 reader 呈现同一来源。完整默认入口沿用原结算路径。 - -File 和 SQLite 用例覆盖两种交付设置下的实际渲染、选题、私有交接和 -checkpoint 预检。验证原认领和签名捕获,从实际返回的引用恢复原件, -按原身份结算一次,并在启动前拒绝冲突的视图选择。隔离标准 wheel -通过 24 个 worker 用例。外部 worker 取消用例改用真实调度观察, -实际启动并回收独立夹具进程,读回取消回执,额度扣减为零。 - -历史对照沿用原 runner 与 LoopX 的固定版本。具名调用方替代和回退 -均验收后,再退役这个显式兼容视图。合成验证之外,实装宿主采用、 -匹配单会话的模型成果及完整成本仍待验收。 - -### 直接 quota 内联交付复用诊断字段 - -上下文交付关闭且完整决策以内联方式返回时,普通的已绑定 generic CLI JSON 复用 -既有的紧凑投影行和 Todo 摘要引用。校验按原服务时刻重建来源行,并按原顺序 -还原 Todo 列表。完整捕获保存任务、边界和原结算计划。 - -与 `f8d0eb588c7e` 同条件运行 File 和 SQLite 夹具时,普通 Turn 在显式 Off -下的标准输出从 55.7–55.8 KB 降至 54.3–54.4 KB,含 guard、写回、扣额和 -扣额重试。两版本均恢复原捕获、拒绝错误 Agent 并只扣额一次。篡改紧凑捕获后 -即使重算文件摘要,也未通过完整来源的完整性校验。尚未选题的初次 replan 输出由 -47.4 KB 降至 45.5 KB,同一 Turn 均无扣额。小型和多 Agent 决策以同一来源 -比较,解码签名捕获后重建的诊断事实全部相同。 - -默认交付含完整引用读回的标准输出仍为 64.0–64.1 KB,同一普通工作夹具在主干 -`f3bdad238739` 为 51.7–51.8 KB。默认采用仍需验证真实选读及匹配模型的成果和成本。 - -### 在初次读取交付当前 Goal 修订 - -共享的初次读取先交付由权威存储提供的当前 Goal 目标、修订号和摘要,再交付 -原 Goal 正文。现有 Goal 验收模块提供修订并判断采用状态。同一捕获可读回支持 -历史和其他 Agent 的采用状态。 - -绑定的通用 CLI 和 Codex App CLI 在 File 与 SQLite 上运行普通 guard 及其实际 -发出的读取命令。四组用例在 `7a37d7d02e79` 的首读均缺当前目标,须从同一捕获 -另行选择这三个字段。候选在同一夹具中使初次读取增加 552 字节,读完相同事实则 -各少一次调用、少 629 字节。现行目标先于原正文到达,读回保持原回执,额度操作为零。 - -在没有 Goal 修订的另一组直接 CLI 对照中,较主干的全文读回差额约有 10.6 KB -来自新增结算计划。这些比较涵盖 CLI 输出和读取调用,匹配模型的成果和完整成本 -仍待验收。 - -### Windows 通过私有引用恢复有输出上限的上下文读取 - -选区游标失效且输出上限容不下完整恢复命令时,Windows 路径复用现有的私有捕获 -目录分配方式。发出引用前校验源文件及所在目录。引用绑定原捕获摘要、读取器入口 -与选区,读取器据此从零偏移重新读取。 - -CLI 夹具用 macOS 私有文件执行 Windows 分支,上限为 700 字节。 -`dead3c8ce709` 对私有捕获的拒绝响应缺少恢复命令。更新后,CLI 返回恢复命令, -执行命令可逐页读回完整的原选区。源文件或目录权限放宽时,CLI 不生成引用。 -改动原捕获字节后,已发出的命令拒绝读取。Windows 原生 DACL 与 PowerShell -执行仍需在 Windows 宿主上验证。 - -### Windows 带输出上限的 quota 守卫在准入前预留私有恢复入口 - -JSON quota 守卫收到输出上限后,在准入前为恢复读取器预留空间。预留与保存选区 -的重新读取共用私有目录分配。Windows 分支使用实际临时目录,并对新目录应用既有 -的仅所有者访问策略。 - -File 和 SQLite 夹具在 macOS 上执行 Windows 分支。两者在 `e9339babfc71` 均因 -1,700 字节上限在准入前被拒绝。修复后各准入一次。模拟宿主交付失败后,实际执行 -返回的命令可在上限内读回原捕获和回执。上限为 96 字节时,两者均在写入捕获和 -回执前拒绝。各组均无扣额。Windows 原生执行仍待验证。 - -### Benchmark 检查点预检后沿用保存的动作 - -非原生检查点的提示要求 worker 遵循保存视图中的动作、必读材料和结算指引。 -在 `e9339babfc71`,File 和 SQLite 共四个显式旧视图的用例缺少动作指引。 -同一组用例核对返回的读取命令、保存的来源和一次 guard 后交付的提示。 - -在 `f220690bef2f`,默认完整视图的提示缺少遵循交互契约的指引,显式 Off -短视图缺少有输出上限的原选题命令读取入口。现在完整视图提示涵盖适用的 -replan 审查和写回必读项,v0 提示提供校验摘要的原捕获字段读取器。 - -File 和 SQLite 的原捕获全文为 31,497–31,509 字节。按字段读取选题命令 -返回 2,049–2,055 字节。计入预检提示、短视图各页和原捕获读回输出,读全文时为 -47,449–47,479 字节,按字段读取时为 18,756–18,782 字节。CLI 用例执行 -读取到的命令在原 Turn 内选题,拒绝错误摘要,扣额为零。模型成果和端到端成本 -仍待验收。 - -### 带上限的 quota 恢复使用调用方显式指定的 PowerShell 启动器 - -共享命令解析器接受显式路径上实际存在的 PowerShell 脚本。PowerShell 可以调用 -没有 POSIX 执行位的脚本。quota 守卫在准入前使用调用方指定的启动器预留恢复读取入口。 - -File 和 SQLite 夹具在 1,700 字节预算下均准入,返回的恢复命令可在 macOS 的 -PowerShell 7 中原样执行。启动器路径含空格、直撇号和弯撇号。两种存储均在上限内 -读回原回执,保留一次 guard 和零扣额。预算为 96 字节时,两者均在准入前拒绝。 -Windows 文件访问控制和原生 Windows Python 入口仍需在 Windows 宿主验证。 - -### 搬迁检查点后读回已提交的扣额回执 - -精确结算读回可以使用搬迁到另一 runs 目录的扣额工件。记账读取器将本地已提交 -事务回执与原索引行匹配,核对记录的工件名,再用回执校验本地扣额工件。 -扣额与撤销仍按既有规则校验活动目录。 - -在 `a1f34097805a`,File 和 SQLite 共四个用例因副本索引仍指向旧目录而失败。 -修复后,移走来源 runs 目录仍可读回同一结算身份和扣额。缺少工件或已提交回执、 -记录被改写、工件是指向原扣额的符号链接时,读取器拒绝。检查点及回执副本保留原字节。 +| 原 quota 对照 C1(`5f1a9d78ba` / `b8c2bf1dc`;`f04ec308f6` / `4ef428767c`;`6a92640346`;`0423908e9c`) | 温态 RPC `-12.65%`–`-12.88%`(`332→290` / `326→284`);消除重复捕获投影(`30/30` 次,Python 温态 IO `-9.5%`);`refresh-state` 结算/重放全部 3 份回执。 | 温态常规步 stdout **增长 +6.66% 至 +8.73%**(不含准备约 `+7 KB`);冷态/恢复 BODY 降幅 `0%`;早期队列温态线字节 `+1.17%`(清除冗余结果体后才降 `-0.93%`);去重前观测 Python IO `+3.2%–4%`。 | +| 主干字段复用后三步任务(`d602248c53` / `b90e711cdb`;`918844a017` / `6f00db17c6`;`39770a9604` / `339f01e087`) | 三步总 stdout `-18.39%`(SQLite `225,841→184,316 B`),修正任务 BODY `-28.50%`(`149,223→106,688 B`),回环 Codex 大字段温态 BODY `14,386→2,583 B`。 | 温态三步 BODY 仅降 `-2.09%`(`102,836→100,691 B`);`39770a9604` 后帧字节反增 **+0.83%** / **+2.14%–2.93%**;File 耗时 `+7.5%`;小规模 2 成果夹具每组多 `1,655 B`。 | +| Hard-lease 三步(`92294e7245cb` / `b3b3b232724d`)与直接绑定 CLI / Kiro / DSH(`f3bdad2387` / `0057a1dbd1`) | Hard-lease 温态全 stdout `-19.5%`/`-19.9%`、RPC `-31.44%`(`843→578`)、帧字节 `-34.1%`;首读 Goal 修订省 1 次调用/`629 B`;搬迁扣额读回通过。 | 直接绑定 CLI stdout 由 `51.7–52.0 KB` 增至 `64.0–64.3 KB`(显式 Off `44.0 → 54.3–55.8 KB`,约 `10.6 KB` 来自结算计划);Kiro 纯内联 Markdown `2.4 → 48.2 KB` / JSON `23.1 → 48.5 KB`。 | +| 边界组件开销与展示预算 | Codex prompt 合并调用(中位 `24.2→14.8 ms`,`-39%`);Vision 重试 `6→2` 次 CLI(`11,473→9,269 B`)。 | 边界校验增加局部耗时:Host 准备(`25.7→31.9 ms`)、schema/材料(`0.013→19.6 ms`)、结算恢复(`0.016→12.4 ms`)、独立路由(`0.005→13.3 ms`)、完成意图(`0.002→19.8–20.8 ms`)。预算保持失败:小 Markdown `24,531 > 10,000`、拥挤计划 `24,044`/`27,508 > 22,500`、完整别名 `24,252 > 13,000`、多 Agent `25,933 > 13,000`;薄提示 `5,519 > 5,400` 修复后为 `5,379`(主干 `5,363`)。 | + +## 验证状态与未关闭门禁 + +- **通过(已记录检查点队列):** 各检查点通过 `196`–`865` 项受影响 Python 用例与 + `45`–`6,161` 项 TypeScript 用例;`1,815`–`1,914` 个匹配文件隔离 wheel 无源码仓 + 污染;默认 17 根严格 mypy、变更路径 Ruff 与 control-plane typecheck 通过。 +- **保留的历史失败:** 历史宽范围 485 文件 mypy(`4,809`–`4,831` 条错误)、`9baa678db` + 六模块中断运行(`37` 次启动失败)、长 namespace `2,015` 字符 hook 失败及上述五项未 + 放宽预算失败均保留原记录。 +- **未验证/开放门禁:** MemT 端到端完整输入阻塞于缺失 `goal_ref` 生命周期(不得用 + `source_session_v1` 作旁路);Windows 宿主原生 DACL 与 PowerShell 执行;正式 App/ + DSH/Kiro/MCP/Ark/PostgreSQL 实装验收;真实模型 token、账单及 §9 匹配单会话 + 成果/完整成本比较;普通 CLI 默认采用审批;精确提交审查、维护性棘轮与合入许可。 diff --git a/loopx/cli_commands/quota_capture.py b/loopx/cli_commands/quota_capture.py index 1aef9a89fe..3392611435 100644 --- a/loopx/cli_commands/quota_capture.py +++ b/loopx/cli_commands/quota_capture.py @@ -10,7 +10,7 @@ import subprocess import sys import tempfile -from collections.abc import Callable +from collections.abc import Callable, Iterable from pathlib import Path from shutil import rmtree from typing import Any @@ -36,6 +36,7 @@ from .quota_context_reader import ( budgeted_ready_opening, _bounded_context_read_failure, + _clamp_budget, _compact_context_restart, _capture_selection_transport_template, bind_capture_selection_transport as bind_capture_selection_transport, @@ -55,6 +56,27 @@ _NATIVE_WIRE_FILENAME = "delivery.json" +def _clamp_capture_budget( + max_page_output_bytes: int | None, *, require_positive: bool = False, +) -> tuple[int, int]: + if require_positive and max_page_output_bytes is not None and max_page_output_bytes <= 0: + raise QuotaDecisionTransportError("Native context output limit must be positive.") + return _clamp_budget(native_context_page_budget(), max_page_output_bytes) + + +def _json_pointer(key: str) -> str: + return "/" + key.replace("~", "~0").replace("/", "~1") + + +def _root_selection_specs(keys: Iterable[str]) -> list[dict[str, Any]]: + return [{"path": [key], "pointer": _json_pointer(key)} for key in keys] + + +def _stateless_opening_plan(document: dict[str, Any], reference: dict[str, Any]) -> dict[str, Any] | None: + plan = _stateless_initial_read_plan(document, reference) + return plan if plan.get("ordinary_opening_rows") else None + + def quota_context_surface(payload: dict[str, Any], args: argparse.Namespace) -> str: """Select the presentation owner from the captured decision, independent of continuity.""" from ..control_plane.quota.turn_envelope import COMPLETE_TURN_DECISION_VERSION, TURN_ENVELOPE_SCHEMA_VERSION @@ -104,12 +126,7 @@ def native_context_capture_view(projected: dict[str, Any], directory: Path, *, """ from ..control_plane.turn_driver.decision_capture import write_decision_capture - if max_page_output_bytes is not None and max_page_output_bytes <= 0: - raise QuotaDecisionTransportError("Native context output limit must be positive.") - page_bytes, output_bytes = native_context_page_budget() - if max_page_output_bytes is not None: - output_bytes = min(output_bytes, max_page_output_bytes) - page_bytes = min(page_bytes, output_bytes) + page_bytes, output_bytes = _clamp_capture_budget(max_page_output_bytes, require_positive=True) # The generated opening crosses a tool boundary even when returned as a # command. Keep its inferred budget out of bulk and selection recovery. first_output_bytes = (output_bytes if max_page_output_bytes is not None @@ -253,9 +270,10 @@ def view(kind: str, ref: dict[str, Any], body: bytes) -> dict[str, Any]: observed = register_native_context_view(context_directory, {**result, "ancestry": ancestry}, hook_session=hook_session) opening_observation = None - used_observed = (progressive_enabled and observed and "first_read_command" in result + used_observed = (progressive_enabled and observed is not None and "first_read_command" in result and observed["pointer_bytes"] <= first_output_bytes // 4) if used_observed: + assert observed is not None first = Path(observed["path"]) result["first_read_reference"] = str(first) result["first_read_command"] = context_capture_read_command(Path(current["path"]), current["sha256"], @@ -269,12 +287,14 @@ def view(kind: str, ref: dict[str, Any], body: bytes) -> dict[str, Any]: result = budgeted_ready_opening(result, initial_read_plan, current_document, initial_read_content, page_bytes=first_page_bytes, output_bytes=first_output_bytes, reader_argv=reader_argv, context_directory=context_directory, observation=opening_observation) - if (progressive_enabled and (source_replan_review or replan_review) and "first_read_command" in result + active_replan_review = source_replan_review or replan_review + if (progressive_enabled and active_replan_review and "first_read_command" in result and (not page_attached or source_replan_review is not None)): try: path, digest = Path(current["path"]), current["sha256"] reader = source_replan_review if reader is None: + assert isinstance(replan_review, dict) selections = [] for item in replan_review["selections"]: if type(item) is int: @@ -347,11 +367,7 @@ def progressive_context_capture_view(payload: dict[str, Any], args: argparse.Nam selection_command_args_template=transport, captured_decision_path=captured_decision_path, captured_recovery=captured_recovery, replan_review_source=replan_review_source, replan_reader_argv=reader_argv if stage_from_projection else None) - read_plan = None - if page_attached and args.initial_read: - plan = _stateless_initial_read_plan(required, reference) - if plan.get("ordinary_opening_rows"): - read_plan = plan + read_plan = _stateless_opening_plan(required, reference) if page_attached and args.initial_read else None view = native_context_capture_view(required, directory, captured_recovery=reference, source_replan_review=review, initial_read_plan=read_plan, metadata={"context_delivery": native_context_activation(args), @@ -362,8 +378,11 @@ def progressive_context_capture_view(payload: dict[str, Any], args: argparse.Nam reader_argv=reader_argv) readable = model_context_reference(view, reader_argv=reader_argv) if page_attached: + from ..command_invocation import current_loopx_cli_argv + return _saved_context_read_page(args, readable, initial_reference=view.get("first_read_reference"), - initial_read_plan=read_plan, output_limit=attached_output_limit, reader_argv=reader_argv, + initial_read_plan=read_plan, output_limit=attached_output_limit, + reader_argv=reader_argv or current_loopx_cli_argv(), prioritize_opening=read_plan is not None) # Small results need no extra navigation. The complete original and required # captures remain available; never shrink by dropping current obligations. @@ -374,13 +393,11 @@ def _saved_context_transport_failure( error: Exception, *, args: argparse.Namespace, receipt: dict[str, Any], recovery: dict[str, Any], reader_argv: list[str], source_unverified: bool = False, ) -> dict[str, Any]: - page_bytes, output_bytes = native_context_page_budget() limit = getattr(args, "max_page_output_bytes", None) - if isinstance(limit, int) and limit > 0: - output_bytes = min(output_bytes, limit) - page_bytes = min(page_bytes, output_bytes) + page_bytes, output_bytes = _clamp_capture_budget(limit if isinstance(limit, int) and limit > 0 else None) path, digest = Path(recovery["path"]), recovery["sha256"] - runtime_unavailable = source_unverified and isinstance(error, EffectRuntimeStartupError) + startup_error = error if source_unverified and isinstance(error, EffectRuntimeStartupError) else None + runtime_unavailable = startup_error is not None if source_unverified: instruction = ( "The saved source could not be verified. Use recovery.command for diagnostic receipt readback. " @@ -418,8 +435,8 @@ def _saved_context_transport_failure( "reason": " ".join(str(error).split())[:500], "heartbeat_receipt": receipt, "capture_sha256": args.capture_sha256, "recovery": readback, "instruction": instruction} - if runtime_unavailable: - failure["diagnostic_code"] = error.diagnostic_code + if startup_error is not None: + failure["diagnostic_code"] = startup_error.diagnostic_code attached = bool(getattr(args, "initial_read", False) or getattr(args, "select", None)) if attached and args.format == "json" and type(limit) is int and limit > 0 and _json_output_size(failure) > limit: if runtime_unavailable: @@ -553,12 +570,7 @@ def project_saved_context_capture( if not activation["enabled"]: raise ValueError("context delivery is off") - page_bytes, output_bytes = native_context_page_budget() - if caller_output_limit is not None: - if caller_output_limit <= 0: - raise QuotaDecisionTransportError("Native context output limit must be positive.") - output_bytes = min(output_bytes, caller_output_limit) - page_bytes = min(page_bytes, output_bytes) + page_bytes, output_bytes = _clamp_capture_budget(caller_output_limit, require_positive=True) full_reference = _capture_read_reference(full_reference, page_bytes=page_bytes, output_bytes=output_bytes, reader_argv=reader_argv) @@ -633,8 +645,7 @@ def project_saved_context_capture( "path": str(cache / _NATIVE_WIRE_FILENAME), "sha256": hashlib.sha256(_native_output_bytes(projected)).hexdigest(), } - plan = _stateless_initial_read_plan(projected, wire) - if plan.get("ordinary_opening_rows"): + if plan := _stateless_opening_plan(projected, wire): initial_read_plan = plan cold_opening = True native_view = native_context_capture_view(projected, cache, @@ -804,7 +815,7 @@ def capture_decision(directory: Path | None, payload: dict[str, object], *, args: argparse.Namespace | None = None, native_context: bool = False, record_capture: Callable[[dict[str, object], str], None] | None = None) -> str | None: if directory is None: - return + return None from ..control_plane.turn_driver.decision_capture import write_decision_capture try: @@ -899,8 +910,7 @@ def fits(value: dict[str, object]) -> bool: if fits(view) and "result_details" not in payload and "instruction" not in payload: return view # Large or unknown controls are mandatory selected reads, never cut text. - pointers = ["/" + key.replace("~", "~0").replace("/", "~1") - for key in payload if key not in deferred] + pointers = [_json_pointer(key) for key in payload if key not in deferred] snapshot_note = "" if supporting_fields is not None: snapshot_note = " Supporting snapshots remain available in the same immutable result." @@ -985,6 +995,184 @@ def handoff_decision(directory: Path | None, socket_path: str | None, return {}, capture_sha256 +def _handle_context_config( + args: argparse.Namespace, + activation: dict[str, Any], + *, + print_payload: Callable[..., None], + registry_path: Path | None, + runtime_root_arg: str | None, +) -> int: + from ..command_invocation import loopx_cli_argv + from ..control_plane.turn_driver.codex_context import codex_context_configuration + + try: + if not activation["enabled"]: + payload: dict[str, Any] = {"ok": True, "context_delivery": activation} + print_payload(payload, args.format, lambda value: json.dumps(value, ensure_ascii=False, indent=2)) + return 0 + directory = getattr(args, "codex_context_root", None) or args.codex_context_dir + if not directory: + raise ValueError("context-config requires codex-context-root or codex-context-dir") + machine_runtime = getattr(args, "_context_delivery_machine_runtime", None) + cli_argv = loopx_cli_argv() + if registry_path is not None: + cli_argv += ["--registry", str(registry_path.expanduser().resolve())] + hook_runtime = machine_runtime or runtime_root_arg + if hook_runtime: + cli_argv += ["--runtime-root", str(Path(hook_runtime).expanduser().resolve())] + config = codex_context_configuration(directory, goal_id=args.goal_id, agent_id=args.agent_id, + cli_argv=cli_argv, scenario=activation["scenario"], session_root=bool(getattr(args, "codex_context_root", None)), + inherit_machine=bool(machine_runtime), progressive_enabled=activation["progressive_enabled"]) + explicit_options = "--context-delivery on" if activation["progressive_enabled"] else "--context-delivery off --delta-delivery auto" + payload = {"ok": True, "context_delivery": activation, "native_config": config, + "activation": "Apply config_overrides, merge hooks and append developer_instructions to the existing native configuration; " + "review and trust only these exact hooks in Codex. " + "Existing loaded threads may retain their original hook configuration; enabled/trusted " + "discovery is not session initialization or live adoption. Start/resume through the host " + "with the resulting configuration after active work reaches its normal safe boundary. " + + ("Machine defaults are re-read on each invocation; generated hooks inherit the same machine runtime. " + "Omit per-command activation and location flags to retain that inheritance. " if machine_runtime else + f"Pass {explicit_options} with the same declared host mode, context location and a decision-output-root to heartbeat-prompt/should-run. ") + + + "Verified saved files support progressive reads and exact deltas without a full model read; compaction starts a new full baseline on the next work Turn. " + "The generated output profile uses 64000-byte continuations and a 20000-token native history limit; " + "the same page profile applies without the shell override. Explicit smaller reader budgets remain available for truncated-range recovery. " + "Set --context-delivery off and remove the generated context configuration, including its output overrides, to restore ordinary output. " + "This command installs nothing and grants no execution authority."} + except (OSError, ValueError, TypeError) as exc: + payload = {"ok": False, "reason": str(exc)} + print_payload(payload, args.format, lambda value: json.dumps(value, ensure_ascii=False, indent=2)) + return 0 if payload["ok"] else 1 + + +def _handle_context_hook( + args: argparse.Namespace, + activation: dict[str, Any], + *, + registry_path: Path | None = None, + runtime_root_arg: str | None = None, +) -> int: + from ..control_plane.effect_runtime import MAX_REQUEST_BYTES + from ..control_plane.turn_driver.codex_context import ( + CONTEXT_LIFECYCLE_HOOKS, codex_context_directory, codex_context_hook, + native_context_event_eligible, native_execution_preparation_request, + record_native_execution_preparation, + ) + from ..control_plane.turn_driver.codex_execution_preparation import ( + LegacyNativePreparationCapture, + codex_execution_preparation_context, + codex_execution_preparation_readback_context, + execute_codex_execution_preparation, + ) + + # Context transport remains read-only. An exact typed Host preparation + # request may additionally execute its ordinary claim and fresh guard. + try: + if not activation["enabled"]: + print("{}") + return 0 + raw = sys.stdin.buffer.read(MAX_REQUEST_BYTES + 1) + event = json.loads(raw) if len(raw) <= MAX_REQUEST_BYTES else None + if (isinstance(event, dict) and native_context_event_eligible(event) + and isinstance(event.get("session_id"), str) and event["session_id"] + and event.get("hook_event_name") in CONTEXT_LIFECYCLE_HOOKS): + directory = codex_context_directory(directory=args.codex_context_dir, + root=getattr(args, "codex_context_root", None), session=event.get("session_id"), create=True) + payload = codex_context_hook(directory, event) + request = None + additional = None + try: + workspace = Path(event.get("cwd") or "") + if workspace.is_absolute() and workspace.resolve() == Path.cwd().resolve(): + request = native_execution_preparation_request(directory, event) + if request is not None: + if "claim_source_sha256" not in request or not request.get("turn_instance_id"): + raise LegacyNativePreparationCapture() + if request.get("readback_only") is True: + additional = codex_execution_preparation_readback_context(request) + else: + # A resumed old pre-claim capture can still lead + # to a newly composed native ready decision. Pin the + # expected format of that new capture separately. + if activation["scenario"] in {"codex_app_heartbeat", "codex_app_ssh_goal"}: + request["complete_turn"] = True + assert directory is not None + capture = Path(tempfile.mkdtemp(prefix="prepared-", dir=directory)) / "ready" + receipt = execute_codex_execution_preparation( + request, + cwd=workspace.resolve(), + scenario=activation["scenario"], + capture_directory=capture, + context_directory=Path(directory), + ) + record_native_execution_preparation( + directory, + event, + source_sha256=request["source_sha256"], + receipt=receipt, + complete_turn=request.get("complete_turn") is True, + ) + # Publish the decision that the Host just verified; + # a model must not need a second guard to obtain its + # Goal, task, requirements and settlement contract. + source = capture / "decision.json" + # The saved-capture reader never rereads authority or admits work. + digest = receipt.pop("capture_sha256") + receipt.pop("capture_path") + receipt["context"] = project_saved_context_capture(argparse.Namespace(**{ + **vars(args), "quota_command": "context-project", + "capture_file": str(source), + "capture_sha256": digest, + "goal_id": request["goal_id"], "agent_id": request["agent_id"], + "turn_instance_id": request["turn_instance_id"], + }), hook_session=event["session_id"], + require_complete_source=request.get("complete_turn") is True) + context = receipt["context"] + if context.get("ok") is False: + recovery = context.get("recovery") + if isinstance(recovery, dict) and isinstance(recovery.get("command"), str): + context["recovery_command"] = recovery["command"] + else: + from ..command_invocation import current_loopx_cli_argv + + context["recovery_command"] = context_capture_read_command( + source, digest, reader_argv=current_loopx_cli_argv()) + additional = codex_execution_preparation_context(receipt) + except LegacyNativePreparationCapture as error: + additional = str(error) + except (OSError, RuntimeError, subprocess.SubprocessError, ValueError, TypeError, RecursionError): + # Reconcile only the attempted source. A concurrent guard + # can replace recovery, so it must never be reserved here. + if request is not None and request.get("turn_instance_id"): + readback = native_execution_preparation_request(directory, event, + readback_for=request["source_sha256"]) + if readback is not None: + additional = codex_execution_preparation_readback_context(readback) + if additional is not None: + existing = payload.get("hookSpecificOutput") + existing_context = str(existing.get("additionalContext") or "") if isinstance(existing, dict) else "" + payload["hookSpecificOutput"] = { + "hookEventName": event["hook_event_name"], + "additionalContext": " ".join(filter(None, [existing_context, additional])), + } + if (event["hook_event_name"] in ("PreCompact", "PostCompact") + or event["hook_event_name"] == "SessionStart" and event.get("source") == "compact"): + from ..capabilities.machine_configuration.compaction_memory import compaction_memory_enabled + from ..paths import effective_runtime_root + + if compaction_memory_enabled(effective_runtime_root(registry_path, runtime_root_arg)): + from ..control_plane.turn_driver.compaction_memory import compaction_memory_hook + + payload = compaction_memory_hook(directory, event, payload, profile=activation["scenario"]) + else: + payload = {} + except (OSError, RuntimeError, subprocess.SubprocessError, ValueError, TypeError, RecursionError): + payload = {} + print(json.dumps(payload, ensure_ascii=False, separators=(",", ":"))) + return 0 + + def handle_native_context_command(args: argparse.Namespace, *, print_payload: Callable[..., None], registry_path: Path | None = None, runtime_root_arg: str | None = None) -> int | None: """Dispatch captured reads and native lifecycle IO before quota authority access.""" @@ -1094,167 +1282,10 @@ def reject_reader_option(reason: str) -> int: payload = {"ok": False, "reason": str(exc)} print_payload(payload, args.format, lambda value: json.dumps(value, ensure_ascii=False, indent=2)) return 1 - if args.quota_command == "context-config": - from ..command_invocation import loopx_cli_argv - from ..control_plane.turn_driver.codex_context import codex_context_configuration - - try: - if not activation["enabled"]: - payload = {"ok": True, "context_delivery": activation} - print_payload(payload, args.format, lambda value: json.dumps(value, ensure_ascii=False, indent=2)) - return 0 - directory = getattr(args, "codex_context_root", None) or args.codex_context_dir - if not directory: - raise ValueError("context-config requires codex-context-root or codex-context-dir") - machine_runtime = getattr(args, "_context_delivery_machine_runtime", None) - cli_argv = loopx_cli_argv() - if registry_path is not None: - cli_argv += ["--registry", str(registry_path.expanduser().resolve())] - hook_runtime = machine_runtime or runtime_root_arg - if hook_runtime: - cli_argv += ["--runtime-root", str(Path(hook_runtime).expanduser().resolve())] - config = codex_context_configuration(directory, goal_id=args.goal_id, agent_id=args.agent_id, - cli_argv=cli_argv, scenario=activation["scenario"], session_root=bool(getattr(args, "codex_context_root", None)), - inherit_machine=bool(machine_runtime), progressive_enabled=activation["progressive_enabled"]) - explicit_options = "--context-delivery on" if activation["progressive_enabled"] else "--context-delivery off --delta-delivery auto" - payload = {"ok": True, "context_delivery": activation, "native_config": config, - "activation": "Apply config_overrides, merge hooks and append developer_instructions to the existing native configuration; " - "review and trust only these exact hooks in Codex. " - "Existing loaded threads may retain their original hook configuration; enabled/trusted " - "discovery is not session initialization or live adoption. Start/resume through the host " - "with the resulting configuration after active work reaches its normal safe boundary. " - + ("Machine defaults are re-read on each invocation; generated hooks inherit the same machine runtime. " - "Omit per-command activation and location flags to retain that inheritance. " if machine_runtime else - f"Pass {explicit_options} with the same declared host mode, context location and a decision-output-root to heartbeat-prompt/should-run. ") - + - "Verified saved files support progressive reads and exact deltas without a full model read; compaction starts a new full baseline on the next work Turn. " - "The generated output profile uses 64000-byte continuations and a 20000-token native history limit; " - "the same page profile applies without the shell override. Explicit smaller reader budgets remain available for truncated-range recovery. " - "Set --context-delivery off and remove the generated context configuration, including its output overrides, to restore ordinary output. " - "This command installs nothing and grants no execution authority."} - except (OSError, ValueError, TypeError) as exc: - payload = {"ok": False, "reason": str(exc)} - print_payload(payload, args.format, lambda value: json.dumps(value, ensure_ascii=False, indent=2)) - return 0 if payload["ok"] else 1 - if args.quota_command == "context-hook": - import sys - from ..control_plane.effect_runtime import MAX_REQUEST_BYTES - from ..control_plane.turn_driver.codex_context import ( - CONTEXT_LIFECYCLE_HOOKS, codex_context_directory, codex_context_hook, - native_context_event_eligible, native_execution_preparation_request, - record_native_execution_preparation, - ) - from ..control_plane.turn_driver.codex_execution_preparation import ( - LegacyNativePreparationCapture, - codex_execution_preparation_context, - codex_execution_preparation_readback_context, - execute_codex_execution_preparation, - ) - - # Context transport remains read-only. An exact typed Host preparation - # request may additionally execute its ordinary claim and fresh guard. - try: - if not activation["enabled"]: - print("{}") - return 0 - raw = sys.stdin.buffer.read(MAX_REQUEST_BYTES + 1) - event = json.loads(raw) if len(raw) <= MAX_REQUEST_BYTES else None - if (isinstance(event, dict) and native_context_event_eligible(event) - and isinstance(event.get("session_id"), str) and event["session_id"] - and event.get("hook_event_name") in CONTEXT_LIFECYCLE_HOOKS): - directory = codex_context_directory(directory=args.codex_context_dir, - root=getattr(args, "codex_context_root", None), session=event.get("session_id"), create=True) - payload = codex_context_hook(directory, event) - request = None - additional = None - try: - workspace = Path(event.get("cwd") or "") - if workspace.is_absolute() and workspace.resolve() == Path.cwd().resolve(): - request = native_execution_preparation_request(directory, event) - if request is not None: - if "claim_source_sha256" not in request or not request.get("turn_instance_id"): - raise LegacyNativePreparationCapture() - if request.get("readback_only") is True: - additional = codex_execution_preparation_readback_context(request) - else: - # A resumed old pre-claim capture can still lead - # to a newly composed native ready decision. Pin the - # expected format of that new capture separately. - if activation["scenario"] in {"codex_app_heartbeat", "codex_app_ssh_goal"}: - request["complete_turn"] = True - capture = Path(tempfile.mkdtemp(prefix="prepared-", dir=directory)) / "ready" - receipt = execute_codex_execution_preparation( - request, - cwd=workspace.resolve(), - scenario=activation["scenario"], - capture_directory=capture, - context_directory=Path(directory), - ) - record_native_execution_preparation( - directory, - event, - source_sha256=request["source_sha256"], - receipt=receipt, - complete_turn=request.get("complete_turn") is True, - ) - # Publish the decision that the Host just verified; - # a model must not need a second guard to obtain its - # Goal, task, requirements and settlement contract. - source = capture / "decision.json" - # The saved-capture reader never rereads authority or admits work. - digest = receipt.pop("capture_sha256") - receipt.pop("capture_path") - receipt["context"] = project_saved_context_capture(argparse.Namespace(**{ - **vars(args), "quota_command": "context-project", - "capture_file": str(source), - "capture_sha256": digest, - "goal_id": request["goal_id"], "agent_id": request["agent_id"], - "turn_instance_id": request["turn_instance_id"], - }), hook_session=event["session_id"], - require_complete_source=request.get("complete_turn") is True) - context = receipt["context"] - if context.get("ok") is False: - recovery = context.get("recovery") - if isinstance(recovery, dict) and isinstance(recovery.get("command"), str): - context["recovery_command"] = recovery["command"] - else: - from ..command_invocation import current_loopx_cli_argv - - context["recovery_command"] = context_capture_read_command( - source, digest, reader_argv=current_loopx_cli_argv()) - additional = codex_execution_preparation_context(receipt) - except LegacyNativePreparationCapture as error: - additional = str(error) - except (OSError, RuntimeError, subprocess.SubprocessError, ValueError, TypeError, RecursionError): - # Reconcile only the attempted source. A concurrent guard - # can replace recovery, so it must never be reserved here. - if request is not None and request.get("turn_instance_id"): - readback = native_execution_preparation_request(directory, event, - readback_for=request["source_sha256"]) - if readback is not None: - additional = codex_execution_preparation_readback_context(readback) - if additional is not None: - existing = payload.get("hookSpecificOutput") - existing_context = str(existing.get("additionalContext") or "") if isinstance(existing, dict) else "" - payload["hookSpecificOutput"] = { - "hookEventName": event["hook_event_name"], - "additionalContext": " ".join(filter(None, [existing_context, additional])), - } - if (event["hook_event_name"] in ("PreCompact", "PostCompact") - or event["hook_event_name"] == "SessionStart" and event.get("source") == "compact"): - from ..capabilities.machine_configuration.compaction_memory import compaction_memory_enabled - from ..paths import effective_runtime_root - - if compaction_memory_enabled(effective_runtime_root(registry_path, runtime_root_arg)): - from ..control_plane.turn_driver.compaction_memory import compaction_memory_hook - - payload = compaction_memory_hook(directory, event, payload, profile=activation["scenario"]) - else: - payload = {} - except (OSError, RuntimeError, subprocess.SubprocessError, ValueError, TypeError, RecursionError): - payload = {} - print(json.dumps(payload, ensure_ascii=False, separators=(",", ":"))) - return 0 + if args.quota_command == "context-config": + return _handle_context_config(args, activation, print_payload=print_payload, + registry_path=registry_path, runtime_root_arg=runtime_root_arg) + return _handle_context_hook(args, activation, registry_path=registry_path, runtime_root_arg=runtime_root_arg) if args.quota_command == "context-project": payload = project_saved_context_capture(args) if project_page and payload.get("ok") is not True: @@ -1327,7 +1358,7 @@ def _bounded_replan_writeback(args: argparse.Namespace, view: dict[str, Any]) -> raise ValueError("Could not save the verified writeback. Repair private capture storage and retry the original read.") path, digest = Path(reference["path"]), reference["sha256"] try: - selections = [{"path": [key], "pointer": "/" + key.replace("~", "~0").replace("/", "~1")} for key in view] + selections = _root_selection_specs(view) reader, selected = write_initial_context_read_reference(path, digest, view, selections) if len(selected) > MAX_REQUEST_BYTES: raise ValueError("The verified writeback exceeds the context reader size limit.") diff --git a/loopx/cli_commands/quota_context_reader.py b/loopx/cli_commands/quota_context_reader.py index 24d4fa8326..86fa56dc55 100644 --- a/loopx/cli_commands/quota_context_reader.py +++ b/loopx/cli_commands/quota_context_reader.py @@ -2,12 +2,12 @@ from __future__ import annotations import argparse -from collections.abc import Callable +from collections.abc import Callable, Iterable, Mapping import json import os import shlex from pathlib import Path -from typing import Any +from typing import Any, TypeVar from ..command_invocation import current_loopx_cli_argv, same_context_reader_route, validate_context_reader_route from ..control_plane.content_digest import BARE_SHA256_PATTERN @@ -144,16 +144,16 @@ def _bind_capture_transport_options(template: str, args: argparse.Namespace, *, if handoff := getattr(args, "decision_handoff_socket", None): options["--decision-handoff-socket"] = handoff # Preserve a caller's explicit opt-out as well as opt-in. - if getattr(args, "context_delivery", None) is not None: - options["--context-delivery"] = args.context_delivery - if getattr(args, "delta_delivery", None) is not None: - options["--delta-delivery"] = args.delta_delivery - if getattr(args, "codex_context_dir", None): - options["--codex-context-dir"] = args.codex_context_dir - if getattr(args, "codex_context_root", None): - options["--codex-context-root"] = args.codex_context_root - if getattr(args, "max_page_output_bytes", None) is not None: - options["--max-page-output-bytes"] = str(args.max_page_output_bytes) + for attr, flag, truthy_only in ( + ("context_delivery", "--context-delivery", False), + ("delta_delivery", "--delta-delivery", False), + ("codex_context_dir", "--codex-context-dir", True), + ("codex_context_root", "--codex-context-root", True), + ("max_page_output_bytes", "--max-page-output-bytes", False), + ): + value = getattr(args, attr, None) + if value is not None and (not truthy_only or value): + options[flag] = str(value) replacements: dict[str, str | None] = dict(options) if options.keys() & {"--codex-context-dir", "--codex-context-root"}: for option in ("--codex-context-dir", "--codex-context-root"): @@ -234,7 +234,6 @@ def page(text: str) -> dict[str, Any]: return best - def _render_capture_page(path: Path, text: str, digest: str, *, offset: int, total: int, size: int, output_limit: int | None, instruction: bool, presentation: dict[str, Any] | None = None, @@ -405,12 +404,6 @@ def continuation_bytes(size: int, budget: int) -> int: return page_bytes, output_limit - - - - - - def _validate_context_page_window(offset: int, size: int, output_limit: int | None) -> None: from ..control_plane.effect_runtime import MAX_REQUEST_BYTES @@ -431,6 +424,26 @@ def _validate_pinned_selection(selection: dict[str, Any]) -> None: raise ValueError("reader selection reference is incomplete or unsupported") +_Payload = TypeVar("_Payload", bound=Mapping[str, object]) + + +def _clamp_budget( + base_budget: tuple[int, int], max_page_output_bytes: int | None, +) -> tuple[int, int]: + page_bytes, output_bytes = base_budget + if max_page_output_bytes is not None: + output_bytes = min(output_bytes, max_page_output_bytes) + page_bytes = min(page_bytes, output_bytes) + return page_bytes, output_bytes + + +def _first_fitting_payload(candidates: Iterable[_Payload], limit: int) -> _Payload | None: + for candidate in candidates: + if _json_output_size(candidate) <= limit: + return candidate + return None + + def _bounded_context_read_failure(payload: dict[str, Any], limit: int | None, *, restart: Callable[[], str | None] | None = None, restart_fits: bool = True) -> dict[str, Any]: @@ -444,17 +457,19 @@ def _bounded_context_read_failure(payload: dict[str, Any], limit: int | None, *, command = restart() if restart is not None else None if command is not None: located = {**diagnostic, "recovery_command": command} - for candidate in ({**located, "reason": payload["reason"], - "recovery": "Read the same capture from offset zero. Do not rerun admission."}, - {**located, "reason": payload["reason"]}, located): - if _json_output_size(candidate) <= limit: - return candidate + if matched := _first_fitting_payload( + ({**located, "reason": payload["reason"], + "recovery": "Read the same capture from offset zero. Do not rerun admission."}, + {**located, "reason": payload["reason"]}, located), + limit, + ): + return matched retry = "Retry this read with a larger output budget. Keep the original capture; do not rerun admission." - for candidate in ({**diagnostic, "reason": payload["reason"], "recovery": retry}, - {**diagnostic, "reason": payload["reason"]}, diagnostic, {"ok": False}): - if _json_output_size(candidate) <= limit: - return candidate - return {} + return _first_fitting_payload( + ({**diagnostic, "reason": payload["reason"], "recovery": retry}, + {**diagnostic, "reason": payload["reason"]}, diagnostic, {"ok": False}), + limit, + ) or {} def _compact_context_restart(path: Path, digest: str, *, limit: int, page_bytes: int, @@ -881,10 +896,9 @@ def fits() -> bool: result["field_index"] = field_index if not fits(): result.pop("field_index") # Optional metadata must never displace recovery or instructions. - if not fits(): - result.pop("overview") - if not fits(): - result.pop("select_command") # --select also works on the current recovery command. + for key in ("overview", "select_command"): + if key in result and not fits(): + result.pop(key) if not fits() and "baseline_reference" in result: result["baseline_reference"].pop("command", None) # Exact path/hash remain usable. if not fits(): @@ -896,12 +910,12 @@ def fits() -> bool: return result -def _native_output_bytes(value: dict[str, Any]) -> bytes: +def _native_output_bytes(value: Mapping[str, object]) -> bytes: """Serialize a compact transport document with the capture file's LF.""" return (json.dumps(value, ensure_ascii=False, separators=(",", ":"), allow_nan=False) + "\n").encode("utf-8") -def _json_output_size(value: dict[str, Any] | bytes) -> int: +def _json_output_size(value: Mapping[str, object] | bytes) -> int: """Count compact JSON with the host's line ending, reusing serialized capture bytes.""" if isinstance(value, bytes): return len(value) + len(os.linesep) - 1 diff --git a/loopx/cli_commands/quota_failure_report.py b/loopx/cli_commands/quota_failure_report.py index 1c96937035..ead5ed9a30 100644 --- a/loopx/cli_commands/quota_failure_report.py +++ b/loopx/cli_commands/quota_failure_report.py @@ -10,7 +10,6 @@ import argparse import hashlib -import json import os from collections.abc import Callable, Mapping from contextlib import nullcontext @@ -48,6 +47,16 @@ ) from ..file_lock import lock_timeout_error_fields +from .quota_context_reader import ( + _clamp_budget, + _first_fitting_payload, + _json_output_size, + compact_selection_fits_one_page, + inline_context_read_fits, + inline_context_recovery_budget, + pinned_context_read_window, +) + QUOTA_EVENT_KINDS = { "should-run": "quota_should_run", "monitor-poll": "quota_monitor_poll", @@ -83,6 +92,43 @@ def verbose_debug_fields(error: Exception, *, verbose: bool) -> dict[str, object } +_CARRIED_RECEIPT_KEYS = ("heartbeat_receipt", "rollout_event", "host_poll_receipt") + + +def _carried_receipts(source: Mapping[str, object]) -> dict[str, object]: + return {key: source[key] for key in _CARRIED_RECEIPT_KEYS if key in source} + + +def _non_event_quota_payload( + command: str, + *, + registry_path: Path, + runtime_root_arg: str | None, + error_code: str, + error_text: str, + health_blockers: int, + health_items: list[dict[str, object]], + extra: Mapping[str, object] | None = None, +) -> dict[str, object]: + return { + "ok": False, + "mode": command, + "registry": str(registry_path), + "runtime_root": runtime_root_arg, + "error_code": error_code, + "error": error_text, + "summary": { + "registered_goals": 0, + "health_blockers": health_blockers, + "next_automatic_turn": None, + "states": {}, + }, + "groups": {}, + "health_items": health_items, + **(extra or {}), + } + + def quota_failure_payload( args: argparse.Namespace, *, @@ -108,21 +154,14 @@ def quota_failure_payload( else {} ) if command not in QUOTA_EVENT_KINDS: - return { - "ok": False, - "mode": command, - "registry": str(registry_path), - "runtime_root": runtime_root_arg, - "error_code": quota_error_code(error), - "error": "quota collection failed", - "summary": { - "registered_goals": 0, - "health_blockers": 1, - "next_automatic_turn": None, - "states": {}, - }, - "groups": {}, - "health_items": [ + return _non_event_quota_payload( + command, + registry_path=registry_path, + runtime_root_arg=runtime_root_arg, + error_code=quota_error_code(error), + error_text="quota collection failed", + health_blockers=1, + health_items=[ { "goal_id": "loopx-quota", "status": "quota_collection_failed", @@ -132,10 +171,8 @@ def quota_failure_payload( "source": "quota", } ], - **verbose_debug, - **lock_timeout_fields, - **authority_failure, - } + extra={**verbose_debug, **lock_timeout_fields, **authority_failure}, + ) # A managed-runtime failure already carries a bounded, public-safe message # (which method could not be reached and how long it was given, or the typed @@ -280,11 +317,6 @@ def quota_failure_payload( return payload -def _fits_failure_output(payload: dict[str, object], limit: int) -> bool: - # Count the compact CLI JSON and its trailing newline. - return _failure_output_size(payload) <= limit - - def captured_quota_failure_view( payload: Mapping[str, object], *, capture_directory: Path, max_page_output_bytes: int | None = None, @@ -303,14 +335,8 @@ def captured_quota_failure_view( from ..control_plane.turn_driver.decision_capture import ( context_capture_read_command, native_context_page_budget, write_initial_context_read_reference, ) - from .quota_context_reader import ( - compact_selection_fits_one_page, inline_context_read_fits, - inline_context_recovery_budget, pinned_context_read_window, - ) - page_bytes, limit = native_context_page_budget() - if max_page_output_bytes is not None: - limit = min(limit, max_page_output_bytes) + page_bytes, limit = _clamp_budget(native_context_page_budget(), max_page_output_bytes) saved = capture_directory / "decision.json" original = saved.read_bytes() if capture_bytes is None else capture_bytes source = payload if captured_payload is None else captured_payload @@ -318,7 +344,7 @@ def captured_quota_failure_view( original_decision = source.get("ok") is True page_size = max(256, min(page_bytes, limit)) fields = ("ok", "goal_id", "decision", "should_run", "error_code", "diagnostic_code", "error", "reason", - "recommended_action", "heartbeat_receipt", "rollout_event", "host_poll_receipt", "action_selection_conflict") + "recommended_action", *_CARRIED_RECEIPT_KEYS, "action_selection_conflict") result = {key: payload[key] for key in fields if key in payload} interaction = payload.get("interaction_contract") cli = interaction.get("cli_channel") if isinstance(interaction, Mapping) else None @@ -339,22 +365,18 @@ def captured_quota_failure_view( "This response does not establish a context baseline or grant execution authority." ) - if not _fits_failure_output(result, limit) or not inline_context_read_fits( + if _json_output_size(result) > limit or not inline_context_read_fits( saved, original, digest, page_bytes=page_size, output_limit=limit, reader_argv=reader_argv, ): # Pin the small diagnostic selection so long launcher/capture paths and # repeated --select arguments do not crowd out the recovery command. - recovery_fields = ( - ("heartbeat_receipt", "rollout_event", "host_poll_receipt") - if original_decision else (*fields, "composition_error") - ) + recovery_fields = _CARRIED_RECEIPT_KEYS if original_decision else (*fields, "composition_error") paths = [[key] for key in recovery_fields if key in source] if not original_decision and isinstance(cli, Mapping) and "next_cli_actions" in cli: paths.append(["interaction_contract", "cli_channel", "next_cli_actions"]) if not paths: paths = [["ok"]] - pointers = ["/" + "/".join(path) for path in paths] - selections = [{"path": path, "pointer": pointer} for path, pointer in zip(paths, pointers, strict=True)] + selections = [{"path": path, "pointer": "/" + "/".join(path)} for path in paths] # The bounded guard already reserved room for a digest-pinned compact # cursor at this cap. Reuse it so nested capture and runtime paths do # not leave only a few bytes of receipt content per page. @@ -384,7 +406,7 @@ def captured_quota_failure_view( read_size, read_limit = pinned_context_read_window(reader, selected, page_bytes=page_size, output_limit=limit, reader_argv=reader_argv) if (not compact and runtime_root is not None - and (reader is None or not _fits_failure_output(result, limit) or read_limit > limit)): + and (reader is None or _json_output_size(result) > limit or read_limit > limit)): from .context_machine import _private_transport_root try: @@ -408,12 +430,12 @@ def captured_quota_failure_view( if read_limit > limit: result["recovery_page_output_bytes"] = read_limit result["instruction"] = "Do not rerun admission." - if not _fits_failure_output(result, limit): + if _json_output_size(result) > limit: # The command or pinned descriptor already carries the capture path. result["captured_decision"] = {"sha256": digest} - if original_decision and "reason" in payload and _fits_failure_output({**result, "reason": payload["reason"]}, limit): + if original_decision and "reason" in payload and _json_output_size({**result, "reason": payload["reason"]}) <= limit: result["reason"] = payload["reason"] - if not _fits_failure_output(result, limit): + if _json_output_size(result) > limit: # Even an impossibly small envelope must keep the original failure # and locator. Report why the requested output size cannot be met. result["instruction"] = "Output limit is too small for recovery metadata. Read this Turn. Do not rerun admission." @@ -458,10 +480,6 @@ def _compact_quota_failure( return result -def _failure_output_size(payload: dict[str, object]) -> int: - return len(json.dumps(payload, ensure_ascii=False, separators=(",", ":")).encode()) + len(os.linesep) - - @dataclass(frozen=True) class _QuotaFailureReader: """One private, compact route reserved before a size-limited guard.""" @@ -506,7 +524,7 @@ def _prepare_quota_failure_reader(limit: int, *, cli_bin: str | None) -> _QuotaF validate_compact_recovery_budget(reference, limit, route) command = context_capture_read_command(reference, "", reference_file=reference, reader_argv=route, compact=True, max_page_output_bytes=limit) - if _failure_output_size(_compact_quota_failure(command)) > limit: + if _json_output_size(_compact_quota_failure(command)) > limit: raise ValueError("Output limit cannot fit a recovery command.") except ValueError as exc: directory.rmdir() @@ -516,12 +534,8 @@ def _prepare_quota_failure_reader(limit: int, *, cli_bin: str | None) -> _QuotaF def _quota_budget_failure_payload(reason: str, limit: int) -> dict[str, object]: payload: dict[str, object] = {"ok": False, "error_code": "QUOTA_VALIDATION_FAILED", "reason": reason} - if _failure_output_size(payload) <= limit: - return payload minimal: dict[str, object] = {"ok": False} - if _failure_output_size(minimal) <= limit: - return minimal - return {} + return _first_fitting_payload((payload, minimal), limit) or {} def run_with_quota_failure_reader( @@ -560,10 +574,11 @@ def _bounded_quota_transport_failure( ) -> dict[str, object]: from ..control_plane.turn_driver.decision_capture import write_context_read_reference, write_decision_capture - if digest is None and _failure_output_size(failure) <= limit: + if digest is None and _json_output_size(failure) <= limit: return failure original_locator = {"path": str(path), "sha256": digest} if path is not None and digest is not None else None receipt = failure.get("heartbeat_receipt") + receipt_mapping = receipt if isinstance(receipt, Mapping) else None command = None if reader is not None: try: @@ -595,32 +610,33 @@ def _bounded_quota_transport_failure( } failure = {**failure, "instruction": locator["instruction"]} failure = {**failure, "captured_decision": capture} - if _failure_output_size(failure) <= limit: - return failure - if locator is not None and _failure_output_size(locator) <= limit: - return locator - if command is not None or isinstance(receipt, Mapping): - compact = _compact_quota_failure(command, receipt=receipt if command is None else None) + direct_candidates = [failure] + ([locator] if locator is not None else []) + if matched := _first_fitting_payload(direct_candidates, limit): + return matched + if command is not None or receipt_mapping is not None: + compact = _compact_quota_failure(command, receipt=receipt_mapping if command is None else None) guided = {**compact, "instruction": "Read the original Turn receipt before recovering. Do not rerun admission."} + candidates: list[dict[str, object]] = [] if command is not None and original_locator is not None: # Keep the independently checkable identity when the receipt and # full failure do not fit. A fallback diagnostic is not the original. - for reference in (original_locator, {"sha256": original_locator["sha256"]}): - located = {**guided, "captured_decision": reference} - if _failure_output_size(located) <= limit: - return located - if _failure_output_size(guided) <= limit: - return guided - if _failure_output_size(compact) <= limit: - return compact + candidates.extend( + {**guided, "captured_decision": reference} + for reference in (original_locator, {"sha256": original_locator["sha256"]}) + ) + candidates.extend((guided, compact)) + if matched := _first_fitting_payload(candidates, limit): + return matched result = _compact_quota_failure() - if isinstance(receipt, Mapping): - result["heartbeat_receipt"] = {key: receipt[key] for key in ("status", "event_id", "turn_instance_id") if key in receipt} - result["reason"] = "Recovery reference could not be published. Inspect the original receipt. Do not rerun admission." - if _failure_output_size(result) <= limit: - return result - result.pop("reason") - return result if _failure_output_size(result) <= limit else _compact_quota_failure() + if receipt_mapping is not None: + result["heartbeat_receipt"] = { + key: receipt_mapping[key] for key in ("status", "event_id", "turn_instance_id") if key in receipt_mapping + } + reason_result = { + **result, + "reason": "Recovery reference could not be published. Inspect the original receipt. Do not rerun admission.", + } + return _first_fitting_payload((reason_result, result), limit) or _compact_quota_failure() def quota_decision_transport_failure_payload( @@ -683,9 +699,7 @@ def quota_decision_transport_failure_payload( "instead of rerunning the guard. If the handoff endpoint belongs to an " "ended Host wake, use the transport named by the current wake, or none." ) - for key in ("heartbeat_receipt", "rollout_event", "host_poll_receipt"): - if key in committed: - payload[key] = committed[key] + payload.update(_carried_receipts(committed)) return payload @@ -722,29 +736,27 @@ def quota_captured_transport_failure_view( runtime_root=runtime_root, captured_payload=source, capture_bytes=original, reserved_reader=reader, ) - if _fits_failure_output(projected, output_limit) and "recovery_page_output_bytes" not in projected: + if _json_output_size(projected) <= output_limit and "recovery_page_output_bytes" not in projected: return projected return _bounded_quota_transport_failure(failure, output_limit, reader, saved, capture_sha256) # The Host can change the file after guard publication. The expected digest # remains that of the original and there is no reader for the changed bytes. - result = {"ok": False, "error_code": QuotaDecisionTransportError.error_code, "captured_decision": { + result: dict[str, object] = {"ok": False, "error_code": QuotaDecisionTransportError.error_code, "captured_decision": { "path": str(saved), "sha256": capture_sha256, }, "reason": "The saved decision cannot be verified against its original SHA-256.", "instruction": "Restore the original capture and inspect its Turn receipt. Do not rerun admission."} - if not _fits_failure_output(result, output_limit): + if _json_output_size(result) > output_limit: result.pop("reason") result["instruction"] = "Restore file. Read receipt. Do not rerun admission." - if not _fits_failure_output(result, output_limit): + if _json_output_size(result) > output_limit: # The reserved reader can carry the original locator and receipt in # private diagnostics. It must never read the unverified capture. - diagnostic = {**result, **{key: failure[key] for key in - ("heartbeat_receipt", "rollout_event", "host_poll_receipt") if key in failure}} + diagnostic = {**result, **_carried_receipts(failure)} return _bounded_quota_transport_failure(diagnostic, output_limit, reader, None, None) - for key in ("heartbeat_receipt", "rollout_event", "host_poll_receipt"): - if key in failure: - candidate = {**result, key: failure[key]} - if _fits_failure_output(candidate, output_limit): - result = candidate + for key, value in _carried_receipts(failure).items(): + candidate = {**result, key: value} + if _json_output_size(candidate) <= output_limit: + result = candidate return result @@ -757,22 +769,15 @@ def quota_validation_failure_payload( ) -> dict[str, object]: command = args.quota_command if command not in QUOTA_EVENT_KINDS: - return { - "ok": False, - "mode": command, - "registry": str(registry_path), - "runtime_root": runtime_root_arg, - "error_code": "QUOTA_VALIDATION_FAILED", - "error": str(exc), - "summary": { - "registered_goals": 0, - "health_blockers": 0, - "next_automatic_turn": None, - "states": {}, - }, - "groups": {}, - "health_items": [], - } + return _non_event_quota_payload( + command, + registry_path=registry_path, + runtime_root_arg=runtime_root_arg, + error_code="QUOTA_VALIDATION_FAILED", + error_text=str(exc), + health_blockers=0, + health_items=[], + ) return { "ok": False, "mode": command, @@ -789,8 +794,6 @@ def quota_validation_failure_payload( } - - __all__ = [ "QUOTA_EVENT_KINDS", "quota_decision_transport_failure_payload", diff --git a/loopx/cli_commands/quota_presentation.py b/loopx/cli_commands/quota_presentation.py index 70bd9ae3fb..a2228ca563 100644 --- a/loopx/cli_commands/quota_presentation.py +++ b/loopx/cli_commands/quota_presentation.py @@ -44,12 +44,13 @@ def select(source: object, *keys: str) -> dict[str, object]: app = source.get("app_automation") if isinstance(app, Mapping) and app.get("host_surface") == "antigravity_app": # The sidecar reads these existing scheduler fields directly. - hint["app_automation"] = select( + app_automation = select( app, "recommended_interval_minutes", "recommended_rrule", "stateful_backoff", ) for key in ("ack_hint", "failure_hint"): if key in app: - hint["app_automation"][key] = select(app[key], "cli_args") + app_automation[key] = select(app[key], "cli_args") + hint["app_automation"] = app_automation for key, field in (("reset_policy", "reset_token"), ("cold_path_detail", "local_scheduler")): if key in source: hint[key] = select(source[key], field) @@ -80,8 +81,7 @@ def select(source: object, *keys: str) -> dict[str, object]: def budgeted_spend_result( - payload: dict[str, object], args: argparse.Namespace, *, - runtime_root: Path, reader_argv: list[str], + payload: dict[str, object], args: argparse.Namespace, *, runtime_root: Path, reader_argv: list[str] | None, ) -> tuple[dict[str, object], int]: """Present an already evaluated spend, retaining failed-delivery controls.""" from .quota_capture import budgeted_settlement_result, settlement_capture_failure_view @@ -94,16 +94,18 @@ def budgeted_spend_result( return settlement_capture_failure_view(payload, output_bytes=args.max_page_output_bytes, error=exc), 1 -def native_quota_result(payload, args, *, capture_directory: Path, - decision_identity, captured_payload, reader_argv, capture_id: str, - progressive_enabled: bool): +def native_quota_result( + payload: dict[str, object], args: argparse.Namespace, *, capture_directory: Path, + decision_identity: tuple[str, str], captured_payload: dict[str, object], + reader_argv: list[str] | None, capture_id: str, progressive_enabled: bool, +) -> dict[str, object]: """IO presentation of the immutable decision, without another guard.""" - from .quota_capture import ( - context_capture_read_command, model_context_reference, native_context_capture_view, quota_context_surface, - ) + from .quota_capture import native_context_capture_view, quota_context_surface + from .quota_context_reader import model_context_reference from ..control_plane.turn_driver.codex_context import ( NativeContextSessionUnavailable, codex_context_directory, prepare_codex_context, ) + from ..control_plane.turn_driver.decision_capture import context_capture_read_command try: directory = codex_context_directory(directory=args.codex_context_dir, @@ -163,12 +165,12 @@ def _project_native_cli_settlement(payload: dict[str, object], *, explicit_compl interaction = payload.get("interaction_contract") cli = interaction.get("cli_channel") if isinstance(interaction, Mapping) else None todo = payload.get("selected_todo") - if not isinstance(cli, Mapping) or not isinstance(todo, Mapping): + if not isinstance(interaction, Mapping) or not isinstance(cli, Mapping) or not isinstance(todo, Mapping): return payload complete_scope = {} if explicit_complete: agent = payload.get("agent_identity") - channel = interaction.get("agent_channel") if isinstance(interaction, Mapping) else None + channel = interaction.get("agent_channel") # The typed owner needs eligibility, not another copy of Goal/context. complete_scope = {"complete_scope": { **{key: payload.get(key) for key in ( @@ -188,7 +190,7 @@ def _project_native_cli_settlement(payload: dict[str, object], *, explicit_compl if not projection: return payload return {**payload, "interaction_contract": { - **interaction, "cli_channel": _apply_context_projection_changes(dict(cli), projection), + **dict(interaction), "cli_channel": _apply_context_projection_changes(dict(cli), projection), }} diff --git a/loopx/control_plane/turn_driver/codex_context_history.py b/loopx/control_plane/turn_driver/codex_context_history.py index be2bb04701..6875047512 100644 --- a/loopx/control_plane/turn_driver/codex_context_history.py +++ b/loopx/control_plane/turn_driver/codex_context_history.py @@ -33,6 +33,7 @@ _MAX_RECORD_BYTES = 16 * 1024 * 1024 _MAX_SELECTED_REPLAY_READS = 32 _MAX_COMPLETE_REREADS = 32 +_REPLAY_ERRORS = (OSError, ValueError, TypeError, KeyError, AttributeError, RecursionError) _SHELL_OUTPUT = re.compile(r"\AChunk ID: [^\r\n]+\nWall time: [0-9.]+ seconds\n" r"Process exited with code 0\n(?:Original token count: [0-9]+\n)?Output:\n(.*)\Z", re.DOTALL) @@ -261,18 +262,38 @@ def _replayed_output_groups(anchor: dict[str, Any], snapshot: dict[str, Any], st yield call_offset, _digest(group), group +def _read_receipt(offset: int, digest: str, pages: list[dict[str, Any]]) -> dict[str, Any]: + return {"native_offset": offset, "native_sha256": digest, "pages_sha256": _digest(pages)} + + +def _matching_resume_session(state: dict[str, Any], event: dict[str, Any]) -> bool: + return (event.get("source") == "resume" and state.get("session_id") == event.get("session_id") + and state.get("cwd") == event.get("cwd")) + + +def _verified_replay_capture(anchor: dict[str, Any], snapshot: dict[str, Any], + stream: BinaryIO) -> tuple[bytes, dict[str, Any]] | None: + from .decision_capture import read_context_capture_file + + reference = anchor.get("read_source") + if not _matching_replay_interval(anchor, snapshot, stream) or not isinstance(reference, dict): + return None + _, body, _ = read_context_capture_file(reference["path"], reference["sha256"], private=True) + return body, reference + + def _matches(anchor: dict[str, Any], snapshot: dict[str, Any], stream: BinaryIO, event: dict[str, Any]) -> bool: - from .decision_capture import capture_page_range, read_context_capture_file + from .decision_capture import capture_page_range - if not _matching_replay_interval(anchor, snapshot, stream): + reads, rereads = anchor.get("reads"), anchor.get("rereads", []) + if not isinstance(reads, list) or not reads or not isinstance(rereads, list): return False - reads, reference = anchor.get("reads"), anchor.get("read_source") - rereads = anchor.get("rereads", []) - if not isinstance(reads, list) or not reads or not isinstance(rereads, list) or not isinstance(reference, dict): + verified = _verified_replay_capture(anchor, snapshot, stream) + if verified is None: return False + body, reference = verified reads = [*reads, *rereads] - _, body, _ = read_context_capture_file(reference["path"], reference["sha256"], private=True) required = {(read["native_offset"], read["pages_sha256"]) for read in reads} ranges = [] for offset, digest, group in _replayed_output_groups(anchor, snapshot, stream, event, reads): @@ -290,13 +311,9 @@ def _matches(anchor: dict[str, Any], snapshot: dict[str, Any], stream: BinaryIO, def _replayed_selection_sections(anchor: dict[str, Any], snapshot: dict[str, Any], stream: BinaryIO, event: dict[str, Any]) -> dict[str, str]: - from .decision_capture import read_context_capture_file - selections = anchor.get("selections") - if not isinstance(selections, dict) or not selections or not _matching_replay_interval(anchor, snapshot, stream): + if not isinstance(selections, dict) or not selections or _verified_replay_capture(anchor, snapshot, stream) is None: return {} - source = anchor["read_source"] - read_context_capture_file(source["path"], source["sha256"], private=True) reads = [read for selection in selections.values() for read in selection["reads"]] outputs = {(offset, digest) for offset, digest, _ in _replayed_output_groups(anchor, snapshot, stream, event, reads)} @@ -347,12 +364,12 @@ def observe_native_read(state: dict[str, Any], event: dict[str, Any], try: with _snapshot(event) as (facts, stream): native_reader = _native_reader(stream, facts["observed_bytes"], event) - except (OSError, ValueError, TypeError, KeyError, AttributeError, RecursionError): + except _REPLAY_ERRORS: return state if native_reader is None: return state offset, digest = native_reader - read = {"native_offset": offset, "native_sha256": digest, "pages_sha256": _digest(pages)} + read = _read_receipt(offset, digest, pages) start, reads = pending.get("native_reader_start"), pending.get("native_reads") if not isinstance(start, dict) or not isinstance(reads, list) or not _same_replay_source(start, facts): start, reads = {**facts, "reader_start": offset}, [] @@ -385,11 +402,11 @@ def observe_completed_native_reread(state: dict[str, Any], updated: dict[str, An if native_reader is None or native_reader[0] < anchor["reader_start"]: return offset, digest = native_reader - read = {"native_offset": offset, "native_sha256": digest, "pages_sha256": _digest(pages)} + read = _read_receipt(offset, digest, pages) rereads = anchor.get("rereads", []) if read not in anchor["reads"] and read not in rereads: candidate["native_resume"] = {**anchor, "rereads": [*rereads, read][-_MAX_COMPLETE_REREADS:]} - except (OSError, ValueError, TypeError, KeyError, AttributeError, RecursionError): + except _REPLAY_ERRORS: return @@ -399,22 +416,20 @@ def native_resume_verified(state: dict[str, Any], event: dict[str, Any]) -> bool if not isinstance(candidate, dict): return False anchor = candidate.get("native_resume") - if (event.get("source") != "resume" or state.get("pending") or not isinstance(anchor, dict) - or state.get("session_id") != event.get("session_id") or state.get("cwd") != event.get("cwd")): + if state.get("pending") or not isinstance(anchor, dict) or not _matching_resume_session(state, event): return False try: with _snapshot(event) as (facts, stream): verified = _matches(anchor, facts, stream, event) return verified - except (OSError, ValueError, TypeError, KeyError, AttributeError, RecursionError): + except _REPLAY_ERRORS: return False def native_resume_sections(state: dict[str, Any], event: dict[str, Any]) -> dict[str, str]: """Verify replay of exact selected outputs without claiming a whole capture read.""" anchor = state.get("selected_resume") - if (event.get("source") != "resume" or not isinstance(anchor, dict) - or state.get("session_id") != event.get("session_id") or state.get("cwd") != event.get("cwd") + if (not _matching_resume_session(state, event) or not isinstance(anchor, dict) or anchor.get("scope") != state.get("read_scope") or anchor.get("epoch") != state.get("context_epoch") or anchor.get("read_source") != state.get("source_recovery")): return {} @@ -422,7 +437,7 @@ def native_resume_sections(state: dict[str, Any], event: dict[str, Any]) -> dict with _snapshot(event) as (facts, stream): retained = _replayed_selection_sections(anchor, facts, stream, event) return retained - except (OSError, ValueError, TypeError, KeyError, AttributeError, RecursionError): + except _REPLAY_ERRORS: return {} @@ -486,7 +501,7 @@ def checkpoint_native_selection(state: dict[str, Any], updated: dict[str, Any], observed = sections selections[selection] = {"reads": progress, "sections": observed, "total_bytes": page["total_bytes"]} updated["selected_resume"] = {**anchor, "selections": selections} - except (OSError, ValueError, TypeError, KeyError, AttributeError, RecursionError): + except _REPLAY_ERRORS: return @@ -524,5 +539,5 @@ def checkpoint_native_read(state: dict[str, Any], updated: dict[str, Any], "reader_sha256": _region_digest(stream, reader_start, facts["observed_bytes"]), "reads": reads, "read_source": {key: reference[key] for key in ("path", "sha256")}} candidate["native_resume"] = checkpoint - except (OSError, ValueError, TypeError, KeyError, AttributeError, RecursionError): + except _REPLAY_ERRORS: return From 6d415c57b254c68f8137de8f5fd3f2eecff88709 Mon Sep 17 00:00:00 2001 From: LoopX Agent <337587101+loopx-agent@users.noreply.github.com> Date: Tue, 17 Nov 2026 04:27:15 +0800 Subject: [PATCH 2/3] fix(tests): remove duplicate F811 settlement test definitions Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com> --- tests/control_plane/test_refresh_settle_turn.py | 6 ------ 1 file changed, 6 deletions(-) diff --git a/tests/control_plane/test_refresh_settle_turn.py b/tests/control_plane/test_refresh_settle_turn.py index cd3d3463df..77c0754547 100644 --- a/tests/control_plane/test_refresh_settle_turn.py +++ b/tests/control_plane/test_refresh_settle_turn.py @@ -194,12 +194,6 @@ def test_explicit_combined_writeback_returns_the_original_turn_receipts(tmp_path assert rc == 0 and todo["todo"]["status"] == "open" - - - - - - @pytest.mark.parametrize("provider", ["file", "sqlite"]) def test_complete_source_budget_recovery_keeps_original_turn_and_single_debit(tmp_path, monkeypatch, provider): isolate_sqlite_runtime(tmp_path, monkeypatch) From 227fb7d0425067ae17248a5f0add6fbd7446edc6 Mon Sep 17 00:00:00 2001 From: LoopX Agent <337587101+loopx-agent@users.noreply.github.com> Date: Tue, 17 Nov 2026 11:19:07 +0800 Subject: [PATCH 3/3] docs,cli(c1): preserve verbatim raw ledger archives and fix context-reader mypy return Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com> --- .../2026-10-28-packaged-heartbeat.md | 7 +- ...26-10-28-packaged-heartbeat.raw-archive.md | 734 ++++ ...28-packaged-heartbeat.raw-archive.zh-CN.md | 541 +++ .../2026-10-28-packaged-heartbeat.zh-CN.md | 5 +- .../2026-10-30-c1-source-convergence.md | 5 +- ...10-30-c1-source-convergence.raw-archive.md | 3414 +++++++++++++++++ ...c1-source-convergence.raw-archive.zh-CN.md | 2525 ++++++++++++ .../2026-10-30-c1-source-convergence.zh-CN.md | 5 +- loopx/cli_commands/quota_context_reader.py | 4 +- 9 files changed, 7229 insertions(+), 11 deletions(-) create mode 100644 docs/architecture/rfcs/ledger/controller-executor-unified-contract-v0/2026-10-28-packaged-heartbeat.raw-archive.md create mode 100644 docs/architecture/rfcs/ledger/controller-executor-unified-contract-v0/2026-10-28-packaged-heartbeat.raw-archive.zh-CN.md create mode 100644 docs/architecture/rfcs/ledger/controller-executor-unified-contract-v0/2026-10-30-c1-source-convergence.raw-archive.md create mode 100644 docs/architecture/rfcs/ledger/controller-executor-unified-contract-v0/2026-10-30-c1-source-convergence.raw-archive.zh-CN.md diff --git a/docs/architecture/rfcs/ledger/controller-executor-unified-contract-v0/2026-10-28-packaged-heartbeat.md b/docs/architecture/rfcs/ledger/controller-executor-unified-contract-v0/2026-10-28-packaged-heartbeat.md index 6d02d37fc2..47cd14da18 100644 --- a/docs/architecture/rfcs/ledger/controller-executor-unified-contract-v0/2026-10-28-packaged-heartbeat.md +++ b/docs/architecture/rfcs/ledger/controller-executor-unified-contract-v0/2026-10-28-packaged-heartbeat.md @@ -1,8 +1,9 @@ # Packaged single-session heartbeat comparison -This is a measurement checkpoint for the [controller/executor RFC](../../controller-executor-unified-contract-v0.md#9-validation), -not acceptance of C1 or a default promotion. The [Chinese mirror](2026-10-28-packaged-heartbeat.zh-CN.md) -records the same scope and results. +This is a navigation summary of the measurement checkpoint for the [controller/executor RFC](../../controller-executor-unified-contract-v0.md#9-validation), +not acceptance of C1 or a default promotion, and does not claim full prose equivalence with the raw ledger. +The [Chinese mirror](2026-10-28-packaged-heartbeat.zh-CN.md) records the same scope and results. +Complete verbatim append-only historical chronology, counterexamples, and validation bounds remain preserved in [2026-10-28-packaged-heartbeat.raw-archive.md](2026-10-28-packaged-heartbeat.raw-archive.md) (`sha256: 52b9cb9e0139d5820ba5404bb71084e27045ddcf759e436a720cf728c6d07599`). ## Source, workload, and convergence scope diff --git a/docs/architecture/rfcs/ledger/controller-executor-unified-contract-v0/2026-10-28-packaged-heartbeat.raw-archive.md b/docs/architecture/rfcs/ledger/controller-executor-unified-contract-v0/2026-10-28-packaged-heartbeat.raw-archive.md new file mode 100644 index 0000000000..96be002c07 --- /dev/null +++ b/docs/architecture/rfcs/ledger/controller-executor-unified-contract-v0/2026-10-28-packaged-heartbeat.raw-archive.md @@ -0,0 +1,734 @@ +# Packaged single-session heartbeat comparison + +This is a measurement checkpoint for the [controller/executor RFC](../../controller-executor-unified-contract-v0.md#9-validation), +not acceptance of C1 or a default promotion. The [Chinese mirror](2026-10-28-packaged-heartbeat.zh-CN.md) +records the same scope and results. + +## Source and workload + +Compare original quota at main `843be494266774b63b3de61d0adf5dd7f4f877a2` +with the integration candidate at runtime commit +`1199cbe0b8e92ddf845e345483041486fe808024` in [#7430](https://github.com/loopx-project/loopx/pull/7430). +Each wheel was built with its own source-dependent frontend fingerprint; +1,884 packaged product members matched their respective source checkout. +No global runtime was installed or active Goal state used as a test fixture. + +Both arms use the same synthetic workload and real, isolated File and SQLite +authorities: one active Goal, a complete selected task, one current-Agent outcome +and five independent peer outcomes, with four requirements each. Global intent, +authority and stop conditions remain available. The candidate's existing native +context opt-in expands the current outcome and indexes the peers. Every peer +body remains readable from the original capture; all 24 requirement descriptions, +owners, linked work and unverified states were checked after expansion. + +The packaged CLI path runs thin heartbeat bootstrap, guarded quota/native context, +every required context page, mandatory Goal-source reads, and the real context-hook +command. Synthetic native lifecycle events provide warm continuity and then +PostCompact/SessionStart invalidation. Loss recovery reads the **same original +capture**, without replacing admission. Tampered sources and early spending are +rejected; refresh and spend replays preserve one effect and one debit. The +unfinished selected task remains open. Warm reconstruction and missing-baseline +full fallback were also checked. + +These are packaged engineering observations with simulated host continuity. +They do not establish installed Codex App adoption, model retention or decisions, +SDK coverage, accepted task outcomes, or a controller/executor experiment. + +## Observations + +One matched cohort was run, one observation per arm/backend/phase. Background +host load was uncontrolled. Elapsed time sums actual CLI calls, including startup, +required Goal reads and lifecycle observations. Counts are logical Python-to-runtime +requests; physical framing, retries and provider-internal IO are not inferred. +Artifact size is delivered UTF-8 context content, not tokens or the full stdout. + +| Backend / phase | Context bytes, original → candidate | Logical requests | Elapsed ms | +| --- | ---: | ---: | ---: | +| File / cold full | 75,387 → 76,162 | 103 → 102 | 5,052.49 → 4,867.53 | +| File / warm delta | 40,991 → 43,558 | 99 → 98 | 3,240.32 → 3,399.05 | +| File / loss recovery | 74,619 → 75,390 | 6 → 6 | 4,045.91 → 4,213.20 | +| SQLite / cold full | 75,483 → 76,270 | 103 → 102 | 4,566.19 → 4,428.81 | +| SQLite / warm delta | 41,085 → 43,666 | 99 → 98 | 3,236.50 → 3,416.50 | +| SQLite / loss recovery | 74,713 → 75,498 | 6 → 6 | 4,149.99 → 3,957.72 | + +Both arms use 13/9/13 CLI calls for cold/warm/recovery. Invalidation itself is +separate: two hook calls, 683–738 ms across these observations. Expanding all five +peers in the candidate adds 13,940 content bytes, five reader pages and five +observation hooks: **10 CLI calls / 10 logical requests**, 17,620 stdout bytes, +and 3,416–3,713 ms per phase. The original arm already carries these bodies inline. + +Total phase stdout also grows: File cold 94,662 → 96,082 bytes, warm +58,077 → 60,649, recovery 89,807 → 91,144; SQLite 94,776 → 96,208, +58,185 → 60,771 and 89,911 → 91,262. The seven settlement/negative/readback calls +per backend use 226 logical requests in each arm, with identical stdout totals +within each backend. Setup, builds, failed authoring probes and optional reads +are separate costs, not removed from the experiment history. + +Coalescing acceptance/title/Explore projection removes one logical request and +reduces bridge JSON. For example, File cold request/response content falls from +965,261/585,535 to 902,963/494,206 bytes. That local reduction does **not** offset +the larger delivered artifact or optional expansion. Warm elapsed time rises in +both backends; recovery observations are mixed. This sample supports no causal +speedup, default SQLite performance qualification or positive complete-cost diff. +Tokens, cache use, billing, verification outcomes, human attention and long-horizon +net benefit remain unqualified. Earlier negative and mixed measurements stand. + +## Owning gap and continuation + +Compared with original quota, scoping removes about 13 KB of peer bodies, but the +candidate retains about 6.6 KB of repeated Todo diagnostic lanes and adds about +3.9 KB of scope metadata. Candidate lists and other diagnostic repetitions consume +the remaining savings. This is a composition/compaction gap, not evidence that +peer scope itself lowers total cost. + +That checkpoint selected a C1 slice to characterize necessary diagnostic compaction and +move it into the existing shared typed composer, retiring the replaced Python +caller algorithm. Preserve complete selected work, portfolio/horizon, +claim/lease facts, global obligations, unknown fields, exact references and +historical recovery. The old Python compactor drops unknown list fields and +shortens some prose; copying it unchanged would not meet that contract. Reuse +the same packaged comparison for default reads and all-peer expansion before +claiming improvement. No new packet format or per-field RPC is justified. + +The integration candidate adopts the merged route owner (#7520) and reference +owner (#7457). Acceptance, Task-title and Explore legacy references now share +one existing `reference_context` operation; the redundant acceptance operation +and duplicate controller-input dispatch branch are removed. Complete composition +reuses those same semantic functions. This is a bounded convergence change, +not full writer cutover, historical-reader retirement or C1 completion. + +The final affected suite has 469 passes and five optional native/SDK skips; +116 typed tests and control-plane typechecking pass. Earlier build fingerprint, +missing-dependency, harness-carrier and outdated call-count failures are retained +as authoring/validation costs, not silently converted into product passes. +No model, paid evaluation, managed benchmark, live install, release or merge was +performed for this comparison. + +## Shared diagnostic owner follow-through + +The follow-through at `d33c1a19d91738c66073d9e71586f14466f36d89` replaces the +Python Todo-list algorithms with `quota/diagnostic_projection.ts`. Existing +`reference_context` callers share it for should-run and the whole status/plan row +collection; scoped native composition reuses it inside its existing request. +[#7557](https://github.com/loopx-project/loopx/pull/7557), at +`5b5d9dd3b0a816aae9d5160b849cff4a3c38da13` on main +`19c213324fbb5990288bd374c1b79096f22bb152`, proposes the independently usable +legacy-reader slice as a normal PR. Its typed module is identical to the +integration module. Neither proposal is merged or installed by this work. + +Only explicitly known diagnostic lanes with recognized canonical Todo records may be +bounded. An unknown item field/version, a non-record item or complex nested +content preserves that entire list. Unknown lists survive. Retained records stay +complete; portfolio prose, capability candidates, planning horizon, selected +work and existing succession IDs are not shortened or reconstructed. Original +capture/recovery remains complete. Projection metadata points to the existing +source capture instead of repeating long recovery commands in each lane. + +The same frozen packaged harness and original quota commit were rerun in one +matched cohort, with the same path lengths, synthetic task and 24 clauses. The +base wheel has 1,884 source-matching product members; the candidate has 1,885. +These measurements belong to the recorded pre-rebase commit above. The later +rebase onto `19c213324` adds the unrelated merged Lark-return change; it does not +turn the frozen experiment into a measurement of that later head. + +| Backend / phase | Context bytes, original → candidate | Stdout bytes | Logical requests | Elapsed ms | +| --- | ---: | ---: | ---: | ---: | +| File / cold full | 75,648 → 70,388 | 95,004 → 89,875 | 103 → 102 | 4,959.03 → 6,475.69 | +| File / warm delta | 41,252 → 44,029 | 58,401 → 61,183 | 99 → 98 | 3,465.08 → 4,538.62 | +| File / loss recovery | 74,880 → 69,618 | 90,113 → 84,903 | 6 → 6 | 5,108.18 → 5,762.51 | +| SQLite / cold full | 75,740 → 70,492 | 95,114 → 89,997 | 103 → 102 | 5,771.16 → 5,856.03 | +| SQLite / warm delta | 41,346 → 44,133 | 58,509 → 61,301 | 99 → 98 | 3,772.95 → 3,794.99 | +| SQLite / loss recovery | 74,974 → 69,722 | 90,217 → 85,017 | 6 → 6 | 4,226.47 → 5,113.92 | + +Both arms still use 13/9/13 CLI calls. Expanding all five peers still adds 13,940 +context bytes, 17,620 stdout bytes and 10 CLI/logical requests to each candidate +phase; measured optional-read time is 4,107–4,875 ms. The original already has +those bodies inline. The seven settlement/negative/readback calls still use 226 +logical requests with identical per-backend stdout; one effect/debit and the +open task are preserved. Builds, setup, failed probes, two invalidation hooks +and optional reads remain separate recorded costs. + +Cold/recovery context is about 5.3 KB smaller, but warm context is about 2.8 KB +larger and all-peer consumption remains more expensive. Every observed candidate +phase is slower in this cohort; with one observation and uncontrolled background +load this is not a causal latency estimate. An intermediate version repeated +capture commands and was larger still (File warm 45,187; SQLite 45,303 bytes); +the metadata fix does not erase that experiment or establish net benefit. + +Four cold/warm File/SQLite presentations were independently compared with their +original source captures for complete selected work, boundary, horizon, +capability gate and portfolio. An intentionally mutated QA wheel that deletes +the capability gate is rejected through the packaged guard/reader path. This +checks oracle sensitivity, not model adherence. Source tampering, early spend, +same-capture loss recovery and once-only settlement retain their negative and +positive checks. + +The final affected integration selection passes 144 Python and 117 typed tests; +an earlier broader selection had 533 passes and five optional skips, before the +unknown-item fallback was strengthened. The independent #7557 slice passes 264 +Python/70 typed cases, including real File/SQLite status/plan/detail and canonical +Todo readback, and all 14 selected premerge checks. Status/plan now pays one coarse +typed request; explicit full Todo summaries skip it. A crowded diagnostic unit +fixture grows to 43,862 characters because complete candidates are retained; this +is an intentional information delta, not a speedup. The unchanged public v4 +multi-Agent budget probe passes on original quota but fails at 27,934 > 13,000 +characters on both the preceding and current integration wheels. That integration +failure remains open; no public budget was raised. + +The next existing C1 work is to diagnose the warm reconstruction/metadata cost +without losing obligations, then qualify remaining consumers and writer cutover. +No positive complete-cost diff, default SQLite performance, installed App/model +retention, token/cache/billing, accepted-outcome or long-horizon benefit is claimed. +C1 and the separate C2/controller experiment remain open. + +## Relocated-context integration + +Runtime `167b31e5d078193b9fd73ad6609804e268390972`, rebased onto main +`f205c02a37d5a668c956733a721af911dcac7fab`, adopts the existing +[#7528](https://github.com/loopx-project/loopx/pull/7528) codec change at +`759c16a9cf430bb7442b47dd3a5c3336ffb93666`. The integration keeps main's scoped +preference binding, native checkpoint fixtures and intelligent-mediation design. +It does not create another encoder. One exact baseline subtree plus literal +current overrides replaces repeated paths to unchanged evidence. Unknown and +current controls remain inline; original capture, identity and recovery stay +unchanged. A scoped-wrapper regression exercises the same implementation. + +A 24-row synthetic relocation compares that runtime with its immutable parent +`87e216f24f966671d35e035df7ba285248b48bad`. Complete ordinary delta bytes fall +13,199 → 6,090; the C1 scoped-wrapper delta falls 13,809 → 6,230. Cold/current +full encodings remain 20,060/20,188 bytes and 20,167/20,295 bytes respectively. +Both reconstruct exactly; the actual old decoder recovers the same full current +capture for the new overlay. The original missing-overlay case fails before +adoption. These are codec observations, excluding model retention, tokens, +framing, billing and task outcomes. + +The unchanged packaged harness is rerun in a new matched cohort against original +quota `843be494266774b63b3de61d0adf5dd7f4f877a2`. Both arms use the same fixture +and equal path lengths; their 1,884/1,885 product members match their sources. +These results belong to this runtime and cohort; the earlier tables remain +historical observations of their own sources. + +| Backend / phase | Context bytes, original → candidate | Stdout bytes | Logical requests | Elapsed ms | +| --- | ---: | ---: | ---: | ---: | +| File / cold full | 75,211 → 69,934 | 94,432 → 89,286 | 103 → 102 | 5,961.28 → 5,183.22 | +| File / warm delta | 40,817 → 43,575 | 57,861 → 60,624 | 99 → 98 | 3,981.29 → 3,592.23 | +| File / loss recovery | 74,445 → 69,164 | 89,603 → 84,374 | 6 → 6 | 5,052.05 → 5,156.02 | +| SQLite / cold full | 75,311 → 70,044 | 94,550 → 89,414 | 103 → 102 | 5,205.45 → 6,393.69 | +| SQLite / warm delta | 40,913 → 43,683 | 57,971 → 60,746 | 99 → 98 | 3,482.77 → 4,216.01 | +| SQLite / loss recovery | 74,541 → 69,272 | 89,709 → 84,492 | 6 → 6 | 4,649.12 → 5,590.37 | + +CLI counts remain 13/9/13. All-five-peer expansion still adds 13,940 context +bytes, 17,620 stdout bytes and ten CLI/logical requests per candidate phase; +observed optional-read time ranges from 4,046 to 9,431 ms. Seven negative, +settlement and readback calls retain 226 logical requests and equal per-backend +stdout in both arms. Tamper/early-spend rejection, all 24 clauses, same-capture +recovery, one effect/debit and the open task pass. Four source comparisons keep +selected work, boundary, horizon, capability gate and portfolio complete; a new +mutated QA wheel dropping the capability gate is rejected by the real guard and +reader. No other owned build or test overlaps the timed cohort; host background +load remains uncontrolled. One observation does not qualify latency or p95. + +The final typed selection passes 147 cases and typecheck. The affected Python +run records 299 passes, 51 optional native/SDK skips and two recovery-text size +failures in a long temporary namespace. A controlled identical-path comparison +on immutable main and this runtime reproduces both failures at 2,015 characters; +neither hook embeds the requirement body, and both retain the original recovery +command. The normal-path lifecycle suite separately passes all 145 cases. No limit, +assertion or fixture body was relaxed, and the original failing run is retained. +The new wheel required rebuilding main's stale frontend bundle before successful +packaging. The unchanged v4 probe still fails at 27,934 > 13,000 characters. + +Relocation redundancy is reduced, while ordinary warm input still grows about +2.8 KB and all-peer reading remains more expensive. The latter is a different +remaining C1 composition/metadata gap. Default SQLite performance, installed App +and model retention, token/cache/billing, accepted outcomes and full long-horizon +benefit remain unqualified. Continue the existing C1 on that gap and remaining +consumers; this adoption does not close C1, C2 or the controller experiment. + +Subsequent integration is rebased onto main +`0cfbf11dcea4ba7bc8fb13f06f1c915b63ce8fad`, which contains #7528; its duplicate +commit drops out. Both Goal-source commits from [#7547](https://github.com/loopx-project/loopx/pull/7547) +retain their authorship and all 12 contributed product/test blobs match the +accepted integration head. Main's capture owner still stages before admission +and publishes afterward. The original complete contract is installed only after +publication. Removing an unused capture helper restores the process-level fence +around the actual Turn executor; the existing held-lane test fails before this +repair and passes afterward. + +Runtime `6f30cc454f2dea7e77f0821a14a1deaf268efe2e` has a source-matching +1,885-member wheel. The post-rebase typed selection passes 148 cases and +typecheck. The integration Python selection initially records 185 passes, two +explicit live-host skips and 12 failures: eight new staged-readback assertions +compare adapter metadata with the actual model projection, and four observers +still name the pre-#7547 metadata-only operation. Retaining their complete +comparisons against the real Host input and observing the stricter dispatch +operation makes all 54 Host-capture cases pass; no product gate is relaxed. +The earlier run and its other passed cases remain recorded separately. + +The packaged File/SQLite bootstrap, complete Goal delivery, all clause/detail +reads, same-capture recovery, rejection and once-only settlement pass again on +this wheel. This functional run overlaps other validation and is not a new +matched timing cohort. The older cost tables remain attached to runtime +`167b31e5d`, not relabeled as this later source. Current-version complete-cost +and outcome qualification remain open. + +The committed premerge then exposes a maintainability failure: the executor +contains 94 statements against the existing 90-statement limit. Runtime +`82f93ab76a403c2633efedb2f8bf02f85be8e3c6` moves published-input installation +into the existing staged-capture owner, preserving recovery bindings and +publication ordering. Its source-matching 1,885-member wheel, all 54 Host-capture +cases and the unchanged maintainability ratchet pass. The original failure is +retained; no exception or threshold is added. This owner consolidation does not +turn the historical warm-input or v4 budget failures into passes. + + +The next integration rebases the retained C1 history onto main +`6f8f476388645fcea2269329d32974b559d490e6` and adopts the repaired diagnostic +slice [#7557](https://github.com/loopx-project/loopx/pull/7557) at +`eb4e9b970aeb1ffb83e46705d6386cc3a4679ead`. That slice originally transported +the whole Python input through JavaScript JSON: `1.0`, negative zero and integers +above the safe range could change outside the display fields. Nine independent +source-number cases fail before repair. The shared typed owner now returns only +display edits and immutable source references; Python applies them to its original +values without owning compaction policy. The standalone slice passes 305 Python +cases, 99 typed cases, typecheck, Ruff and its standard premerge. These are source +and real File/SQLite CLI checks, not installation or independent acceptance. + +C1 runtime `7f35454b392e09ae574c5065c473ee27b5eee853` uses the byte-identical +shared diagnostic module. Its acceptance-sharing stage formerly cloned every +source object, defeating references for relocated numeric facts. It now copies +only changed registered carrier paths. The first integration selection retains +253 passes and five failures: three expose that clone and two old boundary +fixtures fail the complete-Goal dispatch requirement, also on the previous C1 +head. The boundary fixtures now keep work in its canonical provider and deliver +complete non-Todo Goal material; they check both the current original-contract +Host input and historical scope aliases, including rejection, without relaxing +dispatch. The final affected selection passes all 258 Python cases; the 110-case +typed selection, typecheck and Ruff pass. The older wheel and matched timing +cohorts remain attached to their actual versions. This source follow-through +does not qualify a new packaged cohort, cure the warm-input or v4 budget failures, +or close remaining consumers, reader retirement or actual model/outcome costs. + + +The additional complete-Host selection retains 200 passes and two failures +against the later main integration: its operation-host oracle still expected +whitespace folding, removed by main's [#7549](https://github.com/loopx-project/loopx/pull/7549). +The actual `chat_agent.py` blob equals the verified main base. Checking original +prompt bytes on both transports, while retaining schema, retry and tamper +assertions, makes all 54 Host-capture cases pass. This changes the test oracle, +not the production transport. The initial failure remains recorded. + +GitHub subsequently reports #7557 merged as +`4b2b97b7b726d902a20969e3911fd15d15b4bb2e`; all seven contributed files match +its repaired head. Merge occurrence does not supply a missing new-head +independent review or protected-action receipt. The C1 qualification above +remains bound to its frozen main base; later main changes are not implicitly +qualified. C1 stays an unfinished author integration with its existing cost, +consumer and retirement gaps. + +## Complete Goal reuse and independently usable native slice + +C1 is subsequently rebased onto main +`f5e9be3671c1b5c80eba5c62fe4d617bfefd66d6`. Runtime +`a0cc4c14b` reuses the exact unchanged scoped-reading instruction and objective, +while keeping every other wrapper field current. It also reuses complete Goal +text only after the existing source-integrity predicate succeeds. That predicate +moves unchanged into `goal_context_source.ts`, shared by fulfillment and the +codec. Changed text, control fields, scope, indexes, ownership, revisions and +unknown fields stay literal; malformed witnesses and missing baselines cannot +hide required reads. This removes repeated interpretation rather than adding +another context or decision owner. + +Source `ebdce8a49b4faa584571cfb688aa2c2a238a5860` retains this behavior and +native complete-Goal regression coverage. Its rebuilt wheel has 1,889 product +members matching source, with no packaged-only or mismatched member. The same +unchanged private harness compares it with the original quota baseline +`843be494266774b63b3de61d0adf5dd7f4f877a2`, using equal-length namespaces and +the same six outcomes, 24 clauses, work, stops and backends. Both arms include +mandatory supplementary Goal-file reads; recovery also includes the two +invalidation/startup hook outputs and reads the original capture without a new +admission. Optional peer expansion is separate. + +| Backend / phase | Original quota stdout bytes | C1 stdout bytes | Calls, quota → C1 | RPCs, quota → C1 | +| --- | ---: | ---: | ---: | ---: | +| File / cold | 94,892 | 90,918 | 13 → 14 | 103 → 103 | +| File / warm | 58,289 | 52,474 | 9 → 8 | 99 → 98 | +| File / loss recovery | 92,068 | 87,418 | 15 → 14 | 8 → 8 | +| SQLite / cold | 95,002 | 91,048 | 13 → 14 | 103 → 103 | +| SQLite / warm | 58,401 | 52,598 | 9 → 8 | 99 → 98 | +| SQLite / loss recovery | 92,178 | 87,540 | 15 → 14 | 8 → 8 | + +Calls count native CLI/hooks and any mandatory Goal-file read, separately from +RPCs. Capture/delta bytes alone are larger than quota in this cohort; the +complete-input comparison improves because quota separately requires 7,952 Goal +bytes. C1's optional expansion of all five independent peer outcomes still adds +13,940 content bytes and ten CLI/hook calls per phase. Complete clauses, exact +reconstruction, compaction recovery, tamper/early-spend rejection, one durable +writeback/debit and replay pass on both backends. These are deterministic +packaged-consumer checks, not actual model retention or outcome acceptance. +The single cohort ran alongside background work; it does not qualify latency, +model tokens/cache, billing, human cost or complete long-horizon benefit. +Historical negative warm observations remain attached to their earlier source. + +The final affected integration selection passes 205 Python cases, 112 typed +cases, typecheck, configured mypy and scoped Ruff. The packaged source +still fails the unchanged historical v4 oracle (digest `d12a8843834aea84…`) at +27,934 > 13,000 characters; the earlier 26,253-character observation used a +different current-source oracle (`1b5d010a30e608c6…`) and remains separate. +Neither failure is waived or relabeled by the positive paged-input comparison. + +The independently usable [#7575](https://github.com/loopx-project/loopx/pull/7575) +at `d980d621219b10353fdaeb058a1a0fd5714f4389`, based on main +`2cdff65d886d13121ffd78dccd96dd7413ab9d01`, supplies complete Goal material +through the existing opt-in native path and exact warm reuse. It has no dependency +on unmerged C1. Its main-baseline complete-Goal oracle fails on File and SQLite, +then passes with the change. Its 175 Python cases, 57 typed cases, typecheck, +configured mypy, scoped Ruff and packaged real-backend recovery/settlement pass. +Matched native stdout improves about 7.7 KB warm, but cold and loss recovery each +add about 1.2 KB and one RPC. That tradeoff stays explicit; this normal author PR +does not certify complete C1 or promote the default. C1 reuses the same predicate +and native source behavior, with scoped-wrapper reuse remaining in C1. Remaining +callers, writer cutover, historical-reader retirement and actual decision/outcome +qualification continue in the original work stream. + +## Same-capture Todo-summary lane reuse + +C1 subsequently rebases onto main `ffc90182bc2a896aa9980cf24dcf23a0e3276e3d`, +which includes #7575 merged as `a6283d923e3c951443fea65ba1a855c4f7c6c335`. +Its native Goal producer and integrity owner are adopted rather than copied. +Runtime `4604ee479` adds exact lane sharing in the existing typed diagnostic +owner. Equal nonempty registered arrays retain one literal owner and use +same-summary `_ref` references where smaller. Equality preserves order, +JSON types and unknown item fields; other fields and candidate collections stay +unchanged. The complete composer, action projection and native presentation use +this owner, resolving references before display caps. No extra state read, +capture, admission or settlement owner is introduced. Ambiguous, chained, +missing and cross-summary targets are rejected, including with valid inner +contract hashes. Older captures remain readable. + +The same source-checkout workload emits 27,934 characters before this change +and 25,862 afterward: 2,072 fewer (7.4%), entirely in the agent summary. All other +root-section lengths are unchanged. The rebuilt wheel, with 1,889 source-matching +product members, independently fails the unchanged `d12a8843834aea84…` v4 oracle +at **25,862 > 13,000**. This is the opt-in complete-contract variant, not the +default quota output budget. Neither ceiling is raised or claimed passed. +An identical real File/SQLite producer oracle fails on immutable pre-change +`87c14a5aa` and passes with the references. The integration passes 333 Python +cases; five explicit native-Codex environment cases remain skipped. The 125 typed +cases, control-plane typecheck, configured mypy and scoped Ruff pass. A stale +bridge test is corrected separately: display edits are compared with edits, +and the resolved document retains its original semantic assertions. + +The unchanged packaged harness again compares original quota `843be494…` with +this integrated candidate, in equal-length namespaces and with all mandatory +Goal reads. This new cohort measures the complete integration; its difference +does not isolate the lane change from the rebase and preceding C1 work. + +| Backend / phase | Original quota stdout bytes | C1 stdout bytes | Calls, quota → C1 | RPCs, quota → C1 | +| --- | ---: | ---: | ---: | ---: | +| File / cold | 94,510 | 89,911 | 13 → 12 | 103 → 102 | +| File / warm | 57,931 | 52,094 | 9 → 8 | 99 → 98 | +| File / loss recovery | 91,720 | 87,048 | 15 → 14 | 8 → 8 | +| SQLite / cold | 94,622 | 90,638 | 13 → 14 | 103 → 103 | +| SQLite / warm | 58,043 | 52,218 | 9 → 8 | 99 → 98 | +| SQLite / loss recovery | 91,830 | 87,170 | 15 → 14 | 8 → 8 | + +Both backends preserve all 24 clauses, full/delta reconstruction, original-capture +loss recovery without new admission, exact optional peer reads, tamper and early +spend refusal, and one writeback/debit under replay; work stays open. Complete +capture/delta bytes alone remain larger than quota, which separately reads +7,952 mandatory Goal bytes. Five optional peer outcomes still add 13,940 content +bytes and ten CLI/hook calls per phase. Warm RPC response bytes and loss-recovery +request/response bytes grow. One uncontrolled cohort does not qualify latency, +model retention/tokens/cache, billing, human cost or accepted outcomes. Remaining +caller replacement, writer cutover, historical-reader retirement and actual +single-session decision/outcome qualification stay open; the controller-model +comparison remains a separate later experiment. + +## Mainline integration and immutable reader identity + +The existing C1 proposal #7430 integrates main `447c35ed6`, including the shared +native progressive-material planner, generic capture selectors, request-scoped +settlement and current-request authorization. Those owners remain authoritative; +the integration does not create another policy or schema. The native operation +uses the existing material planner in the same typed boundary: sources needing +no material edits keep one RPC, while actual edits still apply to the original +Python JSON before capture and encoding. C1 scope fallbacks retain the complete +source. Signed complete v1 material staging remains unfinished; its full fallback +must not be reported as migrated or compacted. + +Two reader seams are repaired. Generic `context-read --select` continuations +carry their selection digest through the existing CLI validator. Historical +replan commands bind the original captured complete input before diagnostic +references are expanded for the executor view; hashing that expanded view made +the original immutable capture reject a valid generated command. Both repairs +reuse the existing selector, reader and hash owners, without another admission, +receipt or debit. Tampered or differently scoped reads still reject. + +The independent no-material RPC-count oracle fails on the frozen initial +integration and passes after repair. A new repeated replan-read oracle also +fails there when the complete source shares a Todo-summary lane, then passes +with the original binding. The initial repaired source `5a770d183` passes 160 typed cases and 23 +real File/SQLite replan CLI cases, control-plane typecheck, configured mypy and +scoped Ruff. Existing legacy resumed-task display assertions remain alongside +the complete-input assertions; no candidate text, unknown fields or ceiling is +removed to obtain a pass. + +A wider 37-module run at that revision stops at three failures, with 1,364 +passed and 53 environment skips; it is not a full-suite pass. Two assertions +still read the old detached Host layout. The corrected oracle checks complete +Goal bytes and exact current work in the canonical channel, and separately +retains the original pending-read and verification assertions for the historical +reader. The fixture excludes only the harness-added `_returncode` from signed +CLI input. The third failure exposes ordinary missing Task/request identity being +classified as a wait: `281910a95` restores its contract error. The four direct +File/SQLite and missing-work regressions then pass. Its local host-preparation +extraction passes the unchanged maintainability limits; that result does not +establish execution or concurrency parity. + +Integration `bca6350b2` then adopts main `ccf6aacc5`, including #7594 recovery +output guidance, #7609 first-guard choice and #7610 exact Todo-record reuse. The +existing material planner returns reference-only edits through the same native +operation, with original Python-value checks preserved. No duplicate heartbeat +view or reference owner is restored. Its 163 typed cases and control-plane +typecheck pass; focused caller/recovery follow-through is reported on #7430 at +its tested revision. Record reuse retains main's required-view profile; it does +not qualify signed-complete material staging. The source and oracle corrections +do not retroactively pass the wider interrupted/failed cohorts above. + +The later 16-module cohort also stops at three failures, with 843 passed. One +new test still calls the superseded private helper signature; it is moved to the +same existing typed-plan fixture without changing its overhead assertions. The +two real File/SQLite busy-request failures expose an author refactoring mistake: +the lane decorator was left on the preparation helper rather than the complete +execution entry. The corrected entry retains the fence over admission, host and +settlement. The existing public-entry refusal oracle fails on frozen `fc4763098` +and passes after correction, along with busy-request restart/replay. Premerge +now automatically selects that existing seven-case public-entry module when +the executor, lane owner or CLI execution entry changes, including in quick +validation; nine focused planner cases cover selection and unrelated-context +exclusion. This reuses the real fence oracle instead of adding a duplicate +implementation check. Earlier automatic passes do not qualify the broken +intermediate entry, and neither stopped cohort is reported as a full pass. + +This is integration qualification, not new installed or model behavior. Earlier +interrupted cohorts and the subsequent three real reader failures remain failed +historical observations. Earlier cost tables and **25,862 > 13,000** retain their +original revisions and status; no threshold is raised and no latest complete-cost +result is inferred. Caller/writer migration, historical-reader retirement and +actual single-session decisions, accepted outcomes and complete costs remain C1 +work; the proposal stays unfinished. + +## Signed complete material staging + +The next integration adopts main `b47bbc6c9`, including first-call selection and +original captured-failure recovery. The actual native caller supplies +`complete_turn`, rather than the legacy `quota_packet` surface. After validating +the complete decision, that caller now uses the same outcome-scope, progressive +material and exact-record owners. The canonical signed capture is not edited, +re-signed or treated as a new observation. An existing +`outcome_context_projection_v0` presentation carries the original capture +reference; it is also used when material staging alone is worthwhile. Unknown +fields, unsupported obligations, unavailable planning and small material keep +the original full fallback. Delivery disabled remains unchanged. + +Scope filtering can move an outcome to a different array position. The planner +therefore retains original row identity and source positions, then emits two +existing transport-edit stages: scope, followed by material edits. The Python +adapter applies those plans to its original JSON values. There is no second +Python material policy or new public work contract. The shared source-owned +guidance retains cumulative requirements, work links, current review/check +states, permissions and stop conditions; only supporting history, review +reasoning and evidence references become same-capture detail. Historical +scope-only presentations retain their original decoder. +Exact-reference equality still checks the original Python JSON types: a new +negative oracle caught integral floats being equated with integers by the +JavaScript bridge, so that existing IO-side safeguard is retained before edits. + +The independent public-entry oracle requires real File/SQLite `quota should-run` +to deliver the signed staged presentation and recover the exact original source +history through `context-read --select`. It also checks unchanged binding, +original Turn receipt and CLI settlement channel. The scoped fixture deliberately +places the current Agent's outcome after a peer's outcome in the original array, +so a pointer into the filtered position cannot pass as the original evidence. +Existing full-source, disabled-delivery, missing-source, unknown-field, +small-material, pending-read and tampered-hash cases remain. + +The native lifecycle cases distinguish complete required-view coverage from +optional selected evidence, a partial prefix and a truncated inner page inside +valid tool-result JSON. Partial reads never establish a full native baseline. +Repeated compaction recovers the same current presentation and original source; +it does not require finishing an unusable delta or admitting work again. +These are hook/transport checks, not proof of model retention. Default file +navigation and file-version differences are a separate active caller change; +this slice neither defines that reading policy nor adds a necessary-facts index. + +Initial follow-through runs remain failed observations: the real signed caller +first exposed the unsupported `complete_turn` surface, and the historical wrapper +reader exposed a local variable-shadowing error. Author fixtures also exceeded +the existing source-summary limit and requested oversized pages without an +explicit output budget; the fixtures were corrected within the original limits. +No acceptance, page-size or cost ceiling was raised. Final validation and frozen +source sensitivity are recorded on the proposal at their tested revision. + +This removes a demonstrated consumer integration gap, not the remaining C1 +cutover. Earlier **25,862 > 13,000**, failed/interrupted cohorts and complete-cost +tables keep their original status. Installed adoption, model inputs/retention, +tokens/cache/billing, accepted outcomes and total latency/cost are unqualified. +Caller/writer replacement, historical-reader retirement and the original quota +single-session outcome comparison remain open; the two-session controller study +remains separate. + +## Independent current-capture recovery slice + +Prioritize the independently reviewable [#7628](https://github.com/loopx-project/loopx/pull/7628) +before the remaining C1 cutover. It targets main directly at +`6743ce72593121b2e15a9f8ef84355c31c94e46c`, without an unmerged C1 dependency. +The existing native adapter publishes current original recovery and pending +delivery before optional material planning. A real saved-context CLI process +exit reproduces stale predecessor recovery on main `ce4c78088` in both resume +and compaction; the same assertions pass on the proposal. Its affected cohort +has 199 passed and five existing explicit-native opt-in skips; standard premerge +passes at the proposal head. It was merged as +`75034bfa99d39aa949d7bb0fed33913034ce7eca` on 2026-10-29; installed adoption +remains unqualified. The proposal's cohort is not a new whole-main validation. + +Matched project-call observations keep off/plain capture and typed-request counts +unchanged. Material staging adds one journal publication, from two to three; +capture files remain two and typed requests remain two. This buys current-source +durability, not a measured latency, model or complete-cost improvement. The same +recovery ordering is already present in this C1 integration; future mainline +integration must reuse that owner rather than restore another implementation. + +## Lossless-reference qualification and deferred caller migration + +The independent test proposal [#7633](https://github.com/loopx-project/loopx/pull/7633) +adds ten combinations across the existing acceptance-sharing helper and ordinary +CLI projection, directly on main `ee7b65f124`. It preserves distinct integer/float, +negative-zero and large-integer source values, a later exact carrier, source +immutability and repeated projection. The affected mainline cohort has **116 +passed**, including the existing real File/SQLite entrypoint cases; standard +premerge passes. This is a test prerequisite, not another runtime projection. + +Applying the same inputs and assertions through C1 `c335aae894`'s renamed display +and CLI interfaces produces **eight counterexamples out of ten**: JavaScript +number equality can cause a different acceptance body to be referenced away. +This adapted assertion probe is not an unchanged pytest cohort or an installed +observation. Earlier passing cohorts remain valid for their stated cases, but do +not qualify this lossless boundary. C1 stays Draft pending repair and revalidation. + +A separate, unsubmitted migration prototype moved the legacy caller's acceptance +matching into its single existing TypeScript projection call. A matched local +probe used the frozen main Python caller and the candidate against the same +native backend, with ten alternating warm samples and four equal synthetic +contracts. Output remained equal and both made one typed request, but moving +sharing after transport increased the request and local median: + +| Requirement characters per contract | Request bytes, base → candidate | Median milliseconds, base → candidate | +| --- | --- | --- | +| 8,000 | 30,498 → 55,229 | 8.18 → 8.51 | +| 64,000 | 86,498 → 279,229 | 9.25 → 10.64 | +| 256,000 | 278,498 → 1,047,229 | 11.55 → 17.04 | + +These are diagnostic caller measurements, not production-volume, isolated CPU, +model-token or long-horizon benefit qualification. The prototype was deferred +before publication; its larger transport is not an accepted refactor outcome. +Converge at the C1 boundary that already receives the complete source, validating +references against original IO values before replacement. Keep the existing +legacy caller until that usable replacement qualifies; do not add another reader +or restore mandatory outcome scopes while adopting file-first delivery. + +## Source-preserving display transport follow-through + +The independent normal proposal [#7643](https://github.com/loopx-project/loopx/pull/7643), +head `0212a1f2e` on main `5d7f0a61b`, removes a separate source-preservation defect: +reference-only context sharing returned the entire JavaScript-decoded payload +when diagnostic caps were absent. Eight numeric regression cases and an +untouched-material response check fail on that unchanged base. Both callers now +use the existing typed edit plan and original IO facts, preserving numeric +spelling, nested facts, immutability and repeated application with one request. +The same change is absorbed in C1 `fd65514e7`; it does not add another owner. + +The exact frozen requests remain byte-identical before/after. With 8,000, +64,000 and 256,000 bytes of untouched synthetic supporting material, owner +response payloads change from 31,853 / 87,853 / 279,853 bytes to 388 bytes in +each reference-only case. The diagnostic control stays at 7,659 bytes. The +model-visible views retain their content and grow nine bytes to preserve the +original numeric spelling. These are local transport observations, not model +token, latency, installed-client or complete-cost qualification; budgets are +unchanged. The proposal passes 176 Python cases, including isolated real +File/SQLite CLI and staged reads, 74 TypeScript cases and standard premerge. +Configured mypy passes 17 files; three errors in an extra CLI-file typing check +reproduce on base and head. Readback tests use the existing source signature +and reject a mutated capture; the runtime hash codec is unchanged. +The separate C1 integration cohort passes 255 Python and 94 TypeScript cases, +control-plane typecheck, configured mypy and Ruff. This affected cohort does not +replace the earlier whole-path or budget evidence. + +After absorption, the adapted #7633 assertions still produce **eight failures +out of ten** through C1 display/CLI, plus **four out of five** through complete +composition. The edit transport preserves untouched facts; it cannot repair an +earlier incorrect reference decision. These remain adapted assertion probes, +not passing unchanged cohorts. C1 stays Draft with the original budget, +writer/caller/reader retirement, numeric-reference and outcome/full-cost gaps. + +## Exact source-number comparison + +The next C1 slice repairs the preceding 12 failing assertions out of 15 across +display, CLI and complete composition. It reuses the source-value assertions now +merged in #7633. Sparse float and unsafe-integer spellings cross the existing +coarse call; the TypeScript owner uses that original identity when comparing +registered acceptance carriers and summary lanes. Different bodies remain +literal, while subsequent exact copies still share their later owner. Python +supplies JSON source facts and applies edits; it owns no carrier-selection or +equality policy. Small bodies still use the existing body-versus-reference size +decision, excluding the transport metadata from that comparison. + +Complete composition now returns the same edit plan already used by display +projection, applied to original IO values. Both paths reuse one object-path +indexer. There is no additional RPC, full-body return, public view, reader, +authority store or persistent cache. Native JavaScript callers retain their +existing result shape; the Python producer requests source-preserving edits. + +Frozen synthetic inputs at C1 baseline `dd600ac02` compare as follows. With four +identical contracts, each coarse call remains one RPC; complete-composition +request parameters grow by 491 bytes for the sparse identity and edit selector. + +| Supporting material per contract, bytes | Composition response body, base → candidate | +| --- | --- | +| 8,000 | 31,469 → 1,243 | +| 64,000 | 87,469 → 1,243 | +| 256,000 | 279,469 → 1,243 | + +The complete caller view grows by four bytes to retain original numeric +spellings. With different original contracts, correctness requires more input: +the 256,000-byte case grows from 279,469 to 536,456 caller-view bytes because the +previous result wrongly discarded a distinct body. The corrected result still +shares the later exact copies. These are bridge parameter/body and caller-view +bytes, not model tokens or total cost. Three warm timing samples had uncontrolled +concurrent work and provide no latency qualification. + +The affected Python cohort passes 246 cases, including real isolated File/SQLite +entrypoints and original-Turn reentry/settlement. Context/capture recovery adds +128 passes and five existing explicit-native opt-in skips; 104 TypeScript cases, +control-plane typecheck, configured mypy and scoped Ruff pass. Initial validation +retains 28 failures from fixtures that hashed Python spellings as though they +were the existing JavaScript codec; the corrected independent fixture uses native +JSON number encoding without changing runtime hashing or semantic refusals. +Four additional legacy-layout assertions fail on the unchanged C1 baseline too; +their migration now verifies the complete contract's owning command path, +original identity and integrity, preserving the subsequent once-only settlement +and successor checks. + +The existing JavaScript hash normalization is unchanged: numerically distinct +source values can still share its normalized hash input. This slice is not new +numeric hash-integrity qualification; immutable capture hashes retain exact-byte +verification. C1 must reconcile that identity boundary, merge current main and +adopt the existing file-first/delta and advisory navigation work while retiring +its obsolete mandatory outcome scopes/readers. A main integration attempt exposed +those owner conflicts and was aborted without retaining a parallel owner. C1 +remains Draft. The original 25,862 > 13,000 budget failure, historical negatives, +writer/caller retirement, original-quota outcome/full-cost comparison and optional +two-session qualification remain open. +Continue at the owner already holding the complete source, without resending +duplicate legacy bodies or introducing another required reader. diff --git a/docs/architecture/rfcs/ledger/controller-executor-unified-contract-v0/2026-10-28-packaged-heartbeat.raw-archive.zh-CN.md b/docs/architecture/rfcs/ledger/controller-executor-unified-contract-v0/2026-10-28-packaged-heartbeat.raw-archive.zh-CN.md new file mode 100644 index 0000000000..7fbe1e171a --- /dev/null +++ b/docs/architecture/rfcs/ledger/controller-executor-unified-contract-v0/2026-10-28-packaged-heartbeat.raw-archive.zh-CN.md @@ -0,0 +1,541 @@ +# 打包单会话 heartbeat 对照 + +本文是 [controller/executor RFC](../../controller-executor-unified-contract-v0.zh-CN.md#9-验证与验收) +的测量检查点,不代表 C1 验收或提升默认。[英文镜像](2026-10-28-packaged-heartbeat.md) +记录相同范围和结果。 + +## 来源与负载 + +以 main `843be494266774b63b3de61d0adf5dd7f4f877a2` 的原 quota 对照 +[#7430](https://github.com/loopx-project/loopx/pull/7430) 集成候选,候选运行时代码 +固定为 `1199cbe0b8e92ddf845e345483041486fe808024`。两份 wheel 分别按自身源码构建 +前端指纹,各自 1,884 个打包产品成员与来源工作树一致。未安装全局 runtime,也未拿 +活动 Goal 状态做实验夹具。 + +两臂使用同一合成负载及真实隔离 File、SQLite authority:一个活动 Goal、完整选中任务、 +一项当前 Agent 成果与五项独立 peer 成果,每项四条要求。全局意图、权限及停止条件 +仍可读取。候选在已有 native context opt-in 中展开自身成果并索引其他成果;正文仍可 +从原 capture 精确补读,展开后核对全部 24 条完整要求、owner、关联工作和未验证状态。 + +打包 CLI 路径执行 thin heartbeat bootstrap、quota/native context guard、全部必读 +上下文分页、强制 Goal 来源读取和真实 context-hook 命令。以合成 native 生命周期 +事件建立温态连续性,再通过 PostCompact/SessionStart 失效。丢失后读取**同一原始 +capture**,不替换准入;来源篡改和提前记账被拒绝,refresh/spend 重放保持一次 effect +及一次扣额,未完成的选中任务仍开放。另核对温态重建与缺 baseline 的完整回退。 + +这属于模拟宿主连续性下的打包工程观察,不证明正式 Codex App 采用、模型保留或决策、 +SDK 覆盖、任务验收成果,也不是 controller/executor 双会话实验。 + +## 观测 + +只有一组匹配 cohort,每臂、每后端、每阶段一次;宿主后台负载未受控。耗时为实际 CLI +调用之和,包含启动、必读 Goal 和生命周期观察。请求数是 Python 到 runtime 的逻辑 +请求,不推断物理 framing、重试和 provider 内部 IO。产物字节指已交付 UTF-8 上下文, +不是 tokens 或完整 stdout。 + +| 后端/阶段 | 上下文字节,原实现 → 候选 | 逻辑请求 | 耗时 ms | +| --- | ---: | ---: | ---: | +| File/冷态完整 | 75,387 → 76,162 | 103 → 102 | 5,052.49 → 4,867.53 | +| File/温态差分 | 40,991 → 43,558 | 99 → 98 | 3,240.32 → 3,399.05 | +| File/丢失恢复 | 74,619 → 75,390 | 6 → 6 | 4,045.91 → 4,213.20 | +| SQLite/冷态完整 | 75,483 → 76,270 | 103 → 102 | 4,566.19 → 4,428.81 | +| SQLite/温态差分 | 41,085 → 43,666 | 99 → 98 | 3,236.50 → 3,416.50 | +| SQLite/丢失恢复 | 74,713 → 75,498 | 6 → 6 | 4,149.99 → 3,957.72 | + +两臂冷态/温态/恢复均为 13/9/13 次 CLI。失效本身另计两次 hook 调用,本组耗时 +683–738 ms。候选展开全部五项 peer 成果每阶段增加 13,940 字节正文、五页 reader 和 +五次观察 hook:**10 次 CLI/10 次逻辑请求**、17,620 字节 stdout、3,416–3,713 ms。 +原实现已经内联这些正文。 + +完整阶段 stdout 也增加:File 冷态 94,662 → 96,082 字节、温态 58,077 → 60,649、 +恢复 89,807 → 91,144;SQLite 分别为 94,776 → 96,208、58,185 → 60,771、 +89,911 → 91,262。每后端另有七次结算/负例/读回调用,两臂均为 226 次逻辑请求, +同后端 stdout 合计相同。初始化、构建、失败作者探针与可选补读单独计量,不从历史抹去。 + +合并 acceptance/title/Explore 投影减少一次逻辑请求及 bridge JSON。例如 File 冷态 +请求/响应正文从 965,261/585,535 降到 902,963/494,206 字节。这一局部下降**没有** +抵消更大的交付产物和可选补读;两后端温态耗时均上升,恢复结果混合。本样本不支持 +因果提速、默认 SQLite 性能资格或完整成本正向 diff。Tokens、cache、账单、验收成果、 +人工注意力与长程净益仍未资格化;此前负向和混合测量继续保留。 + +## 归属缺口与接续 + +相对原 quota,scope 去掉约 13 KB 的 peer 正文,但候选仍保留约 6.6 KB 的重复 Todo +诊断列表,并新增约 3.9 KB scope 元数据;候选列表及其他诊断重复消耗了剩余节省。 +这是组合/压缩缺口,不能据此认定 peer scope 已降低总成本。 + +该检查点选择的后继 C1 切片是刻画原 quota 中必要的诊断压缩,迁入既有共享 typed composer,并删除 +被替代的 Python caller 算法。保留完整选中工作、portfolio/horizon、claim/lease、全局 +义务、未知字段、精确引用与历史恢复。旧 Python compactor 会丢弃未知列表和缩短部分 +正文,原样复制不满足此合同。继续用同一打包对照分别测默认读取与全 peer 补读,再判断 +是否改善;没有理由新增 packet 格式或逐字段 RPC。 + +集成候选采用已合入的 route owner(#7520)及 reference owner(#7457)。旧投影的 +acceptance、Task 标题和 Explore 引用合用既有 `reference_context` 操作,删除独立 +acceptance 操作和重复 controller-input dispatch;完整组合复用相同语义函数。这只是 +有界代码收敛,不是全部 writer 切换、历史 reader 退役或 C1 完成。 + +最终受影响测试 469 通过、五项可选 native/SDK 跳过;116 项 typed 测试及 control-plane +类型检查通过。此前构建指纹、缺依赖、harness carrier 和过时调用数断言失败保留为作者/ +验证成本,不静默改成产品通过。本对照未调用模型、付费评测、managed benchmark, +未执行 live 安装、发布或合并。 + +## 共享诊断 owner 的接续结果 + +后续 `d33c1a19d91738c66073d9e71586f14466f36d89` 以 +`quota/diagnostic_projection.ts` 替换 Python Todo 列表算法。现有 +`reference_context` 调用方让 should-run 和整组 status/plan 行复用它;scoped +native composition 在已有请求内部调用相同函数。 +[#7557](https://github.com/loopx-project/loopx/pull/7557) 在 main +`19c213324fbb5990288bd374c1b79096f22bb152` 上以 +`5b5d9dd3b0a816aae9d5160b849cff4a3c38da13` 提交可独立使用的旧读取方切片, +为正常 PR;其 typed 模块与集成版本完全相同。本次未合并或安装任一提案。 + +仅明确已知的诊断 lane 且全部为已知规范 Todo 记录时可以有界投影。条目字段/版本未知、 +非记录条目或复杂嵌套内容会保留整个列表;未知列表保留。留下的记录全文不变,不缩短 +或重建 portfolio 正文、能力候选、planning horizon、选中工作和原 succession IDs。 +原 capture/恢复仍完整。投影元数据指向已有 source capture,不在各 lane 重复长恢复命令。 + +复用同一冻结打包 harness 和原 quota commit,按相同路径长度、合成任务及 24 条完整 +要求重跑一组匹配 cohort。基线 wheel 的 1,884 个产品成员、候选的 1,885 个成员分别 +与来源一致。测量绑定上述 rebase 前 commit;随后 rebase 到 `19c213324` 只带入 +无关的已合入 Lark 返回修复,不把冻结实验改称后续 head 的测量。 + +| 后端/阶段 | 上下文字节,原实现 → 候选 | Stdout 字节 | 逻辑请求 | 耗时 ms | +| --- | ---: | ---: | ---: | ---: | +| File/冷态完整 | 75,648 → 70,388 | 95,004 → 89,875 | 103 → 102 | 4,959.03 → 6,475.69 | +| File/温态差分 | 41,252 → 44,029 | 58,401 → 61,183 | 99 → 98 | 3,465.08 → 4,538.62 | +| File/丢失恢复 | 74,880 → 69,618 | 90,113 → 84,903 | 6 → 6 | 5,108.18 → 5,762.51 | +| SQLite/冷态完整 | 75,740 → 70,492 | 95,114 → 89,997 | 103 → 102 | 5,771.16 → 5,856.03 | +| SQLite/温态差分 | 41,346 → 44,133 | 58,509 → 61,301 | 99 → 98 | 3,772.95 → 3,794.99 | +| SQLite/丢失恢复 | 74,974 → 69,722 | 90,217 → 85,017 | 6 → 6 | 4,226.47 → 5,113.92 | + +两臂 CLI 次数仍为 13/9/13。候选各阶段展开全部五项 peer 仍增加 13,940 字节正文、 +17,620 字节 stdout 及 10 次 CLI/逻辑请求;补读耗时 4,107–4,875 ms,原实现已 +内联这些正文。七次结算/负例/读回仍为 226 次逻辑请求,同后端 stdout 相同, +保持一次 effect/扣额和开放任务。构建、初始化、失败探针、两次失效 hook 和补读 +各自保留成本记录。 + +冷态/恢复正文约少 5.3 KB,但温态约多 2.8 KB,全部 peer 消费仍更贵。本组每个 +候选阶段的观测耗时均更长;单次观测和未控制的后台负载不能支持因果延迟估计。 +中间版本重复 capture 命令,更大(File 温态 45,187、SQLite 45,303 字节); +修元数据不抹去该实验,也不证明净收益。 + +四组冷/温 File/SQLite 展示与各自原始 capture 独立核对完整选中工作、boundary、 +horizon、capability gate 和 portfolio。故意删除 capability gate 的 QA wheel +经实际打包 guard/reader 路径被拒绝;这验证 oracle 敏感性,不证明模型遵从。 +来源篡改、提前 spend、同 capture 丢失恢复及一次结算的正负例保持。 + +最终集成受影响集合 144 项 Python、117 项 typed 通过;较早的扩大集合为 533 通过、 +五项可选跳过,发生在加强未知条目回退之前。独立 #7557 为 264 项 Python/70 项 typed +通过,含真实 File/SQLite status/plan/detail 和规范 Todo 回读,14 项选中 premerge +检查均过。Status/plan 新增一次粗粒度 typed 请求;显式完整 Todo 摘要跳过它。 +拥挤诊断单元夹具因保留完整候选增至 43,862 字符,是有意的信息增量,不是提速。 +未修改的公开 v4 多 Agent 预算探针在原 quota 通过,在前一版及当前集成 wheel 均为 +27,934 > 13,000 字符而失败;该集成失败保持开放,未扩大公开预算。 + +下一步沿现有 C1 诊断温态重建/元数据成本,保留义务,再验收剩余消费者和 writer +切换。不宣称完整成本正向、默认 SQLite 性能、正式 App/模型保留、token/cache/账单、 +验收成果或长程收益。C1 及独立的 C2/controller 实验继续开放。 + +## 搬移上下文的集成 + +Runtime `167b31e5d078193b9fd73ad6609804e268390972` 已 rebase 到 main +`f205c02a37d5a668c956733a721af911dcac7fab`,采用现有 +[#7528](https://github.com/loopx-project/loopx/pull/7528) 的 codec 变更 +`759c16a9cf430bb7442b47dd3a5c3336ffb93666`,保留主干的偏好作用域绑定、原生 checkpoint +夹具及智能中介设计。没有新增第二编码器;精确基线子树加字面当前覆盖,替代对未变证据 +反复引用长路径。未知及当前控制仍内联,原 capture、身份和恢复保持,scoped wrapper +回归覆盖相同实现。 + +24 条合成记录搬移,对比该 runtime 的不可变父版本 +`87e216f24f966671d35e035df7ba285248b48bad`:普通完整差分 13,199 → 6,090 字节,C1 +scoped wrapper 差分 13,809 → 6,230。冷态/当前完整编码分别保持 20,060/20,188 及 +20,167/20,295 字节。两者精确重建,实际旧 decoder 对新 overlay 恢复相同当前全文; +原缺失 overlay 用例在采用前失败。这只是 codec 观察,不含模型保留、tokens、framing、 +账单或任务成果。 + +未改打包 harness 再以原 quota `843be494266774b63b3de61d0adf5dd7f4f877a2` 为基线运行 +一组匹配 cohort;两臂夹具和路径长度相同,1,884/1,885 个产品成员与各自来源一致。 +本组结果绑定本 runtime,之前表格仍属于各自原版本,不重新归属。 + +| 后端/阶段 | 上下文字节,原实现 → 候选 | Stdout 字节 | 逻辑请求 | 耗时 ms | +| --- | ---: | ---: | ---: | ---: | +| File/冷态完整 | 75,211 → 69,934 | 94,432 → 89,286 | 103 → 102 | 5,961.28 → 5,183.22 | +| File/温态差分 | 40,817 → 43,575 | 57,861 → 60,624 | 99 → 98 | 3,981.29 → 3,592.23 | +| File/丢失恢复 | 74,445 → 69,164 | 89,603 → 84,374 | 6 → 6 | 5,052.05 → 5,156.02 | +| SQLite/冷态完整 | 75,311 → 70,044 | 94,550 → 89,414 | 103 → 102 | 5,205.45 → 6,393.69 | +| SQLite/温态差分 | 40,913 → 43,683 | 57,971 → 60,746 | 99 → 98 | 3,482.77 → 4,216.01 | +| SQLite/丢失恢复 | 74,541 → 69,272 | 89,709 → 84,492 | 6 → 6 | 4,649.12 → 5,590.37 | + +CLI 次数仍为 13/9/13;全部五项 peer 补读在候选每阶段仍增加 13,940 字节正文、17,620 +字节 stdout 和十次 CLI/逻辑请求,观测耗时 4,046–9,431 ms。七次负例、结算及回读 +仍为 226 次逻辑请求,同后端两臂 stdout 相同。篡改/提前 spend 拒绝、24 条全文、同 +capture 恢复、一次 effect/扣额及开放任务通过。四组来源核对完整保留 selected work、 +boundary、horizon、capability gate 和 portfolio;新 QA mutant wheel 删除能力候选后被 +真实 guard/reader 拒绝。计时 cohort 没有其他自有构建或测试并发,宿主后台负载未控; +单次观察不认证延迟或 p95。 + +最终 typed 集合 147 项及 typecheck 通过。受影响 Python 运行保留 299 通过、51 项可选 +native/SDK 跳过,以及长临时 namespace 下两项恢复文本尺寸失败。同路径受控比较在 +不可变 main 和本 runtime 均复现两项 2,015 字符失败;两者钩子正文不内嵌原要求全文, +均保留原恢复命令。正常路径的 lifecycle 套件另有全部 145 项通过,没有放宽预算、断言或夹具正文, +原失败记录保留。新 wheel 先遇到主干前端 bundle 过期,重建后打包成功。未改 v4 探针 +仍为 27,934 > 13,000 字符而失败。 + +搬移冗余已减少,普通温态输入仍多约 2.8 KB,全部 peer 阅读仍更贵;后者是原 C1 +组合/元数据的另一未解缺口。默认 SQLite 性能、正式 App/模型保留、token/cache/ +账单、验收成果和完整长程净收益均未资格。沿原 C1 继续该缺口及剩余消费者,不以采用 +本修复结清 C1、C2 或 controller 实验。 + +随后集成 rebase 到 main `0cfbf11dcea4ba7bc8fb13f06f1c915b63ce8fad`,其中已含 #7528, +重复 commit 因而退出。[#7547](https://github.com/loopx-project/loopx/pull/7547) 两项 Goal +来源提交保留原作者,12 个贡献的产品/测试 blob 与已接收的集成 head 完全相同。 +主干 capture owner 仍在准入前 stage、准入后发布,发布后才安装原完整契约。删除未用 +capture helper 后,进程级 fence 重新包住实际 Turn executor;既有占用 lane 用例在 +修复前失败、修复后通过。 + +Runtime `6f30cc454f2dea7e77f0821a14a1deaf268efe2e` 的 wheel 含 1,885 个与来源一致的 +产品成员。重基后的 typed 集合 148 项及 typecheck 通过。集成 Python 首次记录 +185 通过、两项明确的 live-host 跳过及 12 失败:八项新增 staged 回读断言把 adapter +元数据与实际模型投影混比,四项 observer 仍记录 #7547 之前的 metadata-only 操作。 +保留对真实 Host 输入的完整比较,观测更严格的 dispatch 操作后,54 项 Host-capture +全部通过,没有放宽产品门;前次失败和其余已通过案例分别保留。 + +该 wheel 再通过打包 File/SQLite bootstrap、完整 Goal 交付、全部条款/详情读取、同 +capture 恢复、拒绝及一次结算。本次功能验证与其他检查并行,不是新的匹配计时 cohort; +旧成本表仍绑定 `167b31e5d`,不改称后续源码的测量。当前版本完整成本与成果资格保持 +开放。 + +随后已提交版本的 premerge 暴露维护性失败:executor 有 94 条语句,超过既有 90 条 +限制。Runtime `82f93ab76a403c2633efedb2f8bf02f85be8e3c6` 将已发布输入的安装收回 +现有 staged-capture owner,保留恢复绑定与发布顺序。其 1,885 个产品成员与来源一致, +54 项 Host-capture 及未改动的维护性 ratchet 均通过。原失败保留,没有新增例外或改 +阈值;本次 owner 收敛不把历史温态输入及 v4 预算失败改判通过。 + + +下一次集成将保留的 C1 历史 rebase 到 main +`6f8f476388645fcea2269329d32974b559d490e6`,采用 +[#7557](https://github.com/loopx-project/loopx/pull/7557) 的修复版本 +`eb4e9b970aeb1ffb83e46705d6386cc3a4679ead`。该独立切片原先把整个 Python 输入经 +JavaScript JSON 往返,展示字段之外的 `1.0`、负零及安全整数范围外的值可能改变。 +九项独立的原数值案例在修复前失败。现在共享 typed owner 仅返回展示变更及不可变 +来源引用,Python 在原值上应用,不拥有裁剪规则。独立切片通过 305 项 Python、99 项 +typed、typecheck、Ruff 及其标准 premerge;这些是源码及真实 File/SQLite CLI 检查, +不是安装或独立验收。 + +C1 runtime `7f35454b392e09ae574c5065c473ee27b5eee853` 使用逐字节相同的共享诊断 +模块。其验收共享阶段原先克隆所有来源对象,导致搬移数值事实无法沿用来源引用;现在 +只复制发生变化的已注册 carrier 路径。首次集成保留 253 通过、五项失败:三项暴露 +上述克隆问题,两项旧边界夹具不满足完整 Goal 的 dispatch 要求,后两项在前一 C1 head +也失败。夹具现在将任务保留于规范 provider,完整交付非 Todo 的 Goal 内容,同时 +验证当前原始契约 Host 输入与历史作用域别名及拒绝,没有放宽 dispatch。最终受影响 +集合 258 项 Python 全过;110 项 typed、typecheck 和 Ruff 通过。旧 wheel 与匹配计时 +cohort 仍绑定各自实际版本。本次源码接续不认证新的打包 cohort,不消除温态输入或 v4 +预算失败,也不结清剩余消费者、reader 退役及实际模型/成果的完整成本。 + + +额外的完整 Host 集合在后续 main 集成上保留 200 通过、两项失败:operation-host +oracle 仍预期折叠空白,而主干 [#7549](https://github.com/loopx-project/loopx/pull/7549) +已经去掉该行为。实际 `chat_agent.py` blob 与已核 main 基线完全相同。两类 transport +都检查原 prompt 字节,并保留 schema、重试和篡改断言后,54 项 Host-capture 全过。 +此处修正测试 oracle,没有改变生产 transport,首次失败记录保留。 + +GitHub 随后报告 #7557 已合并为 `4b2b97b7b726d902a20969e3911fd15d15b4bb2e`,七个 +贡献文件均与修复 head 相同。发生合并不能补足尚缺的新 head 独立评审或受保护操作 +回执。上述 C1 资格仍绑定冻结的 main 基线,不隐含认证后续 main 变化;C1 仍是尚未 +完成的作者集成,原有成本、消费者及退役缺口保持。 + +## 完整 Goal 复用与可独立使用的原生切片 + +C1 随后 rebase 到 main `f5e9be3671c1b5c80eba5c62fe4d617bfefd66d6`。Runtime +`a0cc4c14b` 精确复用不变的作用域阅读指令和 objective,wrapper 其他字段仍取当前值; +完整 Goal 正文也仅在既有来源完整性判定通过后复用。该判定原样移到 +`goal_context_source.ts`,由 fulfillment 与 codec 共享。正文变化、控制字段、scope、 +索引、归属、修订及未知字段仍按字面交付;畸形凭据或缺少基线不能隐藏必读内容。 +这减少重复解释,没有再建上下文或决策 owner。 + +Source `ebdce8a49b4faa584571cfb688aa2c2a238a5860` 保留上述行为和原生完整 Goal +回归覆盖。重建 wheel 的 1,889 个产品成员与源码一致,没有仅存在于包中或不匹配的 +成员。使用同一份未改动的私有 harness,与原 quota 基线 +`843be494266774b63b3de61d0adf5dd7f4f877a2` 比较:namespace 等长,六项成果、 +24 条要求、工作、停止条件及后端相同。两组都计入必需的额外 Goal 文件读取;恢复 +还计入两个失效/启动 hook 输出,沿原 capture 读取,不重新准入。可选 peer 展开单列。 + +| 后端/阶段 | 原 quota stdout 字节 | C1 stdout 字节 | 调用,quota → C1 | RPC,quota → C1 | +| --- | ---: | ---: | ---: | ---: | +| File/冷态 | 94,892 | 90,918 | 13 → 14 | 103 → 103 | +| File/温态 | 58,289 | 52,474 | 9 → 8 | 99 → 98 | +| File/上下文丢失恢复 | 92,068 | 87,418 | 15 → 14 | 8 → 8 | +| SQLite/冷态 | 95,002 | 91,048 | 13 → 14 | 103 → 103 | +| SQLite/温态 | 58,401 | 52,598 | 9 → 8 | 99 → 98 | +| SQLite/上下文丢失恢复 | 92,178 | 87,540 | 15 → 14 | 8 → 8 | + +调用数包含原生 CLI/hook 及必需的 Goal 文件读取,与 RPC 分列。此 cohort 的 capture/ +delta 自身字节仍大于 quota;完整输入对照改善,是因为原 quota 还须另外读取 7,952 +字节的 Goal。C1 可选展开五项独立 peer 成果,每个阶段仍另增 13,940 正文字节及十次 +CLI/hook 调用。两后端的完整条款、精确重建、压缩恢复、篡改/提前扣额拒绝、一次 +持久写回/扣额及重放均通过。这是确定性打包消费者检查,不是实际模型保留或成果验收。 +单个 cohort 与后台工作并行,不认证延迟、模型 token/cache、账单、人工或完整长程 +收益。历史温态负向观察仍绑定原先源码。 + +最终受影响集合集成的 205 项 Python、112 项 typed、typecheck、配置内 mypy 和限定 +Ruff 通过。打包源码在未改动的历史 v4 oracle +(digest `d12a8843834aea84…`)仍为 27,934 > 13,000 字符而失败;早先 26,253 字符 +观察使用另一份当时源码 oracle(`1b5d010a30e608c6…`),单独保留。正向的分页输入 +比较不豁免或重标这两项失败。 + +可独立使用的 [#7575](https://github.com/loopx-project/loopx/pull/7575),精确 head +`d980d621219b10353fdaeb058a1a0fd5714f4389`、基于 main +`2cdff65d886d13121ffd78dccd96dd7413ab9d01`,在现有 opt-in 原生路径完整交付 Goal +并精确复用温态正文,不依赖尚未合入的 C1。完整 Goal oracle 在 main 的 File、SQLite +均失败,修改后通过。175 项 Python、57 项 typed、typecheck、配置内 mypy、限定 Ruff +及打包真实后端恢复/结算通过。匹配的原生 stdout 温态少约 7.7 KB,但冷态及丢失恢复 +各增约 1.2 KB 和一次 RPC。该取舍明确保留;这个正常作者 PR 不认证完整 C1 或提升默认。 +C1 复用相同判定与原生来源行为,作用域 wrapper 复用仍留在 C1。剩余调用方、writer +切换、历史 reader 退役及实际决策/成果资格,沿原工作流继续。 + +## 同 capture 的 Todo 摘要列表复用 + +C1 随后 rebase 到 main `ffc90182bc2a896aa9980cf24dcf23a0e3276e3d`,其中 #7575 +已合入为 `a6283d923e3c951443fea65ba1a855c4f7c6c335`。原生 Goal producer 和完整性 +owner 直接采用,不复制。Runtime `4604ee479` 在既有 typed 诊断 owner 中加入精确 +列表复用:相等且非空的已注册数组仅保留一份字面正文,在更小时用同摘要内的 +`_ref` 引用。相等比较保留顺序、JSON 类型和未知条目字段;其他字段与候选集合 +不变。完整 composer、action projection 和 native 展示共用此 owner,应用展示上限 +前先展开引用。不新增状态读取、capture、准入或结算 owner。正文/引用歧义、引用链、 +目标缺失和跨摘要目标均拒绝,包括内部契约 hash 有效的情况。旧 capture 仍可读取。 + +同一源码工作负载从修改前 27,934 字符降到修改后 25,862,少 2,072(7.4%),全部来自 +agent summary;其他根字段长度不变。重建 wheel 的 1,889 个产品成员与源码一致, +独立运行未改动的 `d12a8843834aea84…` v4 oracle,仍为 **25,862 > 13,000** 而失败。 +这是 opt-in 完整契约变体,不是默认 quota 输出预算;两项上限均未提高,也不称通过。 +相同真实 File/SQLite producer oracle 在不可变修改前 `87c14a5aa` 失败,加入引用后 +通过。集成通过 333 项 Python;五项须显式 native Codex 环境的用例仍跳过。125 项 +typed、control-plane typecheck、配置内 mypy 和限定 Ruff 通过。另行纠正过期 bridge +测试:display edits 与 edits 比较,展开后的文档保留原语义断言。 + +同一未改动的打包 harness,再以等长 namespace 和全部必读 Goal 内容,对照原 quota +`843be494…` 与当前集成候选。此新 cohort 测量完整集成,其差异不能把列表修改与 +rebase、先前 C1 工作分离归因。 + +| 后端/阶段 | 原 quota stdout 字节 | C1 stdout 字节 | 调用,quota → C1 | RPC,quota → C1 | +| --- | ---: | ---: | ---: | ---: | +| File/冷态 | 94,510 | 89,911 | 13 → 12 | 103 → 102 | +| File/温态 | 57,931 | 52,094 | 9 → 8 | 99 → 98 | +| File/上下文丢失恢复 | 91,720 | 87,048 | 15 → 14 | 8 → 8 | +| SQLite/冷态 | 94,622 | 90,638 | 13 → 14 | 103 → 103 | +| SQLite/温态 | 58,043 | 52,218 | 9 → 8 | 99 → 98 | +| SQLite/上下文丢失恢复 | 91,830 | 87,170 | 15 → 14 | 8 → 8 | + +两后端保留全部 24 条要求、全量/差分重建、无需新准入的原 capture 丢失恢复、精确 +可选 peer 补读、篡改及提前扣额拒绝、一次写回/扣额和重放,工作保持 open。完整 +capture/delta 自身字节仍大于 quota;原 quota 另读 7,952 字节必需 Goal。可选五项 +peer 成果每阶段仍另增 13,940 正文字节和十次 CLI/hook 调用。温态 RPC 响应字节与 +丢失恢复的请求/响应字节增长。一次非受控 cohort 不认证延迟、模型保留/token/ +cache、账单、人工或验收成果。剩余调用方替换、writer 切换、历史 reader 退役及实际 +单会话决策/成果资格仍未完成;controller 模型比较另作后续实验。 + +## 主线集成与不可变 reader 身份 + +既有 C1 提案 #7430 集成 main `447c35ed6`,采用共享的原生渐进材料 planner、通用 +capture selector、request-scoped settlement 及当前 request 授权。继续以这些 owner +为准,不新增决策或 schema。原生操作在相同 typed 边界内调用既有材料 planner:无需 +材料编辑的输入保留一次 RPC;确需编辑时,仍在 capture 和编码前应用于原始 Python +JSON。C1 scope 回退保留完整来源。已签名完整 v1 的材料分阶段迁移尚未完成,其完整 +回退不能称为已迁移或已压缩。 + +修复两处 reader 接线。通用 `context-read --select` 接续的 selection digest 通过既有 +CLI 校验。历史 replan 命令在为 executor 展开诊断引用前,先绑定原始 capture 中的完整 +输入;此前对展开视图取 hash,会使不可变原 capture 拒绝其生成的有效命令。两项修复 +均复用既有 selector、reader 和 hash owner,不另行准入、记回执或扣额。篡改及不同 +作用域的读取仍拒绝。 + +独立的无材料 RPC 次数 oracle 在冻结的初次集成上失败,修复后通过。新增重复 replan +读取 oracle 在完整来源复用 Todo 摘要列表时同样复现失败,保留原绑定后通过。修复后 +初次修复源码 `5a770d183` 通过 160 项 typed、23 项真实 File/SQLite replan CLI、control-plane typecheck、 +配置内 mypy 和限定 Ruff。既有 resumed-task 展示断言与完整输入断言同时保留;未为 +通过测试而移除候选正文、未知字段或上限。 + +该版本随后运行更广的 37 模块 cohort,在第三项失败处停止:1,364 项通过、53 项环境 +跳过,不能称为整套通过。其中两项断言仍读取旧的 detached Host 布局。修正后的 +oracle 核对 canonical channel 中完整 Goal 字节和当前任务全文,同时单独保留历史 +reader 的原必读及验证断言;签名 CLI 输入只排除 harness 另加的 `_returncode`。 +第三项失败暴露普通任务缺少 Task/request 身份时被误判为等待;`281910a95` 恢复其 +contract error。四项直接 File/SQLite 和缺失任务回归随后通过。同版本的局部宿主 +准备提取通过原维护性上限;这不能证明执行与并发等价。 + +集成 `bca6350b2` 随后采用 main `ccf6aacc5`,包括 #7594 恢复输出指引、#7609 首次 +guard 选择及 #7610 精确 Todo 记录复用。相同 native 操作接收既有材料 planner 的 +纯引用编辑,保留原始 Python 值核对;不恢复第二套 heartbeat 视图或引用 owner。 +163 项 typed 和 control-plane typecheck 通过;后续限定 caller/recovery 验证在 +#7430 绑定各自实测版本记录。记录复用仍保留 main 的 required-view profile,不认证 +已签名完整输入的材料分阶段交付。源码及 oracle 修正不倒改上述中断/失败 cohort。 + +后续 16 模块 cohort 同样在第三项失败处停止,843 项通过。一项新测试仍调用已替换的 +私有 helper 签名,改用既有相同 typed-plan fixture,保留原开销断言。两项真实 +File/SQLite busy-request 失败暴露作者提取时的错误:lane 装饰器留在准备 helper, +而非完整执行入口。修正后,执行锁继续覆盖准入、host 和结算。既有公共入口拒绝 +oracle 在冻结 `fc4763098` 失败,修正后通过,同时核对 busy-request 重启/重放。 +现在 premerge 在 executor、lane owner 或 CLI 执行入口变化时自动选择既有七项公共 +入口测试,包含 quick 验证;九项限定 planner 用例核对选择及无关 context 编辑排除。 +复用真实 fence oracle,不新增重复实现检查。先前自动检查通过不能认证错误的中间 +执行入口;两组停止的 cohort 都不称为整套通过。 + +这是集成验证,不是新安装或模型行为。先前中断的 cohort、随后三项真实 reader 失败 +仍保留原失败观察。既有成本表及 **25,862 > 13,000** 仍绑定原版本与状态;未提高上限, +不推断最新版完整成本收益。调用方/writer 迁移、历史 reader 退役及实际单会话决策、 +验收成果和完整成本仍属 C1 工作,提案保持未完成。 + +## 签名完整输入的材料分阶段 + +后续集成采用 main `b47bbc6c9`,包括首次选择及原 capture 失败恢复。真实 native +调用方使用 `complete_turn`,而非旧 `quota_packet` surface。完整决策验证通过后, +该调用方现在复用相同 outcome scope、渐进材料及精确记录 owner。canonical 签名 +capture 不被编辑、重新签名或当成新观察。既有 `outcome_context_projection_v0` +呈现携带原 capture 引用;只有材料分阶段值得采用时,也使用这个呈现。未知字段、 +不支持的义务、不可用规划和小材料仍保留原完整回退;关闭交付时行为不变。 + +范围筛选可能改变 outcome 的数组位置。因此 planner 保留原始条目身份和来源位置, +依次输出两个既有传输编辑阶段:先 scope,再材料编辑。Python adapter 将这些计划 +应用于原始 JSON 值,不新增 Python 材料决策或公开工作契约。共享来源 owner 的指引 +保留累积要求、工作关联、当前 review/check 状态、权限与停止条件;只有支持性历史、 +review 原因及证据引用改为同 capture 选读。历史 scope-only 呈现保留原 decoder。 +精确引用相等性仍核对原 Python JSON 类型:新增反例捕获 JavaScript 桥接把整数值 +浮点数与整数混同,因此在编辑前继续保留既有 IO 侧校验。 + +独立公共入口 oracle 要求真实 File/SQLite `quota should-run` 交付签名分阶段 +呈现,并用 `context-read --select` 精确恢复原 source history;同时核对 binding、 +原 Turn 回执和 CLI 结算 channel 不变。范围 fixture 故意把当前 Agent 的 outcome +放在原数组的 peer 之后,避免误用筛选后的位置也能通过证据校验。既有完整来源、 +关闭交付、缺失来源、未知字段、小材料、pending read 及 hash 篡改用例继续保留。 + +native 生命周期用例区分完整 required-view 覆盖与可选证据、未完成前缀,以及外层 +工具 JSON 有效但内层 page 被截断。部分读取不建立完整 native baseline。重复 +compaction 仍恢复相同当前呈现及原来源,不要求先读完已不可用的 delta,也不重新 +准入。这些是 hook/传输校验,不证明模型保留。默认文件导航及文件版本差分属于另一个 +进行中的 caller 改动;本切片不定义该阅读策略,也不新增必要事实索引。 + +初次后续运行保留失败观察:真实签名调用方首先暴露不支持 `complete_turn` surface, +历史 wrapper reader 暴露局部变量遮蔽错误。作者 fixture 还曾超过既有 source-summary +上限,并在未声明输出预算时请求过大 page;随后在原限制内修正。未提高验收、page +或成本上限。最终验证及冻结源码敏感性在提案中绑定实测版本记录。 + +这移除了已证实的消费者接线缺口,不代表剩余 C1 切换完成。此前 **25,862 > 13,000**、 +失败/中断 cohort 及完整成本表均保留原状态。安装采用、实际模型输入/保留、 +tokens/cache/账单、验收成果与总延迟/成本仍未资格化。调用方/writer 替换、历史 +reader 退役及相对原 quota 的单会话成果对照保持开放;双会话 controller 研究另行进行。 + +## 独立的当前捕获恢复切片 + +优先让可独立评审的 [#7628](https://github.com/loopx-project/loopx/pull/7628) 先于剩余 +C1 切换推进。该提案 `6743ce72593121b2e15a9f8ef84355c31c94e46c` 直接面向 main, +不依赖未合 C1。既有 native adapter 在可选材料规划前,先发布当前原始来源的 recovery +及 pending delivery。真实 saved-context CLI 进程退出反例在 main `ce4c78088` 的 +resume/compaction 均复现恢复前一份来源,提案通过相同断言。受影响 cohort 为 +199 项通过、五项既有显式 native opt-in 跳过;提案 head 的标准 premerge 通过。 +2026-10-29 已合入为 `75034bfa99d39aa949d7bb0fed33913034ce7eca`;安装采用仍未资格化, +提案 cohort 不冒充新的完整主线验证。 + +相同 project 调用的关闭态/普通态 capture 及 typed 请求数不变。材料分阶段多一次 +journal 发布,从两次增至三次;capture 文件及 typed 请求仍各两份/次。这换取当前 +来源的持久可恢复性,不是已测延迟、模型或完整成本收益。C1 集成已具有相同恢复顺序; +后续主线集成应复用该 owner,不恢复第二份实现。 + +## 无损引用资格与暂缓的调用方迁移 + +独立测试提案 [#7633](https://github.com/loopx-project/loopx/pull/7633) 直接基于 main +`ee7b65f124`,在既有验收共享 helper 和普通 CLI 投影中新增十个组合,保护不同整数/ +浮点、负零及大整数原值、后续精确 carrier、来源不变与重复投影。受影响主线 cohort +**116 项通过**,含既有真实 File/SQLite 入口;标准 premerge 通过。这是测试前置, +没有新增运行时投影。 + +通过 C1 `c335aae894` 已改名的 display/CLI 接口执行相同输入与断言,十个组合中有 +**八个反例**:JavaScript 数值相等可能把不同的验收正文替换成引用。这是经过接口适配 +的断言 probe,不是原样 pytest cohort 或安装态观察。此前通过 cohort 对各自场景仍 +有效,但未覆盖此无损边界;C1 保持 Draft,修复后需重新验证。 + +另一个未提交的迁移原型将 legacy 调用方的验收匹配移入既有的一次 TypeScript 投影 +调用。同一 native backend 上,对冻结 main Python 调用方和候选使用四份相同合成 +合同,交替执行十次温态样本。输出一致、typed 请求均为一次,但共享晚于传输使请求 +及本地中位耗时增加: + +| 每份合同的要求字符数 | 请求字节,基线 → 候选 | 中位毫秒,基线 → 候选 | +| --- | --- | --- | +| 8,000 | 30,498 → 55,229 | 8.18 → 8.51 | +| 64,000 | 86,498 → 279,229 | 9.25 → 10.64 | +| 256,000 | 278,498 → 1,047,229 | 11.55 → 17.04 | + +这是调用方诊断测量,不是生产规模、隔离 CPU、模型 token 或长程收益资格。原型在 +公开前暂缓,传输增加没有被当成已验收重构成果。应在已收到完整来源的 C1 边界收敛, +替换引用前核验原始 IO 值;可用替代方案资格齐备前保留现有 legacy 调用方。采用默认 +文件交付时,不另建 reader,也不恢复强制 outcome 读取范围。 + +## 保留来源原值的展示传输接续 + +独立普通提案 [#7643](https://github.com/loopx-project/loopx/pull/7643),head +`0212a1f2e`、main 基线 `5d7f0a61b`,移除另一处来源保真缺陷:未开启诊断裁剪的 +上下文引用共享会返回完整 JavaScript 解码结果。八个数值回归场景及一个未修改材料 +返回检查在该未改动基线上失败。两条调用方现统一使用既有 typed 修改计划和原始 IO +事实,一次请求保留数值拼写、嵌套事实、来源不变与重复应用。C1 `fd65514e7` 已吸收 +同一改动,没有另建 owner。 + +冻结请求在修改前后逐字节相同。未修改的合成支持材料分别为 8,000、64,000、256,000 +字节时,仅引用场景的 owner 返回体由 31,853/87,853/279,853 字节均降至 388 字节; +诊断控制保持 7,659 字节。模型可见视图保留正文,为保留原始数值拼写增加九字节。 +这是本地传输观测,不是模型 token、延迟、安装客户端或完整成本资格;预算不变。 +独立提案的 176 项 Python(含隔离真实 File/SQLite CLI 与 staged reads)、74 项 +TypeScript 及标准 premerge 通过。配置内 mypy 的 17 个文件通过;额外 CLI 单文件 +检查的三条旧错误在基线和候选均复现。读回测试使用既有来源签名并拒绝篡改捕获, +运行时哈希 codec 未改变。 +另一次 C1 集成 cohort 的 255 项 Python、94 项 TypeScript、control-plane typecheck、 +配置内 mypy 与 Ruff 通过;该受影响 cohort 不替代此前完整路径或预算证据。 + +吸收后,适配 #7633 断言通过 C1 display/CLI 仍有 **10 项中 8 项失败**,完整 +composition 另有 **5 项中 4 项失败**。修改计划保留未改动事实,不能修复此前已作出 +的错误引用决定。这仍是适配断言 probe,不是原样 cohort 通过。C1 保持 Draft,原有 +预算、writer/caller/reader 退役、数值引用及成果/完整成本缺口均保留。继续在已 +持有完整来源的 owner 修复,不重传重复 legacy 正文,也不另建必需 reader。 + +## 精确的来源数值比较 + +下一项 C1 切片修复前述 display、CLI 与完整 composition 的 15 项断言中失败的 12 项, +复用现已通过 #7633 合入主线的原值断言。浮点数及不安全整数的稀疏拼写随既有一次粗粒度 +调用传输;TypeScript owner 在比较已注册的验收载体与摘要列表时使用原始身份。不同正文 +保持 literal,后续相同副本仍引用其更晚的精确 owner。Python 只提供 JSON 来源事实和 +应用修改计划,不拥有载体选择或相等判断策略。小正文仍按原有正文与引用大小决定是否 +共享,不把传输元数据计入这个比较。 + +完整 composition 现在返回展示投影已使用的同一修改计划,并在原始 IO 值上应用。 +两条路径复用同一个对象路径索引器;没有新增 RPC、完整正文返回、公开视图、reader、 +authority store 或持久缓存。原生 JavaScript 调用方保留既有结果形状,Python producer +请求保留来源原值的修改计划。 + +冻结合成输入以 C1 `dd600ac02` 为基线。四份相同合同下,每次粗粒度调用仍为一次 RPC; +完整 composition 的请求参数因稀疏身份与修改计划选项增加 491 字节。 + +| 每份合同的支持材料字节 | composition 返回体,基线 → 候选 | +| --- | --- | +| 8,000 | 31,469 → 1,243 | +| 64,000 | 87,469 → 1,243 | +| 256,000 | 279,469 → 1,243 | + +完整调用方视图因保留原始数值拼写增加四字节。原始合同不同时,正确性需要更多输入: +256,000 字节场景的调用方视图从 279,469 增至 536,456 字节,因为原结果错误地丢弃了 +不同正文;修复后仍共享后续相同副本。这些是 bridge 参数/返回体与调用方视图字节, +不是模型 token 或完整成本。三次温态耗时样本存在未控制的并发工作,不构成延迟资格。 + +受影响 Python cohort 的 246 项通过,包含真实隔离 File/SQLite 入口及原 Turn 的重入/ +结算。上下文/capture 恢复另有 128 项通过、五项既有显式原生配置的 opt-in 跳过; +104 项 TypeScript、control-plane typecheck、配置内 mypy 与定向 Ruff 通过。首次验证的 +28 项失败保留:夹具将 Python 数值拼写误当作既有 JavaScript codec 来散列;修正后的 +独立夹具使用原生 JSON 数值编码,没有改变运行时哈希或语义拒绝。另四项旧布局断言在 +未修改的 C1 基线上也失败;迁移后的断言检查完整契约自有的命令路径、原始身份及完整性, +保留后续恰好一次结算和 successor 检查。 + +既有 JavaScript 哈希归一化不变:来源不同的数值仍可能得到相同的归一化哈希输入。 +本切片不是新的数值哈希完整性资格;不可变 capture 哈希仍校验精确字节。C1 尚须对齐 +该身份边界、集成当前 main,采用已有的文件默认交付/差分和建议性导航,并退役自身 +过期的强制 outcome scope/reader。一次 main 集成暴露了这些 owner 冲突,已中止且 +未保留并行 owner。C1 保持 Draft,原有 25,862 > 13,000 预算失败、历史负结果、 +writer/caller 退役、原 quota 成果/完整成本比较和可选双会话资格仍未闭合。 diff --git a/docs/architecture/rfcs/ledger/controller-executor-unified-contract-v0/2026-10-28-packaged-heartbeat.zh-CN.md b/docs/architecture/rfcs/ledger/controller-executor-unified-contract-v0/2026-10-28-packaged-heartbeat.zh-CN.md index 545b32a294..2c2271334b 100644 --- a/docs/architecture/rfcs/ledger/controller-executor-unified-contract-v0/2026-10-28-packaged-heartbeat.zh-CN.md +++ b/docs/architecture/rfcs/ledger/controller-executor-unified-contract-v0/2026-10-28-packaged-heartbeat.zh-CN.md @@ -1,8 +1,9 @@ # 打包单会话 heartbeat 对照 本文是 [controller/executor RFC](../../controller-executor-unified-contract-v0.zh-CN.md#9-验证与验收) -的测量检查点,不代表 C1 验收或提升默认。[英文镜像](2026-10-28-packaged-heartbeat.md) -记录相同范围和结果。 +测量检查点的导航摘要,不代表 C1 验收或提升默认,也不宣称与原账本正文逐句语义等价。 +[英文镜像](2026-10-28-packaged-heartbeat.md)记录相同范围和结果。 +完整原样、仅追加的历史时序、反例与验证边界保留在冷归档 [2026-10-28-packaged-heartbeat.raw-archive.zh-CN.md](2026-10-28-packaged-heartbeat.raw-archive.zh-CN.md)(`sha256: 690a8f178288a0ea8d0520d5189be8781084690d395af1bcec91b1a6066fa5ce`)。 ## 来源、负载与收敛范围 diff --git a/docs/architecture/rfcs/ledger/controller-executor-unified-contract-v0/2026-10-30-c1-source-convergence.md b/docs/architecture/rfcs/ledger/controller-executor-unified-contract-v0/2026-10-30-c1-source-convergence.md index cdb7569f91..a175d70ba8 100644 --- a/docs/architecture/rfcs/ledger/controller-executor-unified-contract-v0/2026-10-30-c1-source-convergence.md +++ b/docs/architecture/rfcs/ledger/controller-executor-unified-contract-v0/2026-10-30-c1-source-convergence.md @@ -4,12 +4,13 @@ - **Status:** Unmerged integration evidence; C1 remains open. - **Source:** Unmerged C1 unification branch integrating target `main` checkpoints (see [packaged heartbeat comparison](2026-10-28-packaged-heartbeat.md)). - **Language mirror:** [中文版](2026-10-30-c1-source-convergence.zh-CN.md) +- **Complete append-only archive:** [2026-10-30-c1-source-convergence.raw-archive.md](2026-10-30-c1-source-convergence.raw-archive.md) (`sha256: 8f60f3cbd2d4e11a78e92e1461f0b7106b9a856fa863243092ae47bead76dc0b`) — preserves the full verbatim historical chronology, counterexamples, and validation bounds; this summary is navigation only and does not claim full prose equivalence. ## Shipped vs. unshipped convergence boundaries | Boundary / owner | Current C1 state | Retained compatibility & exit gate | | --- | --- | --- | -| Complete-source `work_contract` (`compose_turn_decision`, `completePlanningFacts`) | **Unmerged in C1:** unifies guard, Host, driver, MCP, benchmark, Kiro, DSH, SSH, and bound `generic_cli` (`quota_settlement_plan_v2`, `task_context` via `#8691`). | Unbound turnless observation (`--scheduler-observation`), raw `--turn-envelope` v0 display (`EdgeBench` / explicit compatibility callers), and historical v0 captures keep explicit readers until replacement and recovery windows qualify. | +| Complete-source `work_contract` (`compose_turn_decision`, `completePlanningFacts`) | **Unmerged in C1:** unifies guard, Host, driver, MCP, benchmark, Kiro, DSH, SSH, and bound `generic_cli` (`quota_settlement_plan_v2`, `task_context` via `#8691`). | Unbound turnless observation (`--scheduler-observation`), legacy `build_turn_envelope` comparison callers in `model_behavior_corpus.py` (forwarding directly to the TypeScript operation), raw `--turn-envelope` v0 display (`EdgeBench`), and historical v0 captures/plans/receipts keep explicit boundaries until their last comparison callers and recovery windows exit. | | File-first progressive/delta & field reuse (`#7560`, `#7627`, `#7935`, `#8186`) | **Shipped on `main` & adopted by C1:** invocation-local initial plan, observed-field reuse, and digest-bound file deltas replace the retired unmerged `outcome_context_projection_v0` mandatory reading plan. | Partial/truncated reads never establish baselines; independent `delta_delivery=auto` with `context_delivery=off` emits no progressive navigation; default ordinary CLI adoption requires §9 qualification. | | Numeric integrity (`#7557`, `#7633`, `#7643`, [numeric checkpoint](2026-10-29-complete-numeric-integrity.md)) | **Shipped owners + C1 transport:** sparse numeric tokens (`1.0` vs `1`, `-0.0`, unsafe integers) and `hash_codec` v1/v2 preserve original Python JSON values across TypeScript edit plans. | Persisted Python JSON/action-hash preimage stays unchanged so existing Turn keys remain valid; exact-byte capture digests remain separate from normalized JS hashes. | | Native selection & replay checkpoints (`codex_context_history.py`) | **Unmerged in C1:** binds hook replay (`native_resume` / `selected_resume`) to physical inode/interval digests and append-only transcript coverage across repeated resumes. | Missing output, changed Todo/body, non-append-only tail, or compaction forces a fresh read; `cli_version` covers writer provenance only and never grants model-retention proof. | @@ -26,7 +27,7 @@ action-hash numeric encoding). | --- | --- | --- | | Turn CLI & launch decision → plan | Passes complete source directly; planner refuses complete source paired with a v0 adapter. | Default inspection retains full source, portfolio, and writeback without becoming executable (`12,388 → 26,524 B` readback delta). | | Capture → Host / `turn_driver` / MCP / DSH / Ark | `host_dispatch_context` & `driver_lineage` check complete source & `selectedWorkTodo` once before dispatch, session lineage, or completion intent. | Omitted contracts retain historical v0 decoding; explicit `null`, non-object, malformed, or source/adapter-mismatched `work_contract` refuses before Host/writeback/spend. | -| Journal write, inspection & resume | Validates v1 and transitional `v0+work_contract` via shared TypeScript reader; enforces hard-lease execution key & lock sharing before `turn/start`. | Source-absent v0 records keep raw identity checks and original bytes during their supported recovery window (`14` File/SQLite plan JSON `-29.33%`, journal bytes `-28.32%`, final Host bytes equal). | +| Journal write, inspection & resume | Validates v1 and transitional `v0+work_contract` via shared TypeScript reader; enforces hard-lease execution key, lock sharing, and stdio bridge pre-spawn expiry checks before `turn/start` (draining clean bridge exit without signal kills). | Source-absent v0 records keep raw identity checks and original bytes during their supported recovery window (`14` File/SQLite plan JSON `-29.33%`, journal bytes `-28.32%`, final Host bytes equal). | ## Current quota and managed-controller cutover diff --git a/docs/architecture/rfcs/ledger/controller-executor-unified-contract-v0/2026-10-30-c1-source-convergence.raw-archive.md b/docs/architecture/rfcs/ledger/controller-executor-unified-contract-v0/2026-10-30-c1-source-convergence.raw-archive.md new file mode 100644 index 0000000000..8b72fa86a3 --- /dev/null +++ b/docs/architecture/rfcs/ledger/controller-executor-unified-contract-v0/2026-10-30-c1-source-convergence.raw-archive.md @@ -0,0 +1,3414 @@ +# C1 source convergence and historical integration checkpoints + +- **Date:** 2026-10-30 +- **Status:** Unmerged integration evidence; C1 remains open. +- **Source:** original candidate `648104978fdd67176cccdbb765c5bc3f36bf2ca3`, integrated with target `e8f4c6f8125e3cc0ef912afac653d5542671392f`. +- **Language mirror:** [中文版](2026-10-30-c1-source-convergence.zh-CN.md) + +## Current caller retirement boundary + +The current #8266 candidate delivers complete v1 through ordinary quota, +the former envelope flag, generated heartbeat loaders, Benchmark wake and +checkpoint entrypoints, and managed or stdio Host requests. Context delivery +Off inlines the same complete source. The Benchmark runtime guides now describe +that behavior. An original-quota reference arm uses its pinned pre-C1 runner +and LoopX revision, while saved captures retain their recorded version. + +| Remaining boundary | Current caller and exit condition | +| --- | --- | +| Complete-source composition and validation | Current quota, Turn, heartbeat and Host consumers share the existing TypeScript owner. The ordinary v0 renderer and flag-based source choice have exited those callers. | +| Versioned plan, capture and receipt recovery | Historical records retain their original source, binding and once-only settlement. Retirement requires the supported recovery window and the disposition of outstanding records. | +| Legacy comparison constructor | The Python `build_turn_envelope` has tree callers only in `model_behavior_corpus.py`. Raw/v0 retained cases and the versioned state matrix preserve their existing control. Complete v1 cases use their original checked source. Retire this constructor after its last supported comparison caller exits. | +| Model outcome and installed adoption | The original-quota/C1 single-session comparison, complete costs, supported installed Hosts and native Windows retain their existing acceptance. | + +The legacy constructor now forwards directly to the same TypeScript operation; +its one-caller Python wrapper is removed. One complete-capture test duplicated +the first thirteen statements of another case, including the same actor and +seed. The retained case also checks damaged-binding refusal before an actor +call, so the duplicate is removed with that coverage preserved. These changes +keep the frozen control and public constructor behavior. They qualify the +caller boundary and reduce duplicate maintenance. Model outcomes and complete +costs remain open. + +## Native selections across repeated resume + +The existing single-resume repair keeps a selection when the original full +capture cannot be replayed. On C1 `043463500ddd`, a second resume before the +next capture discards that selection's read state. The lifecycle owner now +carries the verified selection checkpoint into the new epoch. A later resume +checks the original native output again, and the new capture delivers changed +stop conditions using its current scope. + +With native Codex 0.167.0-alpha.4.1 Code Mode and a local fixed provider, the +next first-read selection after two resumes drops from 11,978 to 631 content +bytes and from two pages to one. Missing selected output, a changed Todo, source +or body, and actual compaction require a fresh read. The full capture still +starts a new baseline after its replay fails. This fixture measures reader +delivery. Actual model costs and long-horizon outcomes remain open. + +## Quota packet size and repeated continuation audit + +The synthetic File quota workflow on main `f38fae05bb9a1` and C1 +`1f2f10539117` uses the same task, accepted artifact and Turn identity. +Total stdout across guard, complete read, writeback, debit and duplicate +submission grows from 53,248 to 65,554 bytes in five calls. SQLite records +53,310 and 65,616 bytes. In the selected-read size breakdown, the new compact +settlement plan occupies 10,646 bytes, including 3,209 bytes of writeback +conditions and 2,939 bytes of Vision authoring structure and examples. +Validation, the original settlement identity and recovery commands account +for further bytes. + +The initial-read projection reuses the exact continuation audit only after +the native hook observes its complete literal body under the same current +Goal, bound Todo, agent and context epoch. A changed audit, missing +observation, changed binding, compaction or a reference to other material +requires a current read. The current writeback command and settlement identity +are delivered separately. Explicit recovery still reads the original audit +from the same capture. + +Two-turn CLI probes on File and SQLite exercise ordinary and complete +selection, actual paged reads, writeback and settlement. Across all four +pairs, the second Turn's first-read stdout decreases by 2,226 bytes at the +same call count. The ordinary File second-Turn workflow drops from 54,093 to +51,827 bytes in eight calls. The isolated installed wheel reproduces reuse, +original capture readback and valid settlement. The matched cold default +workflow stays at 65,554 bytes on File and 65,616 bytes on SQLite with this +change. Explicit off, staged and original recovery also complete with the +same accepted fixture and one debit. These local stdout observations leave +native model token, task outcome and fleet adoption measurements open. + +## Current repair: scoped capture reads and migrated consumers + +C1 integrates main `3a0c9608cc06`. The shared thin heartbeat renderer had turned +complete-capture availability into an unconditional pre-action whole-capture +read. Four matched real CLI cases (ordinary/App × default/explicit context-off) +compare actual main with pre-fix C1 integration `c6d7d0a573f0`: main does not add +that obligation, while C1 does. +The repaired renderer requires current work context, required materials and +applicable goals, criteria, constraints and stops; it scopes original capture +reads to decision dependencies. Explicit full-read obligations, supplied flags +and complete original-source/identity recovery remain. In all four cases, text +outside the changed read clause is byte-identical before/after. The instruction +grows by 347 UTF-8 bytes: this is a semantic correction, not a measured token or +whole-task saving. + +On frozen C1 `c37bd8d0d9`, selected-work collection fails on a deleted helper; +native-child and independent-delegation checks record 62 passes and eight +failures. The existing fixtures now use the current context reader and v1 +request/work-contract owner. Contradictory secondary carriers and damaged owner +identities are still deliberately injected to require pre-effect refusal; +original material, off isolation, lost-response recovery, replay and once-only +settlement assertions remain. Read-scope/source-preflight checks pass 141 cases +with four skips; native/delegation checks pass 70. A broader run first records +104 passes and 28 failures; its subsequent migrated delegation/example run +records 139 passes and two stale example assertions. After migrating explicit +selection and typed pre-effect refusal, both complete canonical-delivery cases +pass on source and the installed package. The refusal checks the original +subject and absence of Host, state, scheduler and spend effects. The broader +failures were not all independently +reproduced on untouched `c37` and are not attributed wholesale to that baseline. + +The first installed-wheel run records 88 passes and 32 setup errors: the example +initializer imports TypeScript through checkout-relative paths. Its existing +Python launcher now supplies the actually loaded package root to the same +initializer; canonical authority, exclusive disposable-runtime creation and +existing-state refusal remain. No Core source is copied into the harness. +After that repair, the installed run records 148 passes and two remaining +stale settlement-field assertions; correcting them yields 150 passes in a +new complete run. All 1,815 package Python/TypeScript sources match the tested +candidate; 374 observed Python processes import only from the +isolated package. Earlier failures and partial replays keep their own evidence. + +Configured cold-cache Mypy (17 roots), control-plane TypeScript and changed-path +Ruff checks pass without weakening settings. Exact-head premerge and +review/readiness remain separate qualification gates; this checkpoint does not +declare them passed. +This slice neither substantially reduces the parent PR nor qualifies complete +provider coverage, independent review, natural adoption, model costs or whole +C1. The actual main already has the intended ordinary-read scope, so this C1 +regression does not justify a duplicate main change. Historical experiments and +frozen base/head cost denominators remain below. + +## Previous dependency repair: source transport below the driver + +C1 integrates main `5a58635028fb`, including merged proposals #8192 and #8186. +Its configured Python check originally +reported 4,562 errors in 463 files: low-level capture and journal readers imported +the driver/Host-result converter for thin source and identity helpers. Those +seven helpers now use the existing `quota.turn_envelope` transport directly; +three old private implementations are removed and published exports remain +aliases. The TypeScript decision owner, wire versions, source refusals, exact +numbers, historical recovery and once-only settlement are unchanged. + +The same configured 17 roots pass with incremental checking disabled and an +isolated empty cache; strict settings and import following were not weakened. +Full control-plane TypeScript checking also passes. This is a repaired import +boundary, not a claim to fix typing in every formerly reachable module or to +improve runtime performance. The broad source run records 627 passes, six +fixture failures and four skips. A clean integrated baseline reproduces the +same six failures: fixtures access a retired second `turn_envelope` carrier. +Corrected fixtures exercise the current producer's missing-witness recovery and +deliberately injected mixed authority; all 36 module cases pass. The rebuilt +independent wheel passes 136 cases across capture/Host, session/journal, +authoring and completion paths. All 1,815 Python/TypeScript package sources +match the candidate; 141 observed Python processes import from the installed +package, without borrowing checkout source. The earlier 100-case package run +and the six original fixture failures retain their own recorded identities. + +Before this dependency repair, integration reduces the parent diff from 201 +files (+18,429/−2,042 at `49a621c9b8` against main `546c08c0d3`) to 197 files +(+17,928/−1,989 at `2fe98521f1` against main `5a58635028`). This is a limited +reduction; a substantially smaller review boundary remains to be delivered. + +Independent review, quality/readiness, full provider coverage, natural adoption +and whole C1 acceptance remain open. This repair does not establish a new +efficiency result or qualify the whole parent PR. Historical bilingual +experiments stay together, and earlier cost measurements retain their frozen +base/head rather than becoming measurements of this integration. + +## Previous extraction: complete replan authoring + +Both author proposals integrate main `d0985c35aa`. [PR #8192](https://github.com/loopx-project/loopx/pull/8192) +extracts C1's existing same-response authoring owner into main, removes Python's +duplicate comparison and restores authoring for ordinary, staged and real CLI +readers. All three complete-authoring oracles fail on original main `a9485073f2` +and pass on the repair. Missing stride declarations still refuse semantic +writeback; a Host reading the delivered contract can declare its decision and +the following task consumes the independently validated plan. C1 retains its +modern source/version checks before captured reads. + +The main repair passes 30 integrated source and 30 isolated-wheel cases; +C1 passes 180 focused source, 96 TypeScript and 30 isolated-wheel cases. +Canonical fixtures locate TypeScript from the loaded package. C1 fixtures use +its actual structured Host prompt and versioned capture binding, rather than +assuming an inline value or a historical digest. Earlier fixture failures remain +recorded. The main repair's frozen standard mechanical checks pass, but the +strict quality receipt remains missing. Independent review and whole C1 remain +open. This repair adds one parent RPC in the frozen fixture (2 to 3, excluding +the CLI child); it is not a net-efficiency result. Neither independent proposal +has landed, so this checkpoint does not claim the parent has already shrunk. + +## Latest field reuse: a main proposal shared with C1 + +[PR #8186](https://github.com/loopx-project/loopx/pull/8186) isolates the native +progressive reader repair at `9df99f042b5f`, based on main `62e234c93999`. +C1 integrates that main at `2f1c91085` and the same repair at `dde48f084b`. +The existing TypeScript owner now considers an exact requirement list, a large +criterion, then its large description. Current changes and unknown controls +invalidate their containing record; current revisions and complete recovery +remain available. Complete current pages can combine with authenticated exact +inherited sections for the next read, without becoming a full-input baseline. +The native hook uses its already matched event session, rather than assuming +it inherits a shell session environment. No new admission, model invocation, +configuration or storage schema is introduced. + +The following is a **main base/head** comparison, not C1's incremental gain. +One sample per File/SQLite, base/head and cold/warm/recovery/canonical-correction +condition gives 16 scenarios and 40 Turns. Twelve scenarios complete the +original synthetic three-step Task; four cold samples execute only its first +step. Current/previously delivered requirements, full UTF-8 page coverage, +independent artifacts, original identities, three receipts, single debits and +replay are checked. Setup and retry probes remain separate, with completed +child costs counted once. Product bytes at the committed head equal the +measured source. + +| SQLite ordinary task | Main base | Proposed main repair | Change | +| --- | ---: | ---: | ---: | +| Warm three-step BODY | 147,059 B | 109,016 B | −25.87% | +| Corrected three-step BODY | 147,793 B | 113,819 B | −22.99% | +| Warm three-step stdout | 268,953 B | 230,730 B | −14.21% | +| Warm / corrected RPCs | 863 / 867 | 863 / 867 | unchanged | +| Warm / corrected framed RPC bytes | baseline | +2.42% / +0.98% | extra cost | + +File has the same direction. Cold and this recovery cohort's BODY are unchanged. +Observed SQLite warm Python regular-file reads/writes increase 11.94%/19.06%; +correction increases them 5.73%/3.31%. Node/kernel/provider and CLI-external +fixture IO are not included. Single instrumented samples do not qualify stable +latency, model retention, natural adoption, tokens/cache, bills or net benefit. +The leaf-only prototype saved no representative task BODY; eagerly indexing +small criteria raised IO substantially. Those negatives remain evidence, not +passes attributed to the final repair. + +Source regressions cover changed text/status/unknown controls, low-value splits, +partial and forged observations, compaction, off and exact recovery. The same +new case fails on untouched main. Both source and isolated-package native paths +exercise the existing owner; each actual Codex static-loopback journey takes +ten requests, includes the subsequent whole-section reuse and restores full +requirements on unverified resume. No paid model is used. At the recorded `dde48f084b` integration, C1 configured +mypy has 4,818 diagnostics; main's configured 17-file check passes. The earlier +C1 count was 4,814 at another integration head; this is not a waiver or an +attribution of the four additional diagnostics. Main standard premerge's six +direct and fourteen selected checks pass mechanically, but its strict Goal +quality receipt is missing. Independent review, CQR, unchanged-head readiness, +maintainer merge authority and whole C1 qualification remain open. This proposal +has not reduced the parent PR's size on main yet; that requires maintainer +adoption of independently reviewable slices. Earlier bilingual experiments stay +together below. + +The later author integration includes main `910ff3bca5`: main product +`a8902b05b` and C1 product `7e52f3a1e`. The frozen cost table above is not +relabelled as a measurement of this later composition. Focused real-entrypoint +checks pass 102 cases on main and 104 on C1; each typed reader/report projection +set passes 66 cases, with typecheck passing. Main configured mypy passes; C1 now +reports 4,831 diagnostics in 485 files, without an attribution or waiver of the +additional diagnostics. Standard premerge passes 6/14 direct/selected checks on +main and 7/19 on C1 mechanically; both still lack the strict quality receipt, +and C1 retains its manual review hold. + +## Previous integration: incremental costs after field reuse reached main + +Measured product revision `b90e711cdb81` integrates main `d602248c5329`, including +#8124's field reuse, Vision audit references, first-read consumers and Chat +observation updates. C1 retains its complete-source validation in the shared +TypeScript owner; native navigation and historical-source refusals remain on +that same path. Later changes in this checkpoint are validation and documentation. +Earlier versioned cohorts below remain historical evidence. + +The current matched engineering cohort uses the original synthetic three-step +Task and two canonical acceptance groups. File/SQLite × cold/warm/recovery × +three repetitions gives 36 scenarios and 84 settled Turns. The 12 cold cases +exercise one step; the other 24 complete the original Task with matching +independently checked artifacts. Actual returned BODY is reconstructed through +EOF, and each omitted outcome must equal both its current immutable source and +its previously delivered value. Original settlement identities, three receipts, +single debits and product-source stability are checked. Preparation and deliberate +retry probes are counted separately; completed child costs are included once. + +| SQLite ordinary path, three-repeat mean | Adopted main | C1 | Change | +| --- | ---: | ---: | ---: | +| Warm step 2 BODY | 27,874 B | 27,159 B | −2.57% | +| Complete three-step BODY | 102,836 B | 100,691 B | −2.09% | +| Complete three-step stdout | 225,841 B | 184,316 B | −18.39% | +| Complete three-step RPCs | 863 | 866 | +3 | +| Complete three-step framed RPC bytes | 11,754,471 B | 11,852,055 B | +0.83% | +| Observed Python regular-file read/write bytes | baseline | −10.39% / −13.83% | limited IO boundary | + +File has the same direction. Recovery first resends the complete current +requirements; the three-step recovery BODY falls only 1.78%. The large savings +against pre-field-reuse main are not C1's exclusive incremental benefit. + +A separate canonical-correction probe appends one criterion through the actual +refine command, preserving the original criteria. Four File/SQLite cases complete +12 Turns and four Tasks. Main conservatively rereads both outcomes; C1 reuses one +unchanged outcome at step 2 and both at step 3. The new criterion remains visible. +SQLite step-2 BODY is 52,169 → 32,905 B (−36.93%); complete-Task BODY is +149,223 → 106,688 B (−28.50%), RPCs 867 → 870 and framed bytes −0.23%. +This is one synthetic correction per provider/arm, not natural feedback adoption +or a scientific outcome result. + +Final-source validation reconciles 1,065 passed / four skipped unique Python +cases, including real native Codex with static loopback inference. The 112 native +cases required focused rechecks after fixing fixture cursor planning, reading +choices before selection, and isolating the eight-page stress loop from static +resume qualification. Original failures remain recorded; this is grouped +qualification, not one wholly passing native invocation. Full TypeScript has +6,161 passed / 77 skipped; control-plane typechecking passes. The isolated wheel +matches 1,809 packaged Python/TypeScript files, passes 24 source/default/off/recovery +cases, and passes actual-client default Progressive and independent Delta checks +with no source import contamination. + +Configured Python typing still fails with 4,814 diagnostics; the same configured +17 roots pass on main. This hold is not waived by broader historical typing +comparisons or the successful transport checks. PostgreSQL/full affected-provider +qualification, independent review, exact-head readiness, installed adoption and +whole-C1 acceptance remain open. BODY/stdout and Python IO are distinct metrics; +Node/kernel/provider IO, model input/cache/output tokens, invoices and sustained +latency are not qualified. No model/scientific run, live installation, CI query, +manual workflow trigger or merge was performed for this engineering cohort. + +## Current private-plan boundary + +New complete-source Turns now write `loopx_turn_plan_v1` with one original +`work_contract`, its source digest and capture header. The complete planner no +longer generates the v0 executor adapter. `planning_facts`, Host input and +`turnPlanWorkSource` reuse the existing TypeScript source/projection, route and +settlement owners; Python retains the persisted action-hash number codec. + +| Production chain | Replacement / retained compatibility | +| --- | --- | +| Turn CLI and current launch decision → plan | Pass the complete source directly. The private planner no longer accepts a complete source paired with a v0 executor adapter. | +| Default CLI plan inspection | Retain the one complete source, including portfolio and writeback; keep inspection non-executable even when transport metadata is restored. | +| Immutable capture → Host | Bind the original source/header without regenerating an adapter; retain capture refusal, original read commands and Host v1. | +| Journal write, inspection, settlement query and CLI resume | Validate v1 through the shared source reader; preserve GoalRef, Agent, Turn, scoped identity, native Session and once-only effects. | +| Native report recovery, capability context, reward-memory activation and child-result context | Read the same work facts; carry original sparse numeric spellings with recovery proof. Existing experiment/capability gates remain required; disabled memory does no source/provider read. Host/provider and authority rules stay with their existing owners. | +| Recorded v0 journals | Keep explicit transitional source/adapter cross-check and historical adapter-only decoding; never downgrade a malformed v1 plan. | + +At this private-plan checkpoint, quota presentation and the managed controller's +quota preview were still separate v0 callers; their subsequent replacement is +recorded below. Outstanding v1 work requires a compatible reader during rollback; +stopping new v1 admission does not let an older binary rewrite or resume it. +Historical readers retire only after their original work and supported recovery +window are reconciled. No new capability, setting, cache or execution grant is +introduced. + +A matched replay uses the actual frozen `0eb0042191d5` implementation and the +candidate on 14 identical synthetic File/SQLite plan inputs plus 16 original +Host recovery inputs. All route/session/transaction/topology and execution +facts agree. Four plan cases use the existing no-Todo replan or request binding. +Capture publication, real journal writes, load/query and idempotent replay run +through their production owners. Only the separate capture-store namespace is +substituted for equality; source clauses and values are not normalized away. + +| Measured component, aggregate over 14 plan cases | Before | Candidate | +| --- | ---: | ---: | +| Canonical plan JSON bytes after capture | 528,364 | 373,372 (−29.33%) | +| Actual journal file bytes | 698,776 | 500,880 (−28.32%) | +| Final canonical Host input bytes | 335,446 | 335,446 | + +Across all 30 matched calls and their measured pipeline steps, native RPC count +is 162→158 and canonical argument/result JSON is 4,645,847→3,536,656 bytes. +Planning saves 18 calls, while checked plan loading adds 14 calls and increases +that read step from 7,052 to 340,486 bytes. Before capture, the new plan's source +digest adds 97 bytes to an unbound Host header; after capture both implementations +already carry that binding and the final model bodies agree. These are component +observations, excluding framing, CPU, model tokens, invoices, cold/warm context +costs and accepted outcomes. They do not improve the original-capture-to-selected- +body control-packet metric or establish whole-workflow net benefit. + +Default plan inspection previously kept a bounded legacy view after omitting +the complete source. Removing the adapter exposed that omission, including the +portfolio and writeback context. Current inspection retains its one source. +A separate real read-only File fixture passes on both implementations with +independent stores: actual JSON stdout grows 12,388→26,524 bytes (+14,136). +This is an explicit readback cost, separate from the smaller persisted plan and +unchanged final model bodies. No CLI read-byte saving is claimed. + +New no-adapter cases first fail on the frozen writer. Subsequent integration +also exposes an actual no-Todo recovery reader still using the removed adapter; +that reader now uses the complete source's original settlement identity. Invalid +current versions, missing/null sources, mixed carriers and wrong source/capture +bindings are refusal cases, alongside explicit historical/transitional controls. +After the readback, capability and historical-fixture corrections, all 403 cases +in the seven affected complete Python modules pass on the current source. +TypeScript typechecking and its full 6,053-pass/77-skip suite pass. The PR records +the exact source/wheel cohorts, retained failures/skips and remaining standard +gates. The expanded source run's 1,367 passes, 37 failures and 22 skips remain +recorded: it exposed the default inspection omission and a real reward-memory +gate still reading the absent adapter. The latter is now bound to checked work +facts; current missing-source and explicit historical controls remain distinct. +This is a private-plan migration proposal, not installed rollout, original- +quota outcome/full-cost qualification or C1 completion. + +## Current quota and managed-controller cutover + +The source candidate removes the remaining normal quota presentation builder +branch and changes the managed controller's fresh preview to the same complete +source used by an executing Turn. It reuses `compose_turn_decision` and +`completePlanningFacts`; the latter validates and derives work/lineage inside +the existing `turn.controller` RPC. Exact numeric tokens cross that boundary +without another projection RPC. Unknown supporting facts survive; an unknown +current execution action is refused before dispatch or settlement. + +| Replaced mechanism / caller | Shared owner and actual deletion | Remaining consumer and exit condition | +| --- | --- | --- | +| Quota `_project_quota_cli_payload` and renderer selection | Delete the v0 builder import, ordinary/envelope format branch, its soft fallback and unused scheduler/capture arguments. Existing complete composition and renderer own should-run output. | Status, plan and monitor remain diagnostic projections. The request owner already permits `--turn-envelope` only on should-run; that alias selects no second current contract. No byte saving is credited to deleting unreachable branches. | +| Managed fresh quota preview → loop disposition | Compose the full source with the actual scheduler context; remove `TurnControllerInput`, its private JSON copy, `build_turn_controller_input` and the TypeScript `build_controller_input` operation. Reuse checked complete planning facts for disposition. | The managed controller keeps its observation/retry and journal ownership. Historical v0 decisions alone retain their scalar route codec. | +| Complete plan/capture/journal → reader and resume | Retain the preceding single-source v1 migration and its original source/header checks. Normal preview no longer rebuilds its v0 adapter. | Recorded v0 and transitional journals retain explicit readers until their outstanding work and supported recovery/rollback window are reconciled. Malformed v1 never falls back to them. | +| Explicit legacy envelope builder and historical renderer | No new ordinary product caller remains for the legacy builder. Complete rendering still reuses the existing renderer module. | `control_plane_composition_scenarios`, `model_behavior_corpus` and original-version controls still construct legacy inputs. Retire a legacy constructor/decoder only after the last supported fixture/replay caller and version window migrate; preserve independent historical negative coverage. | + +A reproducible maintenance drill temporarily adds one missing synthetic-material +check to the existing complete-source validator, then restores the owner file +byte-for-byte. The same four real CLI/provider cases run against integrated +baseline `856faed423620` and the candidate: File/SQLite quota refusals pass on +both; the two managed refusals fail on baseline and pass on candidate. One +production owner edit and zero caller edits now reach both entries; the former +managed path needs a separate migration. The temporary check is not shipped as +a new production read gate. This proves that maintenance boundary, not natural +model compliance or Goal acceptance. + +The durable eight-case source/unknown-action matrix likewise has four managed +failures and four quota controls passing on that baseline, then eight passes +on candidate. It checks actual isolated providers, original supporting evidence +including unsafe integers/integral floats, no journal mutation and no debit. +The affected source cohort passes 408 Python cases and 76 focused TypeScript +cases. Twenty-two stale integration-fixture failures were reproduced on the +unchanged baseline before correction: retry injection targeted a retired helper +statement, complete planning used a newer operation, sender validation moved +earlier, and historical controls had incorrectly used current v1 producers. +Corrections retain receiver refusal, original-version and retry negatives; +those historical failures are not erased or counted as candidate regressions. + +After integrating main `d4aaaaefbd37`, the expanded source cohort passes 427 +cases, including the public lane fence and complete journal recovery. Integration +retains main's typed casts together with complete-source Goal/Agent checks; an +initial missing `cast` import was exposed by the lane check and repaired. The +isolated installed wheel passes the eight-case matrix and two native synthetic +transactions plus once-only replay on each of File/SQLite. Package provenance +is checked independently of source-only test helpers. A stale frontend bundle +initially held wheel building; rebuilding the existing bundle restored it. + +Standard premerge still has a maintainability hold and no exact-scope quality +receipt. A real Git checkout of the same main reproduces four module-metric +findings; the candidate additionally exceeds the existing quota-emitter +decision-function limit at 62 decision points/74 statements. No ceiling or +exception is raised here. The remaining original size holds likewise remain +failures; passing the focused cohort is not a passing whole-PR merge gate. + +This remains an unmerged source proposal. No candidate installation, default +change, model run, budget relaxation or C1 closure follows from these checks. +The original-quota cost comparison below is separate from the earlier adjacent +plan/journal savings and from the still-open natural accepted-outcome gate. + +### Original-quota product-path cost observation + +The frozen original-main baseline is `5f1a9d78ba7ac`, not the adjacent private-plan +baseline. Candidate runtime content is pinned to `b8c2bf1dc`, before the later +mainline integration; later source validation does not remeasure this cohort. +Both snapshots use Python 3.12.15, the same frozen numbered-artifact +task, isolated File/SQLite stores, equal-width namespaces and native context +delivery. Each of twelve scenarios reads the returned entry and every required +continuation, creates the same artifact, passes its independent validator, +writes back, spends once and verifies an idempotent spend replay. Artifact +SHA-256 agrees in all twelve cases. This is synthetic acceptance of that small +task; it does not establish equal natural-model outcomes or equal decision +obligations across the two packet versions. + +Cold starts an isolated runtime. Warm includes its preparatory guard/read; +post-compaction additionally runs the actual PreCompact/PostCompact CLI hooks +before the next admission. The latter measures baseline invalidation, not a +resume of interrupted business effects. Setup is excluded. Preparation failures +remain recorded separately; the table uses the completed final comparison +cohort only. + +The primary metric is `1 - selected BODY file bytes / same full capture bytes`. +It excludes reader envelopes and other output; those are counted separately. + +| Provider / scenario | Original quota: capture → BODY (reduction) | Candidate: capture → BODY (reduction) | +| --- | ---: | ---: | +| File / cold | 59,033 → 28,446 (51.81%) | 55,416 → 55,416 (0%) | +| File / warm | 58,464 → 6,419 (89.02%) | 54,849 → 9,411 (82.84%) | +| File / post-compaction | 58,582 → 28,562 (51.24%) | 54,963 → 54,963 (0%) | +| SQLite / cold | 59,121 → 28,530 (51.74%) | 55,500 → 55,500 (0%) | +| SQLite / warm | 58,552 → 6,344 (89.17%) | 54,937 → 9,397 (82.89%) | +| SQLite / post-compaction | 58,674 → 28,648 (51.17%) | 55,055 → 55,055 (0%) | + +Candidate full fallback retains the full source; its 0% BODY reduction does not +mean zero net benefit. Actual initial reads select their required material +instead of printing that entire BODY. Conversely, a smaller warm delta does +not guarantee a cheaper initial read: the candidate's current initial read +still supplies complete required context. + +| Provider / scenario | All stdout bytes, original → candidate | RPC calls, original → candidate | Framed socket bytes, original → candidate | +| --- | ---: | ---: | ---: | +| File / cold | 55,815 → 48,709 | 236 → 237 | 1,454,525 → 1,547,159 | +| File / warm | 67,522 → 76,353 | 325 → 327 | 2,128,926 → 2,348,959 | +| File / post-compaction | 89,968 → 75,700 | 327 → 329 | 2,132,977 → 2,343,467 | +| SQLite / cold | 56,212 → 49,086 | 236 → 237 | 1,456,277 → 1,548,893 | +| SQLite / warm | 67,849 → 76,806 | 325 → 327 | 2,131,180 → 2,351,673 | +| SQLite / post-compaction | 90,461 → 76,149 | 327 → 329 | 2,135,847 → 2,346,351 | + +All stdout includes guard headers, required reader pages, preparation/hooks, +writeback and spend/replay responses. Both versions use 5/7/9 CLI processes +and one independent validator for cold/warm/post-compaction; there are no help +or failed-command retries inside this final cohort. Readiness pings and framing +are included in RPC counts/bytes; neither side uses referenced RPC snapshots. + +One-time preparation must not be charged again for every steady warm step. +Separating that measured preparation, the current warm operation adds +15,936 File / 16,083 SQLite stdout bytes, while a cold operation saves +7,106 / 7,126. One measured cold byte saving would not pay for one measured +warm increment on this workload. This is conditional byte accounting, not a +prediction of a real session's event mix, tokens, invoices or outcome value. + +Capture IO also grows. Observed Python capture reads/writes on File are +186,399/189,228 → 277,768/238,234 bytes cold, +387,693/392,774 → 664,229/495,634 warm, and +430,659/378,418 → 664,963/475,336 post-compaction. SQLite shows the same +direction. Observed journal bytes and retained provider-state footprint agree +within each matched scenario; retained capture footprint grows by +24,503–51,506 bytes. These are Python regular-file traffic and retained disk +sizes, not physical IO or write amplification. Node/provider IO and native +SQLite page IO remain unmeasured. Process wall time includes Python startup +and wrappers; one observation per condition does not qualify latency. No model +requests, cache/invoice coverage or human-attention cost is measured here. +The main-path byte/RPC regressions and the original size holds remain open; +adjacent plan/journal savings cannot offset them by declaration. + +### Prepared initial-reader transport + +The subsequent reader increment is compared against integrated `86081b142c62`, +not against the original-quota cohort above. Capture generation already asks +the TypeScript selection owner for current initial navigation. It now pins that +owner's resolved addresses with the existing immutable selection cursor, which +the opaque first reader reuses. The reader still checks the complete source +and selected-view digests on every page; selected values come from the original +Python JSON bytes, including unsafe integers. Unselected prose no longer crosses +the runtime bridge a second time. The raw `--initial-read` recipe, explicit +readers and complete recovery remain available. Optional metadata write failure +keeps the raw recipe; an unsupported historical schema uses generic discovery +with one additional bounded selection RPC. A startup/transport failure does +not retry the runtime. + +The independent same-capture oracle preserves the exact selected body and its +unknown obligations. No additional BODY compression or model-input saving is +credited to this change. In particular, warm initial reads still need current +required facts; an old delta or saved cursor grants no retention or freshness. + +The same numbered-artifact fixture, Python version, providers, preparation, +compaction hooks, validator and once-only settlement are replayed in twelve +isolated cases. All artifacts agree. Full-path socket traffic falls modestly; +RPC counts remain 237 / 327 / 329 for cold / warm / post-compaction on both +versions, including pings. + +| Provider / scenario | All stdout bytes, base → candidate | Framed socket bytes, base → candidate | +| --- | ---: | ---: | +| File / cold | 48,258 → 48,293 | 1,541,169 → 1,509,780 | +| File / warm | 75,583 → 75,664 | 2,337,709 → 2,275,365 | +| File / post-compaction | 74,963 → 75,033 | 2,333,325 → 2,270,641 | +| SQLite / cold | 48,635 → 48,670 | 1,542,959 → 1,511,454 | +| SQLite / warm | 76,036 → 76,117 | 2,341,764 → 2,276,882 | +| SQLite / post-compaction | 75,412 → 75,482 | 2,336,165 → 2,273,331 | + +Current initial-reader stdout is byte-identical in each pair; its socket traffic +falls from approximately 60 KB to 30 KB. The longer cursor path adds 35 / 81 / +70 stdout bytes across the complete cold / warm / post-compaction flows. +SQLite Python-observed capture read/write bytes are +276,540/236,976 → 280,522/237,574 cold, +661,271/492,992 → 669,177/490,960 warm, and +662,043/472,836 → 669,965/474,028 post-compaction. File shows the same increased +read cost; visible journal bytes agree. Cursor preparation adds local work and +retained metadata. Native provider IO, model/cache invoices and natural outcomes +remain unmeasured; single wall-clock observations do not qualify latency. +Neither the original-quota warm regression nor the existing size/quality holds +is cleared by this adjacent transport improvement. + +The same-capture transport regression fails on the frozen base while its raw +reader control passes. The initial eleven-module source run records 647 passes, +78 skips and four failures: two navigation tests still invoked the now-prepared +model cursor as a fresh recipe, and two historical staged-reader fixtures also +fail on the unchanged base. Their explicit raw/historical controls are retained; +the final three affected modules pass 103 cases. The actual installed wheel +passes the same 103 cases, with installed module and CLI-child routing checked. +An initial wheel attempt omitted the repository runtime-isolation fixtures and +is rejected as evidence. The default-route fixture now refuses before writing +unless both roots belong to its disposable test base; the repaired package +qualification loads the original isolation fixtures. Source isolation checks +pass 21 cases and a missing-isolation negative leaves synthetic roots untouched. +Standard premerge passes seven direct checks and eighteen of nineteen selected +checks; the same five maintainability findings remain a hold. No ceiling, +exception, merge authority or natural-outcome acceptance is changed. + +### Native command ownership and settled receipts + +The next normal native caller adopts the already shipped +`refresh-state --settle-turn` adapter. Its complete-source plan is +`quota_settlement_plan_v2`: writeback invokes that adapter with explicit receipt +output, and quota spend is runtime-owned rather than a second unconditional +Agent command. Completion, claim/lease, original identity, Vision authoring and +terminal conditions retain their existing obligations. A partial failure still +returns the canonical original `settlement_owed`; there is no extra admission, +automatic retry or direct-debit bypass. Native-off/manual v1, historical readers, +replan successor creation and callback-owned runners retain their paths. + +Receipt output is an explicitly selected post-effect result projection, not a +new admission input or a context-retention claim. Exact receipts and unresolved, +failed or unknown controls remain visible. Known supporting snapshots remain +complete in an immutable result with the originating CLI reader. Failed capture +delivery preserves committed receipts and permits exact-identity retry. A real +replay test also exposed that the old combined adapter returned only the first +two receipt steps on refresh replay despite reporting settled state. Replay now +independently reads all three original receipts without executing another child +or debit. Existing quota presentation IO is separated within its existing owner. + +Three implementations run the same frozen numbered-artifact workload on Python +3.12.15: original quota `5f1a9d78ba7a`, integrated C1 `898aaa9d0c33`, and this +runtime increment. Eighteen isolated File/SQLite cold, warm and post-compaction +cases produce identical independently checked artifacts and one debit each. +The child CLI's RPC and Python IO are included, using an import observer that +waits for the pinned package rather than importing LoopX from its working +directory. Agent CLI calls fall 5/7/9 → 4/6/8; one internal CLI child means total +CLI process counts remain 5/7/9. RPC counts include pings and that child. + +| Provider / scenario | All stdout B: original / integrated C1 / increment | RPC: original / integrated C1 / increment | Socket B: original → increment | +| --- | ---: | ---: | ---: | +| File / cold | 55,622 / 48,556 / 39,643 | 236 / 237 / 231 | 1,452,338 → 1,577,844 | +| File / warm | 67,302 / 76,098 / 66,385 | 325 / 327 / 321 | 2,125,470 → 2,350,007 | +| File / post-compaction | 89,643 / 75,454 / 65,676 | 327 / 329 / 323 | 2,129,249 → 2,345,468 | +| SQLite / cold | 56,020 / 48,933 / 39,982 | 236 / 237 / 231 | 1,454,093 → 1,579,746 | +| SQLite / warm | 67,723 / 76,551 / 66,792 | 325 / 327 / 321 | 2,128,276 → 2,352,873 | +| SQLite / post-compaction | 90,133 / 75,903 / 66,079 | 327 / 329 / 323 | 2,132,085 → 2,348,364 | + +The primary metric remains bytes from each complete capture to its own selected +BODY file. These are separate from initial-read pages and all stdout above. + +| Provider / scenario | Original F → BODY B | Increment F → BODY B | +| --- | ---: | ---: | +| File / cold | 58,907 → 28,329 | 54,498 → 54,498 | +| File / warm | 58,338 → 6,408 | 53,925 → 8,605 | +| File / post-compaction | 58,458 → 28,446 | 54,027 → 54,027 | +| SQLite / cold | 58,995 → 28,414 | 54,578 → 54,578 | +| SQLite / warm | 58,426 → 6,420 | 54,005 → 8,613 | +| SQLite / post-compaction | 58,546 → 28,530 | 54,107 → 54,107 | + +Warm same-capture BODY reduction is 84.04% / 84.05%, against original +89.02% / 89.01%. The candidate's cold and post-compaction rates remain 0%. + +Full BODY fallback remains 0% reduction, not zero net value. More importantly, +removing one-time preparation still leaves the current warm step at +33,603 → 40,558 B (File) and 33,932 → 40,901 B (SQLite), about 7 KB above original +quota. The approximately 1.4% improvement in warm *total* stdout includes the +smaller one-time preparation and does not clear that recurring regression. +Warm Python-observed CLI reads/writes are +636,750/451,370 → 919,810/591,486 B (File) and +645,056/454,206 → 928,728/595,466 B (SQLite). Node/provider/native page IO, model +usage/cache/invoices and natural outcomes remain unknown. Concurrent byte +characterization does not qualify latency. Validator calls/output are counted; its file IO is not measured. The final-head +repetition changes warm BODY from 7,799/7,807 to 8,605/8,613 B while stdout is +identical; each capture retains its own denominator, not a stable-ratio promise. +Whole-workflow net benefit and C1 completion remain open; the remaining targets are repeated warm control input +and duplicate snapshot/transport IO, not another runner or a weaker obligation. + +The integrated runtime at `5aa46dc27de8` passes all ten affected Python modules +(419 passes, 10 skips), TypeScript typechecking and 243 focused TypeScript tests. +Its actual isolated wheel passes 245 cases with 10 skips; 1,181 loaded Core +modules and 392 CLI child routes resolve to that installation. Earlier fixture +failures remain recorded: stale v0 assertions, a metadata-length-dependent +UTF-8 offset and an implicit producing working directory were corrected using +their independent current semantics. Failed result capture, oversized unknown +controls, wrong bindings/workspaces, lost responses and exact replay have real +CLI coverage. Standard premerge reports seven direct checks and nineteen +selected checks, with one inherited maintainability advisory. The raw ratchet +still fails on four untouched baseline modules; the former quota-emitter +finding is absent. No ceiling, exception or historical failed result changes; +this is neither an exact-scope quality receipt nor merge/readiness authority. + +### Settled snapshot replay and repeated original-quota comparison + +The output-IO increment at `4ef428767ce9` treats a completed `current` Todo +projection like its already supported `delivered` state. Strictly known inactive +runtime-route, shared-projection and Explore snapshots also use the existing +immutable result reader. No additional RPC, cache, permission owner or setting +is introduced. This is Python file/output IO over existing TypeScript facts; +settlement, freshness and permissions still belong to their typed owners. +Unsettled/error/dry-run results, unknown nested fields, route conflicts, +projection retries, copied artifacts and blocking postconditions remain inline. +The original identity, three receipts and unsatisfied Vision checkpoint remain +visible; reading the full stored result proves neither acceptance nor retention. + +A new matched cohort freezes main `f04ec308f6e7` and this candidate, with the +same numbered-artifact Task, necessary materials, independent check and one +debit. Three repetitions across File/SQLite and cold/warm/post-compaction give +36 cases and 252 verified parent/child source/executable observations. Table +values are medians of the three observations, in bytes; `current` excludes +one-time baseline preparation. Preparatory output remains in `all stdout`. + +| Provider / scenario | All stdout B: main → candidate | Current stdout B: main → candidate | RPC | Framed socket B | +| --- | ---: | ---: | ---: | ---: | +| File / cold | 55,570 → 36,270 | 55,570 → 36,270 | 236 → 203 | 1,451,832 → 1,437,675 | +| File / warm | 67,892 → 62,991 | 34,239 → 37,183 | 326 → 284 | 2,127,817 → 2,152,912 | +| File / recovery | 89,549 → 62,276 | 55,764 → 36,392 | 328 → 286 | 2,131,374 → 2,147,978 | +| Sqlite / cold | 55,963 → 36,344 | 55,963 → 36,344 | 236 → 203 | 1,453,556 → 1,439,471 | +| Sqlite / warm | 68,313 → 63,133 | 34,568 → 37,261 | 326 → 284 | 2,130,625 → 2,155,458 | +| Sqlite / recovery | 90,038 → 62,414 | 56,165 → 36,466 | 328 → 286 | 2,134,204 → 2,150,686 | + +The recurring warm step is still **8.60% / 7.79% larger** (File/SQLite), while +RPC count is 12.88% lower and framed bytes are 1.18% / 1.17% higher. Warm +Python-observed reads+writes are 787,482 → 813,035 B and +796,984 → 822,778 B (medians of each direction summed), about 3.2% higher. +Counts and byte observations do not qualify CPU/latency while other validation +runs concurrently; native provider/SQLite-page IO and real model cache, input, +generated output, invoices and natural effectiveness remain unknown. + +This increment changes settlement output, not guard BODY selection. In the +first repeat, warm complete-capture F → selected BODY is +58,306 → 7,082 B versus 53,899 → 8,579 B (File), and +58,396 → 7,094 B versus 53,979 → 8,609 B (SQLite). Each rate uses its own +same-capture UTF-8 files. Candidate cold/post-compaction BODY is full, so its +primary reduction remains 0%; that does not imply zero workflow value. Warm +candidate rates vary 82.62–84.08% / 82.64–85.44% across these repetitions, +with no new BODY saving attributable to this output-only change. + +A separate component comparison applies the old `9380173c` and new output IO +to identical captured settled payloads. Warm first-result plus replay saves +3,347 / 3,612 B. If a consumer actually requests all newly deferred fields +from both results, the real selected readers add 5,434 / 5,723 B and two RPCs: +that component instead costs about 2.1 KB more. An equal-demand-probability +byte-only proxy breaks even near 62% / 63%; demand is unmeasured, and neither +that proxy nor this fixed Task establishes model/billing net benefit. There is +no new mandatory detail-read gate. + +Seven complete affected Python modules pass 360 cases; the isolated actual +wheel passes 241 cases using the original test configuration/conftest and +default-root isolation. All 1,185 loaded parent Core modules, 1,186 child CLI +routes and 1,199 Core-loading child import audits resolve to that wheel. +Real File/SQLite caller tests recover the full result, preserve one debit and +all receipts on replay, and keep future or actionable nested controls visible. +These are source/packaged output qualifications, not installed adoption or +whole C1 acceptance. Historical cohorts, failures and frozen budgets above +remain intact. The remaining recurring warm-input and total-cost gap is open. + +### Composed Vision budget recovery + +The existing Vision prepare owner now returns independent numeric budget +diagnostics together through the shared bounded request-error transport. +C1 consumes the same rule through its complete capture and returned composed +settlement command. Five independent numeric failures cause one refusal; +oversized enum text retains its budget error, while a short invalid enum still +rejects. No limits increase, authored-packet rewriting or new decision owner is +introduced. File/SQLite tests preserve the source state and run index on every +refusal. Explicit correction, independent history readback and replay retain +the complete packet, original Turn, three receipts and exactly one debit. + +A fixed caller compares the frozen preceding C1 head `75c05340b6ce` with the +integrated product code. Both sides correct only fields actually named in the +error, reach the same final packet and settle once without another guard. +Equal-width namespaces and the same Python isolate this retry segment. The +accounting child is included: seven Python processes before, three after, per +provider. Equal fixture setup, admission and independent verification are +outside both measured segments. + +| Provider | CLI attempts | Stdout B | RPC | Framed socket B | Observed Python read B | Observed Python write B | +| --- | ---: | ---: | ---: | ---: | ---: | ---: | +| File | 6 → 2 | 11,473 → 9,269 | 137 → 133 | 822,570 → 817,482 | 131,460 → 116,843 | 39,169 → 39,193 | +| SQLite | 6 → 2 | 11,499 → 9,279 | 137 → 133 | 823,294 → 818,206 | 131,962 → 117,297 | 39,285 → 39,309 | + +The first rejection is larger; the complete retry segment emits about 19.2% +less stdout, uses 2.92% fewer RPCs and about 0.62% fewer framed bytes. Observed +Python reads fall about 11.1%; writes increase by 24 B. Native provider IO, +latency, real model corrections, input/cache/generated output and billing are +not measured. This is a deterministic error-recovery improvement relative to +the preceding C1 head, not a new comparison with latest main, a new same-capture +BODY reduction or a qualification of the original quota workload's overall net +benefit. Its warm-input regression and all frozen holds above remain open. + +### Native ready handoff on the complete contract + +This integration includes main `bd79adc64968` and the existing Host ready-source +handoff. The unchanged handoff forced its ready recheck to `context-delivery +off`; inside C1 that replaced the enabled complete composer's combined +settlement with the older split plan. A new independent assertion fails in all +four real File/SQLite × App/SSH paths before the correction. The thin adapter +now preserves the enabled native profile and uses the existing deferred-display +option. It captures the complete ready source before the existing saved-capture +owner presents it once. No new flag, semantic owner, RPC or authority is added. + +| Actual caller | Replaced behavior | Shared owner and remaining boundary | +| --- | --- | --- | +| Bound native execution preparation | Forced-off ready recheck | Existing complete composer retains mandatory context and combined settlement; Python only forwards the native directory/display mode | +| Host post-tool context | Model must recover the missing ready contract with another guard | Existing capture/reader publishes the verified same-Turn source and original claim reference | +| Prepared native closeout | Active prepared caller receives the split v1 plan | Existing v2 settlement owner supplies the combined operation and three receipts; old records and unbound/off callers retain their original recovery contracts | + +The complete Goal is checked against the independent original text, inline or +through an actually declared read. Off remains inert; identity mismatch, corrupt +source, replay and once-only accounting checks remain. This fixes consumer +adoption, not the separate requested semantic-rule-change exercise or the final +historical-reader retirement. Those C1 acceptance boundaries remain open. + +Seven complete affected source modules and the actual isolated wheel each pass +280 cases, with 70 existing opt-in skips. The wheel's 1,897 compared product +files match; 235 completed processes and 44,758 Core-module observations show +no checkout-origin violation. Abrupt exits remain outside exit-time auditing. +The initial source run retains 279 passes, one stale reader-program assertion +failure and 70 skips; the existing reader-program correction is reused, and its +whole 20-case module passes before the final full run. Failed caller pilots +requested the wrong legacy view or reused a capture directory; their failures +are retained, not counted as completed comparisons or fixed by relaxing capture +immutability. No active App/CLI installation is claimed. + +The new hard-lease cohort uses the frozen public numbered Task, stopping at +step three. Cold completes step one; warm/recovery first validate and settle +step one, release its lease, then admit and validate step two. Recovery runs +the actual PreCompact/PostCompact hooks before that second Turn. Both arms use +the original quota entrypoint, identical material, equal-width namespaces, one +Python and one observer, with each parent/child importing its pinned product. +This is separate from the historical soft-claim 36-condition cohort below. + +Three repeats across both providers, scenarios and arms give 36 conditions and +60 independently checked work Turns. Each reaches the same artifact within its +scenario, three committed receipts and one debit per Turn, including replay. +All 654 parent/completed-child source observations and 640,896 module origins +match their arm; product source hashes remain unchanged. Parent RPC totals +already include children. Whole columns include the completed preparation work; +current columns exclude it but retain compaction hooks. Tool output, all +necessary reads, Host execution, writeback, spend, readback and lease release +are included. Values are three-observation medians: + +| Provider / scenario | Whole stdout B | Current stdout B | RPCs | Framed RPC B | Python fixture read B | Python fixture write B | +| --- | ---: | ---: | ---: | ---: | ---: | ---: | +| file / cold | 57,597 → 45,996 | 57,597 → 45,996 | 423 → 288 | 2,938,704 → 1,929,733 | 720,046 → 662,664 | 302,925 → 272,952 | +| file / warm | 118,430 → 95,236 | 60,833 → 49,240 | 843 → 578 | 6,271,394 → 4,130,344 | 1,926,283 → 1,700,979 | 675,761 → 593,384 | +| file / recovery | 118,202 → 94,776 | 60,269 → 48,556 | 845 → 580 | 6,259,244 → 4,112,058 | 1,942,194 → 1,715,504 | 656,353 → 573,186 | +| sqlite / cold | 58,016 → 46,112 | 58,016 → 46,112 | 423 → 288 | 2,943,792 → 1,932,217 | 737,286 → 677,202 | 304,783 → 275,281 | +| sqlite / warm | 119,272 → 95,472 | 61,256 → 49,360 | 843 → 578 | 6,281,728 → 4,136,666 | 1,965,207 → 1,734,459 | 679,477 → 598,310 | +| sqlite / recovery | 119,040 → 95,008 | 60,688 → 48,672 | 845 → 580 | 6,269,816 → 4,117,784 | 1,981,156 → 1,748,980 | 660,103 → 577,919 | + +Warm whole stdout falls 19.58% / 19.95%, RPCs 31.44%, framed bytes 34.14% / +34.15%, and observed fixture Python read-plus-write bytes about 11.8%. Current +step stdout falls 19.06% / 19.42%. These are cumulative C1 comparisons, not +attribution of every reduction to this small integration correction. The warm +wire ranges are file: main 6,271,290–6,271,572; candidate 4,130,308–4,130,664; sqlite: main 6,281,492–6,281,936; candidate 4,136,236–4,136,704. No statistical significance is claimed. + +The primary metric uses each producer's original complete `decision.json`, not +an already projected recovery document. All 60 producer/BODY pairs verify the +original Turn and controls plus published recovery/selected digests: + +| Provider / scenario | Main producer F → BODY B (reduction) | Candidate producer F → BODY B (reduction) | +| --- | ---: | ---: | +| file / cold | 60,084 → 27,993 (53.41%) | 53,873 → 27,291 (49.34%) | +| file / warm | 75,126 → 28,022 (62.70%) | 61,271 → 27,230 (55.56%) | +| file / recovery | 75,342 → 28,135 (62.66%) | 61,465 → 27,376 (55.46%) | +| sqlite / cold | 60,310 → 28,201 (53.24%) | 54,091 → 27,436 (49.28%) | +| sqlite / warm | 75,352 → 28,195 (62.58%) | 61,491 → 27,434 (55.39%) | +| sqlite / recovery | 75,568 → 28,319 (62.53%) | 61,683 → 27,530 (55.37%) | + +Candidate warm BODY is smaller in absolute bytes, while its reduction percentage +is lower because its complete producer source is also smaller. Neither ratio +replaces the complete caller comparison. File-backed delta does not establish +model retention. Referenced RPC snapshot payload bytes are observed as zero in +this cohort; provider/native/SQLite-page and full-process IO remain unmeasured. +CPU/latency, actual model input/cache/generated output, fees, natural adoption +and long-horizon net benefit remain unqualified. All earlier positive/negative +cohorts, frozen budgets and original outcome requirements retain their versions; +this source/package result is neither merge readiness nor complete C1 acceptance. + +### Executable required reads and native-runner attribution + +A current complete source now validates explicitly executable required reads in +`assertInteractionRequiredReads`, beside the existing interaction owner. A read +that declares a command or ordering must retain a non-empty, NUL-free command; +its explicit ordering must be the registered `before_work`. Prose-only +obligations, unknown supporting metadata, quoted Unicode commands and an omitted +historical ordering remain unchanged. A valid unread obligation stays pending: +this check neither acknowledges reading nor creates a blanket material-read gate. + +| Changed boundary | Actual owner / caller change | +| --- | --- | +| Executable read semantics | One TypeScript interaction validator; one call from the existing complete-source validator. Quota, managed preview, planning and Host consumers retain their existing calls. No Python rule or extra RPC is added. | +| Unsupported direct complete source | The Python transport preserves an explicit `contract_binding`, including an unsupported version, for the typed planning reader instead of trying the legacy adapter. | +| Qualification callers | Move stale CLI fault injection from the removed envelope builder to actual complete composition; preserve explicit historical version negatives. Use real canonical hard-lease inventory and the actual artifact workspace instead of mocked admission or incidental Git checkout discovery. | + +On unchanged `f1614358ac13`, the eight new File/SQLite quota/managed refusal +cases fail while eight existing valid/unknown-action controls pass. The shared +rule reaches both entries without changing either caller. A first implementation +also rejects a legitimate prose-only obligation; its original full-text test +exposes that mistake, and the implementation is corrected without removing that +assertion. A separate real Turn CLI case checks unsupported version/codec and a +correctly hashed unsupported read order before Host launch or debit. This is a +bounded semantic-rule change, not independent review or proof of model compliance. +Registry hook admission and recorded-version readers retain their distinct owners; +a new registered ordering would still require that protocol's own review. + +After integrating main `92294e7245cb`, the final eight complete Python modules +pass 196 cases on both source and the actual isolated wheel; the wheel has 1,897 +byte-matching packaged source files, 325 completed-process and 103,615 Core-module +origin observations with no checkout contamination. Abrupt process exits are +outside that exit audit. The six relevant TypeScript modules pass 121 cases, +and full control-plane +typechecking and changed-file Ruff pass. The earlier broad 178-pass/7-failure +source and 168-pass/17-failure wheel runs remain recorded. Corrections preserve +the original assertions: actual composition injection replaces six stale +constructor hooks; the frontier fixture uses canonical authority; wheel helpers +are copied explicitly, and writeback names the real artifact workspace. +Repository worker scripts remain explicit test callers; the origin audit qualifies +packaged Core, not a separately installed scheduler. The ordinary bundle is +rebuilt before packaging; no candidate is installed. + +The earlier 20,533-character premerge failure now has a matched native-runner +counterexample on both immutable main `bd79adc64968` and candidate +`f1614358ac13`. With one parent root, direct output is 20,333 characters and the +native runner is 20,501: its isolation component adds 21 characters to eight +fixture-root occurrences (168 total). The original premerge layout adds another +four-character directory, producing 20,533 on both revisions. After substituting +only the owned fixture root and observation timestamps, payload facts agree. +Every original assertion runs against the original 20,500 ceiling; neither paths +nor output are shortened for those measurements. This character-budget diagnosis +is separate from the UTF-8 complete-capture-to-BODY metric. + +[The existing fixture-calibration proposal](https://github.com/loopx-project/loopx/pull/8069) +owns that separate budget question. No calibration, skip or waiver is included +here; the failed premerge observation remains a failure. The preceding matched +cost cohorts keep their exact measured revisions and are not relabeled as a +measurement of this added validation. CPU, model usage, natural adoption and +long-horizon net benefit remain unknown. + +The legacy constructor's remaining in-tree calls are the explicit composition +and model-behavior qualification fixtures. Original-version journal/recovery +readers still need their supported work/window reconciliation; none is removed +just to make a retirement count. This slice neither retires those readers nor +closes the complete C1 acceptance. + +### Latest-main matched hard-lease comparison + +A separate repetition freezes main `92294e7245cb` against candidate +`b3b3b232724d`, including the executable-read validation above. The original +numbered Task, fixture, observer, shared Python and cold/warm/compaction-recovery +protocol are unchanged. Three repeats per arm/provider again produce 36 +conditions and 60 work Turns. All 1,914 product source hashes per arm remain +unchanged; 654 parent/completed-child observations and 640,896 Core-module +origins match their source. The complete original Task appears in each actual +consumed read. Every Turn keeps its original identity, three committed receipts, +one debit and the same accepted artifact for its scenario. This is engineering +qualification, without a model or an installed App rollout. + +The complete workflow includes the completed preparation Turn, all required +reads, native Host preparation, compaction hooks where applicable, writeback, +spend, replay/readback and lease release. Parent totals already include children. +The current-step column excludes completed preparation. Three-sample medians: + +| Provider / scenario | Whole stdout B | Current stdout B | RPCs | Framed RPC B | Python fixture read B | Python fixture write B | +| --- | ---: | ---: | ---: | ---: | ---: | ---: | +| file / cold | 57,221 → 45,732 | 57,221 → 45,732 | 423 → 288 | 2,930,378 → 1,924,529 | 715,582 → 658,504 | 301,509 → 271,509 | +| file / warm | 117,662 → 94,692 | 60,441 → 48,960 | 843 → 578 | 6,254,008 → 4,120,060 | 1,916,435 → 1,691,969 | 672,788 → 590,508 | +| file / recovery | 117,450 → 94,248 | 59,893 → 48,292 | 845 → 580 | 6,241,950 → 4,101,350 | 1,932,262 → 1,706,384 | 653,451 → 570,267 | +| sqlite / cold | 57,640 → 45,848 | 57,640 → 45,848 | 423 → 288 | 2,935,504 → 1,927,053 | 732,814 → 673,042 | 303,374 → 273,849 | +| sqlite / warm | 118,504 → 94,928 | 60,864 → 49,080 | 843 → 578 | 6,264,426 → 4,125,624 | 1,955,379 → 1,725,427 | 676,528 → 595,288 | +| sqlite / recovery | 118,288 → 94,480 | 60,312 → 48,408 | 845 → 580 | 6,252,476 → 4,107,176 | 1,971,260 → 1,739,860 | 657,195 → 575,088 | + +Warm whole stdout falls 19.52% / 19.89%, RPCs 31.44%, framed bytes 34.12% / +34.14%, and observed Python fixture read-plus-write bytes 11.85% / 11.82%. +Current-step stdout falls 19.00% / 19.36%. Warm framed-byte ranges are file: +main 6,253,744–6,254,276, candidate 4,119,902–4,120,628; SQLite: main +6,264,262–6,264,682, candidate 4,125,580–4,125,850. No significance is inferred. +Observed warm request counts include `quota.turn_envelope.evaluate` 20 → 10, +`todo.context.page` 178 → 62, and capability-hook validation 8 → 4. These are +cumulative C1 differences, not savings attributable to the new read validator. + +The primary metric remains the same producer's complete capture F → selected +BODY. All 60 pairs match the published producer capture digest, recovery and +selected-file digests, original identity and control facts: + +| Provider / scenario | Main F → BODY B (reduction) | Candidate F → BODY B (reduction) | +| --- | ---: | ---: | +| file / cold | 59,828 → 27,845 (53.46%) | 53,649 → 27,120 (49.45%) | +| file / warm | 74,870 → 27,797 (62.87%) | 61,049 → 27,072 (55.66%) | +| file / recovery | 75,086 → 27,921 (62.81%) | 61,241 → 27,194 (55.60%) | +| sqlite / cold | 60,054 → 28,062 (53.27%) | 53,867 → 27,274 (49.37%) | +| sqlite / warm | 75,096 → 28,003 (62.71%) | 61,267 → 27,274 (55.49%) | +| sqlite / recovery | 75,316 → 28,131 (62.65%) | 61,459 → 27,403 (55.41%) | + +BODY is smaller while its reduction ratio is lower, because the full source is +also smaller. Saved-file delta is not model retention. This new cohort supports +lower measured engineering overhead at the same synthetic artifact outcome; +it does not replace older cohorts or establish lower model-generated output, +cached/uncached input, fees, native-provider/SQLite-page/full-process IO, CPU, +latency, natural adoption or long-horizon benefit. The original budget failure, +historical-reader obligations and complete C1 acceptance remain open. No gate, +default, scoring or runtime behavior changes in this measurement update. + +### Transitional journal intake + +The canonical resume loader checked a complete source only for current v1 +plans. Recorded v0 plans with a supplied `work_contract` instead took the raw +legacy identity branch, although the writer, ordinary inspection and settlement +lookup already rejected a changed source. The executing path still refused it +downstream; this is an inconsistent recovery intake, not evidence of an +unauthorized Host launch or debit. Explicit retry inspection likewise returned +its blocked observation instead of the v1 intake error. + +The loader now sends every supplied complete source through the existing +`turn_host_lineage`/TypeScript source owner, including the recorded transitional +source/adapter cross-check. Current v1 loads already use that call; transitional +loads add it. No normal-path RPC saving is claimed. Source-absent historical +plans retain their exact raw identity checks and original bytes. The change +does not impose whole-journal settlement consistency on plan loading: existing +recovery inspection remains responsible for those diagnostics. Plain invalid- +journal inspection still returns its structured blocked observation. + +The existing File/SQLite journal matrix now tests loader refusal for changed +content, unknown version, null/missing binding, conflicting adapter and signed +interaction/action/reference mutations. Numeric source values, current missing- +source refusal, bare historical loading and byte preservation remain controls. +The public `run-once --resume-turn-key` and explicit retry-inspection entries +exercise the same source refusal without rewriting history or spending quota. +The frozen pre-fix loader fails both transitional provider cases; after fixing +the CLI fixture's omitted required project argument, explicit retry inspection +also fails those two cases while both current-plan controls pass. Those are +distinct product and harness findings, not six product defects. + +The pre-integration recovery cohort passes 139 cases in both source and an +isolated installed wheel. Integration with main `2852eb453bef` preserves the +complete native handoff, both lifecycle assertions and shared TypeScript imports. +Its 81-case source cohort and 178 TypeScript cases pass. An interrupted source/ +wheel attempt has no terminal result and is not counted as a pass. + +The integrated wheel initially passes 67 cases and fails 14 settlement cases: +their subprocesses default to the source checkout, which accidentally satisfies +workspace verification there but cannot do so in an off-checkout installation. +A diagnostic observer identifies the real workspace refusal. The existing tests +now explicitly use their own producing project; all original assertions, bad- +workspace cases and once-only recovery controls remain. The complete affected +module then passes 23 cases in both source and the unchanged installed wheel; +58 unaffected cases passed in the earlier wheel cohort. This covers 81 distinct +cases across those cohorts, not one uninterrupted final 81-case run. All 1,898 +packaged source files match; the final 23-case wheel run observes 125 completed +processes and 64,109 Core module origins without checkout contamination. Sudden +exits remain outside that exit audit. Earlier failures remain recorded. + +This repairs a supported recovery consumer rather than deleting a reader to +increase retirement counts. Legacy constructors remain only in the named +historical/composition/model-behavior fixtures above; original outstanding work, +supported recovery windows, independent review and complete C1 acceptance still +govern retirement and adoption. The preceding cost cohort remains pinned to its +original main/candidate snapshots; this integrity change does not remeasure it. + +## Earlier integration evidence + +The integration preserves main's extracted quota-presentation owner and sparse +native journal transport. One existing numeric collector and validator replace +the candidate's duplicates. Acceptance, summary lanes, authoring and Vision +sharing reuse the existing source-identity/edit owners; ordinary JSON equality +cannot establish original numeric identity across the Python/JavaScript boundary. +Body-size decisions still compare serialized bodies, not identity framing. + +An independent 24-case Python-to-TypeScript regression first produced 16 failures +and eight passing controls. After the identity/edit repair, all 24 pass, including +integral floats, signed zero, unsafe integers, later exact authoring owners and +identical audit controls. The broader integration initially failed stale fixture +hash references and one absent-authoring CLI case; those failures remain evidence +and require separate corrected validation. This is source/transport evidence, +not installed adoption, accepted model outcomes or complete-cost qualification. + +The 2026-11-01 heartbeat consumer increment (`18b55e04d`) reuses the existing +heartbeat rule owner for routing, safety and complete work guidance in captured +native Goal input. Fresh on/off prompts share that wording; historical saved +bodies are not rewritten. Clause review retains the actor, authority, required +reads, original/cumulative outcomes, ordering, evidence, continuation and stops. +This removes a separately maintained prose copy, not a decision or settlement +owner, and changes no activation default or protocol. + +With the same CLI caller, 320-character scope, explicit CLI and five capability +flags, substituting only frozen `958eef4c` renderers gives 5,041/5,080 normalized +characters unbound/bound; the candidate gives 4,859/4,898 under the unchanged +4,900 allowance. Each candidate body saves 180 UTF-8 bytes. The longer-route +negatives remain over budget at 5,051/5,090. Captured native Goal input instead +grows 3,187→3,235 characters while staying below its unchanged 4,000 host limit. +These are generated-input measurements, not a full base-repository rerun, +control-packet compression, model adoption, token savings or outcome benefit. + +At that checkpoint, the consumer checks pass 114 prompt/platform cases with one platform skip and +12 real isolated File/SQLite CLI final-input/recovery cases using synthetic host +executables. The output/differential +matrix still has five failing tests: complete quota Markdown 30,462>10,000, +crowded plans 24,044/27,508>22,500, complete alias 24,252>13,000 and its separate +multi-agent probe 25,933>13,000. Its other 219 cases pass, with one skip. No +budget or population is relaxed, and the historical restoration allowance is +not inherited by the new wording. C1 cutover, remaining readers and the original +quota single-session outcomes/full-cost comparison remain open. + +The subsequent Markdown increment (`b852af5f7`, integrating target main +`035f7ac66`) removes nested pretty-print padding through the existing complete +Turn renderer used by both ordinary quota and the alias. Each root field has +its own line; every nested value, source clause and binding remains in one +parseable JSON block. JSON output, captures, native host input, legacy rendering +and decision/settlement owners are unchanged. The same-source comparison with +the frozen `f3ae16362` renderer includes the final stdout newline: + +| Synthetic source | Previous Markdown bytes | Current Markdown bytes | Saved bytes | Complete JSON bytes | +| --- | ---: | ---: | ---: | ---: | +| Small | 30,462 | 24,531 | 5,931 | 24,252 | +| Crowded | 47,237 | 37,846 | 9,391 | 37,555 | +| Crowded with Vision | 55,893 | 45,249 | 10,644 | 44,954 | + +Line counts fall from 860/1,214/1,361 to 69/72/73. Markdown still adds +279/291/295 bytes over the corresponding complete compact JSON; this removes +presentation padding, not semantic control-packet content. The complete-source +module passes 63 cases, including unknown facts, integral floats, signed zero, +unsafe integers and escaped instruction text. The integrated bounded-reader +buffer checks pass two cases. The output/differential matrix remains +219 passed, five failed and one skipped: small Markdown is now 24,531>10,000; +the other four failures retain their preceding sizes and limits. Historical +failures remain failures. No ceiling, fixture population or requirement changes, +and no model, invoice, installed-adoption or long-horizon benefit is qualified. + +The optional Host increment (`8316c9fa5`, subsequently integrating target main +`5a9c0a612`) moves Ark and MemT tool identity to the existing complete dispatch +owner through `extensions.turn_host.extract_turn_work_identity`. Complete input +uses the selected-work owner, including adaptive primary work; historical input +retains the providers' raw declared values and strict string/NUL checks. Session +lineage keeps its historical normalization. Fresh-context, source/projection +integrity and MemT exact-Goal-lifetime refusal remain in force. This retires two +provider-side identity decoders, not the remaining DSH, native-child, steward and +session-recovery compatibility readers or the executor's v0 transport. + +MemT candidate validation now retains the original request and complete source. +A real candidate conversion followed by source invalidation was previously +accepted by this local check; it now rejects. This does not establish that outer +Core settlement previously accepted that candidate. Actual CLI input still lacks +an admitted MemT lifetime and cannot open memory; converter tests do not invent +one. SDK tests use isolated synthetic protocol peers, not a GPU or model service. + +A matched comparison calls the actual Ark identity consumer at frozen +`46bdaddb3` and the candidate on identical synthetic File/SQLite CLI requests: + +| Cost observation | Before | Candidate | +| --- | ---: | ---: | +| Checked identity RPCs per request | 1 | 1 | +| Canonical JSON argument bytes, File / SQLite | 41,286 / 41,338 | unchanged | +| Canonical JSON result bytes | 211 | 324 | +| Complete-source deep copies for identity | 1 | 0 | + +The avoided copy's source is 28,432/28,458 canonical JSON bytes; this is a source +size proxy, not allocated-memory measurement. Every dispatch-context response +now carries the three identity facts, adding 113 bytes even for its other callers. +Model prompts remain byte-identical at 33,020/33,046 bytes, verified by digest. +These counts exclude RPC framing and establish neither latency nor net model, +token, invoice or long-horizon benefit. Complete packet compression is unchanged. + +Ark/MemT suites pass 41/43 cases after baseline 39/37 passes. The added tests first +failed on both providers' identity decoders and on MemT's invalidated-source +acceptance. Core capture/Host checks pass 58 cases, including File/SQLite actual +CLI input, adaptive identity, raw historical values and refusal without fallback. +After integrating main, the envelope/interaction/conversation owners pass 122 +TypeScript cases. The native steward fixture initially has ten startup failures +because it inherits an ambient conversation-provider override that its fake peer +does not echo. Removing only that override in the test child process gives ten +passes; no user configuration or production provider check is changed. The first +failure is retained as test-environment evidence, not a passing execution. +An initial assertion incorrectly imposed complete-input adaptive selection on +historical provider decoding; its two failures were corrected and remain recorded. +The broader local matrices expose six context-delivery and two driver-profile +failures, all eight reproduced at frozen `46bdaddb3`; the five output-budget +failures also remain. They are not qualifying passes. C1 still requires these +delivery gaps, supported-reader retirement, packaged/installed qualification and +the original-quota outcome/full-cost comparison. Both optional packages require +the same integrated Core checkout; a version floor alone cannot prove seam +availability in a previously published wheel. + +The bundled DSH follow-through (`e838e7594`) integrates target main `8ac384cdc` and replaces +its complete-input session/tool identity reads with the same checked selected-work +facts. Previously, adaptive complete work could select a different primary Todo +while DSH still bound tools and its reusable session to the old declared Todo. +The existing dispatch check now retains its already-returned identity privately +for that invocation; DSH reuses it for both bindings without another RPC. This +metadata is absent from final model input. The two historical DSH decoders are +consolidated into one raw-value adapter, preserving its false-like coercion, +component positions, Goal-instance hash and fresh-iteration hash. It remains +only for requests without `work_contract`, until their original-version recovery +window is reconciled; a supplied invalid complete contract never falls back. + +At frozen `ae8ee460a` and the candidate, four identical synthetic requests from +real File/SQLite CLI plans exercise normal and adaptive work through the actual +DSH adapter. Each retains one dispatch RPC; canonical argument/result JSON sizes +remain identical. Final prompts are byte-identical by digest: + +| Source | Normal prompt bytes | Adaptive prompt bytes | Added internal authority JSON bytes | +| --- | ---: | ---: | ---: | +| File | 32,377 | 32,517 | 114 / 115 | +| SQLite | 32,425 | 32,565 | 114 / 115 | + +The final column is a Python-object JSON size proxy, not allocations or wire +traffic. Ordinary session/tool identities remain identical; adaptive bindings +intentionally change from the old Todo to the selected primary Todo. The probe +leaves state unchanged and spends nothing. It qualifies this caller correction, +not packet compression, latency, model billing or accepted-outcome/full-cost benefit. + +The added regressions first produce four adaptive failures and seven passing +controls. The combined DSH and complete-source suites then pass 367 cases; +two additional real File/SQLite CLI cases pass through the built-in DSH runner, +independent validation, committed writeback and replay with one runner invocation +and one debit. Providers remain synthetic. The optional Ark/MemT suites pass +44/65 cases against the current Core. MemT initially lacked its pinned client; +after installing that client only in the isolated test overlay, five CLI cases +still imported an older installed Core from their task working directories. +The child import probe reproduced the missing seam, and explicitly binding the +test child's Python source path fixed those five cases without changing the +product or user configuration. Both initial failures remain evidence. +This uses the existing CLI/Chat Host owner and adds no capability, setting, +user step or activation default. No live SDK service or installed-host adoption +is qualified. Native-child, steward and +other historical consumers, the five output-budget holds, eight broader failures +and C1's original-quota acceptance remain open. + +The native-child metadata follow-through (`3d58796d7`) integrates target main `07149df68`. +`configured_native_child_limit`, called by request construction, durable Host +attempts and both Codex transports, now reads the original complete interaction +context when `work_contract` is present. Only historical requests read the v0 +context. The existing integer decoder, complete-source verification, launch +fences and native receipt admission are unchanged; this is a local transport +read, not a second authority or a new default. The shared source verifier already +rejects inconsistent projections, so this does not establish a prior wrong-child +admission. The remaining v0 envelope still supplies signed compatibility data. + +New on/off regressions first fail on the historical field access. Real subprocess +and durable readback checks then preserve the enabled observations, disabled +isolation, parent result and private-content exclusion. Corrupt complete input +is refused before another process or receipt. The first wider run passes 195 +cases but rejects both new fixtures at the complete Goal-source gate; delivering +the actual fixture file and full revision repairs the fixture, without changing +that product gate. The corrected native-child module passes 38 cases; the full +same three-module rerun passes 197 in 149.37 seconds. The owned +operation Host suite passes 34, with its two explicitly live-model qualification +cases skipped; no live host was launched. + +At frozen integration `5d9dbb811` and the candidate, eight fixed requests combine +the earlier real File/SQLite normal/adaptive CLI fixtures with synthetic on/off +capability context recomposed by the existing owner. Metadata reads use zero +RPCs; complete input preparation still uses one. Request bytes (40,202–40,778), +prompt bytes (30,744–31,030), schema hashes and canonical argument/result sizes +are identical in every matched case. This is no packet reduction, latency, +allocation, invoice or full-Host cost measurement. The five output-budget holds, +eight broader failures, other consumer/writer migration and original-quota +outcome/full-cost acceptance remain open; the historical failures are retained. + +The later source-checkout recheck at `d1046499a` runs both complete +`test_context_delivery_cli` and `test_loopx_turn_driver` modules: 253 pass and +only the two profile-alias cases fail. Their actual CLI response rejects capture +without a Turn identity before the test can inspect `scheduler_hint`; it is not +evidence of a scheduler-policy failure. The fixture now supplies an original +Turn and independently covers explicit delivery off and native delivery on for +both aliases. The on cases follow the declared original-capture reader through +contiguous UTF-8 pages, retaining all scheduler assertions. They verify one +admission, no spend and unchanged Goal/event-log bytes after recovery. + +The same complete modules then pass 257 cases in 118.43 seconds, with no skips +or errors; the focused four-case matrix also passes. This increment changes +tests only and introduces no production setting, default, caller protocol or +runtime behavior. The six older context-delivery failures remain historical +negative evidence; their individual causes were not reassigned by this recheck. +The five output-budget holds, remaining actual consumer/writer migration, +supported-reader exit and original-quota outcome/full-cost qualification remain +open. A passing source-checkout cohort proves neither installed-host adoption +nor packet-size, model-retention or net-cost benefit. + +The subsequent planning increment removes a redundant `consumer_version` RPC +only when `build_loopx_turn_plan` receives a complete contract. Its existing +`driver_lineage` operation already calls the same TypeScript version, integrity, +source/projection and selected-work owners. Historical inputs retain their +standalone version diagnostics. There is no new validation implementation, +cross-invocation cache, field, protocol version, activation default or authority. + +Eight fixed inputs originate from real isolated File/SQLite CLI plans and cover +complete/historical sources with fresh/resume session policies. Against frozen +`0cd09b46c`, all final plans, Host requests, Codex prompts and schemas remain +byte-identical. Complete planning uses one RPC instead of two; the measured +plan/request/prompt/schema sequence uses two instead of three. Its canonical +RPC argument-plus-result JSON changes from 92,598 to 81,554 bytes for File and +92,838 to 81,752 for SQLite, saving 11,044/11,086 bytes (11.93%/11.94%). Historical +controls retain their three RPCs and exact bytes. Every complete model input +still contains the full original contract and fixture Goal; the probes spend +nothing and invoke no model. CSV, SQLite integer totals and Decimal ratios +independently agree on the eight matched comparisons. + +The six-case planning matrix first has five duplicate-call failures and one +passing historical control; all six then pass. Unsupported adapter versions, +changed source content, a self-consistently rehashed but substituted adapter and +an explicitly null complete contract still refuse through the shared owner. +These are component transport costs, excluding framing, latency, allocations, +model usage and outcomes. Final model input is unchanged; the five output holds, +original-quota single-session comparison and complete C1 qualification remain +open. This saving cannot be added to the physical packet or selective-read +figures as though they shared a denominator. + +The full Turn driver, native Codex CLI and complete-source modules pass 334 +cases in 202.77 seconds, with no skips or errors. These include real File/SQLite +delivery, validation, failed-attempt recovery and original-Turn settlement; no +live Host was launched. This qualifies the bounded source increment, not the +remaining C1 cutover or a new exact-head merge-readiness receipt. + +The subsequent Host-transfer repair preserves a supplied `work_contract` even +when it is not an object. Request construction and original-capture publication +previously discarded these values, allowing the native prompt and shared Host +reader to interpret them as historical absence. Both transports now retain the +value for the existing TypeScript complete-source validator; genuine historical +absence still uses the old reader. No parallel validator or new field is added. +The ordinary executor's earlier source check remains; this does not establish +an outer settlement bypass. + +At frozen `42b842f93`, the corrected 18-case matrix has ten missing-refusal +failures and eight passing controls; the repair passes all 18. It covers both +transfers, absent/valid input, null, false, zero, list, text, empty object and +invalid integrity, including native/shared-reader refusal and no DSH runner load. +Two initial controls correctly refused an unfulfilled Goal read; delivering the +complete synthetic Goal fixes those fixtures, without relaxing that check. +Eight fixed File/SQLite fresh/resume inputs retain byte-identical plans, requests, +prompts and schemas, as well as unchanged RPC counts and argument/result bytes. +This is compatibility-boundary qualification, not a new compression or net-cost +result. The original five output holds and complete C1 acceptance remain open. + +The wider six-module run initially passes 522 and fails six Host-context cases +before dispatch. Frozen `42b842f93` reproduces all six. An independent child +import probe finds a different installed Core when cwd is the disposable Goal. +The test now binds and checks this checkout for its subprocesses and explicitly +selects delivery off for its historical direct-body control. That complete +Host-context module passes eight cases; the other five modules retain their +520 passes on unchanged product files. The combined 528 distinct passing cases +come from those two invocations, not a claimed single final six-module run. +Original failures remain recorded; no installed Core or user setting is changed. + +The managed Session's independent-validation reader now shares that same +complete-source owner. Preparation reuses the invocation-local identity already +checked by dispatch; after model work, the callback checks the current complete +source before running the original independent argv. Supplied invalid contracts +cannot enter the historical decoder. Actual absence retains the old selection +and diagnostics. Canonical declaration checks before and after argv, original +actor admission, leases and once-only settlement remain with their owners. + +At frozen `bd2ea9c58`, four File/SQLite changed/null-source cases incorrectly run +the independent argv; four valid/historical controls pass across two baseline +invocations. The repaired eight-case matrix passes in one invocation. Faults are +injected at the actual post-model callback; the native Session, canonical task, +independent argv and settlement remain real, with only synthetic model/provider +fixtures. Six earlier startup failures came from an ambient provider override; +the shared synthetic fixture now isolates it without changing installed settings. +This establishes the callback boundary, not an outer settlement bypass. + +A same-source native-fixture comparison substitutes the frozen baseline methods +without replacing their dependencies or validation command. Preparation adds no +Turn-envelope RPC; post-validation adds one, with 42,911/42,959 canonical argument +plus result JSON bytes for File/SQLite. A separate eight-input fixed CLI-source +comparison measures 36,320/36,404 bytes for complete inputs and no added RPC for +historical ones. These populations are separate. Both exclude framing, latency, +allocation, canonical task reads, argv, model usage and recovery; the extra +baseline argv is read-only fixture validation, not a production replay. This is +a measured component cost increase for source refusal, not compression or a +complete-net-benefit result. The original five output holds, remaining C1 readers +and original-quota single-session outcome/full-cost acceptance remain open. + +The wider attempt at `9baa678db` completes five native/steward/calendar modules +with 359 passes, then stops after 37 identical provider-startup failures in the +sixth private-conversation module, which also has 56 passes. This is an interrupted +run, not a six-module pass; its nameless interrupt record is not a test. Two +same-source environment-unset controls pass, then the same two cases pass with +only the neutral ordinary fixture isolated. The production provider check and +installed configuration remain unchanged. + +Target main `8a9e11628` is subsequently integrated. Its additional explicit +fixture caller is adapted at `4cdf977c3`; the runtime change remains `a49625e3a`. +On that integrated source, the complete native-validation/ordinary modules pass +68 cases in 335.058 seconds, and private-conversation/Antigravity modules pass +316 in 644.420 seconds. These are 384 distinct passing cases across two +invocations, not a new full six-module run. The shared conversation-binding +TypeScript suite passes 45 cases. There are no skips or errors in these final +checks. Earlier failures and component measurements retain their original +source; this integration does not remeasure full costs or qualify C1 cutover. + +The blocks below preserve the candidate narrative moved out of the normative +RFC during this integration. Their measurements, proposals and present-tense +statements belong to their original checkpoints; they are not fresh claims for +this integrated source. The current RFC and named owners govern current behavior. +In particular, the retired scope prototype does not restore a mandatory model +reading plan. Existing negative results, original-quota comparison and reader +retirement requirements remain in force. The directory's other dated entries +retain their own provenance and are not rewritten by this relocation. + +## Historical candidate block 1 + +The Agent-scoped implementation and measurements below remain an unmerged C1 +integration checkpoint. They do not describe default installed behavior. The +shipped acceptance-material slice and candidate-stage proposal follow separately. + +For cold delivery, use the current Agent's outcomes as the default expanded +scope. Other Agents' independent outcomes remain discoverable in an index with +identity, owner, objective, revision, work links, unmet requirement identities, +current review/check status and exact captured detail references. Global Goal +intent, shared requirements, permissions and stops always remain in the required +input. Expand cross-Agent dependencies, shared acceptance and material blockers +or conflicting evidence before the affected decision, regardless of ownership. +Goal-wide replanning and final acceptance widen the scope to every affected +outcome; a local delivery slice need not reread unrelated historical evidence. +Ownership is a default, not a permission boundary or sufficient relevance test. +Unbound work, unknown relations or unsupported source shapes retain complete +delivery until the existing typed owner can prove the narrower requirement set. + +The canonical contract still retains complete requirements and evidence. Reuse +the existing exact-capture outcome indexing and staged replan reader as the +starting point for one ordinary/replan/detail pipeline, extending its index with +current decision facts rather than merely outcome counts. Preserve full text +for the required scope; defer supporting provenance and review detail through +integrity-bound reads with explicit ordering. A dependent decision must consume +its required detail first. Keep current conclusions, freshness and unresolved +requirements inline; an Agent review must not become an independent check. +Interface folding alone does not reduce model input. The delivery projection, +required-read owner and host recovery contract must migrate together; existing +captures retain their original complete-read obligations. Missing detail or +uncertain retention selects the original capture's supported recovery, never a +new admission or an assumed read receipt. Do not shorten retained requirements, +prune declaration origins or infer relevance from prose to meet a byte target. + +Qualify this C2 change on the same cold, retained warm and context-loss sources: +default own work, cross-Agent dependency/constraint, unbound work, changed peer +evidence, broad replan and Goal acceptance. Count actual model input, paging and +detail round trips, recovery, latency and complete outcome cost. A smaller first +page is not a benefit when required follow-up reads or missed constraints erase +the saving. This is proposed delivery behavior; the current complete-source +reader remains authoritative until replacement and rollback are qualified. + +Current integration evidence: [navigation convergence checkpoint](2026-10-29-navigation-convergence.md). +The [journal source-fidelity checkpoint](2026-10-29-journal-source-fidelity.md) +separates the independently reviewable persistence repair from the still-open +numeric hash/context-codec qualification. The subsequent +[context source-fidelity checkpoint](2026-10-29-context-source-fidelity.md) +splits generic cold/delta/full-recovery repair into normal #7661 and reuses one +source-identity/edit owner in C1. Its component transport reduction does not +qualify canonical hashes, installed adoption or original-quota full-cost benefit. +Existing hash semantics remain unchanged. + +The current C1 branch reuses merged #7560's +`outcome_context_navigation_v1` and the generic same-capture `context-read --select` +reader. Registered relations guide reading order; ownership does not prove +independence, and limitations do not create a full-file model-reading gate. +Complete original requirements, current states, global constraints and contrary +evidence remain reachable in the original digest-bound capture. + +The earlier unmerged mandatory reading plan, `outcome_context_projection_v0` +wrapper, outcome-specific ordinary reader and fused native projection operation +are retired. Staged replan's existing decision-bound acceptance reference stays +with its owner. Native IO uses main's material planner and exact recovery codec; +it commits the current complete recovery before optional planning. This restores +two owner calls for a simple native capture instead of the prototype's fused +call, so the old call-count improvement is not a current qualification. + +Merged [#7627](https://github.com/loopx-project/loopx/pull/7627) supplies +saved-file-first delivery and file deltas without mandatory full model reading. +C1 adopts its reviewed implementation through the existing native owner, +without reintroducing the retired scope mechanism. Its installed adoption, actual +model decisions and accepted-outcome/full-cost qualification remain separate. +Historical captures retain their original identity and supported recovery. + +The following measurements and tests describe the retired prototype's exact +checkpoints. They remain historical evidence, not results for the current +navigation/planner integration. + +On one 24-outcome / 253-requirement synthetic snapshot, 61 alternating warm +real-provider owner calls against the prior implementation measured File median +5.890→6.317 ms and SQLite 2.239→2.521 ms; p95 was 15.267→17.580 and +6.504→9.412 ms respectively. All prior response fields were identical; plan +metadata added 405/415 serialized bytes. This isolates the acceptance owner in +one TypeScript process, excluding bridge, CLI, cold startup and model costs. +That foundation added cost before the native scope cutover; it was not an +efficiency win. At the scope-cutover checkpoint, native presentation additionally +allocates an exact required artifact and calls the same typed owner once before the existing codec. These +costs must be included with page, detail and recovery costs; a smaller first +input does not establish a net benefit. + +The native slice passes 406 real-entry Python tests (five explicit native/SDK +cases unqualified), 169 TypeScript tests and four actual Codex +`0.163.0-alpha.11.1` deterministic-loopback checks. The latter inspect actual +model-request bytes for cold/full, retained delta and same-capture recovery; +they do not establish free-form model behavior. Four new File/SQLite scope +assertions fail at `1ac29089f`. An integration recovery-reference failure was +repaired by replacing metadata only for explicitly scoped artifacts, preserving +ordinary original-file byte identity. +An interruption regression first failed with the preceding capture still +selected; publishing current recovery before the optional scope call fixes it. +At runtime `e1c69289a`, standard premerge failed two checks also reproduced on `8b37000b3`: +the existing oversized `run_loopx_turn_once` decision function and stale +`turn_route` producer coverage after the earlier owner convergence. The native +increment did not change those files; that historical result is not a pass or +an exception. The integration was rebased onto `b69021498`, then onto +`f63647e2e` with the target-main native output-budget behavior retained. It incorporates +the actual TypeScript producer/scanner repair from [#7520](https://github.com/loopx-project/loopx/pull/7520). +It also isolates original-capture restoration from run-once orchestration at +`fec9cd3af`, preserving the existing capture owner and session recovery. The +size thresholds remain unchanged. Current combined qualification belongs to +the exact integration head's PR evidence, not the old native-slice test counts. + +Final measurements include the recovery-publication fix at runtime commit +`e1c69289a`. Against immutable `8b37000b3` (the preceding C1 plus the same target-main large +page profile), three warmed cohorts per side supply 21 samples per provider and +phase on a 24-outcome / 253-requirement source. The warm case adds a real typed +dependency and verifies delivery of its previously unread body. Complete +serialized page output for File cold/warm/recovery is +105,380/40,473/103,372→37,908/33,495/38,594 bytes. Median latency is: + +| Phase | File, before→after ms | SQLite, before→after ms | +| --- | ---: | ---: | +| Cold full input | 72.856→48.749 | 67.237→46.477 | +| Warm scope expansion | 38.744→51.944 | 35.953→52.165 | +| Lost-context full recovery | 109.126→61.425 | 109.725→56.777 | +| Index plus one optional complete detail | 96.918→108.557 | 92.460→109.251 | + +In that measured version, the additional scope RPC remains: warm bridge calls rise from two to three. +File warm artifact files total 131,020→160,192 serialized bytes; the index/detail +operation still uses two calls and now revalidates the derived presentation. +Cold and recovery use one page instead of two. These measurements cover Python +native projection, pages and lifecycle with warmed runtime; machine load was +not controlled. They exclude initial acceptance collection, process startup, +child CPU, model/cache tokens, billing, human/setup work and accepted outcomes. +Cold/recovery transport improves while warm and detail medians regress. This +is not the original-quota comparison or a positive complete-cost verdict. + +At `85c235d29`, the native caller combines scope and encoding through the same +owners in one request and removes the unused full-wire copy. The former standalone +scope operation is retired; ordinary codecs and captured-detail readers remain. +Against `307d000a3`, the same frozen File/SQLite observations and three interleaved +warm cohorts per arm (21 samples per provider/phase) measure: + +| Phase | File median/p95, before→after ms | SQLite median/p95, before→after ms | +| --- | --- | --- | +| Cold full input | 37.438/60.718→28.516/38.941 | 34.263/39.924→26.966/39.054 | +| Warm scope expansion | 42.065/58.640→34.813/45.922 | 39.869/49.047→33.856/45.593 | + +Including page-lifecycle observation, these phases now use two rather than three +bridge calls. File cold artifact bytes fall 162,877→129,299; warm artifacts remain +160,192. Complete page output is unchanged. Six same-path ordinary/scoped/broad +File/SQLite comparisons preserve complete public pages and recovery values; +the one-call regression assertion fails on the baseline. Warm response payload +grows by 27 bytes despite lower request traffic. Detail/recovery keep their call +counts; SQLite detail p95 worsens 138.131→175.541 ms without a changed code path. +Machine load remains uncontrolled and the earlier exclusions still apply. +This removes demonstrated local transport/IO cost, not the original-quota +outcome/full-cost gap, short-source growth or all warm artifact overhead. + +Small sources provide a counterexample to size savings: four real-entry +File/SQLite fixtures with two outcomes and four requirements grow from +36,293–40,548 to 37,948–42,203 bytes, exactly 1,655 bytes each. Index and scope +metadata exceed their short optional bodies. The proposal does not derive a +semantic omission rule or production size threshold from the larger fixture. + +On the same 24-outcome / 253-requirement synthetic source, rendering the former +count-only index shape allocates 8,190 bytes; the staged state groups allocate +18,979 bytes. The old 12 KiB index budget fails. Retaining these decision facts +justifies a separate 20 KiB index ceiling; history, horizon, whole-envelope and +production performance limits stay unchanged. Grouping exact states avoids +repeating the same status fields for each requirement. These are serialized +bytes, not a token/latency/outcome benefit or an immutable base/head comparison. +The source-path scope checks and transport costs above do not qualify general +semantic independence or matched accepted-outcome/full-cost benefit. + +## Historical candidate block 2 + +The external scheduler candidate now validates a versioned complete input through +`assert_complete_turn_decision` and the existing TypeScript complete-reader owner +before reading cadence or wake permission. This is a pure reader: it neither +recomposes the captured host binding nor creates a legacy executor view. Missing +bindings, unsupported versions/required semantics, altered content and invalid +same-capture references fail before the wake command. Unversioned ordinary quota +packets retain their existing compatibility path; retiring that path requires +reconciling supported deployed workers. File/SQLite source-CLI-to-worker tests use +local child markers, not model execution. This qualifies that input boundary, +not attached-host task delivery, settlement or accepted-outcome/full-cost benefit. + +The optional Ark adapter reuses `extract_turn_authority` / `render_prompt` from +that same host-input owner; no optional-package contract builder is needed. +File/SQLite `turn plan --host generic-cli --iteration-context fresh` now feeds +its complete request through the real Ark SDK with a synthetic HTTP transport. +Checks compare the actual user-message contract with the original CLI source, +recover a persisted running receipt without a new input, replay completion +without provider calls, and reject altered source/version/binding or explicitly null +complete input before provider or receipt creation. Core state and spend remain +unchanged. Historical Ark request and recovery tests remain. This qualifies the +SDK wire boundary, not a deployed cloud session, model outcomes or Core settlement. +Ark and MemT now share the real File/SQLite CLI request fixture. MemT rejects +that complete input before provider IO because the executable legacy registry +supplies no exact `goal_ref`. The existing `source_session_v1` profile carries +an exact lifetime but is lifecycle-only: the real generic Turn planning entrypoint +rejects it before capture or execution. Supplying a synthetic reference after +planning would hide this producer/consumer gap. Complete-input corruption also +rejects before provider or receipt creation; historical MemT SDK/snapshot tests +remain, but they do not qualify end-to-end complete-input delivery. The owning +change on the MemT path must carry an admitted exact lifetime from an executable registry +through the shared Turn request and recovery owners, preserving recreation and +stale-instance rejection. Do not relax MemT's isolation or enable the +lifecycle-only profile as an adapter workaround. This is a demonstrated adoption +gap, not a qualified native-memory path. The operation-SDK native runtime and +packaged App adoption also remain unqualified. The internal effect envelope and historical request decoder +still serve settlement/result/session callers; remove them only after those +callers and outstanding receipts use the replacement, not merely because model +input no longer contains the old envelope. + +New Codex/DSH requests now read their shared dispatch session lineage from the +complete contract, reusing the TS complete-input validator and adaptive primary +work owner. Model-input validation uses the same owner and rejects mismatched +Goal/Agent/Todo identities between complete input and the internal effect adapter, +even when both digests are independently valid. The complete path no longer +repeats Python version/signature validation; historical requests keep their +original decoder, persisted session schema, path and scope. Real File/SQLite CLI +capture, failed-attempt recovery and once-only settlement replay pass. Ordinary +and adaptive work restore existing Codex/DSH sessions under Todo and Agent +scopes. The same fixture preserves legal baseline paths but fails the added +identity-conflict cases before migration and passes on the candidate. Native +operation SDK environment tests still include skips; its runtime is not qualified. +Session identity migration does not retire all result qualification and settlement +readers of the internal envelope. Full retirement and net-cost +benefit remain unproven. The MemT lifetime gap blocks its dependent path only, +not these independent migrations. + +Planning and failed-attempt session lookup now pass the original complete contract +through the same identity owner, including journal inspection. An omitted contract +still decodes historical records; an explicitly null contract rejects. Live and +cached vision-result normalization also use this shared identity read instead of +rebuilding Goal/Agent from the effect adapter. Session scope/lifetime fences and +the native app-server callback remain with their existing owners. This removes +those identity-only reads, not the full internal adapter: execution routing, +result evidence/profile interpretation and settlement still require migration. +Adaptive recovery fixtures are composed before signing: historical unverified +selections preserve primary-Todo writeback, while a conflicting verified task +source rejects before host execution or quota spend. The source fence is retained. +Completion-recovery qualification checks the original durable completion and spend +receipts without resubmitting completion. Four obsolete replay-call assertions +also failed on the prior baseline; their repaired oracle retains changed-task-text +and historical pre-source acceptance cases on real File/SQLite stores. + +Completion task-body resolution now lives with the existing TypeScript interaction +source owner. The same coarse read now supplies `run-once` with the original +selected work, task-body commitment, admitted action, replan and writeback +conditions. Complete-source validation reuses its already-checked effect +projection within that call; it adds neither another RPC nor a model-facing +contract. Adaptive primary selection and ordinary selection share the existing +interaction owner. The CLI no longer reads these execution facts from the +historical adapter; it still transports that adapter for source/signature checks +and consumers not yet migrated. Omitted complete contracts retain the old journal +decoder; supplied null or invalid sources never fall back. Exact Unicode and +whitespace bytes, missing/ambiguous-source refusals, original settlement identity +and accepted-receipt recovery remain protected. The old 48-case File/SQLite +capture/completion selection passes at +`599cf1f72`; candidate complete-source checks also reject altered bindings and +explicit null inputs. The initial task-hash migration added a TypeScript boundary +where the historical resolver was local Python; this broader read reuses that +boundary rather than canceling its cost. Full adapter retirement, remaining +effect/material consumers and original-quota outcome/full-cost qualification +remain open. + +Structured Host preparation now consumes the checked complete source directly; +it no longer flattens the old action, boundary, capsule and planning carriers for +new requests. The same typed source check supplies the executable-action alias +and admitted-replan fact, preserving capability-before-replan ordering without +reimplementing it in Python. Codex prompt construction also uses the complete +source for boundary guidance and the original model input's staged readers. +Original capture metadata still travels through the existing transport; its +source and adapter integrity checks remain. Historical-only requests retain the +old decoder and renderer. This is an internal consumer replacement, not another +model-facing view or a cache across attempts; the final complete model input and +its instruction obligations must remain unchanged. Other effect/session +consumers, packaged adoption and full-cost qualification remain open. + +Against rebased predecessor `4c4e9b346`, frozen real File/SQLite CLI requests +produce identical complete prompts, result contracts, historical-only outputs +and invalid-source diagnostics. Host preparation still makes two RPCs; total +request bytes decrease by five and responses grow by 190 bytes per group. Six +sequential cohorts, with separate verified runtime namespaces and 93 warm +samples per arm/case, observe these median/p95 values in milliseconds: + +| Request provenance / Host | Predecessor | Complete-source consumer | +| --- | --- | --- | +| File / Codex | 27.544 / 32.366 | 31.258 / 40.408 | +| File / structured | 25.948 / 32.642 | 30.007 / 39.242 | +| SQLite / Codex | 25.695 / 31.070 | 31.889 / 37.696 | +| SQLite / structured | 24.409 / 30.258 | 33.242 / 42.287 | + +These observations are negative local costs, not a speedup. Provider labels +identify request provenance; the measured groups perform no authority-store IO. +Machine/background load remains uncontrolled. Startup, other calls, complete +Turn/model/cache/billing/human costs and accepted outcomes are excluded. Earlier +overlapping, non-isolated exploratory timing is not qualified; neither source +convergence nor these samples establish original-quota net benefit. + +The next input-preparation increment shares one complete-source check between +prompt and result-schema construction within a single Codex launch. Both the +CLI process and operation-equipped app-server use this existing adapter boundary. +Standalone prompt/schema calls still check independently; structured result +conversion checks its source again after execution. No checked value is cached +across attempts, model work or result handling. The typed owner now returns only +action/replan/approval/profile applicability facts instead of echoing the full +source over the bridge. Python consumes its original checked input, retaining +the structured authority's detached values. Complete model input, original +readers, launch guards, result validation and outer settlement remain unchanged. + +An owned V8 capture of 500 baseline source checks locates substantial CPU work +in canonical hashing and Unicode key ordering. It excludes Python, transport and +provider IO; its inclusive weights are not elapsed-time savings. This motivates +removing duplicate checks at one preparation boundary, not weakening integrity +checks or sharing validation across execution. Earlier negative measurements +remain historical evidence; this increment does not close C1's original-quota +outcome/full-cost or adoption requirements. + +Against rebased predecessor `75bd69bf6` on target `ff9e97f8e`, six sequential interleaved cohorts +(93 warm samples per arm/case) retain identical complete prompt/schema/result, +historical output and invalid-source diagnostics. Codex preparation drops from +two RPCs to one; structured prompt plus post-execution candidate conversion +retains two. Codex request bytes are 86,293/86,399 → 43,144/43,197 for File/SQLite; +responses are 62,554/62,606 → 211. Structured requests decrease by five bytes and +responses become 422 bytes. These are internal JSON payloads, excluding framing. + +| Request provenance / Host | `75bd69bf6` median / p95 ms | Prepared input median / p95 ms | +| --- | --- | --- | +| File / Codex | 22.147 / 26.204 | 12.003 / 13.653 | +| File / structured | 22.269 / 26.310 | 23.124 / 27.843 | +| SQLite / Codex | 21.656 / 26.511 | 11.734 / 17.183 | +| SQLite / structured | 21.324 / 23.608 | 23.716 / 26.079 | + +Codex's local preparation improves; both structured timings remain negative +observations despite lower transport volume. The workload performs no store IO +or real model work. Separate owned runtimes and sequential arms avoid this +Agent's validation overlap, but background load remains uncontrolled. Startup, +other calls, full Turn, tokens/cache, billing, implementation/human cost and +accepted outcomes remain outside this measurement; it is not the original-quota +comparison or proof of overall benefit. + +The Codex result schema and shared candidate adapter now use one checked +complete-contract profile read for evidence applicability. They no longer decide +that requirement from the internal capsule on new requests. The existing +TypeScript integrity/source/lineage validator serves both this read and model +input validation; no new model-facing packet view or per-evidence-field call is +introduced. Omitted contracts retain historical capsule decoding; explicit null +or altered contracts reject. Empty/non-object profiles preserve their previous +non-applicability, stop results still need no evidence, and supplied evidence is +passed unchanged to the existing result validator. This migrates applicability, +not evidence-content validation, execution routing or all settlement consumers. +Each schema/material-candidate read adds one checked boundary call; this is a +semantic convergence step, not an established performance improvement. +In a 31-pair warm-boundary measurement using one real SQLite CLI host request +(45,405 JSON bytes, synthetic provider), schema construction plus material-result +conversion rose from a median 0.013 ms at `68223e337` to 19.6 ms in the candidate +(p95 0.019/22.8 ms); legitimate outputs matched. This local added cost is retained +as negative evidence. It excludes cold startup, model work and the full Turn; +overall outcome/cost qualification remains open. Checks cover real File/SQLite +capture/recovery plus Codex/shared-host consumers; they do not prove packaged App +adoption or a model-outcome improvement. + +The execution entry now checks complete-contract identity once before dispatch +or journal recovery. Settlement-plan fallback uses that checked identity, and +the recovery assessment reuses it within the same invocation instead of reading +the adapter's Agent again. Existing settlement plans and receipts are never +rebuilt, and omitted historical contracts retain their exact decoder. The value +is not cached across host attempts, source replacement or later invocations. +This also closes a recovery bypass: an existing settlement plan previously +skipped source validation, allowing a null/altered complete request to return an +existing journal outcome. On real File/SQLite CLI journals the new refusals leave +journal bytes and spend counts unchanged and invoke no host/settlement callbacks. +Ten targeted cases fail the new refusal assertions at `ce996ea0f`; the candidate's +32 capture/recovery cases and broader 605-case regression pass (overlapping). +The entry adds one checked boundary call, reused for both consumers. On the same +45,405-byte real SQLite CLI request, 31 alternating warm samples of the existing +settlement-plan read plus recovery identity preserve legitimate output parity: +median 0.016 to 12.382 ms, p95 0.024 to 14.883 ms. This is added local validation +cost, not an efficiency win; it excludes cold startup, full Turn and model costs. +Full-path performance and remaining routing/settlement retirement stay open. + +Codex CLI prompt construction now delegates valid complete requests directly to +that existing complete validator, removing its redundant standalone envelope +version call. Historical requests retain their version check; a failed complete +validation still checks the version to preserve diagnostic precedence when both +inputs are malformed. No validation cache, new wire field or second owner is +introduced, and prompt text is unchanged. This is a call-boundary consolidation, +not retirement of the remaining driver routing or settlement adapter. + +Against `e1dcd95dd`, complete and historical prompt bytes match, and six negative +input cases retain the same refusal diagnostics. On one 45,429-byte real SQLite +CLI request producing a 34,043-byte prompt, 61 alternating warm samples reduce +median prompt construction from 24.229 to 14.819 ms and p95 from 30.189 to +17.854 ms; bridge tracing confirms two calls become one. This local reduction +is about 39%, excluding cold startup, model execution and full-Turn cost. It does +not cancel the separately measured profile/settlement overhead or qualify the +original-quota outcome comparison. An earlier pre-diagnostic-refinement sample +was 21.279/12.994 ms median and 29.729/17.321 ms p95; retain it as earlier evidence, +not a second independent final qualification. + +Planning now receives the complete contract before route/session/transaction +construction, rather than attaching it after the plan is built. Planning and +failed-session reconciliation share the existing TypeScript complete-source +validator through one coarse lineage operation. It selects Goal/Agent/work +identity and returns the action-signature preimage in the same boundary call; +it replaces the previous signature-only call, without a per-field RPC or cache. +Explicit null, unsupported or altered complete contracts reject, including an +already-resumed request. Omitted historical contracts keep their exact decoder. +The receipt owner still supplies Todo-less replan identity. The route and launch +increments below describe the subsequent consumer migration. + +The Python JSON/hash transport codec remains deliberately unchanged. A direct +JavaScript hash trial failed numeric/exponent preimage parity and would have +changed persisted Turn keys; File/SQLite characterization now protects those +values, Unicode, adaptive work selection and resume idempotency. On one real +SQLite CLI request (45,380 JSON bytes), 31 alternating warm samples against +`088867421` preserve complete/historical plan and failed-session output parity. +Planning median/p95 changes from 39.632/47.964 to 42.608/53.270 ms; recovery changes +from 12.330/20.858 to 18.136/23.242 ms. These are local added validation costs, +not a full-Turn or original-quota outcome comparison. No model, installed App +or PostgreSQL authority qualification is implied. Remaining route/material +adapter retirement and end-to-end cost qualification keep C1 open. + +The live Host launch recheck now composes the receipt-bound live observation +through the same complete-contract owner as initial planning, then supplies that +contract to the shared planner. This replaces its raw-quota-to-historical-plan +shortcut. Stop and changed-action refusals still precede composition; the live +observation neither replaces the original captured model input nor mints another +receipt. Remaining effect/material adapter retirement is still migration work. + +The route classifier now lives in the existing TypeScript envelope owner. The +explicit registered action/frontier table is exhaustive at compile time; unknown +historical actions still reach the Host. Signature refusal, attempt, replan before +ordinary-delivery gating, capability intent identity, repair, user action and +quiet wait keep their ordering. Python retains a thin controller transport and +historical scalar-text encoding, not a second classification table. Complete +validation ignores historical decoding hints. The persisted Python action-hash +codec and historical selected-work reader are unchanged. + +Planning receives the route in its existing coarse lineage/signature call; +complete and historical ordinary plans still use two bridge calls. Against the +previous Python classifier, 1,152 action/gate combinations agree; complete and +historical plan outputs also agree on a fixed real SQLite CLI fixture. These +planner comparisons use the same current TypeScript endpoint and therefore are +not an exact old/head end-to-end latency experiment. The standalone controller +route now needs one bridge call: 61 alternating warm samples on a 44,891-byte +request increase median/p95 from 0.004792/0.010125 to 13.252792/15.855042 ms. +That is a measured regression for this caller, not an efficiency gain. It remains +an explicit cost gap for controller boundary consolidation; no cache or duplicate +classifier is introduced to hide it. File/SQLite entry, recovery and once-only +settlement qualification, remaining adapter retirement, packaged adoption and +original-quota outcome/full-cost qualification remain separate acceptance work. + +The production `turn managed-step` caller now combines envelope construction and +that same route evaluation in one TypeScript request. The Python adapter returns +a local immutable envelope snapshot paired with its route; this is neither a new +agent wire layout nor a second decision owner. Decoding or editing a returned +dictionary cannot change that snapshot or attach its qualification to another +wire dictionary. The controller retains its existing user-action precedence, +receipt/predecessor checks and journal-owned retry budget. Plain historical or +external envelopes still use the existing route reader and signature refusal. +The construction adapter shares host-binding and capture-argument preparation +with the ordinary envelope builder; the managed caller's redundant intermediate +builder has been removed. The standalone-reader regression above remains a +historical measurement; only the fresh production construction/consumption pair +can avoid that extra request. Remaining selected-work/effect/material decoding, +large cold-context recovery and packaged/outcome qualification remain open. +The local snapshot retires when this caller consumes the unified typed +controller result directly; it adds no persisted schema or compatibility wire. + +On one fixed 31,088-byte synthetic source, 61 alternating warm samples compare +the previous Python producer/controller functions at `ddf96b79c` with the fused +call, using the same current TypeScript server and unchanged build/route rules. +The final-source component median/p95 is 22.477/25.417 versus 13.739/17.479 ms. A separate +public `managed-step` CLI comparison uses real isolated File/SQLite stores and +21 alternating warm samples per arm/provider: median is 135.989 versus 137.316 ms +for File and 149.310 versus 146.081 ms for SQLite; p95 is 209.730 versus 192.544 ms +and 222.299 versus 240.848 ms respectively. A separate transport-count probe +observes 70 versus 69 total bridge requests on each provider; this removes one +route request, not the other live-decision calls. Complete outputs agree, the failed +journal remains byte-identical and neither arm spends quota. Request count +improves; mixed whole-CLI medians and tails do not establish a speedup. Small local samples and +shared host resources limit tail inference. These are source-bound observations, +not an entire immutable old-tree comparison, cold-start, installed App, model +outcome or original-quota full-cost qualification. + +Complete readers now also compare the adapter's signed action document with the +existing producer projection of the admitted complete source. Independent source +and adapter hashes previously proved only their separate integrity: a rehashed +adapter could retain Goal/Agent/Todo while changing execution or writeback facts. +The shared check covers the producer's existing signature dimensions without a +second field list, new RPC or wire view. Historical-only inputs keep their old +reader. Existing complete requests whose profile adapter disagrees with their +source now reject instead of silently reading the source profile; this deliberate +refusal change preserves the historical profile behavior separately. + +Against `b9e2c5120`, File/SQLite planning refusal assertions fail before the fix. +Six independently rehashed variants cover run eligibility, effective action, +delivery permission, user intervention, execution policy and spend permission; +the candidate rejects them before host/writeback/spend callbacks and leaves no +Turn journal or settlement receipt. An existing lane lock can still be allocated. +On a 44,891-byte real SQLite CLI fixture, 101 alternating warm in-process +TypeScript samples preserve legitimate lineage output; median validation changes +from 4.864 to 5.163 ms and p95 from 5.570 to 6.010 ms. These are added local costs, +excluding bridge transport, live composition, cold startup, models and full Turn +cost. They do not qualify the original-quota outcome comparison or C1 cutover. + +The candidate's ordinary planner and failed-session reconciliation now also +consume the selected work from the existing `driver_lineage` call. The shared +`selectedWorkTodo` owner places ordinary or adaptive selection into that call's +existing action-hash preimage; Python no longer selects it again or rewrites the +preimage. Python retains the persisted JSON/number and primary-ID scalar/whitespace codec. +The shared owner consumes already-decoded historical text without applying JS +trim again. Complete inputs +ignore those hints and retain full source/projection integrity checks. There is +no new bridge call, model-facing field, persisted schema or cross-attempt cache. +The public action-signature operation still describes the original envelope. + +This replaces selection in the actual plan and failed-session recovery callers, +including the native CLI's original-capture retry. The remaining v0 Host, +settlement and controller readers still use their historical selection decoder; +they retire only after their callers and outstanding receipts migrate and pass +equivalent recovery qualification. This increment does not qualify complete +adapter retirement, App/SDK/benchmark adoption or original-quota net benefit. + +Qualification against immutable `334c1a772` retains complete plan/recovery outputs +on frozen File/SQLite CLI inputs. Planning still uses two bridge calls and +reconciliation one, with equal request/response bytes on these ordinary inputs. +The actual CLI/provider/Host, completion and settlement modules pass 254 cases; +ten migration assertions fail on that predecessor while twelve historical-codec +cases pass there. The latter cover omitted/false/zero, whitespace, numeric, +boolean and collection-valued historical primary IDs, Unicode whitespace/BOM, version/mode applicability, +original Turn keys and resumed bindings. The candidate passes all of them. + +A temporary `ef479d2b5` trial changed three Unicode whitespace/BOM identities; +those semantic counterexamples fail there and pass on the corrected owner, +while the original predecessor preserves them. Its measurements below remain +historical trial evidence, not qualification of the corrected source. + +There is no qualified latency improvement. Three balanced sequential cohorts +give 93 warm samples per arm/case. The initial source-worktree versus archived +baseline comparison has higher candidate medians in all eight ordinary and +historical plan/recovery rows. Its generated-cache inventories differ. A second +control uses clean sibling source copies, identical inventories and disabled +bytecode generation in both arms; it still has mixed or slower observations: + +| Complete-source input / operation | Initial baseline → candidate median / p95, ms | Clean control baseline → candidate median / p95, ms | +| --- | --- | --- | +| File / plan | 35.129 / 40.776 → 46.227 / 57.355 | 24.174 / 30.183 → 25.330 / 30.443 | +| File / failed-session recovery | 14.941 / 17.957 → 19.440 / 24.477 | 11.259 / 13.196 → 12.582 / 15.495 | +| SQLite / plan | 36.979 / 46.065 → 46.461 / 54.795 | 23.820 / 30.178 → 26.408 / 30.523 | +| SQLite / failed-session recovery | 17.404 / 22.606 → 18.759 / 22.139 | 12.586 / 16.141 → 11.503 / 14.124 | + +The initial negative results are retained; the control is not a historical pass +or proof of their cause. These are raw-helper observations without store IO, +not full native CLI/Turn timings, cold startup, model cost or accepted outcomes; +background host load is uncontrolled. Separate owned V8 captures identify +existing Unicode key ordering/hash work, without proving the latency cause. +Python wait/IO stacks remain unprofiled because the optional profiler is absent. +Shared ownership and byte parity do not cancel these cost gaps or earlier +negative C1 measurements. + +The corrected three-file source has a separate clean-source comparison, again +93 warm samples per arm/case with all eight complete outputs equal and unchanged +RPC/ordinary-input traffic. It retains mixed results, including a worse SQLite +planning tail. The same exclusions and uncontrolled-load limits apply: + +| Input / operation | Baseline median / p95, ms | Corrected source median / p95, ms | +| --- | --- | --- | +| File / complete plan | 38.529 / 48.381 | 38.504 / 47.134 | +| File / complete recovery | 17.821 / 22.029 | 18.244 / 21.857 | +| File / historical plan | 32.787 / 44.413 | 30.871 / 36.733 | +| File / historical recovery | 10.635 / 14.620 | 10.292 / 12.201 | +| SQLite / complete plan | 39.600 / 46.547 | 40.036 / 77.714 | +| SQLite / complete recovery | 18.034 / 28.685 | 18.552 / 25.223 | +| SQLite / historical plan | 32.061 / 42.789 | 32.447 / 38.962 | +| SQLite / historical recovery | 10.444 / 14.258 | 10.270 / 12.891 | + + +#### Native execution and completion source + +The native launch guard now consumes the selected Todo already returned by the +shared planner, rather than running the historical Python selector again. +The existing execution-context/task-commitment reader lives with the Turn +driver and serves both CLI preparation and completion-intent classification; +its CLI copy is removed. The semantic owner remains the existing TypeScript +`execution_context` operation, not a new view, schema or Python decision owner. + +After Host execution and independent task validation, a complete request checks +that source again before choosing terminal versus ordinary completion. A saved +writeback or terminal outcome does not bypass this check. Malformed complete +input and adapter facts inconsistent with its source reject before writeback or spend; +the original journal can then recover the already validated result without +another Host invocation and settle once. Omitted historical inputs retain their +exact decoder and receipt recovery. Completion-outcome validation and the +typed settlement/effect owner are unchanged; this does not retire every +historical completion or controller reader. + +The launch guard adds no bridge call. Complete validated-completion +classification adds one coarse source check at this later boundary, including +unfinished journal recovery; historical classification is unchanged. That is +an explicit additional cost, not a speedup or permission to cache a pre-execution +check across execution, attempts or recovery. Original-quota decisions, +accepted outcomes, complete costs and remaining consumer adoption stay open. + +The four affected capture/driver/completion/settlement modules pass 264 cases +with real isolated File/SQLite CLI consumers and synthetic Host/validator +processes; the two typed-owner modules pass 79 cases. Twenty-two migration +assertions fail on immutable `2a170247ba3` and pass on the candidate. Eight +additional native replacement cases commit on that baseline but reject before +writeback/spend on the candidate, then recover the original journal result +without rerunning the Host and debit once. These cover ordinary and final +completion on both backends; they do not establish live model or installed +consumer adoption. + +Three balanced sequential cohorts use clean sibling source copies and the same +fixtures. Each warm helper row has 93 samples per arm. Complete intent/recovery +classification changes from about 0.002 ms with no bridge call to these +median/p95 values: File 19.813/26.454 and 20.770/25.287 ms; SQLite +20.243/23.964 and 19.005/22.458 ms. Each adds one logical request with +43,200/43,253 request bytes respectively and 1,693 result bytes. Historical +classification retains zero requests and equivalent outcomes. Logical JSON +counts exclude framing and physical transport retries. + +The same cohorts also execute real CLI admission, capture, synthetic Host work, +independent validation and settlement, followed by native Todo readback and +committed replay. Each row has only three samples per arm; the table reports +median and observed range, not a p95 or causal speedup: + +| CLI completion | Baseline median [range], ms | Candidate median [range], ms | Logical requests, base → candidate | +| --- | --- | --- | --- | +| File / ordinary | 2303.0 [2001.9–3646.5] | 2173.5 [2051.4–2196.6] | 282 → 283 | +| File / final | 2306.0 [2283.4–2389.4] | 2818.4 [2338.2–2973.9] | 294 → 295 | +| SQLite / ordinary | 1888.5 [1758.5–2061.7] | 2513.5 [2086.5–2955.7] | 278 → 279 | +| SQLite / final | 2549.1 [2240.7–2681.2] | 2282.7 [2276.8–4064.8] | 294 → 295 | + +Native outcome observations agree, including the original settlement identity, +done readback and one debit. Committed replay retains five logical requests and +zero new effects in both arms. Readback/replay observations are retained +separately from the timed execution. Background host load is uncontrolled; +no other owned validation runs alongside these cohorts. The added source check +is a demonstrated cost, while whole-CLI timing remains mixed and default SQLite +performance is not qualified. Models/cache tokens, billing, evaluation, +implementation/human costs, accepted real-work outcomes and original-quota net +benefit remain unqualified; earlier negative observations remain valid. + +## Historical candidate block 3 + +The [numeric-integrity checkpoint](2026-10-29-complete-numeric-integrity.md) +binds producer number identity through one typed owner and all complete readers, +and removes an unused Host echo. The subsequent [sparse-transport integration](2026-10-29-sparse-numeric-integration.md) +adopts the existing context collector instead of retaining a separate complete-path +rule. Its changed experimental hash identity is explicit in codec v2; old bindings +retain unchanged captures and their pinned readers. Original capture-byte checks +remain separate. Component transport savings do not qualify original-quota outcomes, +full cost or a live writer cutover. + +## Historical candidate block 4 + +The acceptance-sharing increment in #7430 moves the original Python display +algorithm into the existing TypeScript composition owner, before hashing/capture; +the old display helper now delegates to that same implementation. Complete readers +and historical staged reads use one reference resolver. Equal contracts retain +one full owner; different revisions, JSON types, provenance and negative evidence +remain distinct. Existing references follow relocated owners. Dangling, cyclic +or unavailable references reject even with valid integrity hashes. Small objects +stay inline when a reference would cost more. + +Isolated File/SQLite quota and native-host fixtures cover complete acceptance at +the actual synthetic Codex subprocess input, failed-attempt recovery and original +once-only settlement; shared full/delta/lost-baseline reconstruction is also +exercised. These qualify transport semantics, not model compliance. The legacy +display adapter adds a transport call; complete composition shares inside its +existing call. No latency improvement is claimed. + +A fixed-source acceptance fixture with four identical carriers produces 23,432 +compact UTF-8 JSON bytes for the fused contract versus 22,237 for the original +non-staged CLI (+5.37%). With capture staging, fused bytes are 23,515 versus +24,509 for original entry/review/writeback together, excluding extra material +reads. The original display-sharing helper is frozen at `895f38fc5` for this +comparison. The acceptance-free workload above remains unchanged. This absorbs +an existing quota efficiency into the common path; it does not establish an +advantage over quota or full-cost benefit. The subsequent guidance increment below narrows that gap; next qualify the remaining +vision sharing in its existing owner after the title increment below, before deferred-detail choices. Keep cold and staged totals separate and retain negative results; do +not force a byte target by dropping unique instructions. + +The next #7430 increment shares replan vision-authoring instructions through +that same TypeScript composition boundary. Its retained owner is the existing +durable-writeback settlement step. The legacy Python display helper delegates +sharing and only adds its historical presentation metadata. The complete +reader and historical unstaged/staged adapters resolve the same exact reference; +no second authoring policy is introduced. JSON type, revision or instruction +differences stay inline, and a reference must be smaller. Conflicting inline/ref +values, wrong step kinds, missing targets and chains reject even if hashes match. +The settlement plan, all original instructions and the example remain intact in +the capture; the historical writeback stage retains its existing example omission. + +Two old CLI spellings now expose the same shared complete contract; material +readback, rejection before effects and native input are qualified separately. +The exercised native outer-controller inputs lack an inline settlement authoring +owner, so their authoring +remains inline; sharing never invents that owner or transfers settlement authority. +At the authoring checkpoint, four legacy projection tests expected multiline-title +or Explore-guidance sharing absent from the complete candidate and failed at both +the preceding and authoring heads. The guidance increment below resolves two; +the title increment below resolves the other two. Historical failures remain recorded, not waived or relabeled. +These slices do not qualify installed App adoption. + +For the fixed synthetic authoring fixture, the original non-staged CLI is 22,062 +compact UTF-8 JSON bytes and the fused contract is 23,266 (+5.46%). With capture +staging, original entry/review/writeback total 24,311 versus 23,349 fused bytes. +The original CLI projection module is frozen at `895f38fc5`; inputs and projected +read stages are held fixed. Additional reads, request framing, tokens/cache, +latency and model outcomes remain unmeasured. Sharing eliminates a duplicate +implementation and duplicate instructions in the candidate, but does not prove +an improvement over quota's existing sharing or a positive full-cost diff. + + +The Explore guidance increment removes the Python exact-match loop and reuses the +same TypeScript composition boundary for complete and legacy display callers. +Only identical instructions with an existing durable-writeback Explore attachment +share that same-capture owner when the reference is smaller. Unique/short text and +missing owners stay inline. Invalid, conflicting or chained references reject; +no instruction is shortened and an optional attachment gains no new obligation. +Historical staged and unstaged readers resolve the reference before moving context, +then reuse Explore's existing domain projection. Independent Explore reads still +return full guidance. The compatibility helper retires with the legacy display +callers; it owns no separate decision or sharing algorithm. + +Real isolated File/SQLite CLI captures now satisfy the two previously failing +Explore-sharing cases, including standalone material comparison, historical +readback and invalid-capture refusal without state/spend changes. Existing staged +CLI tests still exercise unavailable-registry reads, tamper refusal and actual +writeback/settlement. Delta reconstruction preserves changed instructions and +lost-baseline recovery; incomplete context falls back to full delivery. These are +transport and local integration results, not installed App or model-outcome proof. + + +Broader caller qualification also migrates old test assumptions to the admitted +complete contract: native subprocess capture/retry compares the entire original +contract, and generated settlement commands still settle only the original Turn. +Historical capability readers retain explicit canonical-fixture initialization, +refusal facts and scheduler information without granting execution authority. +Rejected capability admissions still emit their typed diagnostic/historical +projection, whereas admitted calls emit the complete contract. This remaining +failure-path migration belongs to C1 before full cutover; it is not a permanent +second contract. Synthetic native/stdio providers do not qualify model benefit. + +With the same original projection frozen at `895f38fc5`, the synthetic guidance +fixture uses 22,848 compact UTF-8 JSON bytes on the original non-staged path and +24,320 fused (+6.44%). Captured original entry/review/writeback total 26,081 versus +24,403 fused bytes. The guidance-free fixture remains 20,543 versus 21,738 bytes +non-staged. Required extra reads, framing, tokens/cache, latency and accepted model +outcomes remain unmeasured. Shared code and restored quota information efficiency +do not establish a positive complete-cost diff; C1 remains open. + +The current-Task title increment removes the Python exact-source matching algorithm. +Complete composition and the legacy display delegate now share its TypeScript +owner. Only an exact duplicate of `text` or `title` in the unique, verified, +complete current selected Task can become a same-capture `title_ref`; the full +original declaration and its provenance stay inline. Missing, differing, +incomplete, ambiguous, failed, done or archived sources do not qualify. The +historical character threshold, including Unicode code points, stays unchanged. +The old display-only label-prefix omission remains local and is not applied to +the complete contract. This delegate retires with the legacy display callers. + +Complete readers validate identity and reference ownership again, rejecting +conflicting inline values, chains, malformed paths and unavailable targets even +with valid hashes. Historical envelopes retain the full Task source, without a +relocated dangling lane reference. Real File/SQLite CLI with differential delivery +off now passes the two previous multiline-title cases; captured variants also +verify exact readback and refusal before state mutation or spend. Delta and +lost-baseline/full recovery preserve changed requirements. Existing independent +Todo detail still returns the full declaration. This qualifies local transport +semantics, not installed App adoption or model behavior. + +For a fixed synthetic current-Task fixture, the original non-staged CLI frozen +at `895f38fc5` is 28,585 compact UTF-8 JSON bytes and the fused contract is 29,780 +(+4.18%). Captured original entry/review/writeback total 29,906 versus 29,863 fused +bytes. The no-current-Task control remains 20,543 versus 21,738 non-staged bytes. +These totals exclude request framing, extra material reads, tokens/cache, latency +and accepted outcomes. They restore quota's existing sharing in the common path; +they do not establish positive full-cost benefit. + +The vision-audit increment now moves the nested exact-match algorithm from Python +into that same TypeScript owner. Complete and historical display callers share +only an identical full audit, including unknown facts, negative evidence and +ordered obligations, when its reference is smaller. Different JSON types are not +equal: the old Python `True == 1` comparison could erase a channel difference; +that case now stays inline. Short audits also stay inline. The root retains the +complete audit and judge; legacy display metadata remains in its adapter. + +Complete recovery rejects missing, malformed, chained or conflicting audit/judge +references even with recomputed valid hashes. Existing historical envelopes still +obtain their judge from the inline root, so no moved reference dangles; their +existing projection limits are unchanged. Real isolated File/SQLite CLI captures +with an active prior vision verify the full judge, exact capture readback and +rejection before state mutation or spend, without differential delivery enabled. +Delta/full and lost-baseline recovery retain changed requirements. Fixtures with +no active vision correctly emit no audit and cannot qualify this path. + +With the original CLI projection frozen at `895f38fc5`, the fixed synthetic audit +fixture uses 22,337 non-staged compact UTF-8 JSON bytes versus 23,333 fused (+4.46%). +Captured original entry/review/writeback total 23,658 versus 23,416 fused bytes. +The no-audit control remains 20,543 versus 21,738 non-staged bytes. These are not +tokens/cache, latency, extra reads, framing or accepted outcomes. Restored sharing +and fewer rule owners do not prove positive full-cost benefit. The legacy audit +delegate retires with its display callers; remaining consumer retirement and +packaged/outcome qualification still keep C1 open. + +Rejected admission now uses the same complete composer before immutable capture +when the decision has an interaction contract, including an unhealthy paused +source. A false `ok` still prevents host handoff and native context-baseline +publication and retains the failing exit status. Composition grants no delivery +or settlement authority. Invalid complete sources fail validation before capture. +Errors before a work contract exists retain their original typed diagnostic and +recovery facts, with either CLI flag spelling; they do not acquire a manufactured +work contract or pass through the historical envelope renderer. + +Isolated real File/SQLite CLI checks cover missing work, unavailable capability +and selection-required reentry under both App-heartbeat and generic profiles. +They preserve the original receipt on reentry and create no spend, baseline or +unauthorized state mutation. Capture consumers are being moved to exact complete +readback while keeping explicit historical long-route recovery coverage. This +qualifies local transport and refusal semantics, not installed App adoption or +all-provider/full-path delivery. Remaining consumer retirement and packaged +single-session outcome/cost qualification still keep C1 open. + +Subsequent observation qualification separates two issues. #7464 repairs the +cache test's comparison of independent live observation clocks while retaining +all other facts. #7468 preserves the existing authority owner's typed rejection +and backup/migration recovery in `quota status/plan`, whose early failure return +had hidden that information. Unmigrated ordinary reads remain refused under the +accepted #7032 cutoff; File/SQLite retain their scope-isolation checks. The new +recovery assertions fail on the previous implementation and the corrected +scope/diagnostic/authority selection passes 156 tests. These independently +reviewable fixes are absorbed by the integration candidate, not evidence of +installed adoption or improved outcomes/cost. Earlier failed runs remain +historical evidence; these diagnosed failures are no longer open investigations. + +For an unhealthy-paused synthetic source, the original CLI projection frozen at +`895f38fc5` uses 6,325 compact UTF-8 JSON bytes and the complete contract uses +6,639 (+4.96%). The extra binding preserves common validation; this is no efficiency +win. Tokens/cache, latency, extra reads, framing and accepted outcomes remain +unmeasured for this case. No live model experiment is implied by these checks. + +The shared reference owner is merged in #7457. Its +Task-title and Explore operations use one coarse legacy projection call; complete +composition reuses those same functions inside its existing call. The integration +branch absorbs the prerequisite commits rather than carrying a copied owner. +New `should-run` emission accepts the already-composed contract or original +predecision diagnostic only; it no longer falls back to legacy packet/envelope +projection. Historical capture recovery remains explicit. Component measurements +show reduced bridge cost versus two calls, but higher cost than the original +Python projection; this is not evidence of a positive full-path quota comparison. + +The [packaged heartbeat comparison](2026-10-28-packaged-heartbeat.md) +now exercises real isolated File/SQLite CLI cold, warm and same-capture recovery +against original quota. The first result grew default context and stdout. The +follow-through shares one typed diagnostic owner across legacy and scoped native +callers and removes the replaced Python algorithms. Its independently usable +legacy-reader slice is proposed in [#7557](https://github.com/loopx-project/loopx/pull/7557); +the integration uses the identical module. Unknown fields/lists, complete retained +records, candidates and portfolio remain intact. The repeated comparison reduces +cold/recovery context by about 5.3 KB, but warm context still grows about 2.8 KB; +all-peer expansion still adds 13,940 bytes and ten CLI calls. The public v4 budget +probe still fails on both preceding and current integration wheels. No positive +complete-cost diff, default performance or model benefit is qualified. Continue +within C1 on warm reconstruction/metadata cost and remaining consumers; this does +not promote the candidate by default or qualify the separate controller experiment. + +The integration also adopts the merged [#7528](https://github.com/loopx-project/loopx/pull/7528) +overlay in that same context codec. Relocated exact evidence can share one base +subtree while current and unknown controls remain literal, including through the +scoped C1 wrapper. The ledger separates the positive relocation-only byte result +from the repeated packaged comparison: ordinary warm input still grows about +2.8 KB and the v4 budget failure remains. This removes a demonstrated transport +redundancy without establishing a positive full-cycle or outcome result. + +These cost and budget results remain pinned to their ledger revisions. The +[later mainline integration](2026-10-28-packaged-heartbeat.md#mainline-integration-and-immutable-reader-identity) +repairs native projection and original-capture reader wiring; it does not rerun +or qualify those model/full-cost comparisons. The subsequent +[signed-material checkpoint](2026-10-28-packaged-heartbeat.md#signed-complete-material-staging) +extends the same material owner to validated complete inputs and preserves +original detail positions through scope filtering. This removes that consumer's +full-material fallback when staging earns its transport bytes. It does not +change the Host's default reading policy or qualify model retention, full costs, +remaining caller/writer migration or historical-reader retirement. C1 and its +original quota-baseline gate stay open. + +## Historical candidate block 5 + +### Local registered Goal material checkpoint + +The complete Turn writer and existing native context-delivery opt-in now request +full registered Goal material before capture. The source adapter returns original +UTF-8 text for unmarked or mixed files; the existing TypeScript context owner +checks the full-file revision and fulfills that read. Existing marked-region +lineage and canonical Todo authority remain. Ordinary quota with delivery off +keeps progressive reads. The bridge requires a `complete_goal_v1` acknowledgement; +an older runtime cannot silently ignore the request. + +Automatic business-work Host context uses `host_dispatch_context`, which refuses pending or +invalid Goal material before provider loading. Historical `host_context` metadata +reads remain available for original-version interpretation and necessary result +finalization; stored captures are not rewritten. This is a bounded material +delivery prerequisite. General capability-read interlocks, current-condition +revalidation, packaged adoption, real-model adherence and complete costs still +need their own evidence. Replan material-reading invocations retain their staged +reader and work restrictions. C1 remains unqualified. + +### Current preference initial-read integration + +The C1 candidate incorporates the existing selector repair from +[#7935](https://github.com/loopx-project/loopx/pull/7935): the initial read carries +the preference owner's complete current scoped view, including corrections, +retirement, empty replacements, provenance and advisory authority. It reuses the +same selector and source owner. It does not change activation, grant authority, +or replace a later action's required fresh scoped read. + +Integration checks reuse the native capture reader and executor projection, +rather than requiring the retired capsule at the complete-source root or treating +navigation as an inline decision. The checks retain the delivery-off progressive +Goal read and verify the native default's complete inline Goal, canonical task, +later requirement change, damaged preference storage and signature refusal. +Five old layout assumptions fail on the pre-integration candidate too; after +adapting the tests, six complete modules pass 143 cases. Actual native exec and +CodeMode paths pass two cases with a deterministic loopback provider; six +TypeScript modules pass 124 cases. These counts describe those scopes only. + +The complete CLI budget module still has four failing test groups, 39 passes +and one environment-dependent skip. Its observed small Markdown, crowded plans +and compatibility-view limits remain exceeded; the original five size holds and +their historical measurements are retained. No ceiling, fixture workload or +production prompt was reduced to hide a failure. This is source integration, +not a passing whole-C1 quality receipt, merge readiness, installed adoption, +natural-model behavior or a full-cost benefit claim. + +### Canonical Todo projection cost qualification + +A matched observation at main `f941b5939` and C1 `c59777597` uses the existing +`todo project-markdown` operation with its freshly read provider revision. +File/SQLite each cover one Todo, 36 Todos with/without Vision and 18 Todos across +three agents: 16 projection transitions, 32 surface conditions and 64 before/after +quota/plan responses. Complete canonical rows remain identical within every +transition. Independent full-file and excluded-region hashes reconstruct the +delivered Goal narrative, including its final stop. Unmarked source remains full; +only the normal writer's generated regions become excluded. No source-adapter, +projection policy, output threshold or fixture workload changed. + +The measured component is normalized parsed CLI argv JSON plus actual stdout, +including the emitted Goal `cat` command when that response requires it. At C1, +projection reduces a crowded plan observation by 7,698 bytes without Vision and +7,697 with Vision; the multi-agent plan decreases by 3,697. Small quota/plan +observations instead grow by 364/75 bytes. Projection itself costs 1,667–1,700 +measured bytes; counting both complete canonical readbacks as one-time audit cost +moves the positive cases' conditional break-even to 7–9 repeated observations. +This is an accounting scenario, not a recommendation to regenerate each Turn. + +The existing projection also benefits main. With both snapshots' generated Goal +regions, C1 plans remain 23–24 measured bytes larger; quota is 959 bytes larger in +the small case and 1,958/1,759 larger in the crowded cases without/with Vision. +The ordinary multi-agent quota observation supplies neither inline Goal nor a +Goal read in either snapshot, so it is excluded from Goal-equivalent cost claims. +These observations qualify the existing source/projection route, not a new C1 +optimization, identical complete decision semantics, model adoption or full net +benefit. RPC, CPU, invoices, outcome value and natural-model use remain unmeasured. + +The original unmarked-source budget cases and all five historical holds remain +unchanged. Crossing a limit on this separately projected workload does not repair +or relabel those failures. Continue through the existing writer/reader owner and +the original quota single-session acceptance; do not delete unmarked Goal text, +relax signed-source fallback or add another compaction algorithm for these bytes. + +### Generic Host dispatch and saved-result recovery + +The shared executor now calls the existing TypeScript `host_dispatch_context` +owner before a new Host attempt is recorded, confirmed or launched. A valid +complete-source commitment with an unfinished Goal narrative read previously +reached a custom callback or external argv through this generic path; named +adapters already had their own check. The repair adds no decision owner, state, +vocabulary, general capability-read obligation or activation setting. + +Fourteen File/SQLite cases cover callback and real argv dispatch for valid, +pending-Goal and historical requests, plus saved typed-result recovery. The +pending cases have no Host effect; valid and historical controls reach the Host. +Saved results continue through their original validator without another Host +attempt. The existing staged replan material-read exception remains owned by +the same TypeScript rule. Two actual native exec/CodeMode paths pass with the +deterministic loopback provider. This is synthetic source-checkout qualification, +not natural-model adoption, installed behavior or whole-C1 acceptance. + +The three complete capture, Turn-driver and manager-context consumer modules +pass 345 cases on the integrated source, including that new coverage. This does +not rerun every earlier adapter, budget or backend qualification. + +A paired component observation adds one `host_dispatch_context` RPC for a new +complete-source attempt: normalized params JSON plus result JSON totals 42,771 +bytes on File and 42,828 on SQLite in the fixed fixture. Saved-result recovery +retains its existing single lineage RPC and identical measured bytes. Historical +requests without a complete source add no RPC. The baseline function is read +from the frozen pre-repair commit and runs with the same owner and fixture; +this isolates the dispatch component rather than replaying a whole branch run. +RPC framing, CPU, model input, invoices, outcomes and full net benefit are not +measured. This correctness check increases fresh-attempt cost; it is not a byte +saving, a same-capture body-size measurement or a repair of the five size holds. +The shared existing phase/helper is sufficient; a second wrapper or policy owner +would add no bounded refactoring value. Writer/reader retirement and the original +quota single-session outcome and complete-cost comparison remain open. + +### Goal refusal before automatic-start reservation + +The generic dispatch check now runs after original-capture staging selects the +input and before automatic-start reservation, publication or new journal writes. +It uses the staged original plan when present and the current request otherwise. +The previous ordering could reject a pending Goal without launching a Host yet +still reserve its interval and write a journal/capture. A subsequent valid Turn +then waited for that interval. The same TypeScript rule is relocated; there is +no new rule, state, configuration, bypass, persistent cache or extra RPC. + +Four File/SQLite refusal cases reproduce that waiting state on the frozen +pre-repair source; six valid/historical controls pass. The strengthened public +matrix covers callback and real argv, staged capture, actual cadence state and +saved-result recovery in 22 passing cases. Two actual native exec/CodeMode cases +pass with the deterministic loopback provider. Existing result recovery retains +its metadata/finalization route without reserving or starting another attempt. + +The four complete capture, Turn-driver, manager-context and cadence modules +pass 357 cases. The first combined run retains 356 passes and one old root-layout +failure, also reproduced in a clean frozen pre-repair checkout. That cadence +test now reads its scheduler field through the actual immutable capture reader; +its original floor and refused-reduction assertions remain unchanged. + +Ten paired synthetic conditions compare frozen executor functions with the +candidate through the same real owners, fixed source inputs and separate +equal-width namespaces. Socket observation counts complete JSON request/response +lines, including errors and framing, without retaining credentials. Refused +non-capture paths use 5 to 2 RPCs; capture paths use 6 to 3. Their measured bytes +decrease by 95,293/95,405 and 97,665/97,777 on File/SQLite, respectively. The removed +calls are one cadence admission and two journal writes. Refusal leaves no new +journal/capture and keeps the lane eligible; all four subsequent valid attempts +start where their frozen controls wait. + +The six valid/historical conditions retain identical RPC counts and measured +bytes, with identical Host inputs after substituting only the separate capture +namespace. Complete-source dispatch validation still costs its existing RPC. +This is warmed RPC component qualification with an intentionally stopped Host, +not a whole-branch model/outcome experiment, same-capture body reduction, CPU, +invoice or full net-benefit result. The original five size holds and whole-C1 +writer/reader and outcome acceptance remain open. Consolidating journal writes +needs its own interruption/recovery qualification; this ordering fix does not +coalesce the durable Host-attempt checkpoint or confirmation boundary. + + +### Current main integration and the original quota workload + +The complete-source path now reuses main's Progressive and Delta owners. The +existing complete-decision owner checks the original source before presentation +plans are applied. Saved-capture transport options change only the derived +selection recipe; they do not mutate the signed original or create another +admission. The shared source-preserving edit transport retains sparse numeric +identity, current requirements, explicit-off behavior and same-capture recovery. +The replaced native-quota and bounded-settlement adapters are retired rather +than retained as competing production paths. + +The original fixed quota task is repeated against main `24f46874bc97` and the +integrated runtime `675cd9d23b5b`: three repetitions of cold, warm and compaction +recovery on File and SQLite (36 conditions). All conditions produce the same +independently checked artifact and one debit, including replay. Both arms use +the same Python executable and unchanged workload/observer. The provenance +check covers 252 parent and internal-child observations. Counts include all +caller output, accounting-child RPC directions and observed Python regular-file +IO. Concurrent validation prevents a latency/CPU conclusion; native provider IO, +model input/cache/output, billing and natural effectiveness remain unmeasured. + +| Provider / scenario | All caller stdout, main → candidate (bytes) | RPCs | RPC wire bytes | +| --- | ---: | ---: | ---: | +| File / cold | 55,754 → 35,834 | 242 → 209 | 1,468,459 → 1,474,720 | +| File / warm | 68,136 → 62,107 | 334 → 292 | 2,151,083 → 2,217,775 | +| File / recovery | 89,861 → 61,384 | 336 → 294 | 2,156,745 → 2,214,069 | +| SQLite / cold | 56,155 → 35,908 | 242 → 209 | 1,470,295 → 1,476,592 | +| SQLite / warm | 68,557 → 62,249 | 334 → 292 | 2,153,959 → 2,218,459 | +| SQLite / recovery | 90,349 → 61,522 | 336 → 294 | 2,159,660 → 2,216,837 | + +These are medians, not an efficiency promotion. Warm output including baseline +preparation falls about 9%, but current-step output excluding that preparation +increases 7.0% on File and 6.2% on SQLite. Warm wire bytes increase about 3%; +observed Python read-plus-write bytes increase about 4%. The primary +same-capture full-to-selected-body reduction is about 87.8% on main and +82.6% / 85.4% on the candidate's File / SQLite warm paths. Candidate cold and +recovery select the full body (0% primary reduction); this is not zero net value. +Fewer RPCs and a complete checked source do not establish overall net benefit. +Original quota, writer/reader retirement and long-horizon acceptance remain open; +these observations do not erase earlier negative cohorts or frozen size holds. + +The integrated source suites pass 448 complete-caller/settlement cases, 156 +context cases and 14 work-acceptance cases; their five and ten skipped cases +remain explicitly outside this run. The two focused TypeScript modules pass +67 tests and the control-plane typecheck passes. The isolated installed wheel +passes 258 cases with one platform skip. Its 476 completed process observations +and 136,450 Core-module observations show no source-origin violations; abrupt +exit probes do not emit the audit's exit-time observation. All 1,897 compared +packaged source files match the measured product source. This qualifies the +packaged paths above, not live installation or the outstanding net-benefit gate. + + +### Selected-reader and settled-record transport + +The explicit reader now sends only the source containers along the requested +literal escaped addresses. The existing TypeScript selector still validates +RFC 6901, array indexes, failed batches and their recovery parent; Python renders +the original digest-checked values. Array lengths, container kinds, initial +navigation, full discovery, historical pinned order and native section-read +verification are retained. No additional cache, metadata file, pointer parser, +read obligation or retention claim is introduced. Main's selected-source IO and +shared native replay owner are reused. + +The combined refresh caller also requests a smaller final read from the existing +TypeScript settlement owner. After that owner verifies a settled Turn, this +explicit projection returns the same identity, controls and three receipts with +six unused Run/event bodies set to null. Default/full reads and all pending +recovery retain their complete original bodies. The optional internal RPC field +changes neither admission nor accounting, and adds no CLI or product workflow. + +The unchanged original quota workload is repeated against main `886f2cdff4b2` +with the same Python, materials, independent artifact check and replay: three +repetitions of cold, warm and compaction recovery on File and SQLite, 36 conditions. +All produce the same artifact and one debit. The 252 parent/accounting-child +source observations are clean; the measured product source remains unchanged +through the run. Medians include both RPC directions and all required reads: + +| Provider / scenario | All caller stdout, main → candidate (bytes) | RPCs | RPC wire bytes | +| --- | ---: | ---: | ---: | +| File / cold | 55,946 → 35,930 | 241 → 208 | 1,465,253 → 1,429,981 | +| File / warm | 68,364 → 62,287 | 332 → 290 | 2,143,831 → 2,147,306 | +| File / recovery | 90,181 → 61,556 | 334 → 292 | 2,149,657 → 2,143,784 | +| SQLite / cold | 56,343 → 36,004 | 241 → 208 | 1,467,027 → 1,431,735 | +| SQLite / warm | 68,793 → 62,429 | 332 → 290 | 2,146,719 → 2,149,912 | +| SQLite / recovery | 90,666 → 61,694 | 334 → 292 | 2,152,475 → 2,146,508 | + +Warm RPC count falls 12.7%, but wire bytes still rise 0.16% / 0.15%. Current-step +stdout excluding preparation rises 7.0% / 6.2%; observed Python read-plus-write +bytes rise about 4%. The primary same-capture full-to-body reduction is 82.6% +for the candidate's warm paths versus 87.8% for main. Candidate cold/recovery +still select the complete body: 0% primary reduction does not mean zero net value. +The earlier topology-only cohort also remained negative; it is not combined with +this cohort. Lower cold/recovery transport does not establish overall benefit. +CPU/latency, native provider IO, model input/cache/generated output, invoices and +natural long-horizon outcomes remain unqualified. Earlier cohorts and frozen +size holds retain their original results; original C1 acceptance stays open. + +Real public CLI replay preserves all 15 successful/rejected selection observations +against main, including exact large integers, escaped keys, invalid indexes and +whole-batch rejection. A dropped-source-structure mutation fails the independent +value oracle through that same entrypoint. The settlement suite checks complete +parity by default and throughout six recovery states; its 137 TypeScript tests +and control-plane typecheck pass. Final installed-wheel and premerge readback +are recorded with the submitted exact head, separately from live installation. + +The final isolated installed wheel passes 325 tests with one Linux-only skip; +1,897 packaged source files match the measured product source. Completed-process +module-origin audits are clean; abrupt exits remain outside that audit. The +expanded source settlement run has 274 passes, four failures and one platform +skip. Both File and SQLite failures reproduce unchanged on main `886f2cdff4b2`: +a receipt-bound task becoming deferred returns `quota_skip` instead of its +original closeout recovery, and due successor-replan replay loses its action. +The initial report interpreted the guard's `should_run`/`delivery_allowed` facts +as conflicting. The follow-up below corrects that diagnosis while preserving +the failed run. The smaller record projection is not used on those failing paths; +no relaxed receipt rule is used to turn them into passes. + +### Preparation and original-Turn recovery + +An ordinary guard may require a claim while forbidding business delivery. +`should_run=true` and `delivery_allowed=false` are consistent in that state: +the existing claim postcondition requires same-Turn reentry and an explicit +`execution_preparation.state=ready`. Two earlier File/SQLite tests omitted that +step before producing their artifact. They now follow the existing caller +contract and verify append-only negative-to-positive guard lineage under the +same settlement identity. Neither the earlier negative event nor native result +admission is weakened or rewritten. + +The other two failures expose a product bug. The selected-Todo IO adapter applied +ordinary execution preparation to a planning operation whose canonical +obligation already forbade delivery. A deferred task then suppressed the due +successor replan and lost its original action on replay. The adapter now consumes +that same explicit `delivery_allowed=false` fact used by the TypeScript +interaction owner before reading execution leases. Planning still permits no +ordinary delivery or debit. Omitted facts retain all existing preparation checks; +ordinary claims, conflicts, receipt identity and once-only recovery keep their +existing owners. No new decision owner, protocol field, permission, cadence +ordering or RPC is introduced. + +With the same corrected test harness, frozen pre-repair product source passes +the two ordinary-delivery cases and fails both planning cases. The candidate +passes all four and the complete 30-case execution-preparation matrix. The +original four-failure cohort remains historical evidence; fixing caller ordering +and fixing product routing are distinct results. This closes the demonstrated +planning-route defect, not whole-C1 acceptance or overall efficiency. + + +The unchanged original quota task is also repeated against the same main source +for three repetitions of each File/SQLite cold, warm and recovery condition. +All 36 conditions preserve the independent artifact and one debit with replay; +252 parent/accounting-child source observations are clean and product hashes +remain unchanged. Warm RPCs are still 332 to 290. Wire bytes rise 0.165% on File +and 0.073% on SQLite; current-step stdout excluding preparation rises 9.5% and +6.2%, and observed Python read-plus-write bytes rise 4.1% and 3.8%. The primary +same-capture full-to-body reductions are 84.1% / 85.5% on the candidate versus +89.2% / 87.8% on main. Candidate cold/recovery still select the complete body. +This is a separate cohort, not a causal subtraction from the preceding cohort. +Planning-route correctness does not resolve the ordinary warm-path cost tradeoff. +Native provider IO, latency/CPU, model/cache/generated output, invoices and +natural long-horizon effectiveness remain unmeasured. + +The expanded source settlement suite now passes 278 tests with one native +Windows PowerShell skip. A fresh isolated installed wheel passes 246 tests, +including the four corrected CLI cases, ordinary/native preparation, settlement, +combined closeout and runtime integration. Its Windows PowerShell and Linux +thread-group exit cases are skipped on this host. All 1,897 compared packaged +source files match, including the changed adapter; 227 completed processes and +102,420 Core-module observations show no source-origin violations. Abrupt exits +remain outside the exit-time audit. The original isolation guards are retained; +this does not install or promote the candidate on the active runtime. The shared +IO adapter is the bounded change; another contract projection or lifecycle +wrapper would add ordering risk without a required caller. + + +### Native quota capture publication + +The qualified native quota caller now reuses the complete decision it has just +published as its source-recovery reference. Previously it wrote an identical +complete projection before asking the same TypeScript owner for optional +presentation. Thirty saved capture pairs in the preceding qualified workload +are byte-identical. The adapter now passes that producer-owned reference into +the existing native preparation; external continuity input cannot supply it. +Derived required views still receive separate captures when their content +differs. Standalone APIs and uninitialized native fallback keep their existing +publication paths. There is no hard link, persistent cache, new file format, +semantic owner, read obligation, permission or RPC. Existing historical paths +remain readable under their original identity and digest. + +The original quota workload is repeated against main `6a9264034605`, with three +repetitions of File/SQLite cold, warm and compaction recovery. All 36 conditions +produce the same independently checked artifact and one debit including replay. +The 252 parent/accounting-child source observations are clean; product hashes +remain unchanged during measurement. All 30 candidate captures avoid the +redundant complete projection. This removes a duplicate producer write; it does +not omit the complete source or claim retained model input. + +| Provider / scenario | All caller stdout, main → candidate (bytes) | RPCs | RPC wire bytes | Observed Python reads | Observed Python writes | +| --- | ---: | ---: | ---: | ---: | ---: | +| File / cold | 55,429 → 35,654 | 241 → 208 | 1,459,302 → 1,424,420 | 336,589 → 287,832 | 127,933 → 120,437 | +| File / warm | 67,723 → 61,768 | 332 → 290 | 2,133,937 → 2,137,552 | 552,218 → 511,741 | 238,580 → 201,925 | +| File / recovery | 89,316 → 61,059 | 334 → 292 | 2,139,532 → 2,134,660 | 580,809 → 519,604 | 233,054 → 195,818 | +| SQLite / cold | 55,826 → 35,728 | 241 → 208 | 1,461,076 → 1,426,174 | 344,133 → 295,172 | 129,145 → 122,147 | +| SQLite / warm | 68,136 → 61,910 | 332 → 290 | 2,136,689 → 2,141,039 | 560,254 → 519,489 | 240,008 → 204,526 | +| SQLite / recovery | 89,801 → 61,197 | 334 → 292 | 2,142,354 → 2,137,296 | 588,955 → 527,354 | 234,484 → 197,664 | + +Warm observed Python read-plus-write bytes fall 9.75% / 9.53%, and writes fall +15.36% / 14.78%. RPCs fall 12.65%, while wire bytes still rise 0.169% / 0.204%. +Current-step stdout excluding preparation rises 7.02% / 6.24%. The primary +same-capture full-to-body reduction is 86.1% / 84.7% on the candidate versus +87.9% on main; candidate cold/recovery still select the complete body. Tool +stdout is not model-generated output. Native/provider IO, latency/CPU, model +input/cache/output, invoices and natural long-horizon outcomes remain +unqualified. Earlier cohorts retain their original negative observations; +these separate cohorts are not subtracted to claim a causal cost reduction. + +The same test harness on frozen pre-repair C1 source retains four semantic +controls and fails four duplicate-storage assertions. The candidate passes the +full 265-case native/lifecycle/reader/cost suite; its final advertised-reference +mutation also rejects changed bytes without changing the native journal. The +64-case public capture/model/recovery run passes. A fresh isolated installed +wheel passes 493 cases with one Linux thread-group exit skip. Its 1,897 compared +packaged source files match the measured product, including both changed IO +adapters; 278 completed processes and 45,049 Core-module observations have no +source-origin violations. Seventeen undistributed tracked assets/dev fixtures +remain separately listed, and abrupt exits remain outside the exit-time audit. +This qualifies the packaged paths, not active installation or independent PR +approval. The bounded change reuses the existing recovery reference rather than +adding a writer, helper framework or second semantics owner. + +### Settled result-value transport + +The existing combined-closeout caller requests `include_record_bodies=false` +after the TypeScript settlement owner verifies the original identity and all +receipts. That projection previously removed the top-level Run records but +still returned the same writeback/spend bodies inside four result values. +Those values are unused by this caller. The existing bundle helper now clears +them in that already requested, fully settled projection; identity, receipt +payloads, failures and all other controls retain their values. Default complete +reads and every pending recovery retain their original bodies. The persisted +Runs, historical readers, accounting and public CLI result are unchanged. +There is no new option, schema, RPC, cache, Python rule or model-read obligation. + +This is an intentional change to the existing internal opt-in read projection, +not to the default reader. The only production opt-in consumer remains the +combined refresh/spend adapter. The same TypeScript harness first rejects the +old duplicate-body behavior, then passes all 137 cases on the repair, including +complete-read and pending-state parity. Real File/SQLite CLI tests independently +check the omitted bodies, unchanged receipts, persisted readback and one debit +through replay. A test-local variable collision discovered after those new +assertions was corrected without changing an assertion or the product rule; +the failed cohort remains recorded. + +The wider source run retains 276 passes, one native Windows rendering skip and +those two fixture failures; the corrected File/SQLite cases pass. The isolated +wheel retains 387 other passes, two platform skips and the same two failures, +then passes both corrected cases without a product change. Its 1,897 compared +packaged sources match the measured product, including the changed TypeScript +owner; 17 undistributed assets/dev fixtures are separately listed. Across both +wheel runs, 1,297 completed-process observations and 535,308 Core-module +observations show no source-origin violations. Abrupt exits remain outside the +exit-time audit. This qualifies the tested installed-wheel paths, not active +installation, independent review or merge authority. + +The unchanged original-quota workload is repeated three times per provider and +scenario against frozen main `0423908e9cf4`. The candidate includes that target +and the earlier C1 changes. All 36 conditions reach the same independently +checked artifact with one debit, including replay. All 252 parent/child source +observations match their pinned arm, and product hashes remain stable through +measurement. Child RPCs are already included in parent accounting. + +| Provider / scenario | All caller stdout, main → candidate (bytes) | RPCs | RPC wire bytes | Observed Python reads | Observed Python writes | +| --- | ---: | ---: | ---: | ---: | ---: | +| File / cold | 55,472 → 35,678 | 241 → 208 | 1,459,815 → 1,400,685 | 336,894 → 288,097 | 128,010 → 120,512 | +| File / warm | 67,892 → 61,813 | 332 → 290 | 2,135,559 → 2,114,908 | 552,831 → 512,164 | 238,851 → 202,786 | +| File / recovery | 89,386 → 61,102 | 334 → 292 | 2,140,392 → 2,111,166 | 581,330 → 520,030 | 233,207 → 195,945 | +| SQLite / cold | 55,868 → 35,752 | 241 → 208 | 1,461,586 → 1,402,351 | 344,435 → 295,437 | 129,221 → 122,222 | +| SQLite / warm | 67,403 → 61,955 | 332 → 290 | 2,136,570 → 2,116,685 | 559,999 → 519,924 | 239,399 → 203,919 | +| SQLite / recovery | 89,875 → 61,240 | 334 → 292 | 2,143,241 → 2,113,734 | 589,491 → 527,788 | 234,645 → 197,795 | + +These are three-observation medians, not a significance claim. Warm wire bytes +fall 0.97% / 0.93%; the observed ranges are 2,134,771–2,135,559 versus +2,113,851–2,115,192 for File, and 2,136,570–2,138,375 versus +2,115,544–2,117,498 for SQLite. Warm Python read-plus-write bytes fall +9.69% / 9.45%, and RPCs fall 12.65%. These cumulative C1 comparisons do not +attribute the earlier RPC/IO reductions to this small projection change. + +Current-step stdout excluding preparation still grows 6.66% / 8.73%. +The primary same-capture full-to-selected-body reduction is 84.7% / 86.1% +versus 87.7% / 89.2% on main; its three-repeat ranges are 84.6%–86.2% / +84.7%–87.6% for the candidate and 87.7%–87.9% / 87.7%–89.2% for main. +Candidate cold/recovery still select the full body. This projection changes +internal transport, not model-generated output. CPU/latency, native/provider +IO, model input/cache/output, invoices, natural adoption and whole-workflow +net benefit remain unqualified. Earlier positive and negative cohorts retain +their original versions and results; separate cohorts are not subtracted for +causal attribution. C1, its final reader exits and overall acceptance remain open. + +During qualification main advanced to `7f550aef58a8`, changing the Chat +original-conversation fallback and its two frontend fixtures. That later +combination has not been qualified; the cohort and integration base remain +`0423908e9cf4` rather than being relabeled as the moving target. + +### Main integration and independent context layers + +Implementation `6f00db17c654` integrates main `918844a01746`. It retains the +invocation-local initial plan while adopting main's independent Delta path: +explicit Progressive off plus Delta auto does not publish progressive navigation +or observed-field reuse. Digest-bound file deltas and complete current recovery +remain available. Normal quota presentation and managed preview already consume +the shared complete-source owner; this integration does not repeat their cutover +or retire version-pinned historical journals. C1's RFC increments follow main's +annex layout without dropping either language's obligations. + +Actual Codex with static loopback inference qualifies default Progressive and +independent Delta in both source and isolated wheels. Complete unchanged large +acceptance fields still reduce the matched warm selected BODY from 14,386 to +2,583 bytes; unverified observed-field continuity restores 14,386 bytes. The +independent-Delta case reconstructs every original field and reads complete +current recovery through the actual client. Saved-source identity refusals, +explicit off and lost-predecessor/compaction recovery also pass from the wheels. +These are transport checks, not a new model experiment or installed adoption. + +A new matched engineering cohort uses the same synthetic three-step Task with +main's original quota product entry: File/SQLite, cold/warm/recovery, three +repetitions and the same checked artifacts and single debits. It records 36 +scenarios and 60 Turns, including preparation and child RPC/IO once. BODY is +reconstructed from returned pages in byte-offset order, not the backing file's +size. SQLite warm current-step BODY is 23,617 → 22,970 bytes (−2.74%), CLI stdout +58,949 → 48,401 bytes (−17.89%), RPCs 294 → 290 and framed RPC bytes about −3.74%. +Including preparation, stdout is 115,568 → 93,613 bytes, RPCs 586 → 578 and framed +traffic about −4.01%; observed Python regular-file reads/writes fall about +8.80%/26.18%. Node/kernel/provider IO and model costs are not measured. File warm +instrumented CLI time increases about 7.5%; this is not latency qualification. +The lightweight quota fixture does not contain the large acceptance bodies, so +its result does not attribute savings to field reuse. It validates the measured +steps, not completion of the original three-step Task, natural model adoption or +whole-C1 net benefit. Historical failures and the remaining reader, quality and +independent-acceptance obligations remain open. + +### First-read convergence after main adoption + +The subsequent integration `339f01e08782` adopts main `39770a960483`, including +the landed first-read producers/readers. The last `project_codex_context` test +caller now uses `prepare_codex_context`; the unused Python wrapper is removed. +Recorded source versions and journal recovery codecs retain their separate +support obligations. Benchmark preflight tests follow the emitted first BODY +through EOF, verify its reference/source/selection digests and required fields, +and retain the complete original source instead of expecting a navigation reply. + +A fresh, source-stable 36-scenario cohort against that main retains the same +synthetic Task, artifacts, single debits and cost boundaries. SQLite warm BODY +is 24,016 → 23,285 bytes (−3.04%), CLI stdout 59,898 → 49,136 (−17.97%) and RPCs +292 → 290. Framed RPC bytes **increase 2.93%**. Including preparation, stdout is +117,466 → 95,041 (−19.09%), RPCs 582 → 578, framed bytes **increase 2.14%**, and +observed Python reads/writes fall 9.12%/26.28%. These results supersede neither +the preceding cohort nor natural-model qualification. The current-main native +control still delivers 14,386 warm BODY bytes versus 2,583 with field reuse; +that large-field component is absent from the lightweight quota fixture. + +Configured Python typing remains non-passing: the prior C1 has 4,809 diagnostics +and this integration 4,814. The five additions are in unchanged main-owned +modules, verified by identical Git objects; they are not waived. Reader exits, +independent review, installed adoption and whole-C1 net benefit remain open. + +### Complete-source qualification and native execution ordering + +The no-write behavior qualifier now accepts Core-validated complete v1 sources +in either experimental arm and reports the actual packet version. Retained and +counterfactual candidates use the existing complete composer by default; an +already captured complete source keeps its original host binding and settlement +composition. Raw fixtures use the Core's default composition, without inferring +a different binding from candidate metadata. The versioned v0 state matrix +remains an explicit historical control, including action aliases refused by the +current owner. This does not retire supported historical codecs. + +Pair preflight checks both confidentiality boundaries before either actor call. +Complete candidates retain source/integrity validation and exact paired origin; +provider instructions and encoded scheduler scanning follow the actual packet +layout rather than the arm name. Current-format ablations are refused before +actors. Semantic-negative fixtures are changed at their original source and +composed by Core, so a validly bound pair still has to pass the independent +fixed strategic-chain oracle. Tampered bindings remain separate negative cases. + +The integrated native Host exposed an ordering gap: its delivery guard required +the Task lease that the model callback would acquire only after launch. Explicit +non-report Tasks now enter the existing lease lifecycle before that guard; the +managed callback reuses and checks that same Task. Canonical missing work still +reaches the kernel's structured refusal, unavailable authority fails closed, and +a conflicting execution lease is not borrowed. Report and recorded-resume +paths retain their existing lifecycle. No guard or independent validator is +relaxed, and this does not qualify automatic selection without an explicit Task. + +The frozen main integration first recorded 646 passing and 22 failing tests. +Development runs retained their 292/4 and 356/1 results; the latter caught an +early-lease exception replacing the missing-work refusal. After correction, a +new source-stable eight-module cohort passed all 357 tests, including the 61 +native File/SQLite, original-session, HTTP, refusal and independent-validation +cases. The main conversation-binding TypeScript module passed 59 tests; the +five changed qualification Python modules passed typing. These are local +synthetic actor/provider checks, not live-model behavior or full-cost evidence. + +A fresh verified Chat bundle and isolated wheel contain 1,815 Python/TypeScript +sources matching the tested product bytes. Installed complete requests, current +and explicit historical pairs, wrong-source refusal and the real adapter with +a local transport double passed with 300 observed LoopX modules and no checkout +Core imports. Native Host was imported, not exercised as an installed journey. +The first stale/missing-bundle build, harness preparation failure and historical +v0 large-integer source mismatch remain recorded; the legacy positive control +uses its original representable fixture, while current-format large integers +remain checked. No active installation, live model run, whole-C1 acceptance, +quality/readiness or net-benefit qualification follows from these results. + +The subsequent direct-writer audit found the public task-orchestration smoke +still creating v0 input, and an unused scenario packet builder with no caller. +The smoke now composes each host's complete source with its original scheduler +context and reads back the final Codex and Claude Host requests. Both preserve +the complete source and primary Task selection, alongside the existing child +context and native-operation assertions. The unused builder is removed rather +than replaced by another unused abstraction. The explicit versioned v0 state +matrix and supported historical writer/reader remain. The audit of Python +callers in product code and examples now finds only that historical matrix +calling the retained writer; it does not certify dynamically constructed calls. + +The public smoke passed before and after migration. Default configured Mypy +passed all 17 roots at the preceding `a706379f70` checkpoint and after this +change; this updates the current typing qualification without rewriting the +earlier 4,809/4,814 failures. These checks do not exercise real child creation, +prove live-model adoption or qualify a new installed package. + +One source-stable four-module regression cohort passed all 247 cases, covering +the real Turn driver, the active portfolio sources, the retained historical +corpus and replan Host-context projections. This is a separate current caller +qualification, not an extension of the earlier 357-case or installed run. + +### Installed native lifecycle after main integration + +Integration `5091fb82a9` adopts main `9d276f6cb9`'s original-context answer +repair. One source-stable cohort of the native Turn Host and private-conversation +modules passed all 466 cases. After rebuilding and verifying the Chat bundle, +the same two modules ran against an isolated installed package with unchanged +fixtures, real File/SQLite state, native protocol and HTTP, original sessions, +independent Task validation, source/permission refusal and recovery. The model +and external provider remain synthetic; this is no longer an import-only native +check, but it does not qualify an active App or live-model adoption. + +The first installed cohort recorded 459 passes and seven preparation failures: +the seven explicitly activated account-routing cases lacked their separately +distributed optional package. After installing its same-commit 0.15.3 wheel, a +new complete cohort passed all 466, without combining partial reruns. The first +failures and 61 audit-helper deprecation warnings remain recorded; the helper's +keyword argument was corrected separately from product code. + +All 1,815 packaged Core Python/TS files and the optional distribution's 24 files +match committed and installed bytes. The existing private fault-process test +driver is outside this wheel qualification. Across 48 observed Python processes, +1,228 Core modules, seven optional-provider modules and four observed subprocess +source paths came from the installed distributions, with no checkout Core or +provider imports. Fixtures and installed sources stayed unchanged. Default +17-root Mypy and the integrated conversation-binding TS module's 60 tests passed. +Earlier 357/247-case and PostgreSQL evidence retain their own versions; these +synthetic correctness and provenance checks do not establish full-cost benefit. + +### Visible Goal reads and declared acceptance audits + +Integration `d80b3860ab` adopts main `ac62962255`. Independent review found +that visible Goal prompts added an unconditional full-capture prerequisite, +including ordinary/off inputs, and rejected three previously legal 4,000-character +configurations. Captured prompts now require the needed original sections; +ordinary/off prompts gain no capture prerequisite. Work-context and required +reads, explicit full-read duties, original identity/recovery, transport flags, +settlement and stop rules remain. The 4,000-character host limit is unchanged. +Across 24 matched builder inputs, main accepts 21 and the candidate 23, losing +none of main's legal inputs; one oversized input remains rejected in both. + +Both complete structured and Codex Host inputs now share the declared audit's +original trigger: read it before judging Goal acceptance or proposing closeout. +The eight File/SQLite counterfactuals cover both hosts with and without an audit; +absence tests caught and rejected an initial unconditional instruction. Twelve +synthetic historical structured-renderer cases retain exact output and input +parity. This is scoped instruction qualification, not model-retention proof. + +Heartbeat consumers now validate the complete source and read the caller-owned +original capture through its digest-checked paged reader. Original scheduler, +selection, receipt and once-only settlement oracles remain. Installed execution +exposed a test caller's implicit checkout working directory: refresh must run +from its actual disposable project. The first installed cohort recorded 60 +passes and 18 failures; an unchanged-wheel control passed after correcting only +that caller directory. No production workspace guard was weakened. + +The final source-stable nine-module cohort records **855 passes, two failures**; +the complete three-module installed rerun records **80 passes, two failures**. +Both failures retain the original raw-JSON budget: 5,519 characters exceeds +5,400 for the two long-scope backend cases, whereas matched main passes all +four original budget cases. No budget, fixture size or useful duty was reduced +to hide this regression. Earlier failed cohorts and a private audit-directory +preparation failure remain recorded. Default 17-root Mypy, six changed-path +Ruff checks and the limited semantic advisory pass. All 1,815 Core wheel sources +match the frozen tested and installed bytes; five observed Python processes, +1,179 modules and six observed subprocess source paths show no checkout Core +imports. Some children override the audit environment, so this is not an +observation of every process. These synthetic checks qualify the repaired +Goal/audit/caller slice; whole-C1 acceptance, the remaining budget regression, +live App/model adoption and complete-cost benefit remain open. + +### Preserve producer-bound heartbeat Turn identities + +Runtime `3736048363` removes an inapplicable wake instruction after the existing +producer has actually replaced the timestamp placeholder. A bound prompt already +contains its original concrete assignment and separate guard; asking the model +to replace a new wake timestamp is redundant and risks losing that identity. +Reusable unbound templates retain the original guidance. The existing binding +owner handles all four prompt modes; no new field, switch or reader is added, +and saved bodies, commands, transport flags, required reads and recovery/stop/ +settlement rules are unchanged. + +Eight mode/shell counterfactuals fail before the repair and pass afterward; +Windows syntax is emulated, not an installed Windows qualification. Thirty-two +actual-builder characterizations retain exact unbound default/off output in +16 cases and remove only the fulfilled instruction in 16 bound cases, with +unchanged other generator fields and limits. The original four real-CLI budget +cases retain their paths, scopes and assertions: the long cases change from +5,519 to **5,379 raw JSON characters**, removing 139 body characters and one +additional JSON escape character. Matched main remains 5,363. This repairs the +candidate regression; it does not establish a whole-workflow saving over main. +The 5,400/5,500/4,000 limits and independent overflow cases remain unchanged. + +A new source-stable nine-module cohort passes all **865** cases; a complete +three-module isolated installed cohort passes all **90**. These include the +original worker selection, repair, capture, replay and once-only settlement +oracles. Earlier 855/2 and 80/2 cohorts retain their original versions. Default +17-root Mypy and changed-path Ruff pass. Fresh bundle verification and wheel +source checks bind 1,815 Core sources and 24 optional-provider files to the +frozen tested bytes; five observed Python processes, 1,179 Core modules and six +observed subprocess paths show no checkout Core imports. The same audit-coverage +limits, synthetic providers, unqualified live-model adoption and complete-cost +claims apply. Independent review and whole-C1 acceptance remain open. + +### Visible host scheduler observations + +Pi, OpenCode and OpenCode 2 now read the existing scheduler observation for a +bound Agent. The same Core decision supplies the runnable state, reset token, +wait limits and terminal-source proof. This replaces those callers' ordinary +model-context reads, which could return a progressive navigation reference +without the fields their scheduler needs. OpenCode and OpenCode 2 read the +current cold-path cadence and still accept the historical cadence shape. Their +explicit host poll receipt uses its existing writer once per probe. + +The observation has no Turn, capture or settlement effect. Work delivery uses +its original context policy. Older host bindings without an Agent ID use the +explicit full observation until they acquire an Agent binding. Keep the host +adapter and CLI on the same build when upgrading or rolling back. The retained +original-version Turn readers still cover outstanding work in their supported +recovery window. + +### Recover rejected complete-source composition + +Failed composition now records the existing transport-failure contract at the +capture root, with `ok=false` and `should_run=false`. Every original input fact +is retained under `source_diagnostic`, beside the exact original receipt and +the runtime's typed composition diagnostic. Both semantic rejection and runtime +startup failure follow this path. The regular digest-checked selected reader +provides diagnostic recovery. + +Current-source consumers require a successfully composed decision before +publishing work or native claim preparation. This closes the path where a +rejected current input could be mistaken for an unversioned historical capture. +Genuine historical captures use their explicit recovery readers. A failure in +delivery after successful composition retains the validated original capture. + +Focused synthetic File/SQLite cases cover unknown actions, unknown interaction +versions and composition unavailability after admission. Their independent +oracles check full diagnostic readback, rejected execution projection, native +journal and claim-source effects, one original receipt and zero spend. Existing +pause, capture, handoff and historical recovery coverage qualifies the adjacent +boundary. Whole-C1 acceptance and live-model effectiveness remain open. + +### Codex SSH guard and managed retry + +New Codex SSH Goal prompts and onboarding guards select the complete Turn +source with the existing native begin-Turn identity. A saved bootstrap that +invokes the generator with the previous display argument can still regenerate +its guard. Explicit context-delivery Off returns the complete inline source. +With delivery enabled the prompt follows the returned same-capture reader and +the original Turn's settlement plan. The full and standalone installations +execute the owed quota command through their shared CLI entry and grammar. + +Managed-step requires a fresh complete decision at the TypeScript controller +boundary. A saved failed Turn journal still uses its original decoder. A +signed v0 preview injected at the live boundary is refused before launching the +Host, modifying the journal or spending quota. Retry uses the original Turn. + +Source and isolated-wheel File/SQLite cases cover enabled delivery, explicit +Off, regeneration from the old bootstrap, same-capture reading and settlement +replay. The native Turn test also covers a lost spend response. + +### Benchmark and MCP live reads + +New benchmark heartbeat workers request the complete decision with either +context-delivery setting. Fresh checkpoint selection requires its signed source. +Historical checkpoint recovery uses its original capture reader and Turn +identity. The explicit v0 benchmark display still needs caller retirement. + +The shared MCP live read requests the complete decision and returns its original +JSON plus the MCP guidance block. A missing or altered source binding is rejected +before delivery. The live unversioned MCP projection is removed. The existing +`complete_task` transaction continues to own claim validation and settlement. +The real stdio boundary, replay and historical recovery tests run on isolated +authority. Installed MCP clients still need end-to-end readback. + +Ordinary quota, installed App adoption, the remaining settlement callers, +and single-session outcomes and full costs remain open. + +### Staged Host dispatch and stale-work retry + +Staged dispatch reuses the last TypeScript source check before publishing the +capture or reserving a start. Current plans assemble only the complete Host +request. The external process and in-process Host then receive the same checked +transport; the external stdin writer does not reconstruct a legacy adapter. +The legacy conversion remains at the boundary for saved transitional plans. + +An exact native retry still reads the original capture. A refusal on entry to +the launch guard records a contract rejection for the attempt with no model +dispatch. This covers a missing required capability and changed work. The +journal retains the original session recovery requirement. If the operation +Host has already bound a session before the model launch guard refuses, the +next explicit retry must resume that session. Restoring the original work and +its capabilities permits that retry through the current guard. Changed work +requires a fresh eligible Turn. Unknown dispatch outcomes still require +reconciliation of the original attempt. + +Native and external stdio launch checks bind the original hard-lease execution +key. Renewal retains that key. Release and reacquisition require a fresh Turn, +even when the same Agent still owns the same Todo. File/SQLite runs through +Codex CLI and the operation-equipped app-server verify that a replacement +lease rejects the initial dispatch and explicit retry before model work or +settlement. The stdio adapter also refuses to spawn on a retry after replacement. +Renewal permits dispatch on each of those paths. + +The current check and dispatch share the canonical Todo and lease writers' +lock. For the ordinary Codex CLI, the operation Host and the external stdio +retry, an independent lease release must wait if it arrives after the current +check and before the process spawn or `turn/start` handoff. Release can finish +while Host work is running. These races exercise the real File and SQLite +owners with a synthetic Host. A registry lock held by another operation +refuses dispatch before sending the request and leaves the original attempt +available for retry. + +The writer lock cannot pause a lease's clock. The launch scope retains the +current expiry of the admitted generation and carries it to the native spawn +or `turn/start` write. The stdio bridge checks the deadline before spawning +the Host after it receives the frame. An expired lease refuses dispatch before +task work, work writeback or spending, including when the adapter has already +bound a session for the original Turn. + +After the bridge acknowledges that no Host was launched, the parent drains its +normal exit without sending a termination signal. This preserves the original +lease-expiry refusal while still requiring confirmed cleanup. File/SQLite +regressions check the refusal, the clean bridge exit and zero termination calls. + +File/SQLite cases exercise unchanged retries, capability and task changes, +recovery in the original session, historical formats, and subprocess stdin. +Visible Codex CLI JSON follows the complete source through the generated +Turn-binding command, including when complete output is implicit. The generic +quota control retains its compact response. The tests use isolated synthetic +Hosts. Installed Hosts and model outcomes require separate acceptance. + +### Bound generic CLI heartbeat + +DSH launches a generated thin heartbeat for an explicit Agent and Turn under +`generic_cli`. That JSON route now composes its current capture through the +same complete-source owner as Codex. The bound route exits the ordinary +unversioned quota writer and compactor. Selection and settlement recovery use +the existing transport binding and Agent-owned heartbeat spend. Explicit Off +stays active through selection and the original Turn's recovery. Unbound +probes and the explicit EdgeBench v0 comparison still have live callers. +Original-version capture readers serve pinned historical work. + +The same synthetic work was exercised through main `f7e3f427197b`, the prior +C1 head `6415e3607502`, and the changed product code `0057a1dbd129`. Each arm +ran three times per delivery setting and backend. The eight measured CLI +operations cover thin bootstrap, choice, binding, same-capture required +readback, writeback, recovery of the owed debit, spend and replay. All 36 runs +produced the same independently checked fixture artifact, two receipts for +initial admission and selection on the same Turn, and one debit. + +| Delivery / backend | Main stdout median (B) | Prior C1 (B) | Current (B) | +| --- | ---: | ---: | ---: | +| On / File | 48,950 | 48,819 | 48,644 | +| On / SQLite | 48,998 | 48,867 | 48,692 | +| Off / File | 127,838 | 127,707 | 126,327 | +| Off / SQLite | 127,926 | 127,795 | 126,377 | + +Main's unedited Off selection omitted both delivery flags and resumed +progressive delivery. Its File and SQLite totals were 73,710 and 73,758 bytes. +For the Off comparison above, the probe restored both Off flags on baseline +selection and recovery. The candidate's generated command already carried +them. End-to-end CLI time moved in both directions across the four cases. +The fixture counts CLI outputs and calls and exercises same-capture recovery. +RPC and filesystem IO totals, actual model decisions, model costs and adoption +in an installed DSH or App session require further evidence. + +### Complete contract for new EdgeBench heartbeat work + +The EdgeBench CLI, SForge/Harbor launch settings, ordinary worker wake and +checkpoint preflight now use the same complete contract for new heartbeat work. +The explicit legacy display request fails before registration or creation of a +new wake. An explicit context-delivery Off still reaches the quota guard and +preserves its complete source and settlement identity. + +Native checkpoint recovery still checks the recorded presentation and exact +pending command, including original v0 records. Archived reproduction uses the +product and runner revisions already recorded by the source pin. Retire the +historical reader after the supported recovery window and outstanding records +no longer require it. The remaining product callers of the explicit legacy CLI +and actual installed adoption have separate acceptance. + +### Complete contract for captured heartbeat loaders + +The shared thin heartbeat renderer now sends the complete guard for a captured +wake that uses the former `--turn-envelope` option. New saved loaders write +`--complete-turn`; the managed upgrade still recognizes byte-exact earlier +loaders and carries their explicit binding, capture and delivery settings. The +same thin budget allowance covers both spellings of an explicit captured Turn. + +The direct quota compatibility route remains available for existing raw +callers. Those callers must migrate before the raw writer exits. Original +captures and pending commands retain their versioned readers during recovery. + +Six matched local CLI pairs used the same selected Todo on File and SQLite +with context delivery Off. The first guard grew from 22.1 KB to 37.9 KB. For +complete readback, loader, guard and original-capture pages together changed +from 71.7–71.9 KB to 42.9–43.0 KB across the two backends. Every arm kept one +heartbeat receipt and the same settlement identity. Model outcomes, selective +read costs and actual installed adoption still need qualification. + +### Kiro CLI thin heartbeat uses the complete Turn source + +The generated Kiro activation enters the shared complete-source composer for +JSON work with an Agent and Turn. Explicit Off puts the full decision inline. +The visible-Goal writeback, recovery and spend retain the original Todo and +Turn. The turnless probe keeps its compact observation. Kiro's MCP tool already +uses the complete composer. + +Against the preceding candidate `3f527c468b2f`, three pairs per backend and +delivery setting exercised the generated activation, bound guard, presentation +readback, verified fixture result, writeback, debit and replay. The original +Kiro captures produced by the preceding revision recovered on both backends. +Recovery refused a mismatched Agent and settled the original Turn once. The +CLI stdout medians include full recovery when the guard returns a reference. + +| Delivery / backend | Prior candidate (B) | Current (B) | +| --- | ---: | ---: | +| Default / File | 70,190 | 71,182 | +| Default / SQLite | 70,252 | 71,244 | +| Off / File | 61,578 | 61,142 | +| Off / SQLite | 61,640 | 61,204 | + +A separate direct raw Off trial substituted inline complete output for the +bounded v0 view. On the same fixture, JSON grew from 23.1 KB to 48.4–48.5 KB, +and Markdown grew from 2.4 KB to 48.2 KB. This explicit route retains its +bounded writer until its callers have a qualified replacement. Historical +decoders serve unsettled original records during the supported recovery window. +The original-quota model outcome and full-cost comparison and live Kiro +session adoption require separate validation. + +### Complete work for generated external CLI launchers + +Manual shell and custom external drivers now receive the existing +`generic_cli` profile from onboarding and bootstrap. The normal generated +guard for a selected Agent and Turn takes the shared complete-source path. +The prior launch command emitted follow-up text without a bound settlement +plan. The new guard carries the original Todo and Turn through writeback +and one heartbeat debit. Explicit Off returns the full source inline. + +Against `e3d470c1903f`, sixteen local pairs ran generated onboarding and +heartbeat commands, captured and read the selected work, checked the same +fixture result, and wrote back, debited and retried. The baseline harness +supplied the original Turn explicitly during settlement. File and SQLite +also recovered the old unversioned captures. A wrong Agent was refused +and the original Turn debited once on each backend for each launcher. + +Per-turn CLI output, including full reference reads and settlement, grew from +58.3 KB to 71.2–71.3 KB with default delivery and from 50.3 KB to 61.2–61.3 KB +with explicit Off. The comparison starts at the generated heartbeat +invocation. The Full installation generates the command through +`agent-onboard`. The standalone Core runs that generated heartbeat and +its quota, capture and settlement commands. Refresh copied launchers using +the existing onboarding entry to adopt the complete source for new work. +Handwritten raw CLI and the explicit bounded v0 route retain their +compatibility surface. Model adoption and full cost require the original-quota +single-session comparison. + +### Complete source for direct bound quota CLI work + +JSON `quota should-run` with an explicit Agent and Turn now uses the complete +source even when the caller omits a scheduler profile or spells out the +`generic_cli` host fields. The ordinary CLI uses the same settlement plan +builder as the declared generic CLI. Its emitted writeback and heartbeat spend +carry the receipt's original Todo and Turn and run as separate commands. A +missing scheduler declaration still carries no scheduler authority. Explicit +Off gives the complete source inline. Turnless ordinary reads and the +explicit bounded v0 display keep their compatibility routes. + +Eight matched File and SQLite pairs compared the direct command with main +`f3bdad238739`; the preceding C1 candidate `6cbc9a4aa56a` also served as a +control. The harness supplied the original Turn at baseline closeout +because the older response did not provide its bound plan. Both arms +accepted the same synthetic result and appended one debit. The candidate +read back the original captures and rejected a different Agent without +another admission. Guard, full display read when referenced, writeback, +spend and replay used the same number of calls. Against main, observed CLI +stdout grew from 52.0 KB to 64.3 KB with default delivery and from +44.0–44.1 KB to 55.8 KB with explicit Off. The display comparison excludes +the separate recovery probe. The long-path explicit v0 budget and the +existing complete diagnostic carrier both pass their original checks. +Model outcomes, selective read costs and installed Host adoption still +require qualification. + +### Preserve the explicit EdgeBench short-view control + +The same heartbeat adapter configuration accepts `--turn-envelope` on +main `f3bdad238739`, and C1 `efa342224084` rejects it before the first +wake. The EdgeBench runner now carries that explicit choice through SForge, +Harbor, wake receipts and checkpoint preflight. A bound `generic_cli` +heartbeat preserves the flag through selection reentry. Explicit Off uses +the existing v0 projection and links to the original complete v1 capture. +With delivery enabled, the native reader presents that same source. The +complete default retains its original settlement route. + +The File and SQLite tests exercised live renderer, selection, private +handoff and checkpoint preflight with both delivery settings. They verify +the original claim and signed capture, recover it from the actual emitted +reference, settle the original identity once and reject incompatible view +choices before launch. An isolated standard wheel passed the 24-case +worker matrix. The external worker cancellation regression now consumes a +real scheduler observation, then launches and reaps a detached fixture +process and reads back its cancellation receipt with zero quota debit. + +Historical comparisons remain pinned to their original runner and LoopX +revisions. Retire this explicit compatibility view after the named caller's +replacement and rollback qualify. The synthetic operations leave installed +Host adoption and matched single-session model outcomes and complete costs +open. + +### Share diagnostics in direct inline quota delivery + +Ordinary bound generic CLI JSON now uses the existing compact projection rows and +Todo summary references when the complete decision is delivered inline +with context delivery disabled. Validation reconstructs source rows at +the original serving time and restores literal Todo lanes in their original +order. The complete capture holds the task, boundaries, and original +settlement plan. + +Against `f8d0eb588c7e`, matched File and SQLite fixture runs reduced +explicit Off stdout per normal Turn from 55.7–55.8 KB to 54.3–54.4 KB. +The comparison includes guard, writeback, debit, and debit replay. Both +versions recovered the original capture, refused a mismatched Agent, and +debited once. A modified compact capture failed the complete source +integrity check even with its file digest recomputed. An initial replan +without a selected Todo used 47.4 KB before and 45.5 KB after, with the same +Turn and no debit. Same-source reconstruction of small and multi-Agent +decisions matched all diagnostic facts after decoding the signed capture. + +With default delivery, full stdout including the reference read remained +64.0–64.1 KB, against 51.7–51.8 KB on main `f3bdad238739` for this +normal-work fixture. Actual selective reads and matched model outcomes and +costs remain part of the default-adoption qualification. + +### Deliver the current Goal revision on the initial read + +The shared initial reader now delivers the provider-backed Goal objective, +revision, and digest before the original Goal narrative. The existing Goal +acceptance owner supplies the revision and continues to decide adoption. +Supporting history and peer adoption are readable from the same capture. + +Bound generic CLI and Codex App CLI tests use the ordinary guard and its +emitted reader commands on File and SQLite. All four cases omitted the +current objective from the initial selection at `7a37d7d02e79`. Reading the +three fields from that same capture required a separate selection. The new +initial responses are 552 bytes larger in this fixture. Reading the same +facts costs one fewer reader call and 629 fewer response bytes in each +case. The objective arrives before the original narrative and reading it +leaves the original receipt intact with no additional quota effect. + +The separate direct CLI fixture without a revised Goal still attributes +about 10.6 KB of the full-read difference against main to the added +settlement plan. These observations measure CLI output and reader calls. +Matched model outcomes and complete costs still require qualification. + +### Recover bounded context reads through a private Windows reference + +When a stale selection cursor requires a restart and the output cap excludes +the full command, the Windows path uses the existing private capture +allocator. It checks the source file and its containing directory before +emitting a reference. The reference preserves the capture digest, reader +route, and selection so the reader can restart at offset zero. + +The CLI fixture used the Windows branch with private macOS files and a +700-byte cap. At `dead3c8ce709` the refusal for the owned capture omitted +the restart command. The updated reader returned and followed that command +through every page of the original selection. Shared source files and +directories produced no reference, and modifying the original bytes caused +the emitted command to refuse the read. Native Windows DACL and PowerShell +execution still require verification on a Windows host. + +### Reserve private recovery before capped Windows quota guards + +The JSON quota guard reserves room for a recovery reader before admission +when the caller supplies an output cap. This reservation now shares the +private directory allocator with restarts of a saved selection. The Windows +branch uses a physical temporary directory and applies the existing +owner-only access policy to the new directory. + +The File and SQLite fixtures exercise Windows branch selection on macOS. +At `e9339babfc71`, both guards refused a 1,700-byte cap before admission. +The updated guard admits once. After an injected Host delivery failure, the +returned command reads the original capture and receipt within the output +cap. Both guards refuse a 96-byte cap before writing a capture or receipt. +The fixtures record zero debits. Native Windows execution remains open. + +### Follow the saved action after a Benchmark checkpoint preflight + +The non-native checkpoint prompt tells the worker to follow the saved +view's action along with its required reads and settlement instructions. +At `e9339babfc71`, the prompt omitted the action clause in four explicit +legacy view cases across File and SQLite. The same cases verify the returned +reader command, its saved source, and the prompt after one guard. + +At `f220690bef2f`, the default full-view prompt omitted the instruction to +follow the interaction contract. The explicit Off short view needed a +bounded route to its original Todo selection command. The prompt now +preserves the full view's replan review and writeback reads when present. +The v0 prompt supplies a digest-checked reader for specific fields in the +original capture. + +On File and SQLite, a direct read of the complete original capture returned +31,497–31,509 bytes. The reader returned the Todo selection command in +2,049–2,055 bytes. Including the preflight prompt and saved-view pages, +the full-source route used 47,449–47,479 bytes and the field selection used +18,756–18,782 bytes. The CLI cases followed the selected command on the +original Turn, refused an incorrect digest, and recorded zero debits. Model +outcomes and end-to-end costs remain open. + +### Use the explicit PowerShell launcher for bounded quota recovery + +The shared command resolver accepts an existing script at an explicit +PowerShell path. PowerShell can launch that script without a POSIX execute +bit. The quota guard uses the supplied launcher to reserve the recovery +reader before admitting work. + +In both File and SQLite fixtures, a 1,700-byte budget now permits admission +and the emitted recovery command runs verbatim in PowerShell 7 on macOS. +The fixtures use launcher paths containing spaces and straight and typographic +apostrophes. They read the original receipts within the limit and retain +one guard and zero debits. At 96 bytes, both providers refuse before admission. +Windows filesystem access control and the native Windows Python route +still require a Windows host. + +### Read a committed debit after moving a checkpoint + +Exact settlement readback can use a debit copied into a different runs +directory. The accounting reader matches the copied committed transaction +receipt to the original index row, verifies the recorded artifact name, +then checks the local debit against the receipt. Spend and void operations +use their existing active-directory checks. + +Four File and SQLite cases failed at `a1f34097805a` because the copied +index still pointed to the source directory. After the fix, they read the +same settlement identity and debit after the source runs directory moves +away. The reader rejects a missing artifact or committed receipt, an altered +record, and a symbolic link to the original debit. The copied checkpoint +and its receipts retain their original bytes. diff --git a/docs/architecture/rfcs/ledger/controller-executor-unified-contract-v0/2026-10-30-c1-source-convergence.raw-archive.zh-CN.md b/docs/architecture/rfcs/ledger/controller-executor-unified-contract-v0/2026-10-30-c1-source-convergence.raw-archive.zh-CN.md new file mode 100644 index 0000000000..32a6b52a32 --- /dev/null +++ b/docs/architecture/rfcs/ledger/controller-executor-unified-contract-v0/2026-10-30-c1-source-convergence.raw-archive.zh-CN.md @@ -0,0 +1,2525 @@ +# C1 来源收敛与历史集成检查点 + +- **日期:** 2026-10-30 +- **状态:** 未合入的集成证据;C1 仍未完成。 +- **来源:** 原候选 `648104978fdd67176cccdbb765c5bc3f36bf2ca3`,集成目标 `e8f4c6f8125e3cc0ef912afac653d5542671392f`。 +- **语言镜像:** [English](2026-10-30-c1-source-convergence.md) + +## 当前调用方退役边界 + +当前 #8266 候选通过普通 quota、原 envelope 参数、生成的 heartbeat 入口、 +Benchmark 唤醒及 checkpoint、managed 与 stdio Host 请求交付完整 v1。 +上下文交付 Off 内联同一完整来源。Benchmark 运行指南现按该行为说明。 +原 quota 对照臂使用固定的 pre-C1 runner 与 LoopX 版本,已保存捕获按原版本读取。 + +| 保留边界 | 当前调用方及退出条件 | +| --- | --- | +| 完整来源组合与校验 | 当前 quota、Turn、heartbeat 和 Host 消费方共用既有 TypeScript owner。普通 v0 renderer 及按参数选择来源的分支已退出这些调用方。 | +| 版本化 plan、capture 与回执恢复 | 历史记录保留原来源、绑定及一次结算。退役需核清支持恢复窗口和未结记录去向。 | +| 旧对照构造器 | Python `build_turn_envelope` 的树内调用仅在 `model_behavior_corpus.py`。保留的 raw/v0 用例与版本化状态矩阵沿用原对照,完整 v1 用例消费原校验来源。最后一个受支持对照调用方退出后,再退役该构造器。 | +| 模型成果与安装采用 | 原 quota/C1 单会话对照、完整成本、受支持实装 Host 及原生 Windows 沿原验收继续。 | + +旧构造器现直接调用同一 TypeScript 操作,删除只有一个调用方的 Python 包装。 +一项完整捕获测试与另一项的前十三条语句重复,使用相同 actor 和种子。 +保留用例还验证坏绑定在调用 actor 前拒绝,因此删除重复用例并保留覆盖。 +冻结对照和公开构造器的行为保留。这批改动核清调用边界并减少重复维护, +模型成果与完整成本继续待验。 + +## 连续恢复时保留已独立核验的原生选区 + +原有单次恢复修复能在完整捕获回放失败时保留独立选区。在 C1 +`043463500ddd`,生成下一份捕获前再恢复一次,会丢掉这个选区的已读状态。 +生命周期 owner 将已核验的选区检查点带入新周期。后续恢复会再核对原生输出, +变化的停止条件按当前捕获和范围交付。 + +真实 Codex 0.167.0-alpha.4.1 Code Mode 和本地固定 provider 对照中, +连续恢复两次后,下一次首读选区正文从 11,978 降至 631 字节,页数从两页降至 +一页。选读输出缺失、Todo/来源/正文变化或实际压缩时须重读。全量回放失败后 +仍建立新的完整捕获基线。本次夹具度量 reader 交付,模型成本与长程成果仍待验证。 + +## Quota packet 体积与重复的续跑验收审计 + +以主干 `f38fae05bb9a1` 与 C1 `1f2f10539117` 对照,File quota +合成流程使用同一任务、验收成果和 Turn 身份。guard、完整读取、写回、扣额 +和重复提交共五次调用,stdout 由 53,248 字节升至 65,554 字节。SQLite +分别为 53,310 和 65,616 字节。拆解选读发现,新增结算计划的紧凑 JSON 为 +10,646 字节,写回条件占 3,209 字节,Vision 写回的结构与示例占 2,939 +字节。校验、原结算身份和恢复命令还占用其余空间。 + +原生 hook 在同一上下文周期内完整观察过审计正文后,首读投影才允许按当前 +Goal、已绑定 Todo 和 agent 复用逐字相同的审计。审计变化、缺少完整观察、 +绑定变化、压缩或出现材料引用时均须读取当前内容。当轮写回命令和结算身份 +单独交付。显式恢复仍可从同一份 capture 读回原审计正文。 + +File 与 SQLite 的双 Turn CLI 对照覆盖普通与完整选择、实际分页读取、写回 +和结算。四组对照中,第二轮首读 stdout 均少 2,226 字节,调用次数相同; +File 普通路径的第二轮完整流程从 54,093 降至 51,827 字节,均为八次调用。 +隔离安装 wheel 复现了复用、原 capture 回读和有效结算。改动前后的冷启动 +默认流程分别维持在 File 65,554 与 SQLite 65,616 字节。显式 off、分段 +读取和原捕获恢复也交付同一合成验收成果,并且只扣额一次。当前证据是本地 +CLI stdout 字节数,实际模型 token、任务效果和线上采用仍待验证。 + +## 当前修复:按依赖读取 capture 并迁移消费者 + +C1 集成 main `3a0c9608cc06`。共享 thin heartbeat renderer 曾把完整 capture 的 +可用性变成行动前无条件通读整份 capture 的义务。普通/App × 默认/显式 context-off +四种同输入真实 CLI 对照实际 main 与修复前 C1 集成 `c6d7d0a573f0`:main 未新增此 +义务,修复前 C1 四种入口均新增。 +修复后仍要求当前工作上下文、必读材料及适用目标、验收、约束和停止条件;原 capture +按决策依赖读取。显式全读、所供 flags 以及完整原来源/身份恢复义务继续有效。 +四种入口在读取条款之外的文字修复前后逐字相同,指导文字增加 347 个 UTF-8 字节。 +这是语义纠正,不是测得的 token 或完整任务节省。 + +冻结 C1 `c37bd8d0d9` 的 selected-work 因导入已删除 helper 无法收集;native-child +与独立 delegation 记录 62 通过、八个失败。既有夹具现采用当前 context reader 和 +v1 request/work-contract owner;仍故意注入矛盾的第二 carrier 和损坏的 owner +身份,要求副作用前拒绝。原材料、off 隔离、响应丢失恢复、重放及一次结算断言保留。 +读取范围/来源预检 141 通过、四个跳过,native/delegation 70 通过。扩展运行先记 +104 通过、28 失败,迁移后的完整 delegation/示例运行记录 139 通过、两个示例旧断言 +失败;迁移显式选择和 typed 副作用前拒绝后,两个完整 canonical-delivery 用例在源码 +及安装包均通过。拒绝断言核对原 subject,以及 Host、状态、scheduler 和扣额均无效果。 +这 28 项没有全部在未改动 `c37` 上独立复现,不能统称为该冻结基线的回归。 + +首次安装 wheel 运行记录 88 通过、32 个 setup error:示例初始化器沿 checkout +相对路径导入 TypeScript。既有 Python launcher 现将实际加载包的根目录传给同一 +初始化器;canonical authority、独占创建可丢弃 runtime 和拒绝已有状态保持。 +harness 不复制 Core 源码。修复后安装运行记录 148 通过及两个残留旧结算字段断言, +修正后新的一次完整运行 150 项通过。包内 1,815 个 Python/TypeScript 源 +与实测候选一致,374 个已观测 Python 进程仅从隔离安装包导入。 +原失败与局部重放均保留各自证据。 + +配置内空缓存 Mypy(17 入口)、全控制面 TypeScript 及改动路径 Ruff 通过,未放宽 +配置。精确 head 的 premerge 及评审/readiness 仍须独立取得,本文不声明已通过。 +本片不建立父 PR 已显著缩小、完整 provider、独立评审、自然采用、模型费用或整体 +C1 资格。实际 main 已有预期普通读取范围,不为 C1 此回归重复修改 main。 +下方历史实验及冻结 base/head 成本分母继续保留。 + +## 上一次依赖修复:来源传输位于 driver 下层 + +C1 集成 main `5a58635028fb`,包含已合入的独立提案 #8192 和 #8186。 +配置内 Python 检查原先报 463 文件中的 4,562 条错误: +低层捕获和 journal 读取器为薄的来源与身份 helper 导入了 driver/Host 结果转换器。 +这七个 helper 现直接使用既有 `quota.turn_envelope` 传输层;删除三个旧私有实现, +已发布导出保留别名。TypeScript 决策 owner、wire 版本、来源拒绝、精确数字、 +历史恢复和只结算一次保持不变。 + +同一配置的 17 个入口在禁用增量检查、隔离空缓存后通过,未放宽严格配置或 import +跟随。完整控制面 TypeScript 检查也通过。这是依赖边界修复,不表示修完此前可达的 +全部模块类型,也不宣称运行性能收益。较广源码运行记录 627 通过、六个夹具失败、 +四个跳过;干净集成基线复现相同六个失败,均为夹具访问已退役的第二份 +`turn_envelope` carrier。修正后真正检验当前 producer 的缺 witness 恢复和故意注入 +混合 authority,模块 36 项全部通过。重建的独立安装 wheel 在捕获/Host、会话/journal、 +authoring 和完成路径共 136 项通过。包内 1,815 个 Python/TypeScript 源与候选一致, +141 个已观测 Python 进程全部从安装包导入,没有借用 checkout 源码。 +较早的 100 项安装包运行及原六个夹具失败保留各自证据身份。 + +本依赖修复前,集成已使父 PR 从 201 文件(`49a621c9b8` 对 main `546c08c0d3`, ++18,429/−2,042)降到 197 文件(`2fe98521f1` 对 main `5a58635028`, ++17,928/−1,989)。这是有限缩小,显著降低评审范围的交付仍待继续。 + +独立评审、质量/readiness、完整 provider、自然采用和整体 C1 验收仍开放。 +本修复不建立新的效率结果,也不资格整个父 PR。历史双语实验继续整组保留; +旧成本数据保持冻结 base/head,不改记为本次集成的测量。 + +## 上一次拆分:完整重规划 authoring + +两个作者提案均集成 main `d0985c35aa`。[PR #8192](https://github.com/loopx-project/loopx/pull/8192) +把 C1 既有的同响应 authoring owner 独立提到 main,删除 Python 重复比较,恢复普通、 +staged 及真实 CLI 读取器的 authoring。三个完整正文断言在原 main `a9485073f2` 均失败, +在修复后通过。缺少 stride 声明仍拒绝语义写回;Host 读取实际交付契约后可声明决策, +后续任务消费经过独立验证的计划。C1 在读取捕获内容前保留现代源版本与绑定校验。 + +main 修复的集成源码 30 项、隔离 wheel 30 项通过;C1 定向源码 180 项、TypeScript +96 项、隔离 wheel 30 项通过。Canonical fixture 从实际加载的包定位 TypeScript; +C1 fixture 使用实际结构化 Host prompt 和版本化 capture 绑定,不再假定正文内联或 +沿用历史 digest。先前夹具失败继续保留。main 修复的冻结 standard 机械检查通过, +但严格质量收据仍缺失;独立评审及整体 C1 仍开放。此修复在冻结夹具中增加一次父 +RPC(2 到 3,未计 CLI 子进程),不是净效率结果。两个独立提案均未落地,不宣称父 +PR 已缩小。 + +## 最新字段复用:main 独立提案与 C1 同步 + +[PR #8186](https://github.com/loopx-project/loopx/pull/8186) 将原生渐进 reader 修复 +独立提出:`9df99f042b5f` 基于 main `62e234c93999`。C1 在 `2f1c91085` 集成该 main, +在 `dde48f084b` 同步同一修复。既有 TypeScript owner 依次考虑精确要求列表、大条目 +及其大正文;已改状态和未知控制条件使相应记录失效,当前修订号及完整恢复仍可读取。 +完整当前返页与已认证的精确继承字段可合成为下一次 section coverage,不变成完整 +模型输入基线。Native hook 使用已匹配的事件会话,而不假定继承 shell 会话环境。 +没有新增准入、模型调用、配置或存储 schema。 + +下表是 **main base/head** 对照,不是 C1 的独有增量。File/SQLite、base/head、冷/温/ +恢复/canonical 修订各一例,共 16 场景、40 Turn;12 个完成原三步合成 Task,4 个冷态 +只执行第一步。核验当前/此前实际交付的要求、完整 UTF-8 返页、独立产物、原身份、 +三回执、一次扣额和重放;准备、故意重试分列,完成子进程只计一次。提交 head 的产品 +字节与实测源一致。 + +| SQLite 普通完整任务 | main 基线 | main 提案 | 变化 | +| --- | ---: | ---: | ---: | +| 温态三步 BODY | 147,059 B | 109,016 B | −25.87% | +| 修订后三步 BODY | 147,793 B | 113,819 B | −22.99% | +| 温态三步 stdout | 268,953 B | 230,730 B | −14.21% | +| 温态/修订 RPC | 863/867 | 863/867 | 不变 | +| 温态/修订 framed RPC 字节 | 基线 | +2.42%/+0.98% | 额外成本 | + +File 同方向。冷态及本组恢复 BODY 不变。SQLite 温态观测的 Python 普通文件读/写增加 +11.94%/19.06%,修订增加 5.73%/3.31%;不含 Node、内核、provider 和 CLI 外 fixture IO。 +单次插桩样本不资格稳定延迟、模型保留、自然采用、token/cache、账单或整体净收益。 +只拆正文的原型没有减少代表性任务 BODY,积极索引小条目的原型显著增加 IO;这些 +负结果继续保留,不改记为最终修复通过。 + +源码反例覆盖已改正文/状态/未知控制、低收益拆分、部分与伪造观察、压缩、off 和 +精确恢复;同一新增用例在未改 main 上失败。两条源码与隔离安装包的原生路径使用 +同一 owner;真实 Codex 静态回环旅程各十次请求,覆盖下一次整块复用及未验证 resume +后的完整恢复,没有收费模型。记录的 `dde48f084b` 集成点 C1 配置内 mypy 有 4,818 条诊断,main 配置内 17 个 +源文件检查通过;先前另一集成 head 的 C1 为 4,814,不豁免也不归因新增四条。 +main standard premerge 的六项直接和十四项选中检查机械通过,但严格 Goal quality +receipt 缺失。独立评审、CQR、精确 head readiness、维护者合并权限及整体 C1 验收仍开。 +提案尚未让 main 上的父 PR 变小,仍需维护者采用独立可评审切片;早期双语实验继续 +整组保留在下方。 + +后续作者集成包含 main `910ff3bca5`,产品头分别为 main `a8902b05b`、C1 `7e52f3a1e`。 +上表固定成本不改标为这个后续组合的实测。真实入口定向检查 main 102 项、C1 104 项 +通过,两端 typed reader/报告投影各 66 项及 typecheck 通过。main 配置内 mypy 通过; +C1 当前为 485 文件中的 4,831 条诊断,新增诊断不归因、不豁免。standard premerge 的 +直接/选中机械检查分别为 main 6/14、C1 7/19 项通过;两者仍缺严格 quality receipt, +C1 的人工评审门保留。 + +## 上一集成:字段复用进入主干后的增量成本 + +实测产品版本 `b90e711cdb81` 已集成 main `d602248c5329`,包括 #8124 字段复用、 +Vision 审计引用、首读消费者和 Chat 观察更新。C1 在共享 TypeScript owner 中保留完整源 +校验,原生导航与历史来源拒绝仍走同一路径;此检查点的后续修改只有验证和文档。 +下方早期 cohort 保持原版本的历史证据身份。 + +当前工程对照使用原三步合成 Task 和两组 canonical 验收。File/SQLite × 冷/温/恢复 +× 三次重复,共 36 场景、84 个已结算 Turn:12 个冷态场景只走一步,另 24 个完成原 +Task,独立校验的产物一致。实际返回 BODY 连续重建到 EOF;每个省略 outcome 同时与 +当前不可变来源、此前完整交付逐字核对。核验原身份、三回执、一次扣额及产品源稳定; +准备和故意重试探针单列,完成子进程成本只计一次。 + +| SQLite 普通路径,三次均值 | 已获字段能力的 main | C1 | 变化 | +| --- | ---: | ---: | ---: | +| 温态第二步 BODY | 27,874 B | 27,159 B | −2.57% | +| 完整三步 BODY | 102,836 B | 100,691 B | −2.09% | +| 完整三步 stdout | 225,841 B | 184,316 B | −18.39% | +| 完整三步 RPC | 863 | 866 | +3 | +| 完整三步 framed RPC 字节 | 11,754,471 B | 11,852,055 B | +0.83% | +| 已观测 Python 普通文件读/写 | 基线 | −10.39%/−13.83% | 有限 IO 边界 | + +File 同方向。恢复时先完整重送当前要求,含回退的三步 BODY 仅少 1.78%;不能把相对 +字段复用落地前主干的大幅下降,继续当作 C1 独有增量。 + +另有经真实 refine 追加一项条件的 canonical 修订探针,保留原条件。四个 File/SQLite +用例完成 12 Turn、四个 Task。main 保守重读两块正文;C1 第二步复用一块未变 outcome, +第三步复用两块,新条件完整显示。SQLite 第二步 BODY 为 52,169→32,905 B(−36.93%), +完整 Task 为 149,223→106,688 B(−28.50%),RPC 867→870、framed 字节 −0.23%。 +每个 provider/arm 只有一个合成修订案例,不代表自然反馈采用或科学成果收益。 + +最终源码按唯一用例对账为 1,065 通过/四项跳过,包含实际 Codex 的静态回环。112 项 +原生用例经过定向复验:修正输出预算缩页后仍按预设偏移读取、未读选择项就选择的 fixture,并将 +八页压力循环与静态恢复资格隔离。原失败保留,不冒充一次全原生套件通过。全量 TS 为 +6,161 通过/77 跳过,控制面类型检查通过。隔离 wheel 的 1,809 个 Python/TS 打包源 +逐字匹配,24 项保存源/默认/off/恢复通过,实际客户端默认 Progressive 与独立 +Delta 验证通过,无源码导入污染。 + +配置内 Python typing 仍有 4,814 项诊断,同样 17 根在 main 通过;不能以历史扩展范围 +或传输验证豁免。PostgreSQL/完整受影响 provider 资格、独立评审、精确 head readiness、 +安装态采用及完整 C1 验收仍开放。BODY、stdout 与 Python IO 分开;Node/kernel/provider +IO、模型输入/缓存/输出 token、账单和持续延迟未资格。本工程 cohort 未启动模型/ +科学运行、活动安装、CI 查询/手动触发或合并。 + +## 当前私有 plan 边界 + +新的完整源 Turn 写 `loopx_turn_plan_v1`:一份原始 `work_contract`、源摘要与 capture +header。完整 planner 不再生成 v0 executor adapter。`planning_facts`、Host 输入与 +`turnPlanWorkSource` 复用既有 TypeScript 来源/投影、路由和结算 owner;Python +保留已持久化 action hash 的数值编码。 + +| 生产链路 | 替换/保留的兼容路径 | +| --- | --- | +| Turn CLI 与当前 launch decision → plan | 直接传完整源。私有 planner 不再接收完整源与 v0 executor adapter 的组合。 | +| 默认 CLI plan inspection | 保留一份完整源及 portfolio、writeback;即使恢复 transport 元数据,inspection 也不可执行。 | +| 不可变 capture → Host | 绑定原来源与 header,不重建 adapter;保留 capture 拒绝、原读取命令和 Host v1。 | +| Journal 写入、检查、结算查询与 CLI resume | v1 经共享来源 reader 校验;保留 GoalRef、Agent、Turn、scoped identity、原生 Session 及一次性 effect。 | +| 原生报告恢复、capability context、reward-memory 激活与子任务结果 context | 读取相同 work facts,恢复证明携带原稀疏数值拼写;原有 experiment/capability gate 仍必需,关闭 memory 时不读来源或 provider;Host/provider 和权限规则仍由原 owner 负责。 | +| 已记录的 v0 journal | 显式保留 transitional 来源/adapter 交叉校验及历史 adapter-only 解码;错误 v1 不降级。 | + +在此私有 plan 检查点,quota presentation 与 managed controller 的 quota preview +仍是独立 v0 调用方;后续替换记在下文。回退期间,未结 v1 工作仍须保留兼容 reader;停止 +新的 v1 准入不表示旧 binary 可以重写或恢复它。历史工作及受支持恢复窗口核清后, +才退役历史 reader。没有新增 capability、设置、缓存或执行授权。 + +同源重放在实际冻结实现 `0eb0042191d5` 与候选上运行 14 个相同的合成 File/SQLite +plan 输入及 16 个原 Host 恢复输入。路由/Session/transaction/topology 与执行事实 +全部一致,其中四个 plan 用例使用已有无 Todo replan 或 request binding。Capture +发布、真实 journal 写入、load/query 和幂等重放均经过生产 owner。相等比较只替换 +两个实现各自的 capture 存储目录,不归一化来源条款或值。 + +| 实测组件,14 个 plan 用例合计 | 修改前 | 候选 | +| --- | ---: | ---: | +| Capture 后 canonical plan JSON 字节 | 528,364 | 373,372(−29.33%) | +| 实际 journal 文件字节 | 698,776 | 500,880(−28.32%) | +| 最终 canonical Host 输入字节 | 335,446 | 335,446 | + +30 项同源调用及其被测链路步骤的原生 RPC 为 162→158,canonical 参数/结果 JSON +为 4,645,847→3,536,656 字节。Planning 少 18 次调用;校验 plan load 多 14 次,该读取 +步骤从 7,052 增至 340,486 字节。Capture 前,新 plan 的源摘要使未绑定 Host header +多 97 字节;capture 后两个实现已有相同绑定,最终模型正文一致。这些组件测量不含 +framing、CPU、模型 token、账单、冷/温态 context 成本与验收成果,既不改善“原始 +capture 到所选正文”的 control packet 主指标,也不证明整条工作流净收益。 + +过去默认 plan inspection 删除完整源后保留有界 legacy 视图;删除 adapter 暴露了 +这一遗漏,包括 portfolio 与 writeback context。当前 inspection 保留一份完整源。 +另一个真实只读 File 夹具在两个实现的独立 store 上均通过,实际 JSON stdout 从 +12,388 增至 26,524 字节(+14,136)。这是明确披露的读回成本,与持久化 plan 缩小及 +最终模型正文不变分别统计,不声称 CLI 读取字节减少。 + +新增无 adapter 用例先在冻结 writer 上失败。随后集成还发现真实无 Todo 恢复 reader +仍读取已移除 adapter;现在改用完整源的原结算身份。当前未知版本、缺失/null 来源、 +混合载体和错误来源/capture 绑定均是拒绝用例,并保留显式历史/transitional 对照。 +修正读回、capability 与历史夹具后,当前源码的七个相关完整 Python 模块共 403 项全部通过。 +TypeScript 类型检查与全量 6,053 通过/77 跳过的测试通过。PR 记录精确 source/wheel +矩阵、保留的失败/跳过及标准 gate。扩大源码运行的 1,367 通过、37 失败、22 跳过 +保留为历史:它暴露默认 inspection 遗漏,以及 reward-memory gate 仍读取已不存在 +adapter 的真实断点。后者现绑定 checked work facts;当前缺源拒绝与显式历史对照仍 +独立。这是私有 plan 迁移提议,不是 installed 推广、 +相对原 quota 的成果/完整成本资格或 C1 完成。 + +## 当前 quota 与 managed-controller 切换 + +源码候选删除剩余普通 quota presentation builder 分支,让 managed controller 的 +fresh preview 使用与执行 Turn 相同的完整源。复用 `compose_turn_decision` 与 +`completePlanningFacts`;后者在既有 `turn.controller` RPC 中完成校验及 work/lineage +派生。精确数值 token 跨越此边界,不增加投影 RPC。未知支持事实保留;未知的当前执行 +动作在 dispatch 或结算前拒绝。 + +| 替换的机制/调用方 | 共享 owner 与实际删除 | 剩余消费者与退出条件 | +| --- | --- | --- | +| Quota `_project_quota_cli_payload` 与 renderer 选择 | 删除 v0 builder import、ordinary/envelope 格式分支、软降级及闲置 scheduler/capture 参数;既有完整 composition 和 renderer 负责 should-run 输出。 | Status、plan、monitor 保持诊断投影;request owner 原本就只在 should-run 接受 `--turn-envelope`,此 alias 不选择第二份当前契约;不把删除不可达分支记为字节收益。 | +| Managed fresh quota preview → loop disposition | 携带实际 scheduler context 组合完整源;删除 `TurnControllerInput`、其私有 JSON 副本、`build_turn_controller_input` 及 TypeScript `build_controller_input` 操作;disposition 复用 checked complete planning facts。 | Managed controller 保留 observation/retry 与 journal 归属;只有历史 v0 decision 继续使用原 scalar route codec。 | +| 完整 plan/capture/journal → reader 与 resume | 保留此前单源 v1 迁移及原来源/header 校验;普通 preview 不再重建 v0 adapter。 | 已记录的 v0、transitional journal 保留显式 reader,直到未结工作及受支持恢复/回退窗口核清;错误 v1 不能降级。 | +| 显式 legacy envelope builder 与历史 renderer | Legacy builder 已无新的普通产品调用方;完整渲染仍复用既有 renderer 模块。 | `control_plane_composition_scenarios`、`model_behavior_corpus` 与原版本对照仍构造 legacy 输入;最后一个受支持 fixture/replay caller 和版本窗口迁移后,才删除对应 constructor/decoder,同时保留独立历史负例。 | + +可复现维护演练在既有完整源 validator 中临时加入一项合成缺材料检查,结束后逐字节 +还原 owner 文件。同样四个真实 CLI/provider 用例在集成基线 `856faed423620` 与候选运行: +File/SQLite quota 拒绝在两者均通过;两个 managed 拒绝在基线失败、候选通过。现在只改 +一个生产 owner、零个 caller 即可到达两个入口,旧 managed 路径需要另行迁移。临时检查 +没有作为新生产读取 gate 保留。这证明的是维护边界,不是自然模型遵循或 Goal 验收。 + +持久八项完整源/未知动作矩阵同样先在基线得到四项 managed 失败、四项 quota 对照通过, +候选八项全部通过。它覆盖真实隔离 provider、原支持事实及不安全整数/整数形浮点, +验证不改 journal、不扣额。相关源码矩阵有 408 项 Python、76 项聚焦 TypeScript 通过。 +另有 22 项旧集成夹具失败先在未修改基线复现:retry 注入仍瞄准旧 helper 语句,完整 +planning 已换操作,sender 校验提前,历史对照误用了当前 v1 producer。修正保留 receiver +拒绝、原版本和 retry 负例,不抹去这些历史失败,也不把它们误算为候选新增回归。 + +集成 main `d4aaaaefbd37` 后,扩大源码矩阵 427 项通过,覆盖公开 lane fence 与完整 +journal 恢复。集成同时保留 main 的 typed cast 和完整源 Goal/Agent 校验;lane 检查 +先暴露缺少 `cast` import,随后修复。隔离实际安装的 wheel 通过八项矩阵,并在 +File/SQLite 各完成两次原生合成事务及一次性重放;生产包来源与只供测试的源码 helper +独立核验。首次 wheel 构建被过期 frontend bundle 阻止,重建既有 bundle 后恢复。 + +Standard premerge 仍有 maintainability hold,且缺少精确 scope 的 quality receipt。 +同一 main 的真实 Git checkout 复现四项 module-metric finding;候选另有 quota emitter +超过既有 decision-function 限制,实测 62 decision points/74 statements。本次不 +提高 ceiling 或 exception;原有大小限额失败同样保留,聚焦矩阵通过不等于整 PR +merge gate 通过。 + +这仍是未合入的源码提议,不因上述检查安装候选、改变默认、运行模型、放宽预算或关闭 +C1。下述原 quota 成本对照独立于此前相邻 plan/journal 节省,也独立于仍开放的自然 +验收成果门。 + +### 原 quota 产品路径成本观察 + +冻结的原 main 基线为 `5f1a9d78ba7ac`,不是相邻 private-plan 基线。候选 runtime 内容 +固定在后续 mainline 集成前的 `b8c2bf1dc`,之后的源码验证不重测此 cohort。两份源码均用 +Python 3.12.15、同一冻结编号产物任务、隔离 File/SQLite store、等长目录和原生 +context delivery。十二个场景均读取返回入口及全部必需续页,创建相同产物,通过 +独立 validator,写回、扣额一次并验证幂等扣额重放;十二份产物 SHA-256 相同。 +这只验收该小型合成任务,不证明两种 packet 版本有相同自然模型成果或完全相同 +决定义务。 + +冷态启动隔离 runtime;温态计入准备 guard/read;压缩后场景还先运行实际 +PreCompact/PostCompact CLI hook,再准入下一次工作。后者测 baseline 失效,不是 +恢复被中断的业务 effect。搭建成本排除;准备阶段失败单独保留,表格仅用完整跑完 +的最终对照 cohort。 + +主指标为 `1 - 所选 BODY 文件字节 / 同次完整 capture 字节`,不混入 reader 包装或 +其他输出;后者单列。 + +| Provider/场景 | 原 quota:capture → BODY(缩减率) | 候选:capture → BODY(缩减率) | +| --- | ---: | ---: | +| File/冷态 | 59,033 → 28,446(51.81%) | 55,416 → 55,416(0%) | +| File/温态 | 58,464 → 6,419(89.02%) | 54,849 → 9,411(82.84%) | +| File/压缩后 | 58,582 → 28,562(51.24%) | 54,963 → 54,963(0%) | +| SQLite/冷态 | 59,121 → 28,530(51.74%) | 55,500 → 55,500(0%) | +| SQLite/温态 | 58,552 → 6,344(89.17%) | 54,937 → 9,397(82.89%) | +| SQLite/压缩后 | 58,674 → 28,648(51.17%) | 55,055 → 55,055(0%) | + +候选 full fallback 保留完整源;BODY 缩减为 0% 不表示净收益为零。实际 initial read +选择必需材料,不打印整份 BODY。反过来,温态 delta 较小也不保证初读便宜:候选的 +当前 initial read 仍提供完整必需上下文。 + +| Provider/场景 | 全部 stdout 字节,原 → 候选 | RPC 次数,原 → 候选 | 含 framing 的 socket 字节,原 → 候选 | +| --- | ---: | ---: | ---: | +| File/冷态 | 55,815 → 48,709 | 236 → 237 | 1,454,525 → 1,547,159 | +| File/温态 | 67,522 → 76,353 | 325 → 327 | 2,128,926 → 2,348,959 | +| File/压缩后 | 89,968 → 75,700 | 327 → 329 | 2,132,977 → 2,343,467 | +| SQLite/冷态 | 56,212 → 49,086 | 236 → 237 | 1,456,277 → 1,548,893 | +| SQLite/温态 | 67,849 → 76,806 | 325 → 327 | 2,131,180 → 2,351,673 | +| SQLite/压缩后 | 90,461 → 76,149 | 327 → 329 | 2,135,847 → 2,346,351 | + +全部 stdout 包括 guard header、必需 reader 页、准备/hook、写回及扣额/重放响应。 +两份源码在冷态/温态/压缩后均用 5/7/9 个 CLI 进程及一个独立 validator;最终 cohort +内部没有 help 或失败重试。RPC 次数/字节包含 readiness ping 与 framing;两者都 +没有使用 referenced RPC snapshot。 + +一次准备成本不能在每个稳定温态步骤重复计费。拆开已测准备后,当前温态操作的 +stdout 增加 File 15,936/SQLite 16,083 字节,单个冷态操作则少 7,106/7,126 字节。 +在此负载上,一次实测冷态节省不够支付一次实测温态增量。这是有条件的字节记账, +不预测真实会话事件比例、token、账单或成果价值。 + +Capture IO 同样增加。File 上 Python 可见 capture 读/写字节分别为:冷态 +186,399/189,228 → 277,768/238,234,温态 +387,693/392,774 → 664,229/495,634,压缩后 +430,659/378,418 → 664,963/475,336;SQLite 方向相同。同场景的可见 journal 字节与 +provider-state 留存体积一致,capture 留存体积则多 24,503–51,506 字节。这些是 +Python 常规文件流量与留存大小,不是物理 IO 或写放大;Node/provider IO 与原生 +SQLite page IO 仍未测。进程墙钟包含 Python 启动与 wrapper,每条件一次观察不能 +资格化延迟;本次未测模型请求、cache/账单覆盖或人工注意力成本。主路径字节/RPC +回归及原大小限额失败继续保留,不能用相邻 plan/journal 节省宣告抵消。 + +### 初读复用已解析 cursor 的传输改进 + +后续 reader 增量与集成基线 `86081b142c62` 对照,不替换上文原 quota cohort。 +Capture 生成本已请求 TypeScript selection owner 规划当前 initial navigation; +现用既有不可变 selection cursor 固定该 owner 解析的地址,opaque 首读直接复用。 +每页仍检查完整源和所选视图 digest,原值从 Python JSON 原文取出,保留不安全整数; +未选正文不再第二次经过 runtime bridge。原始 `--initial-read` recipe、显式 reader +及完整恢复路线保留。可选 metadata 写失败时沿用原 recipe;不支持的历史 schema +走 generic discovery,多一次有界 selection RPC。启动/传输失败不重试 runtime。 + +独立同-capture oracle 验证所选正文及未知义务逐字相同,不为此变化记新增 BODY +压缩或模型输入节省。温态初读仍需当前必读事实;旧 delta 或保存的 cursor 不授予 +retention 或 freshness。 + +同一编号产物夹具、Python 版本、provider、准备、压缩 hook、validator 和一次结算 +在十二个隔离场景重放,全部产物一致。完整路径 socket 流量小幅减少;冷态/温态/ +压缩后两版本 RPC 次数均为 237/327/329,包含 ping。 + +| Provider/场景 | 全部 stdout 字节,基线 → 候选 | 含 framing 的 socket 字节,基线 → 候选 | +| --- | ---: | ---: | +| File/冷态 | 48,258 → 48,293 | 1,541,169 → 1,509,780 | +| File/温态 | 75,583 → 75,664 | 2,337,709 → 2,275,365 | +| File/压缩后 | 74,963 → 75,033 | 2,333,325 → 2,270,641 | +| SQLite/冷态 | 48,635 → 48,670 | 1,542,959 → 1,511,454 | +| SQLite/温态 | 76,036 → 76,117 | 2,341,764 → 2,276,882 | +| SQLite/压缩后 | 75,412 → 75,482 | 2,336,165 → 2,273,331 | + +每对当前 initial reader 的 stdout 字节完全相同,该 reader 的 socket 流量约从 +60 KB 降至 30 KB。更长 cursor 路径使冷态/温态/压缩后完整流程 stdout 多 +35/81/70 字节。SQLite Python 可见 capture 读/写字节为:冷态 +276,540/236,976 → 280,522/237,574,温态 +661,271/492,992 → 669,177/490,960,压缩后 +662,043/472,836 → 669,965/474,028;File 同样增加读取成本,可见 journal 字节 +一致。准备 cursor 增加本地工作和留存 metadata。原生 provider IO、模型/cache 账单 +及自然成果仍未测,单次墙钟观察不能资格化延迟。该相邻传输改进不能清除原 quota +温态回归,也不清除既有大小/质量 hold。 + +冻结基线上的同-capture 传输回归失败,raw reader 对照通过。首次十一模块源码运行 +记录 647 pass、78 skip、4 fail:两项 navigation 测试把已准备的 model cursor 当作 +fresh recipe 调用,另两项历史 staged-reader 夹具在未改基线上同样失败。原 raw/ +历史负例保留,最终三个受影响模块 103 项通过。实际隔离安装的 wheel 同样 103 项 +通过,并检查已加载模块及 CLI 子进程的安装包来源。首次 wheel 尝试漏载仓库的 +runtime 隔离夹具,该结果不采用;现 default-route 夹具在写入前要求两根目录都属于 +可丢弃 test base,修正后的打包资格检查加载原隔离夹具。源码隔离模块 21 项通过, +缺隔离负例保持合成目录未动。Standard premerge 七项 direct 通过,十九项 selected +中十八项通过;相同五项 maintainability finding 仍阻止通过。不改变 ceiling、 +exception、merge authority 或自然成果验收。 + +### 原生命令归属与已结算回执 + +本次普通 native caller 采用已经交付的 `refresh-state --settle-turn` adapter。 +完整来源 plan 使用 `quota_settlement_plan_v2`:写回命令调用该 adapter 并明确请求 +receipt 输出,quota spend 由 runtime 执行,不再无条件要求 Agent 另跑一条命令。 +Completion、claim/lease、原身份、Vision authoring 与 terminal 条件保留原义务。 +部分失败仍返回 canonical 原 `settlement_owed`;不增加准入、自动重试或直接扣额旁路。 +Native-off/manual v1、历史 reader、replan successor 创建及 callback runner 保留原路径。 + +Receipt 是显式选择的操作后结果投影,不是新的准入输入,也不声称上下文保留。 +精确回执、未解决/失败/未知控制仍可见;已知 supporting snapshot 完整保存在不可变 +结果中,由原 CLI reader 读取。Capture 交付失败保留已提交回执,可按原身份恢复。 +真实 replay 测试还发现旧 combined adapter 虽报告 settled,refresh replay 却只返回 +前两步回执;现独立读回原三步回执,不再次执行 child 或扣额。Quota 展示 IO 也在 +既有 owner 内分离。 + +三组实现使用相同冻结的编号产物任务与 Python3.12.15:原 quota `5f1a9d78ba7a`、 +集成 C1 `898aaa9d0c33` 和本次 runtime 增量。十八个隔离的 File/SQLite cold、warm、 +post-compaction 场景都交付相同独立校验产物,且各只扣额一次。子 CLI 的 RPC 与 +Python IO 也计入;import observer 等待 pinned package 加载,不从工作目录抢先导入 +LoopX。Agent CLI 调用为 5/7/9 → 4/6/8,但内部仍有一个 CLI child,因此 CLI 进程 +总数保持 5/7/9。RPC 次数包含 ping 与该 child。 + +| Provider / 场景 | 全部 stdout B:原 quota/集成 C1/本增量 | RPC:原 quota/集成 C1/本增量 | Socket B:原 quota → 本增量 | +| --- | ---: | ---: | ---: | +| File / cold | 55,622 / 48,556 / 39,643 | 236 / 237 / 231 | 1,452,338 → 1,577,844 | +| File / warm | 67,302 / 76,098 / 66,385 | 325 / 327 / 321 | 2,125,470 → 2,350,007 | +| File / post-compaction | 89,643 / 75,454 / 65,676 | 327 / 329 / 323 | 2,129,249 → 2,345,468 | +| SQLite / cold | 56,020 / 48,933 / 39,982 | 236 / 237 / 231 | 1,454,093 → 1,579,746 | +| SQLite / warm | 67,723 / 76,551 / 66,792 | 325 / 327 / 321 | 2,128,276 → 2,352,873 | +| SQLite / post-compaction | 90,133 / 75,903 / 66,079 | 327 / 329 / 323 | 2,132,085 → 2,348,364 | + +主指标仍是各完整 capture 到其所选 BODY 文件的字节缩减;与上表 initial-read 页面和 +全部 stdout 的分母分别保留。 + +| Provider / 场景 | 原 quota F → BODY B | 本增量 F → BODY B | +| --- | ---: | ---: | +| File / cold | 58,907 → 28,329 | 54,498 → 54,498 | +| File / warm | 58,338 → 6,408 | 53,925 → 8,605 | +| File / post-compaction | 58,458 → 28,446 | 54,027 → 54,027 | +| SQLite / cold | 58,995 → 28,414 | 54,578 → 54,578 | +| SQLite / warm | 58,426 → 6,420 | 54,005 → 8,613 | +| SQLite / post-compaction | 58,546 → 28,530 | 54,107 → 54,107 | + +Warm 同次 capture 的 BODY 缩减率,File/SQLite 为84.04%/84.05%,原 quota 为89.02%/ +89.01%;候选的 cold 与 post-compaction 仍为0%。 + +Full BODY 回退仍是 0% 缩减,不代表净益为零。扣除一次准备后,当前 warm 步骤仍为 +File 33,603 → 40,558 B、SQLite 33,932 → 40,901 B,比原 quota 多约7KB。 +Warm 全流程 stdout 约少1.4%包含较小的一次准备,不能抵销这项重复开销。 +Warm Python CLI 可见总读/写为 File 636,750/451,370 → 919,810/591,486 B, +SQLite 645,056/454,206 → 928,728/595,466 B。Node/provider/native page IO、模型 +usage/cache/账单及自然成果仍未知;并行字节对照不资格化延迟。独立 validator 的调用与输出已计入,其文件 IO 未测。最终集成头重测的 warm BODY +为8,605/8,613B,前次为7,799/7,807B,而实际 stdout 相同;各自分母保留,不把 +单次比例当作稳定保证。完整净收益与 C1 继续开放,下一重点是重复 warm 控制输入与重复 snapshot/transport IO,不是再造 runner +或减弱义务。 + +集成 runtime `5aa46dc27de8` 的十个完整相关 Python 模块为419通过、10跳过, +TypeScript typecheck 与243项 focused 测试通过。实际隔离 wheel 为245通过、10跳过; +1,181个已加载 Core module 和392条 CLI child 路由来自该安装。前次 fixture 失败保留: +旧 v0 断言、依赖 metadata 长度的 UTF-8 offset、隐含 producing cwd 已按独立的当前 +语义修正。真实 CLI 覆盖结果 capture 失败、超大未知控制、错误绑定/workspace、 +响应丢失与精确 replay。Standard premerge 报告7项 direct 和19项 selected checks, +其中1项 inherited maintainability advisory;raw ratchet 仍因4个未改动基线模块失败, +原 quota emitter finding 已消失。未更改 ceiling、exception 或历史失败;这不构成 +exact-scope quality receipt,也不授予 merge/readiness 权限。 + +### 已结算快照重放与重复原 quota 对照 + +`4ef428767ce9` 的输出 IO 增量,让已完成 `current` Todo 投影与原本支持的 +`delivered` 使用同一按需读取路径。严格已知、无待办动作的 runtime route、shared +projection 与 Explore 快照也保留在原不可变完整结果中。不增加 RPC、缓存、权限 +owner 或设置;Python 只处理既有 TypeScript 事实的文件/输出 IO,结算、freshness +及权限仍归原 typed owner。未结算/错误/dry-run、未知嵌套字段、route 冲突、 +投影重试、产物复制及阻塞 postcondition 保持直接可见。原身份、三项回执及未满足 +Vision checkpoint 保留;读完完整结果既不证明验收,也不证明 retention。 + +新对照冻结 main `f04ec308f6e7` 与当前候选,使用相同 numbered-artifact Task、 +必要材料、独立检查与一次扣额。File/SQLite × 冷/温/压缩恢复各重复三次, +共 36 项、252 次父/子实际源码及解释器核验。下表为三次观测的中位数,单位字节; +current 排除一次性 baseline 准备,全部 stdout 仍计入该准备成本。 + +| Provider/场景 | 全部 stdout B:main → 候选 | 当前 stdout B:main → 候选 | RPC | Framed socket B | +| --- | ---: | ---: | ---: | ---: | +| File / cold | 55,570 → 36,270 | 55,570 → 36,270 | 236 → 203 | 1,451,832 → 1,437,675 | +| File / warm | 67,892 → 62,991 | 34,239 → 37,183 | 326 → 284 | 2,127,817 → 2,152,912 | +| File / recovery | 89,549 → 62,276 | 55,764 → 36,392 | 328 → 286 | 2,131,374 → 2,147,978 | +| Sqlite / cold | 55,963 → 36,344 | 55,963 → 36,344 | 236 → 203 | 1,453,556 → 1,439,471 | +| Sqlite / warm | 68,313 → 63,133 | 34,568 → 37,261 | 326 → 284 | 2,130,625 → 2,155,458 | +| Sqlite / recovery | 90,038 → 62,414 | 56,165 → 36,466 | 328 → 286 | 2,134,204 → 2,150,686 | + +温态重复步骤仍分别**多 8.60%/7.79%**(File/SQLite),RPC 少 12.88%, +framed 字节仍多 1.18%/1.17%。温态 Python 可观测读+写为 +787,482 → 813,035 B 与 796,984 → 822,778 B(各方向中位数相加),仍多约 3.2%。 +其它验证并行期间,调用次数/字节不资格化 CPU/延迟;原生 provider/SQLite page +IO、真实模型缓存/输入/生成输出、账单及自然成果均未知。 + +本增量修改结算返回,不修改 guard BODY 选择。第一遍温态完整 capture F → 所选 +BODY 为 File 的 58,306 → 7,082 B 对 53,899 → 8,579 B,及 SQLite 的 +58,396 → 7,094 B 对 53,979 → 8,609 B;每个比例只使用其同次 capture 的 UTF-8 +文件。候选冷态/恢复仍选择完整 BODY,主缩减为 0%,不表示工作流净价值为零。 +三次候选温态比例分别在 82.62–84.08%/82.64–85.44% 间变化;本次仅改输出, +不把这些变化记作新增 BODY 收益。 + +另用旧 `9380173c` 与当前输出 IO 消费相同已捕获结算 payload。温态首次+重放 +分别少 3,347/3,612 B;若消费者实际将两份结果中新延后的字段全部补读,真实 +selected reader 多返回 5,434/5,723 B、增加 2 RPC,此组件反多约 2.1 KB。 +等概率需求的纯字节近似在约 62%/63% 处持平;需求频率未知,不能由近似或固定 +Task 宣称模型/费用净收益;没有新增强制补读门。 + +七个受影响完整 Python 模块共 360 通过;实际隔离 wheel 使用原测试配置、conftest +与 default-root 隔离,241 通过。1,185 个已加载父 Core 模块、1,186 条 child CLI +route 及 1,199 个加载 Core 的 child import 审计均指向该 wheel。真实 File/SQLite +caller 验证完整结果恢复、重放仍仅一次扣额/三回执,以及未来或可执行嵌套控制不能 +被隐藏。这是 source/packaged 输出资格,不是 installed 采用或完整 C1 验收; +以上历史 cohort、失败和冻结预算均保留,重复温态输入及完整成本缺口仍开放。 + +### 组合结算中的 Vision 预算恢复 + +既有 Vision prepare owner 通过共享、有界的 request-error 传输集中返回独立数值 +预算诊断。C1 沿完整 capture 及其返回的组合结算命令使用同一规则。五项独立数值 +错误一次拒绝;超长 enum 文本保留原预算错误,短而非法的 enum 仍拒绝。不提高限制、 +不改写撰写包、不新增决策 owner。File/SQLite 测试在每次拒绝后保持来源状态及 run +index 不变;明确修正、独立 history 回读及重放保留完整包、原 Turn、三回执和一次扣额。 + +固定调用者比较冻结的上一 C1 head `75c05340b6ce` 与集成后的产品代码。两边只修正 +错误实际点名的字段,得到同一最终包,只结算一次,不另取 guard。使用等长 namespace +和同一 Python 隔离重试片段;包含记账 child,每 provider 的 Python 进程从七个减至 +三个。两边相同的 fixture 初始化、admission 与独立验证均在测量片段之外。 + +| Provider | CLI 尝试 | Stdout B | RPC | Framed socket B | Python 观测读 B | Python 观测写 B | +| --- | ---: | ---: | ---: | ---: | ---: | ---: | +| File | 6 → 2 | 11,473 → 9,269 | 137 → 133 | 822,570 → 817,482 | 131,460 → 116,843 | 39,169 → 39,193 | +| SQLite | 6 → 2 | 11,499 → 9,279 | 137 → 133 | 823,294 → 818,206 | 131,962 → 117,297 | 39,285 → 39,309 | + +首条拒绝更大,但完整重试片段的 stdout 少约 19.2%、RPC 少 2.92%、framed 字节 +少约 0.62%;Python 观测读少约 11.1%,写反增 24 B。未测原生 provider IO、延迟、 +真实模型修正、输入/缓存/生成输出或账单。它只证明相对上一 C1 head 的确定性错误 +恢复改善,不是相对最新 main 的新对照、同 capture BODY 新缩减或原 quota 完整任务 +整体净收益资格;以上温态输入回归与冻结门仍开放。 + +### 完整契约上的原生 ready 交接 + +本次整合 main `bd79adc64968` 与既有 Host ready 来源交接。原交接把 ready 复查强制 +设为 `context-delivery off`,在 C1 内将已启用完整 composer 的组合结算换回旧分步 +计划。新的独立断言在真实 File/SQLite × App/SSH 四条路径上均先失败。薄 adapter +现保留启用的原生 profile,使用既有延后展示选项:先捕获完整 ready 来源,再仅由 +既有 saved-capture owner 展示一次。不增加 CLI 开关、语义 owner、RPC 或权限。 + +| 实际调用方 | 替换行为 | 共享 owner 与保留边界 | +| --- | --- | --- | +| 绑定的原生执行准备 | 强制 off 的 ready 复查 | 既有完整 composer 保留必需上下文和组合结算;Python 只转交 native 目录与展示模式 | +| Host post-tool 上下文 | 模型须再取 guard 恢复缺失的 ready 契约 | 既有 capture/reader 交付验证过的同 Turn 原件与原 claim 引用 | +| 已准备的 native 收尾 | 活跃调用方收到分步 v1 计划 | 既有 v2 owner 提供组合操作与三回执;旧记录及 unbound/off 调用者保留原恢复契约 | + +完整 Goal 仍对照独立原文核验,允许完整内联或真正声明的读取;off 无效果,身份错配、 +来源损坏、重放和一次记账检查保留。这修复消费方采用,不代替另需验收的语义规则变更 +演练或最后历史 reader 退役;原 C1 验收边界保持开放。 + +七个完整受影响源码模块及真正隔离安装的同一 wheel 均为 280 项通过、70 项既有 +opt-in skip。1,897 个比较的打包产品文件逐字匹配;235 个完成进程、44,758 次 Core +模块观察无 checkout 来源污染,突然退出仍不在退出时审计范围。初次源码运行保留 +279 通过、一项旧 reader 程序假设失败及 70 skip;复用既有 reader 程序修正,完整 +20 项模块先通过,再得到最终全范围结果。caller pilot 曾误请求旧展示或重复使用 +capture 目录;失败保留,不计入完整对照,也未放宽 capture 不可变规则。未活动安装 +App/CLI。 + +新的 hard-lease cohort 使用冻结的公开编号 Task,停止于第三步。冷态完成第一步; +温态/恢复先验证并结算第一步、释放 lease,再准入和验证第二步;恢复在第二 Turn 前 +执行真实 PreCompact/PostCompact hook。两端使用原 quota 入口、相同材料、等长 +namespace、同一 Python 和 observer,父/child 均从各自固定产品导入。它与下方旧 +soft-claim 36 条件 cohort 分开,不混合比较分母。 + +两后端、三场景、两端各重复三次,共 36 条件、60 个独验工作 Turn;每场景产物相同, +每 Turn 三回执 committed,含重放只扣一次。654 次父/完成 child 来源观察与 +640,896 次模块观察均匹配所属端,测量期间产品摘要不变。父 RPC 已含 child,不再 +重复相加。whole 包含已完成的准备工作,current 排除它但保留 compaction hook; +计入工具输出、全部必需读取、Host 执行、写回、扣额、回读和 lease 释放。下表均为 +三次中位数,单位 B,main → 候选: + +| Provider / scenario | Whole stdout B | Current stdout B | RPCs | Framed RPC B | Python fixture read B | Python fixture write B | +| --- | ---: | ---: | ---: | ---: | ---: | ---: | +| file / cold | 57,597 → 45,996 | 57,597 → 45,996 | 423 → 288 | 2,938,704 → 1,929,733 | 720,046 → 662,664 | 302,925 → 272,952 | +| file / warm | 118,430 → 95,236 | 60,833 → 49,240 | 843 → 578 | 6,271,394 → 4,130,344 | 1,926,283 → 1,700,979 | 675,761 → 593,384 | +| file / recovery | 118,202 → 94,776 | 60,269 → 48,556 | 845 → 580 | 6,259,244 → 4,112,058 | 1,942,194 → 1,715,504 | 656,353 → 573,186 | +| sqlite / cold | 58,016 → 46,112 | 58,016 → 46,112 | 423 → 288 | 2,943,792 → 1,932,217 | 737,286 → 677,202 | 304,783 → 275,281 | +| sqlite / warm | 119,272 → 95,472 | 61,256 → 49,360 | 843 → 578 | 6,281,728 → 4,136,666 | 1,965,207 → 1,734,459 | 679,477 → 598,310 | +| sqlite / recovery | 119,040 → 95,008 | 60,688 → 48,672 | 845 → 580 | 6,269,816 → 4,117,784 | 1,981,156 → 1,748,980 | 660,103 → 577,919 | + +温态 whole stdout 少 19.58%/19.95%,RPC 少 31.44%,framed 字节少 +34.14%/34.15%,Python 夹具观测读写合计少约 11.8%;current stdout 少 +19.06%/19.42%。这是累计 C1 对照,不把全部下降归给此小集成修复。温态 wire 范围 +为 file: main 6,271,290–6,271,572; candidate 4,130,308–4,130,664; sqlite: main 6,281,492–6,281,936; candidate 4,136,236–4,136,704。不声明统计显著性。 + +主指标以生产者原始完整 `decision.json` 为 F,不能用已经投影的 recovery 文档代替。 +60 组生产者/BODY 均核对原 Turn、控制及公布的 recovery/selected 摘要: + +| Provider / scenario | Main producer F → BODY B (reduction) | Candidate producer F → BODY B (reduction) | +| --- | ---: | ---: | +| file / cold | 60,084 → 27,993 (53.41%) | 53,873 → 27,291 (49.34%) | +| file / warm | 75,126 → 28,022 (62.70%) | 61,271 → 27,230 (55.56%) | +| file / recovery | 75,342 → 28,135 (62.66%) | 61,465 → 27,376 (55.46%) | +| sqlite / cold | 60,310 → 28,201 (53.24%) | 54,091 → 27,436 (49.28%) | +| sqlite / warm | 75,352 → 28,195 (62.58%) | 61,491 → 27,434 (55.39%) | +| sqlite / recovery | 75,568 → 28,319 (62.53%) | 61,683 → 27,530 (55.37%) | + +候选温态 BODY 的绝对字节更少,缩减百分比却较低,因为它的完整生产来源也更小; +两种比率都不能替代完整调用对照。文件差分不证明模型保留。本 cohort 观测到的 RPC +引用快照 payload 为零;provider/native/SQLite page 及完整进程 IO 仍未测。CPU/延迟、 +真实模型输入/缓存/生成输出、费用、自然采用和长程净收益仍未资格化。旧正负 cohort、 +冻结预算及原成果要求保留其版本;源码/打包结果不等于 merge readiness 或完整 C1 验收。 + +### 可执行必读义务与原生 runner 的体积归因 + +当前完整来源在既有 interaction owner 旁通过 `assertInteractionRequiredReads` 校验 +显式可执行的必读义务。声明 command 或 ordering 的读取必须保留非空、无 NUL 的命令; +显式顺序必须是已注册的 `before_work`。纯文字义务、未知支持元数据、带引号的中文路径 +以及历史省略的 ordering 保持原样。合法未读义务仍待执行;这项校验不补造已读确认, +也不增加全部材料先读完的通用门。 + +| 改变的边界 | 实际 owner/调用方变化 | +| --- | --- | +| 可执行读取语义 | 一个 TypeScript interaction validator,由既有完整来源 validator 调用一次;quota、managed preview、planning 与 Host 沿原调用进入,不增加 Python 规则或 RPC。 | +| 不支持的直接完整来源 | Python 运输保留显式 `contract_binding`,包括未知版本,交 typed planning reader 拒绝,不尝试旧 adapter。 | +| 验证调用方 | 将过期 CLI 故障注入从已删除的 envelope builder 移到实际完整 composition;保留显式历史版本负例。采用真实 canonical hard-lease inventory 和实际产物工作区,代替伪造准入或偶然的 Git checkout 发现。 | + +在未改的 `f1614358ac13` 上,新增八个 File/SQLite quota/managed 拒绝用例失败,八个 +既有合法/未知动作对照通过。共同规则无需修改两个调用方即可到达两入口。首版实现 +误拒一个合法纯文字义务,由原有完整原文测试发现;修正实现而不删除该断言。另一组 +真实 Turn CLI 在 Host 启动或扣额前验证未知版本/codec 和摘要正确但顺序不支持的 +读取。这是一项有界语义规则变更,不代表独立评审或模型遵从。Registry hook 准入及 +原版本 reader 保留各自 owner;新增注册顺序仍须该协议自身的评审。 + +整合 main `92294e7245cb` 后,最终八个完整 Python 模块在源码及实际隔离 wheel 均 +196 项通过;1,897 个打包来源文件逐字匹配,325 个完成进程及 103,615 次 Core 来源 +观察无 checkout 污染,突然退出不在退出审计范围。六个相关 TypeScript 模块 121 项 +通过,完整 control-plane +类型检查和变更文件 Ruff 通过。之前源码 178 过/7 败及 wheel 168 过/17 败均保留。 +修正保留原断言:六处过期 constructor 注入改为实际 composition;frontier fixture +使用 canonical authority;wheel 明确复制测试 helper,写回指定真实产物工作区。 +仓库 worker 脚本仍是显式测试调用方;来源审计资格针对打包 Core,不代表独立 scheduler +已经安装。正常重建 bundle 后打包,没有安装候选。 + +之前 20,533 字符的 premerge 失败,现在于不可变 main `bd79adc64968` 与候选 +`f1614358ac13` 上取得匹配的原生 runner 反例。固定同一父目录,直接输出为 20,333, +原生 runner 为 20,501:隔离目录在八处 fixture 根引用中各增加 21 字符,共 168。 +原 premerge 布局再增加四字符目录,两版本均为 20,533。只替换所属 fixture 根和 +观测时间后,payload 事实一致。实测仍以原 20,500 上限运行全部原断言,没有缩短路径 +或输出;这项字符预算诊断与完整 capture 到 BODY 的 UTF-8 主指标分开。 + +[既有 fixture 预算提案](https://github.com/loopx-project/loopx/pull/8069) 负责该独立问题。 +这里不校准、不 skip、不豁免;原失败仍失败。前述完整成本 cohort 保持各自精确版本, +不改称新增校验后的实测。CPU、模型用量、自然采用和长程净收益仍未知。 + +旧 constructor 的树内调用仍是显式 composition 与 model-behavior 验证 fixture。 +原版本 journal/recovery reader 仍需核清已接纳工作和支持窗口;不为增加退役数量而 +删除。本切片不退役这些 reader,也不关闭整体 C1 验收。 + +### 最新 main 的匹配 hard-lease 对照 + +另一次独立重复固定 main `92294e7245cb` 与候选 `b3b3b232724d`,纳入上面的可执行 +读取校验。原编号 Task、fixture、observer、共同 Python 和 cold/warm/压缩恢复协议 +均保持原样。每个 arm/provider 三次重复,共 36 条件、60 个工作 Turn。每端 1,914 个 +产品源码摘要未变;654 个父/完成 child 和 640,896 次 Core 来源观察均匹配原版本。 +完整原 Task 出现在每次实际消费的读取正文中;每 Turn 保留原身份、三份 committed +回执和一次扣额,同场景交付同一合格产物。这是工程资格,没有调用模型或安装 App 候选。 + +完整流程计入已完成的准备 Turn、所有必读、原生 Host 准备、适用的压缩 hook、写回、 +扣额、重放/读回和 lease 释放。父指标已含 child;当前步骤列只排除已完成的准备工作。 +以下为三次中位数: + +| Provider/场景 | 完整 stdout B | 当前 stdout B | RPC 次数 | Framed RPC B | Python fixture 读 B | Python fixture 写 B | +| --- | ---: | ---: | ---: | ---: | ---: | ---: | +| file/cold | 57,221 → 45,732 | 57,221 → 45,732 | 423 → 288 | 2,930,378 → 1,924,529 | 715,582 → 658,504 | 301,509 → 271,509 | +| file/warm | 117,662 → 94,692 | 60,441 → 48,960 | 843 → 578 | 6,254,008 → 4,120,060 | 1,916,435 → 1,691,969 | 672,788 → 590,508 | +| file/recovery | 117,450 → 94,248 | 59,893 → 48,292 | 845 → 580 | 6,241,950 → 4,101,350 | 1,932,262 → 1,706,384 | 653,451 → 570,267 | +| sqlite/cold | 57,640 → 45,848 | 57,640 → 45,848 | 423 → 288 | 2,935,504 → 1,927,053 | 732,814 → 673,042 | 303,374 → 273,849 | +| sqlite/warm | 118,504 → 94,928 | 60,864 → 49,080 | 843 → 578 | 6,264,426 → 4,125,624 | 1,955,379 → 1,725,427 | 676,528 → 595,288 | +| sqlite/recovery | 118,288 → 94,480 | 60,312 → 48,408 | 845 → 580 | 6,252,476 → 4,107,176 | 1,971,260 → 1,739,860 | 657,195 → 575,088 | + +温态完整 stdout 减少 19.52%/19.89%,RPC 减少 31.44%,framed 字节减少 +34.12%/34.14%,观测到的 Python fixture 读写合计减少 11.85%/11.82%;当前步骤 +stdout 减少 19.00%/19.36%。温态 framed 范围:File main 6,253,744–6,254,276, +候选 4,119,902–4,120,628;SQLite main 6,264,262–6,264,682,候选 +4,125,580–4,125,850。不推断统计显著性。实际温态请求包括 +`quota.turn_envelope.evaluate` 20 → 10、`todo.context.page` 178 → 62、capability +hook 校验 8 → 4;这些属于累计 C1 差异,不能全部归因给新增必读 validator。 + +主指标仍为同一次生产者完整 capture F → 所选 BODY。60 组逐一核对公布的原生产者 +capture 摘要、recovery/所选正文摘要、原身份和控制事实: + +| Provider/场景 | Main F → BODY B(缩减率) | 候选 F → BODY B(缩减率) | +| --- | ---: | ---: | +| file/cold | 59,828 → 27,845(53.46%) | 53,649 → 27,120(49.45%) | +| file/warm | 74,870 → 27,797(62.87%) | 61,049 → 27,072(55.66%) | +| file/recovery | 75,086 → 27,921(62.81%) | 61,241 → 27,194(55.60%) | +| sqlite/cold | 60,054 → 28,062(53.27%) | 53,867 → 27,274(49.37%) | +| sqlite/warm | 75,096 → 28,003(62.71%) | 61,267 → 27,274(55.49%) | +| sqlite/recovery | 75,316 → 28,131(62.65%) | 61,459 → 27,403(55.41%) | + +候选 BODY 绝对值更小,缩减率更低,因为完整来源也更小。文件 delta 不证明模型保留。 +新 cohort 支持“同一合成产物下测得的工程开销更低”,不替换旧 cohort,也不证明模型 +生成输出、cached/uncached 输入、费用、native provider/SQLite page/完整进程 IO、 +CPU、延迟、自然采用或长程收益。原体积失败、历史 reader 义务及完整 C1 验收仍开放; +本次测量更新不改变门、默认、评分或运行时行为。 + +### 过渡期 journal 的恢复入口 + +canonical resume loader 原先只对当前 v1 plan 校验完整来源。已记录的 v0 plan +即使带有 `work_contract`,仍走原始 legacy 身份分支;writer、普通 inspection +和 settlement lookup 已会拒绝被改动的来源。执行路径仍在下游拒绝它,因此这是恢复 +入口不一致,不能据此声称 Host 越权启动或扣额。显式 retry inspection 同样返回 +blocked 观察,而非 v1 的入口错误。 + +loader 现在把所有显式完整来源交给既有 `turn_host_lineage`/TypeScript source +owner,包含已记录过渡格式的 source/adapter 交叉校验。当前 v1 加载本就使用该调用; +过渡格式增加这次调用,不宣称普通路径 RPC 节省。没有完整来源的历史 plan 仍保留原始 +身份精确比较和原字节。plan 加载不新增整个 journal 的 settlement 一致性门,相关 +诊断仍归既有 recovery inspection;普通坏 journal inspection 继续返回结构化 blocked +观察。 + +既有 File/SQLite journal 矩阵补入 loader 对内容改动、未知版本、null/缺失 binding、 +冲突 adapter 及已重签名 interaction/action/reference 改动的拒绝。数值来源、当前 +版本缺源拒绝、纯历史格式加载及字节保留继续作为控制。公开 +`run-once --resume-turn-key` 与显式 retry-inspection 入口验证相同来源拒绝,不改写历史 +或扣额。冻结的修复前 loader 在两个 provider 的过渡格式用例均失败;修正 CLI fixture +遗漏的必填 project 参数后,显式 retry inspection 的两个过渡用例也失败,两个当前 +plan 控制通过。这些是分别记录的产品与 harness 问题,不是六个产品缺陷。 + +整合前的恢复 cohort 在源码和隔离实际 wheel 中均有 139 个用例通过。整合 main +`2852eb453bef` 时保留完整原生交接、两侧 lifecycle 断言及共享 TypeScript import; +随后源码 81 个、TypeScript 178 个用例通过。被中断的源码/wheel 尝试没有终态结果, +不计作通过。 + +整合后的 wheel 首次有 67 个用例通过、14 个 settlement 用例失败:其子进程默认在 +源码 checkout 工作,恰好借用了该目录的 workspace 资格,离开 checkout 安装后便无法 +验证。诊断 observer 确认实际 workspace 拒绝。既有测试现显式使用各自的真实产物 +project,全部原断言、坏 workspace 负例和 once-only 恢复控制保留;完整受影响模块在 +源码及字节未变的安装 wheel 中各有 23 个用例通过,另 58 个未改用例已在前一 wheel +cohort 通过。这覆盖跨 cohort 的 81 个独立用例,并非一次未中断的最终 81 用例运行。 +1,898 个打包源文件逐字一致;最终 23 用例 wheel 运行观察到 125 个完成进程、64,109 +次 Core 模块来源,无 checkout 污染。突然退出仍不在退出审计范围;旧失败继续保留。 + +本次修复实际仍受支持的恢复 consumer,不为退役数量删除 reader。legacy constructor +只剩前述具名历史/composition/model-behavior fixture;原未结工作、支持恢复窗口、 +独立审阅及完整 C1 验收继续约束退役和采用。前述成本 cohort 仍固定于原 main/候选 +快照,本次完整性修复没有重新测量该 cohort。 + +## 较早的集成证据 + +集成保留 main 已抽取的 quota-presentation owner 与稀疏原生 journal 运输。 +候选中的重复数值 collector/validator 由既有实现替代。验收、summary lane、 +authoring 和 Vision 共享既有来源身份及编辑 owner;普通 JSON 相等不能证明跨 +Python/JavaScript 边界的原数值身份。正文大小判断仍比较序列化正文,不比较身份 framing。 + +独立的 24 项 Python 到 TypeScript 回归先得到 16 项失败、8 项对照通过。修复身份/编辑 +后 24 项全部通过,覆盖整数形浮点、带符号零、不安全整数、稍后的精确 authoring owner +及相同 audit 对照。扩大集成验证最初还暴露旧 fixture 的 hash 引用和一项 authoring +缺失的 CLI 用例;这些失败保留为证据,须另行完成修正后的验证。这是来源/运输证据, +不证明 installed 采用、模型验收成果或完整成本资格。 + +2026-11-01 的 heartbeat 消费切片(`18b55e04d`)让 captured native Goal 输入 +复用既有 heartbeat 规则 owner 的路由、安全与完整工作指引。新生成的 on/off +提示共享这段文案;历史保存正文不重写。逐条复核保留 actor、权限、必读来源、 +原始/累计成果要求、顺序、证据、接续与停止条件。删除的是独立维护的文案副本, +没有新增决定或结算 owner,也不改变激活默认值或协议。 + +在同一 CLI 调用方、320 字符 scope、显式 CLI 和五项能力参数下,仅替换成冻结 +`958eef4c` renderer 得到未绑定/绑定正文 5,041/5,080 个归一化字符;候选为 +4,859/4,898,满足原 4,900 限额。两种候选正文均少 180 UTF-8 字节;更长路径 +负例仍以 5,051/5,090 超限。Captured native Goal 正文反而从 3,187 增至 3,235 +字符,仍低于原 4,000 宿主硬限。这些是生成输入的测量,不是整份 base 仓库 +重跑、control packet 压缩、模型采用、token 节省或成果收益。 + +在该检查点,消费检查有 114 项提示/平台用例通过、1 项平台跳过,以及 12 项真实隔离 +File/SQLite CLI 最终输入/恢复用例通过,宿主 executable 为合成实现。 +输出/差分矩阵仍有 5 项失败:完整 quota +Markdown 30,462>10,000,拥挤 plan 24,044/27,508>22,500,完整 alias +24,252>13,000,另一个 multi-agent probe 25,933>13,000;其余 219 项通过、 +1 项跳过。预算和样本规模均不放宽,新文案不继承历史 restoration 展示豁免。 +C1 切换、剩余 reader 及原 quota 单会话成果/完整成本对照继续开放。 + +后续 Markdown 切片(`b852af5f7`,集成目标 main `035f7ac66`)在普通 quota +和 alias 共用的完整 Turn renderer 中移除嵌套 pretty-print 缩进。每个根字段 +独占一行;全部嵌套值、来源条款和 binding 仍保存在同一个可解析 JSON 区块。 +JSON 输出、capture、原生宿主输入、legacy 展示及决定/结算 owner 均未改变。 +与冻结 `f3ae16362` renderer 的同源对照计入 stdout 最后一个换行: + +| 合成来源 | 原 Markdown 字节 | 当前 Markdown 字节 | 减少字节 | 完整 JSON 字节 | +| --- | ---: | ---: | ---: | ---: | +| Small | 30,462 | 24,531 | 5,931 | 24,252 | +| Crowded | 47,237 | 37,846 | 9,391 | 37,555 | +| Crowded with Vision | 55,893 | 45,249 | 10,644 | 44,954 | + +行数从 860/1,214/1,361 降为 69/72/73。Markdown 仍比对应的完整 compact +JSON 多 279/291/295 字节;减少的是展示缩进,不是语义 control packet 内容。 +完整来源模块 63 项通过,覆盖未知事实、整数形浮点、带符号零、不安全整数及 +转义指令原文;集成的有界 reader buffer 检查 2 项通过。输出/差分矩阵仍为 +219 项通过、5 项失败、1 项跳过:small Markdown 当前为 24,531>10,000, +另四项失败保留上一检查点的大小和门槛。历史失败仍是失败,未改变上限、 +fixture 规模或要求;不据此认证模型、费用、安装采用或长程收益。 + +可选 Host 切片(`8316c9fa5`,随后集成目标 main `5a9c0a612`)让 Ark、MemT +的工具身份通过 `extensions.turn_host.extract_turn_work_identity` 读取既有完整 +dispatch owner。完整输入复用 selected-work owner,包含 adaptive 主任务;历史 +输入保留 provider 原始声明值及严格 string/NUL 检查。Session lineage 保持原有 +归一化方式。Fresh context、来源/投影完整性及 MemT 精确 Goal 生命周期拒绝门 +均保留。本次退出两个 provider 自行解码身份的调用点;DSH、native-child、steward、 +session-recovery 的兼容 reader 和 executor 的 v0 运输仍未退出。 + +MemT 候选校验现在保留原请求与完整来源。真实候选转换完成后再使来源失效,原本 +仍被该本地检查接受的结果现在会被拒绝;这不证明外层 Core 结算此前会接受它。 +实际 CLI 输入仍没有已准入的 MemT 生命周期,不能打开记忆;converter 测试没有 +补造该身份。SDK 用例使用隔离合成协议对端,不运行 GPU 或模型服务。 + +同源对照在冻结 `46bdaddb3` 与候选上调用真实 Ark 身份消费函数,输入是完全相同的 +合成 File/SQLite CLI 请求: + +| 成本观察 | 原实现 | 候选 | +| --- | ---: | ---: | +| 每个请求的身份检查 RPC | 1 | 1 | +| Canonical JSON 参数字节,File/SQLite | 41,286/41,338 | 未改变 | +| Canonical JSON 返回字节 | 211 | 324 | +| 为读取身份进行的完整来源深拷贝 | 1 | 0 | + +省去的拷贝来源为 28,432/28,458 canonical JSON 字节;这是来源大小代理,不是 +内存分配测量。全部 dispatch-context 返回现在携带三个身份事实,其他调用方也 +多付 113 字节。模型提示经 digest 核对仍逐字节相同,为 33,020/33,046 字节。 +上述数字不含 RPC framing,不认证延迟、模型净收益、token、费用或长程收益; +完整 packet 压缩没有变化。 + +Ark/MemT 基线分别 39/37 项通过,修复后 41/43 项通过。新增用例先在两个 +provider 的身份 decoder 及 MemT 失效来源接受行为上失败。Core capture/Host +检查 58 项通过,包含 File/SQLite 真实 CLI 输入、adaptive 身份、历史原始值及 +禁止回退的拒绝路径。集成 main 后,envelope/interaction/conversation owner +的 TypeScript 用例 122 项通过。Native steward fixture 最初有 10 项启动失败, +因为继承的会话 provider 环境覆盖未被合成对端回显;只在测试子进程移除该覆盖后 +10 项通过,未改变用户配置或生产 provider 检查。首轮失败保留为测试环境证据, +不算通过。初始断言曾把完整输入的 adaptive 选择强加给历史 provider +解码,已修正这两项失败并保留记录。扩大本地矩阵暴露 6 项 context-delivery、 +2 项 driver-profile 失败;冻结 `46bdaddb3` 可复现全部 8 项,原有 5 项输出预算失败 +也继续保留,均不算资格通过。C1 仍需解决这些交付缺口、supported reader 退出、 +打包/安装资格及原 quota 成果/完整成本对照。两个可选包须使用同一份已集成的 +Core 源码;版本下限不能证明已发布旧 wheel 含有所需接缝。 + +随包 DSH 后续切片(`e838e7594`)集成目标 main `8ac384cdc`,让完整输入的 Session/工具身份 +复用同一次已校验的 selected-work 事实。此前完整契约的 adaptive 工作可能选择另一 +主 Todo,DSH 却仍把工具和可复用会话绑定到旧声明 Todo。既有 dispatch 检查现在 +仅为本次调用保留已经返回的私有身份事实,DSH 两处绑定复用它,不增加 RPC;该 +元数据不进入最终模型输入。两个历史 DSH decoder 合并为一个 raw-value adapter, +保留 false-like 转换、组件位置、Goal-instance hash 和 fresh-iteration hash。 +它只用于未携带 `work_contract` 的历史请求,待原版本恢复窗口对账后退出;已提供 +但无效的完整契约不会回退。 + +冻结 `ae8ee460a` 与候选使用同四份真实 File/SQLite CLI plan 生成的合成输入, +通过实际 DSH adapter 对照普通与 adaptive 工作。每份仍只有一次 dispatch RPC, +canonical 参数/返回 JSON 大小均未改变;最终提示经 digest 核对逐字节相同: + +| 来源 | 普通提示字节 | Adaptive 提示字节 | 内部 authority JSON 增加字节 | +| --- | ---: | ---: | ---: | +| File | 32,377 | 32,517 | 114/115 | +| SQLite | 32,425 | 32,565 | 114/115 | + +最后一列是 Python 对象 JSON 大小代理,不是内存分配或 wire 流量。普通会话/工具 +身份保持相同;adaptive 绑定有意从旧 Todo 改为当前所选主 Todo。探针未改状态、 +未扣额;它验证该 caller 修正,不认证 packet 压缩、延迟、模型费用或同等成果/ +完整成本收益。 + +新增回归先得到 4 项 adaptive 失败、7 项对照通过,随后 DSH 与完整来源组合有 +367 项通过;另加 2 项真实 File/SQLite CLI 用例,经过随包 DSH runner、独立 +校验、已提交写回及重放,runner 调用与扣额均只有一次。Provider 为合成实现。 +可选 Ark/MemT 用例针对当前 Core 分别有 44/65 项通过。MemT 最初缺少已固定的 +client;仅在隔离测试 overlay 安装该 client 后,5 项 CLI 用例仍从任务工作目录 +导入旧 installed Core。子进程 import 探针复现缺失接缝,显式绑定测试子进程的 +Python 源路径后这 5 项通过,未改变产品或用户配置;两次初始失败均保留。 +切片复用既有 CLI/Chat Host owner,不增加能力、设置、用户步骤或激活默认值; +未认证实际 SDK 服务或 installed Host 采用。Native-child、steward 等历史消费者、 +原 5 项输出预算门、8 项扩大矩阵失败,以及 C1 的原 quota 验收继续开放。 + +Native-child 元数据后续切片(`3d58796d7`)集成目标 main `07149df68`。请求构造、持久 Host +attempt 及两种 Codex transport 调用的 `configured_native_child_limit`,在存在 +`work_contract` 时改读原始完整 interaction context;只有历史请求读取 v0 +context。既有整数 decoder、完整来源校验、launch fence 和原生 receipt 准入 +不变;这是本地运输读取,不是第二个 authority 或新默认值。共享来源校验原本就会 +拒绝不一致的投影,不能据此认定此前放行过错误子任务。v0 envelope 仍保留用于 +签名兼容数据,其整体运输尚未退出。 + +新增 on/off 回归先因读取历史字段失败。真实子进程与持久读回保留启用时的观测、 +关闭时的隔离、父任务结果和私有正文排除;损坏完整输入在第二次进程或 receipt +之前被拒绝。首轮扩大验证有 195 项通过,两个新 fixture 被完整 Goal 来源门拒绝; +补齐 fixture 的真实文件及完整 revision 后修正的是夹具,产品门禁未改。 +修正后的 native-child 模块 38 项通过;相同三个模块的最终完整重跑 197 项通过, +用时 149.37 秒。Owned operation Host 模块 34 项通过, +两个明确要求真实模型 opt-in 的资格用例跳过,没有启动 live Host。 + +冻结集成 `5d9dbb811` 与候选的八份固定请求,来自前述真实 File/SQLite +普通/adaptive CLI fixture,并通过既有 owner 重组加入合成 on/off capability +context。元数据读取仍为零 RPC,完整输入准备仍为一次 RPC。全部配对的请求 +字节(40,202–40,778)、提示字节(30,744–31,030)、schema 摘要及 canonical +参数/返回大小都相同。这不是 packet 缩减、延迟、内存分配、账单或完整 Host +成本测量。原 5 项输出预算门、8 项扩大矩阵失败、其他 consumer/writer 迁移及 +原 quota 成果/完整成本验收继续开放,历史失败保留。 + +后续在源码 `d1046499a` 完整复跑 `test_context_delivery_cli` 与 +`test_loopx_turn_driver` 两个模块,得到 253 项通过,仅两个 profile alias 用例 +失败。实际 CLI 返回先因 capture 缺少 Turn 身份拒绝请求,测试才无法读取 +`scheduler_hint`;这不能证明调度策略失败。现为 fixture 提供原始 Turn,两个 +alias 分别验证显式 delivery off 与 native delivery on。开启用例沿声明的原始 +capture reader 连续读取 UTF-8 页,保留全部调度断言,并验证只有一次 admission、 +恢复后没有 spend、Goal 与事件账本字节不变。 + +相同两个完整模块随后 257 项通过,用时 118.43 秒,无跳过或错误;聚焦的四项 +矩阵也通过。本次增量仅修改测试,不引入生产设置、默认值、caller 协议或运行时 +行为。原六项 context-delivery 失败保留为历史负例,本次未重新归因其逐项原因。 +原五项输出预算门、其他实际 consumer/writer 迁移、supported reader 退出及原 +quota 成果/完整成本资格继续开放。源码用例通过不证明 installed Host 采用, +也不证明 packet 体积、模型保留上下文或净成本收益。 + +后续 plan 切片仅在 `build_loopx_turn_plan` 收到完整契约时删除重复的 +`consumer_version` RPC。既有 `driver_lineage` 已调用同一 TypeScript 版本、 +完整性、source/projection 和 selected-work owner;历史输入仍保留独立版本诊断。 +不增加校验实现、跨调用缓存、字段、协议版本、激活默认值或权限。 + +八份固定输入来自真实隔离 File/SQLite CLI plan,覆盖完整/历史来源及 +fresh/resume 会话策略。相对冻结 `0cd09b46c`,最终 plan、Host 请求、Codex +提示和 schema 全部逐字节相同。完整 plan 的 RPC 从两次变为一次,测量的 +plan/request/prompt/schema 序列从三次变为两次;规范 RPC 参数加返回 JSON +在 File 下为 92,598→81,554B,SQLite 下为 92,838→81,752B,分别少 +11,044/11,086B(11.93%/11.94%)。历史对照仍为三次且字节完全相同。 +四份完整模型输入都保留完整原契约和 fixture Goal;探针未扣额或调用模型。 +CSV、SQLite 整数合计和 Decimal 比率独立复核八组对照一致。 + +六项 plan 矩阵先有五项重复调用失败、一项历史对照通过,修改后六项通过。 +不支持的 adapter 版本、改动的来源正文、自洽重签却替换原动作的 adapter、显式 +null 完整契约仍经同一 owner 拒绝。这只是运输组件成本,不含 framing、延迟、 +内存分配、模型用量和成果;最终模型输入没有缩减。五项原输出预算门、原 quota +单会话对照和完整 C1 资格继续开放,不能把本次缩减与不同分母的物理包或选择 +读取数字直接相加。 + +完整 Turn driver、原生 Codex CLI 和完整来源三个模块有 334 项通过,耗时 +202.77 秒,无跳过或错误,包含真实 File/SQLite 交付、验证、失败 attempt +恢复和原 Turn 结算;未启动 live Host。这验证有界源码切片,不结清其余 C1 +cutover,也不产生新的精确 head merge-readiness 回执。 + +后续 Host 运输修复保留显式提供的 `work_contract`,即便它不是对象。请求构建与原 +capture 发布此前会丢弃这些值,使原生提示和共享 Host reader 将其解释成历史缺省。 +两处运输现在保留原值,交既有 TypeScript 完整来源校验器拒绝;真正未提供的历史 +请求仍用旧 reader。不新增平行校验器或字段。普通 executor 更早的来源检查仍在, +本次证据不表明外层结算可被绕过。 + +冻结 `42b842f93` 上,纠正后的 18 项矩阵有十项未拒绝失败、八项对照通过;修复后 +18 项全部通过。覆盖两处运输、缺省/有效、null、false、零、列表、文本、空对象和 +完整性错误,核原生/共享 reader 拒绝且 DSH runner 未加载。最初另有两项对照因 +Goal 尚未完整读取而被正确拒绝;实际交付完整合成 Goal 后修正夹具,不放宽该校验。 +八份固定 File/SQLite fresh/resume 输入的 plan、请求、提示、schema 仍逐字节 +相同,RPC 次数和参数/返回字节也不变。这是兼容边界资格,不是新的压缩或净成本 +结果;原五项输出失败和完整 C1 验收继续开放。 + +扩大六模块运行最初为 522 过、六项 Host-context 在 dispatch 前失败;冻结 +`42b842f93` 重现相同六项。独立子进程 import 探针发现,cwd 为一次性 Goal 时 +实际导入另一份已安装 Core。夹具现为子进程绑定并核对当前 checkout,且为历史 +直接正文对照显式选择 delivery off。完整 Host-context 模块八项通过,产品文件 +未变的另五模块保留 520 项通过;合并为 528 个不同的通过 case,来自上述两次 +运行,不冒称最终一次六模块全过。原失败保留;未改变已安装 Core 或用户设置。 + +受管 Session 的独立验收 reader 现在复用同一个完整来源 owner。准备阶段复用 +dispatch 在本次调用内刚核过的身份;模型工作后,回调在运行原独立 argv 前核验 +当前完整来源。显式非法契约不能进入历史 decoder;真正缺省保留旧选择与诊断。 +argv 前后的 canonical 声明复核、原 actor 准入、lease 和一次性结算仍由原 owner +负责。 + +冻结 `bd2ea9c58` 上,两次基线运行覆盖的八项中,File/SQLite 的四项来源改动/ +置空反例仍错误执行独立 argv,四项正常/历史对照通过;修复后一次运行八项全过。 +故障注入实际模型后回调边界;原生 Session、canonical Task、独立 argv 与结算 +保持真实,仅模型/provider 为合成夹具。更早六项启动失败来自继承的 provider +override;共享合成夹具现隔离该环境值,不改变已安装设置。这验证回调边界, +不表明外层结算可被绕过。 + +原生夹具的同来源对照替换冻结基线方法,依赖和验收命令保持原样。准备阶段没有 +新增 Turn-envelope RPC;模型后验收增加一次,File/SQLite 的规范参数加返回 +JSON 为 42,911/42,959B。另八份固定 CLI 来源对照中,完整输入为 +36,320/36,404B,历史输入没有新增 RPC;两组分母分开。均不含 framing、延迟、 +分配、canonical Task 读取、argv、模型用量及恢复;额外基线 argv 仅对一次性夹具 +做只读验证,不是生产重放。这是来源拒绝带来的组件成本增加,不是压缩或完整净 +收益结论。原五项输出失败、剩余 C1 reader 及原 quota 单会话成果/完整成本验收 +继续开放。 + +`9baa678db` 上的扩大运行完成五个原生/管家/日历模块,共359项通过;第六个 +私聊模块在56过/37项相同provider启动失败后主动停止。这是未完成运行,不能称为 +六模块全过;无名中断记录不计测试。同源码移除环境override的两项控制通过,随后 +仅隔离ordinary合成夹具,原环境下同两项也通过。生产provider检查与安装配置不变。 + +随后集成目标main `8a9e11628`,在`4cdf977c3`适配其新增的另一处显式夹具调用; +运行时修复仍为`a49625e3a`。该集成源码的原生验收/普通会话完整模块68项通过, +335.058秒;私聊/Antigravity完整模块316项通过,644.420秒。两次运行合计384个 +不同的通过case,不是一次新的六模块全跑。共享conversation-binding TypeScript +45项通过。最终检查没有跳过或错误;原失败与组件测量保留各自源码版本。这次集成 +未重测完整成本,也不认证C1切换。 + +以下区块保存本次集成从规范 RFC 移出的候选叙述。测量、提议和现在时陈述属于各自原 +检查点,不是对本次集成源码的新结论。当前行为以规范 RFC 和具名 owner 为准。尤其不能 +由已退出的 scope 原型恢复强制模型阅读计划。既有负结果、原 quota 对照与 reader 退出 +要求继续有效。目录内其他日期条目保持自身来源,不因这次迁移而被改写。 + +## 历史候选区块 1 + +下述按 Agent 范围交付的实现与测量仍是未合并的 C1 集成检查点,不代表默认安装行为。 +已交付的验收材料切片与按候选决策阶段交付的提案在后文分别说明。 + +冷态交付默认展开当前 Agent 的成果。其他 Agent 的独立成果保留可发现索引,包含 +身份、owner、目标、revision、工作关联、未满足要求标识、当前 review/check 状态及 +精确 capture 正文引用。全局 Goal 意图、共同要求、权限与停止条件始终进入必读输入。 +跨 Agent 依赖、共同验收,以及影响当前决策的阻塞或矛盾证据,须在相关决策前自动 +展开,不受 owner 限制。Goal 级重规划和整体验收扩大到所有受影响成果;局部交付 +无需重读无关历史证据。Owner 只是默认范围,不是权限边界或充分的相关性判断。 +工作未绑定、关联未知或来源形状不受支持时,保持完整交付,直至既有 typed owner +能够证明较窄的必读范围。 + +Canonical 契约仍保留完整要求和证据。以现有同 capture 成果索引及 replan 分阶段 +reader 为起点,合并普通/replan/detail 管线;索引须补足当前决策事实,不能只有成果 +数量。必读范围保留要求全文,支持性来源和 review 细节通过绑定完整性、顺序明确的 +reader 按需交付;依赖该材料的决策须先读完它。当前结论、新鲜度与未满足要求仍 +内联,Agent review 不能变成独立检查。界面折叠本身不会减少模型输入;交付投影、 +required-read owner 与 host 恢复契约须一起迁移,已有 capture 保留原完整读取义务。 +正文缺失或保留情况不确定时,执行原 capture 支持的恢复,不能重新准入或假定已读。 +不能为字节目标缩短保留要求、裁剪声明来源或靠正文关键词推断相关性。 + +C2 须在相同冷态、已保留温态及上下文丢失来源上验证:默认自己工作、跨 Agent +依赖/约束、未绑定工作、同伴证据变化、广域 replan 和 Goal 验收。计入实际模型输入、 +分页及正文读取往返、恢复、延迟和完整成果成本;首屏变小不能抵消必要补读或漏掉 +约束的成本。这是拟议交付行为,替换与回滚完成资格验证前,仍以当前完整来源 reader +为准。 + +当前集成证据:[导航收敛检查点](2026-10-29-navigation-convergence.zh-CN.md)。 +[Journal 来源保真检查点](2026-10-29-journal-source-fidelity.zh-CN.md) +将可独立评审的持久化修复与尚未完成的数值 hash/上下文 codec 资格分开记录;既有 +hash 语义保持不变。 +后续[上下文来源保真检查点](2026-10-29-context-source-fidelity.zh-CN.md) +将通用冷态、差分和全量恢复修复拆为普通 #7661,C1 复用同一来源身份/修改 owner。 +组件传输缩减不证明 canonical hash、安装采用或原 quota 完整成本收益;历史 hash +语义仍保持。 + +当前 C1 分支复用已合入 #7560 的 `outcome_context_navigation_v1` 和通用同 capture +`context-read --select`。注册关系建议读取顺序;归属不证明独立性,覆盖限制也不 +新增模型全文读取门。原完整要求、当前状态、全局约束和反证仍可从原 digest 绑定的 +capture 取得。 + +此前未发布的强制阅读计划、`outcome_context_projection_v0` wrapper、普通读取的 +专用成果 reader 和融合 native projection 操作均已退役。Staged replan 原本的 +decision 绑定验收引用仍归其 owner。Native IO 复用主干材料 planner 与精确恢复 +codec,在可选规划前先提交当前完整恢复引用。简单 native capture 因而恢复为两次 +owner 调用,而非原型的一次融合调用;旧调用数优化不构成当前资格。 + +已合入 [#7627](https://github.com/loopx-project/loopx/pull/7627) 提供文件优先交付及文件 +差分,无需强制模型全文读取。C1 沿既有 native owner 采用其评审后的精确实现,不再 +引入已退役的 scope 机制。实际安装采用、模型决定和验收成果/完整成本仍须分列。 +历史 capture 保留其原身份与受支持的恢复。 + +以下测量和测试对应已退役原型的精确检查点,作为历史证据保留,不代表当前导航/ +planner 集成的结果。 + +同一 24 成果/253 要求合成快照,以 61 组交替温态真实 provider owner 调用对照 +旧实现:File 中位数 5.890→6.317 ms,SQLite 为 2.239→2.521 ms;p95 分别为 +15.267→17.580 和 6.504→9.412 ms。原响应字段全等,计划元数据增加 405/415 个 +序列化字节。此对照仅隔离同一 TypeScript 进程的 acceptance owner,不含 bridge、 +CLI、冷启动或模型成本;此基础在 native 范围切换之前增加成本,不是效率提升。 +在范围切换检查点,native 展示还增加精确必读产物及既有 codec 之前的一次 typed owner 调用,必须与 +分页、补读和恢复成本一起计入;首包缩小不证明净收益。 + +native 切片通过 406 项真实入口 Python(五项显式 native/SDK 案例未资格)、169 项 +TypeScript 和四项真实 Codex `0.163.0-alpha.11.1` 静态 loopback 检查。后者核实际 +模型请求中的冷态全文、保留差分与同 capture 恢复字节,不证明自由生成模型行为。 +四个新增 File/SQLite 范围断言在 `1ac29089f` 失败。集成中发现的恢复引用回归已修复: +只为显式 scoped 产物替换 metadata,普通恢复保留原文件字节身份。 +中断回归最初因仍选中前次 capture 而失败;将当前恢复发布前移到可选 scope 调用之前 +后通过。在运行源码 `e1c69289a`,标准 premerge 有两项在 `8b37000b3` 同样复现的失败:既有 +`run_loopx_turn_once` 决策函数过大,以及前序 owner 收敛后 `turn_route` 的 producer +覆盖过期。本 native 增量未修改这些文件;历史结果不是通过或例外。集成已先 rebase +到 `b69021498`,再到 `f63647e2e`,保留目标主干的原生输出预算行为,并采用 [#7520](https://github.com/loopx-project/loopx/pull/7520) +对真实 TypeScript producer/scanner 的修复,并在 `fec9cd3af` 将原 capture 恢复从 +run-once 编排中分离,保留既有 capture owner 与 session 恢复。大小阈值不变。当前 +完整组合的资格归精确集成 head 的 PR 证据,不能沿用旧 native 切片的测试计数。 + +最终运行源码 `e1c69289a` 的成本含上述恢复发布顺序修复;对照不可变 `8b37000b3`(前序 C1 与相同 target-main 大页配置),24 成果/253 要求 +来源上,每侧三组温态 cohort、每 provider/阶段 21 样本。温态新增真实 typed 依赖并核 +先前未读正文的交付。File 冷态/温态/恢复的完整分页序列化输出为 +105,380/40,473/103,372→37,908/33,495/38,594 字节。延迟中位数: + +| 阶段 | File,原→新 ms | SQLite,原→新 ms | +| --- | ---: | ---: | +| 冷态全文输入 | 72.856→48.749 | 67.237→46.477 | +| 温态范围扩大 | 38.744→51.944 | 35.953→52.165 | +| 上下文丢失后全文恢复 | 109.126→61.425 | 109.725→56.777 | +| 索引加一项可选全文 | 96.918→108.557 | 92.460→109.251 | + +在该次测量版本中,新增 scope RPC 仍在,温态 bridge 调用由二增三;File 温态产物文件共 +131,020→160,192 个序列化字节。索引/详情仍为两调用,但增加派生展示重验;冷态和恢复由两页 +变一页。测量含温态 runtime 下 Python native 投影、分页与生命周期,未控制机器负载; +不含首次验收收集、进程启动、子进程 CPU、模型/缓存 tokens、账单、人工/实施及验收 +成果。冷态/恢复传输改善,温态及详情中位数退化;这不是原 quota 对照或完整成本正向结论。 + +在 `85c235d29`,native 调用方经同一批 owner 在一次请求中组合 scope 与编码,并删除 +未被使用的全文 wire 副本;原独立 scope operation 已退役,普通 codec 和 capture +详情 reader 保留。相对 `307d000a3`,使用相同冻结 File/SQLite 观察、每侧三组交错 +温态 cohort(每 provider/阶段 21 样本)测得: + +| 阶段 | File 中位/p95,原→新 ms | SQLite 中位/p95,原→新 ms | +| --- | --- | --- | +| 冷态全文输入 | 37.438/60.718→28.516/38.941 | 34.263/39.924→26.966/39.054 | +| 温态范围扩大 | 42.065/58.640→34.813/45.922 | 39.869/49.047→33.856/45.593 | + +计入分页生命周期观察,两阶段 bridge 调用均由三减二。File 冷态产物字节由 +162,877 降至 129,299,温态仍为 160,192;完整分页输出不变。六组同路径的 +普通/scoped/广域 File/SQLite 对照保留完整公开分页与恢复值,单调用回归断言在 +基线失败。温态请求流量降低,但响应 payload 增加 27 字节。详情/恢复调用数不变; +SQLite 详情 p95 在未改代码路径下由 138.131 退化到 175.541 ms。机器负载仍未控制, +前述成本排除项仍适用。这去除了已证明的局部传输/IO 成本,不闭合原 quota 的成果/ +完整成本缺口、短来源增长或全部温态产物开销。 + +小来源给出体积节省的反例:四个真实入口 File/SQLite 夹具各含两成果、四要求, +由 36,293–40,548 增至 37,948–42,203 字节,每项恰好增加 1,655 字节,索引和范围 +元数据超过短可选正文。提案不从大夹具推导语义省略规则或生产体积阈值。 + +同一 24 成果/253 要求的合成来源,按旧的仅数量索引形状渲染分配 8,190 字节, +staged 状态分组分配 18,979 字节,原 12 KiB 索引预算失败。保留这些当前决策事实, +据此将独立索引上限调整为 20 KiB;history、horizon、完整 envelope 与生产性能 +限额均不变。完全相同状态分组避免逐要求重复状态字段。这里只测序列化字节, +不是 token/延迟/成果收益或不可变 base/head 对照。上述源码范围检查和传输成本不证明 +一般语义独立性或匹配验收成果/完整成本收益。 + +## 历史候选区块 2 + +External scheduler 候选在读取节奏或唤醒许可前,通过 +`assert_complete_turn_decision` 复用现有 TypeScript 完整 reader owner 验证带版本输入。 +这是纯读取:不重组已捕获的 host binding,也不生成旧 executor 视图。缺失 binding、 +不支持的版本/必需语义、内容篡改和无效同 capture 引用均在 wake command 前拒绝。 +无版本普通 quota packet 暂保留原兼容路径,退役须核对受支持的已部署 worker。 +File/SQLite 源码 CLI 到 worker 验证使用本地子进程标记,不执行模型;这里只取得 +该输入边界资格,不代表 attached host 任务交付、结算或验收成果/完整成本收益。 + +可选 Ark adapter 复用同一宿主输入 owner 的 `extract_turn_authority`/ +`render_prompt`,无需在可选包里新增契约 builder。File/SQLite 的真实 +`turn plan --host generic-cli --iteration-context fresh` 已将完整请求送入 +真实 Ark SDK,并使用合成 HTTP transport 验证。检查对照实际 user-message +中的契约与原 CLI 来源,恢复持久化 running receipt 时不重新提交输入,重放完成 +结果时不再调用 provider;来源/版本/binding 被篡改或完整输入显式为 null 时,在调用 +provider 或创建 receipt 之前拒绝。Core 状态与记账保持不变,历史 Ark 请求和恢复 +测试继续保留。这验证了 SDK wire 边界,尚未验证实际云端 session、模型成果或 +Core 结算。Ark 与 MemT 现共用真实 File/SQLite CLI 请求夹具。MemT 在 provider IO +之前拒绝该完整输入,因为可执行的 legacy registry 不提供精确 `goal_ref`。 +现有 `source_session_v1` 虽有精确生命周期,但属于 lifecycle-only;真实通用 Turn +规划入口会在 capture 或执行前拒绝它。规划后补造引用会掩盖这一生产者/消费者缺口。 +完整输入损坏也会在 provider 或 receipt 创建前拒绝;历史 MemT SDK/snapshot 测试 +继续保留,但不能证明端到端完整输入送达。MemT 路径的所属边界修复须将可执行 registry +准入的精确生命周期沿共享 Turn 请求与恢复 owner 传递,并保留重建及旧实例拒绝。 +不能通过放松 MemT 隔离或启用 lifecycle-only profile 来绕过。这是已证实的采用缺口, +尚未取得原生记忆路径资格。operation-SDK 原生 runtime 与打包 App 采用也仍待验。 +内部 effect envelope 与历史请求 decoder +仍服务结算/结果/会话 caller;只有这些 caller 和未结 receipt 已采用替代契约后 +才能移除,不能仅因模型输入不再包含旧 envelope 就删除。 + +新请求的 Codex/DSH 共享 session lineage 已从完整契约读取,复用 TS 的 +完整输入校验与自适应主任务选择 owner。模型输入校验使用同一 owner,并拒绝完整 +输入与内部 effect adapter 的 Goal/Agent/Todo 不一致,即使两份摘要各自有效。 +完整路径不再重复调用 Python 的版本与签名校验;历史请求继续使用原 decoder, +持久化 session schema、路径与 scope 不变。File/SQLite 真实 CLI capture、失败恢复 +和一次结算重放通过;普通/自适应任务在 todo/agent scope 均能读回 Codex/DSH +原 session。相同夹具在迁移前基线保留合法路径通过,但新增身份冲突用例失败, +在候选通过。原生 operation SDK 环境仍有跳过,不能宣称其 runtime 已验证。 +会话身份迁移未移除全部结果资格与结算的内部 envelope caller,尚未达到完整退役 +或净成本收益结论。MemT 生命周期缺口仅阻塞 +其依赖路径,不阻塞这些独立迁移。 + +规划与失败重试的 session 查找现在传递原始完整契约,journal inspection 也复用 +同一身份 owner。缺省契约仍解码历史记录;显式 null 契约会拒绝。实时与缓存 vision +结果的归一化也复用该身份读取,不再从 effect adapter 重建 Goal/Agent。 +会话 scope/生命周期门与原生 app-server callback 仍由既有 owner 负责。 +本片移除这些仅用于读取身份的旧调用,尚未删除内部 adapter:执行路由、结果证据/ +profile 判定与结算仍须迁移。 +自适应恢复夹具在签名前构造:历史未验证选择仍按 primary Todo 写回;冲突的已验证 +任务来源在 host 执行和额度支出前拒绝。既有来源校验门保持有效。 +完成恢复验证读取原始持久完成及支出回执,不重新提交完成。四项过时的重复调用断言 +在前一基线同样失败;修正后的验收保留真实 File/SQLite 中后续任务文本变化和历史 +未带来源凭据但已经接受完成的恢复场景。 + +完成任务正文的解析现由既有 TypeScript interaction 来源 owner 统一负责。 +同一次粗粒度读取现在向 `run-once` 提供原始选定工作、正文摘要、已准入动作、replan +与写回条件。完整来源校验在本次调用内复用已核对的 effect 投影,不新增 RPC 或面向 +模型的契约。自适应 primary 与普通选择共用既有 interaction owner。CLI 不再从历史 +adapter 读取这组执行事实,仍传递该 adapter 供来源/签名校验及尚未迁移的消费者使用。 +缺省完整契约保留旧 journal decoder;显式 null 或无效来源不回退。Unicode/空白原始 +字节、缺失/重复来源拒绝、原结算身份及已接受完成回执恢复继续受保护。 +迁移前 `599cf1f72` 的 48 项 File/SQLite 捕获及完成检查通过;候选完整来源检查也 +拒绝被修改的 binding 和显式 null 输入。最初正文摘要迁移将本地 Python 解析变为 +一次 TypeScript 边界调用;本次扩展读取复用该边界,不抵销原新增成本。 +完整 adapter 退役、其余 effect/material 消费者及原 quota 成果/完整成本资格仍开放。 + +结构化 Host 准备现在直接消费经过校验的完整来源,不再为新请求展开旧 action、 +boundary、capsule 与 planning 载体。同一次 typed 来源校验提供可执行行动别名和 +已准入 replan 事实,保留能力动作优先于 replan 的顺序,不在 Python 重写判断。 +Codex prompt 的边界指导也读取完整来源,分阶段 reader 读取原始模型输入。 +原 capture 元数据仍沿既有 transport 传递,来源及 adapter 完整性校验保持。 +只有历史请求继续使用旧 decoder 与 renderer。这是内部消费者替换,不是另一份 +面向模型的视图或跨 attempt 缓存;完整最终模型输入及其全部指令义务须保持一致。 +其他 effect/session 消费者、打包采用及完整成本资格仍开放。 + +相对重基后的前序 `4c4e9b346`,冻结的真实 File/SQLite CLI 请求产生完全一致的 +完整提示、结果契约、仅历史输入输出与无效来源诊断。Host 准备仍为两次 RPC;每组 +请求合计减少五字节,响应增加 190 字节。六组顺序 cohort 使用各自经过核验的独立 +runtime namespace,每个 arm/case 93 次温态采样,median/p95 毫秒值为: + +| 请求来源 / Host | 前序 | 完整来源消费者 | +| --- | --- | --- | +| File / Codex | 27.544 / 32.366 | 31.258 / 40.408 | +| File / structured | 25.948 / 32.642 | 30.007 / 39.242 | +| SQLite / Codex | 25.695 / 31.070 | 31.889 / 37.696 | +| SQLite / structured | 24.409 / 30.258 | 33.242 / 42.287 | + +这些是局部负向成本观察,不是加速。provider 标签只说明请求来源,计量组不执行 +authority-store IO;机器及后台负载仍未控制。不含启动、其他调用、完整 Turn/模型/ +缓存/账单/人工成本及验收成果。早期与验证重叠且未独立隔离的探索计时不作资格; +源码收敛和这些样本均不能证明相对原 quota 的净收益。 + +后续输入准备增量在同一次 Codex 启动内,由提示词和结果 schema 共用一次完整 +来源校验。CLI 进程与启用 operation tools 的 app-server 都消费这一既有 adapter +边界。独立调用提示词/schema 仍各自校验,结构化结果转换在执行后重新校验来源; +不跨 attempt、模型执行或结果处理缓存校验值。typed owner 只返回行动、replan、 +approval 和 profile 适用性事实,不再通过 bridge 原样回传完整来源。Python 消费 +自己持有的原始已校验输入,并保留结构化 authority 值的独立副本。完整模型输入、 +原 reader、启动 guard、结果验证和外层结算不变。 + +自有 V8 进程捕获 500 次基线来源校验,显示 canonical hash 与 Unicode key +排序占用明显 CPU;未覆盖 Python、transport 或 provider IO,inclusive 权重不是 +节省时延。它支持移除同一次准备中的重复校验,不支持弱化完整性或跨执行复用。 +原负面测量按历史保留;本增量不关闭 C1 相对原 quota 的成果/完整成本及采用要求。 + +相对重基到目标 `ff9e97f8e` 的前序 `75bd69bf6`,六组顺序交错 cohort、每 arm/case 93 次温态样本, +完整 prompt/schema/result、历史输出和无效来源诊断完全一致。Codex 输入准备从 +两次 RPC 降为一次;结构化提示与执行后 candidate 转换仍保留两次。File/SQLite 的 +Codex 请求字节为 86,293/86,399 → 43,144/43,197,响应为 62,554/62,606 → 211; +结构化请求各减少五字节,响应变为 422 字节。这里是内部 JSON payload,不含 framing。 + +| 请求来源 / Host | `75bd69bf6` median / p95 毫秒 | 输入准备增量 median / p95 毫秒 | +| --- | --- | --- | +| File / Codex | 22.147 / 26.204 | 12.003 / 13.653 | +| File / structured | 22.269 / 26.310 | 23.124 / 27.843 | +| SQLite / Codex | 21.656 / 26.511 | 11.734 / 17.183 | +| SQLite / structured | 21.324 / 23.608 | 23.716 / 26.079 | + +Codex 局部准备成本改善,两个结构化时延仍是负向观察,不能被传输量下降抵销。 +负载没有 store IO 或真实模型工作;各自有独立 runtime、顺序执行避免本 Agent 的 +验证重叠,但后台负载仍未控制。不含启动、其他调用、整轮、tokens/缓存、账单、 +实施/人工与验收成果;不是原 quota 对照,也不证明整体净收益。 + +Codex 结果 schema 与共享 candidate adapter 现通过同一经过校验的完整契约 +profile 读取判断证据要求是否适用;新请求不再从内部 capsule 决定该要求。 +该读取与模型输入校验复用既有 TypeScript 完整性/来源/身份校验器,没有新增 +模型侧 packet 视图或按证据字段分别调用。缺省契约仍解码历史 capsule; +显式 null 或被修改的契约会拒绝。空/非对象 profile 保持原来的不适用行为, +停止结果仍不要求证据,已提供证据原样交给既有结果验证器。此次迁移的是适用性 +判断,未改写证据内容校验,也尚未迁移全部执行路由和结算消费者。 +schema/material candidate 每次读取各新增一次校验边界调用;这是语义收敛, +尚不能据此宣称性能改善。 +使用同一真实 SQLite CLI host 请求(JSON 45,405 字节、合成 provider)进行 +31 组交替热边界测量,schema 构造加 material 结果转换的中位耗时从 +`68223e337` 的 0.013 ms 增至候选的 19.6 ms(p95 为 0.019/22.8 ms), +合法输出一致。保留这一局部新增成本的负向证据;测量不包括冷启动、模型工作或 +完整 Turn,总体成果/成本资格仍开放。检查覆盖真实 File/SQLite 捕获恢复与 +Codex/共享 host 消费者,不能证明打包 App 已采用或模型成果改善。 + +执行入口现在在 dispatch 或 journal 恢复前校验一次完整契约身份。结算计划缺失时 +用该身份补建,恢复检查在同一次调用内复用它,不再读取 adapter 的 Agent。 +已有结算计划与回执不重建;缺省完整契约的历史记录保留原解码与字符串处理。 +该值不会跨 host 尝试、来源替换或后续调用缓存。此举同时关闭一个恢复绕过点: +此前已有结算计划会跳过来源校验,null/被修改的完整请求仍可返回已有 journal +结果。真实 File/SQLite CLI journal 的新拒绝保留 journal 字节与扣额数, +不调用 host 或结算 callback。十个定向用例在 `ce996ea0f` 的新增拒绝断言处失败; +候选 32 项捕获/恢复检查和扩大后的 605 项回归通过(相互重叠)。入口新增一次 +校验边界调用,由两个消费者共用。同一份 45,405 字节真实 SQLite CLI 请求, +31 组交替热测已有结算计划读取与恢复身份,合法输出一致:中位数从 0.016 增至 +12.382 ms,p95 从 0.024 增至 14.883 ms。这是新增局部校验成本,不是效率收益; +不含冷启动、完整 Turn 与模型成本。完整路径性能及其余路由/结算退役仍开放。 + +Codex CLI 构建提示词时,有效完整请求现在直接调用既有完整校验 owner,删除重复的 +单独 envelope 版本调用。历史请求保留版本检查;完整校验失败时仍检查版本,以保留 +两处同时损坏时的诊断优先级。未引入校验缓存、新 wire 字段或第二 owner,提示词正文 +不变。这是调用边界合并,不代表剩余 driver 路由或结算 adapter 已退役。 + +对照 `e1dcd95dd`,完整与历史提示词字节一致,六类无效输入保留相同拒绝诊断。 +同一份 45,429 字节真实 SQLite CLI 请求生成 34,043 字节提示词;61 组交替热测中, +提示词构建中位数从 24.229 降至 14.819 ms,p95 从 30.189 降至 17.854 ms; +桥接追踪确认两次调用变为一次。局部降幅约 39%,不含冷启动、模型执行和完整 Turn +成本,不抵销单独测得的 profile/结算开销,也不证明相对原 quota 的成果收益。 +诊断补充前的较早样本为中位 21.279/12.994 ms、p95 29.729/17.321 ms;保留其 +早期证据身份,不作为第二份独立的最终资格。 + +规划现在在构建路由、会话和事务之前接收完整契约,不再在计划完成后附加它。 +规划与失败会话恢复通过一个粗粒度身份操作复用既有 TypeScript 完整来源校验; +同一次边界调用选择 Goal/Agent/工作身份并返回动作签名前像,替代原先仅取签名的 +调用,不增加逐字段 RPC 或缓存。显式空值、不支持版本、被修改的完整契约均拒绝, +已处于 resume 的请求也一样;缺省完整契约的历史输入保留原 decoder。 +Todo-less replan 身份仍由回执 owner 提供;下文路由与启动增量记录后续消费者迁移。 + +Python JSON/hash 传输编码特意保持不变。直接采用 JavaScript 哈希的试验未通过 +小数/指数前像一致性检查,会改变已持久化的 Turn key;File/SQLite 特征化现在 +覆盖这些数值、Unicode、自适应工作选择和重复恢复。一个真实 SQLite CLI 请求 +(45,380 JSON bytes)相对 `088867421` 的 31 组交替热态采样,完整/历史计划及 +失败恢复输出保持一致。规划 median/p95 从 39.632/47.964 变为 42.608/53.270 ms; +恢复从 12.330/20.858 变为 18.136/23.242 ms。这是局部增加的校验成本,不是完整 +Turn 或原 quota 成果对照,也不代表模型、已安装 App 或 PostgreSQL authority +资格。剩余路由/材料 adapter 退役及端到端成本资格继续使 C1 保持开放。 + +Host 启动前实时复查现在将回执绑定的实时观察交给初始规划所用的同一完整契约 +composition owner,再把完整契约传入共享 planner,替换原先 raw quota 直接进入历史 +规划的捷径。Stop 和动作变化仍先于 composition 拒绝;实时观察不替换原始 capture +中的模型输入,也不生成另一份回执。剩余 effect/材料 adapter 仍需退役。 + +路由分类现在归既有 TypeScript envelope owner 所有。显式注册 action/frontier 表在 +编译期检查穷尽性,历史未知 action 仍进入 Host;签名拒绝、attempt、先 replan 后 +普通 delivery 门、能力 intent 身份、repair、用户行动和安静等待保留原顺序。 +Python 仅保留 controller 薄传输与历史 scalar-text 编码,不再拥有第二份分类表。 +完整契约校验忽略历史解码提示;已持久化动作 hash 的 Python 编码及历史工作选择 +reader 均保持不变。 + +规划在既有粗粒度身份/签名调用中同时取得 route;完整与历史普通计划仍各需两次 +桥接调用。相对旧 Python 分类器,1,152 组 action/gate 组合一致;固定真实 SQLite +CLI fixture 的完整与历史计划输出也一致。计划对照共用当前 TypeScript endpoint, +因此不是精确旧版/新版端到端延迟实验。controller 单独读取 route 现在新增一次 +桥接:44,891 字节请求的 61 组交替热测,median/p95 从 0.004792/0.010125 升至 +13.252792/15.855042 ms。这是该 caller 的实测回归,不是效率收益;作为 controller +调用边界合并的明确成本缺口保留,不引入缓存或重复分类器掩盖它。File/SQLite +入口、恢复、一次结算资格,剩余 adapter 退役、打包采用和原 quota 成果/完整成本 +资格仍分别验收。 + +生产 `turn managed-step` caller 现在将 envelope 构造与同一路由求值合并在一次 +TypeScript 请求中。Python adapter 返回绑定 route 的本地不可变 envelope 快照;它 +不是新的 Agent wire 版式,也不拥有第二份决策规则。读取或修改返回的字典不会 +改变快照,也不能把它的资格附到另一份 wire 字典。controller 保留既有用户行动 +优先级、回执/前驱校验和 journal 所有的重试预算;普通历史或外部 envelope 仍走 +原 route reader 与签名拒绝。构造 adapter 和普通 envelope builder 共用宿主绑定及 +capture 参数准备,删除 managed caller 原本多余的中间 builder。上段独立 reader +回归保留为历史实测;只有生产中新生成与消费的调用对能够省去这次额外请求。 +剩余工作选择/effect/材料解码、大型冷上下文恢复、打包与成果资格继续开放。 +caller 直接消费统一 typed controller 结果后,本地快照随之退役;它不新增持久化 +schema 或兼容 wire。 + +固定 31,088 字节合成来源的 61 组交替热测,将 `ddf96b79c` 的原 Python producer/ +controller 函数与合并调用比较;共用当前 TypeScript 服务和未变的 build/route 规则。 +最终源码的组件 median/p95 为 22.477/25.417 对 13.739/17.479 ms。另以真实隔离 File/SQLite +store 经公开 `managed-step` CLI,各 provider/arm 取 21 组交替热测:File median +为 135.989 对 137.316 ms,SQLite 为 149.310 对 146.081 ms;p95 分别为 +209.730 对 192.544 ms、222.299 对 240.848 ms。另行传输计数探测发现每个 provider +的桥接总请求数从 70 降为 69:省去一次 route 请求,其余 live-decision 调用仍在。 +完整输出一致,失败 journal 逐字节不变,两臂均不扣额。请求数改善,但整条 CLI 的 +median 和尾部结果混合,尚不能证明加速;本地小 +样本及共享机器资源限制尾部推断。这是具名源码边界的观察,不是整个不可变旧树 +对照、冷启动、已安装 App、模型成果或原 quota 完整成本资格。 + +完整 reader 现在还将 adapter 的已签名动作文档,与原完整来源经过既有 producer +投影的结果比较。原先来源和 adapter 各自的 hash 只能证明各自完整:重新计算 hash +后的 adapter 可以保留 Goal/Agent/Todo,却改变执行或写回条件。共享校验复用既有 +签名维度,不新增第二份字段清单、RPC 或 wire 视图。仅含历史输入时保留旧 reader。 +完整请求的 profile adapter 与来源不一致时,现在明确拒绝,替代此前忽略冲突、直接 +采用来源 profile 的行为;这是有意的拒绝语义变化,历史 profile 行为另行保留。 + +相对 `b9e2c5120`,File/SQLite 的规划拒绝断言在修复前失败。六类独立重算 hash 的 +反例覆盖运行资格、有效动作、交付许可、用户介入、执行策略和扣额许可;候选在 +host/写回/扣额回调前拒绝,不产生 Turn journal 或结算回执。既有 lane 锁仍可能 +先分配。一个 44,891-byte 真实 SQLite CLI fixture 的 101 组交替热态进程内 +TypeScript 采样保持合法身份输出一致;校验 median 从 4.864 增至 5.163 ms,p95 从 +5.570 增至 6.010 ms。这是局部新增成本,不含桥接、实时 composition、冷启动、模型 +或完整 Turn 成本,不证明相对原 quota 的成果收益或 C1 切换资格。 + +候选的普通 planner 与失败会话恢复现在也从既有 `driver_lineage` 调用消费选中工作。 +共享 `selectedWorkTodo` owner 将普通或自适应主任务选择写入该调用已有的动作 hash +preimage;Python 不再重选或重写 preimage。Python 保留已持久化 JSON/数字编码, +同时运输历史 primary-ID scalar/空白编码;共享 owner 消费已解码历史文本,不再重复 +执行 JS trim。完整输入忽略该提示,并保留 +完整来源/投影一致性校验。不新增 bridge 调用、模型侧字段、持久化 schema 或跨 +attempt 缓存;公开动作签名操作仍描述原 envelope。 + +这替换了实际规划和失败会话恢复 caller 中的选择解释,包括原生 CLI 使用原 capture +重试的路径。剩余 v0 Host、结算和 controller reader 仍使用历史选择 decoder,只有其 +caller 与未结 receipt 已迁移且通过等价恢复资格后才可退役。本片不验收完整 adapter +退役、App/SDK/benchmark 采用或优于原 quota 的净收益。 + +对不可变 `334c1a772` 的资格保留了冻结 File/SQLite CLI 输入上的完整规划/恢复 +输出;规划仍为两次 bridge 调用,恢复为一次,普通输入的请求/响应字节量相同。 +实际 CLI/provider/Host、完成及结算模块 254 项通过;十个迁移断言在前序失败, +十二个历史编码用例在前序通过,候选全部通过。后者覆盖缺省/false/zero、空白、 +数字、布尔与 collection-valued 历史 primary ID、Unicode 空白/BOM、版本/mode +适用性、原 Turn key +及恢复绑定。 + +临时 `ef479d2b5` 试验改变了三种 Unicode 空白/BOM 身份:语义反例在该版本失败, +在修正 owner 后通过,而原始前序保留这些身份。下述该版本测量仍是历史试验, +不作为修正源码的资格。 + +尚无延迟改善资格。三组平衡顺序对照使每 arm/case 有 93 个温态样本。最初以 +实际 source worktree 对比归档基线,八个普通/历史规划和恢复行的候选 median +均升高,但两侧生成缓存清单不同。第二组控制使用干净同级来源副本、相同清单并在 +两侧关闭 bytecode 生成,仍观察到混合或更慢结果: + +| 完整来源输入/操作 | 初始基线 → 候选 median / p95,ms | 干净控制基线 → 候选 median / p95,ms | +| --- | --- | --- | +| File/规划 | 35.129 / 40.776 → 46.227 / 57.355 | 24.174 / 30.183 → 25.330 / 30.443 | +| File/失败会话恢复 | 14.941 / 17.957 → 19.440 / 24.477 | 11.259 / 13.196 → 12.582 / 15.495 | +| SQLite/规划 | 36.979 / 46.065 → 46.461 / 54.795 | 23.820 / 30.178 → 26.408 / 30.523 | +| SQLite/失败会话恢复 | 17.404 / 22.606 → 18.759 / 22.139 | 12.586 / 16.141 → 11.503 / 14.124 | + +初始负结果保留;控制对照不追认历史通过,也不证明负结果的原因。这些是不含 store +IO 的直接 helper 观察,不是完整原生 CLI/Turn、冷启动、模型成本或验收成果;后台 +宿主负载未控。另对自有进程取得的 V8 capture 指向既有 Unicode key ordering/hash +计算,但未证明延迟根因。可选 profiler 未安装,Python wait/IO stack 仍未观察。 +归属统一和字节相同不能抵销这些成本缺口或此前 C1 的负测量。 + +修正后的三个源码文件另有干净来源对照,同样每 arm/case 93 个温态样本,八项 +完整输出相同,RPC 与普通输入传输量不变。结果仍混合,SQLite 规划尾延迟更差; +同样保留上述未测范围和后台负载未控限制: + +| 输入/操作 | 基线 median / p95,ms | 修正源码 median / p95,ms | +| --- | --- | --- | +| File/完整规划 | 38.529 / 48.381 | 38.504 / 47.134 | +| File/完整恢复 | 17.821 / 22.029 | 18.244 / 21.857 | +| File/历史规划 | 32.787 / 44.413 | 30.871 / 36.733 | +| File/历史恢复 | 10.635 / 14.620 | 10.292 / 12.201 | +| SQLite/完整规划 | 39.600 / 46.547 | 40.036 / 77.714 | +| SQLite/完整恢复 | 18.034 / 28.685 | 18.552 / 25.223 | +| SQLite/历史规划 | 32.061 / 42.789 | 32.447 / 38.962 | +| SQLite/历史恢复 | 10.444 / 14.258 | 10.270 / 12.891 | + + +#### 原生执行与完成来源 + +原生启动 guard 现在消费共享 planner 已返回的选中 Todo,不再调用历史 Python +selector 重选。既有执行上下文/任务承诺 reader 归 Turn driver 所有,同时供 CLI +准备和完成意图分类使用;CLI 副本已删除。语义 owner 仍为既有 TypeScript +`execution_context` 操作,没有新增视图、schema 或 Python 决策 owner。 + +Host 执行和独立任务验证之后,完整请求在判断终态或普通完成前重新检查该来源。 +已保存的 writeback 或 terminal outcome 不能跳过检查。无效完整输入或 +与来源冲突的 adapter 事实在写回/扣额前拒绝;原 journal 随后可以恢复已有验证结果, +不再次调用 Host,并只结算一次。省略完整输入的历史请求保留精确 decoder 和 +回执恢复。完成 outcome 验证及 typed 结算/effect owner 不变;本片没有退役所有 +历史完成或 controller reader。 + +启动 guard 不增加 bridge 调用。完整 validated-completion 分类在此后续边界增加 +一次粗粒度来源检查,包括未完成 journal 恢复;历史分类不变。这是明确新增成本, +不代表提速,也不能据此跨执行、attempt 或恢复缓存执行前检查。原 quota 的实际 +决策、验收成果、完整成本及剩余消费者采用仍保持开放。 + +四个受影响的 capture/driver/completion/settlement 模块共 264 项通过,使用 +真实隔离 File/SQLite CLI 消费者及合成 Host/validator 进程;两个 typed owner +模块 79 项通过。22 个迁移断言在不可变 `2a170247ba3` 失败、候选通过。新增的 +8 个原生替换反例在基线会提交完成结果,候选在写回/扣额前拒绝,随后从原 +journal 恢复已有结果,不重跑 Host 并只扣额一次;覆盖两后端的普通/最终完成。 +这些不证明真实模型或已安装消费者采用。 + +三组平衡顺序对照使用干净同级来源副本与相同夹具,每个温态 helper 行各有 +93 个样本。完整 intent/recovery 分类从约 0.002 ms、零 bridge 请求变为: +File median/p95 分别 19.813/26.454 和 20.770/25.287 ms;SQLite 分别 +20.243/23.964 和 19.005/22.458 ms。每次新增一个逻辑请求,File/SQLite +请求分别 43,200/43,253 字节,结果均 1,693 字节。历史分类仍零请求、结果等价。 +逻辑 JSON 计量不含 framing 或物理传输重试。 + +同组对照还运行真实 CLI 准入、捕获、合成 Host 工作、独立验证与结算,再通过 +原生入口回读 Todo 并重放已提交结果。每行每 arm 仅三个样本;下表为 median +和实际范围,不推 p95 或因果提速: + +| CLI 完成 | 基线 median [范围],ms | 候选 median [范围],ms | 逻辑请求,基线 → 候选 | +| --- | --- | --- | --- | +| File/普通 | 2303.0 [2001.9–3646.5] | 2173.5 [2051.4–2196.6] | 282 → 283 | +| File/最终 | 2306.0 [2283.4–2389.4] | 2818.4 [2338.2–2973.9] | 294 → 295 | +| SQLite/普通 | 1888.5 [1758.5–2061.7] | 2513.5 [2086.5–2955.7] | 278 → 279 | +| SQLite/最终 | 2549.1 [2240.7–2681.2] | 2282.7 [2276.8–4064.8] | 294 → 295 | + +原生结果观察一致,包括原结算身份、done 回读和一次扣额;两侧已提交重放均为 +五次逻辑请求、零新增 effect。回读/重放观察与执行计时分别保留。后台宿主负载 +未控,这些对照未与其他自有验证并行。新增来源检查是实测成本;完整 CLI 时延 +仍混合,默认 SQLite 性能尚未资格。模型/缓存 tokens、账单、评测、实现/人工 +成本、真实工作验收成果和优于原 quota 的净益仍未知,所有既有负结果保持。 + +## 历史候选区块 3 + +[数值完整性检查点](2026-10-29-complete-numeric-integrity.zh-CN.md) +让 producer 数值身份与全部完整 reader 共用一个 typed owner,并删除无用 Host echo。 +后续[稀疏运输整合](2026-10-29-sparse-numeric-integration.zh-CN.md) +采用既有 context collector,不保留完整路径专用的第二规则。变化的实验 hash 身份由 +codec v2 明示;旧 binding 的 capture 不变,保留对应版本固定的 reader。原 capture +字节仍单独校验。组件运输减少不认证原 quota 成果、完整成本或 live writer 切换。 + +## 历史候选区块 4 + +#7430 的验收共享增量把原 Python 展示算法移入既有 TypeScript composition owner, +在 hash/capture 前执行;旧展示 helper 只委托同一实现。完整契约 reader 与历史分阶段 +读取共用一个引用解析器。相同契约保留一份完整 owner;不同 revision、JSON 类型、来源 +和负面证据分别保留。已有引用随 owner 的迁移同步调整;即使完整性 hash 正确,悬空、 +循环或不可用引用也会拒绝。引用比原对象更大时仍保留短对象原文。 + +隔离 File/SQLite 的 quota 和 native host fixture 覆盖真实合成 Codex 子进程输入中的 +完整验收、失败后恢复和原身份一次性结算,也验证共享后的 full/delta/丢失基线重建。 +这些证明传输语义,不证明模型遵从。旧展示 adapter 增加一次传输调用;完整契约在原有 +composition 调用内部完成共享。未声称延迟改善。 + +固定 source 的四份相同验收 fixture 中,融合契约为 23,432 个紧凑 UTF-8 JSON 字节, +原未分阶段 CLI 为 22,237(+5.37%)。启用 capture 分阶段时,融合契约为 23,515, +原 entry/review/writeback 合计为 24,509,未计追加材料读取。对照冻结 `895f38fc5` +的原展示共享 helper;上述不含验收副本的 workload 数字不变。这把 quota 已有的效率 +吸收到共同路径,不能证明优于 quota 或完整成本获益。下述 guidance 增量进一步缩小缺口;下一步先在既有 owner 验证剩余 +vision 共享;标题由下述增量处理,然后再评估延后详情。冷启动与分阶段总量分别保留, +保留负结果,不能靠删除独有指令达到字节目标。 + +#7430 后续增量通过同一个 TypeScript composition 边界共享 replan 的 vision-authoring +指令,保留的 owner 是既有 durable-writeback 结算步骤。旧 Python 展示 helper 委托 +共享判断,仅添加历史展示元数据。完整 reader 和历史未分阶段/分阶段 adapter 解析同一个 +精确引用,不另建 authoring 策略。JSON 类型、版本或指令不同则保留原文,引用必须更小。 +即使 hash 匹配,冲突的原文/引用、错误步骤类型、缺失目标和引用链也会拒绝。 +结算计划、全部原指令和示例保留在 capture 中;历史 writeback 阶段维持原有的示例省略。 + +两个旧 CLI 参数写法现在暴露同一份共享完整契约;材料回读、产生效果前拒绝和 native +输入分别验证。已验证的 Native 外层 controller 输入没有内联结算 authoring owner,authoring 仍保留原文; +共享不会虚构该 owner 或转移结算权。authoring 检查点的四项旧 projection 测试期待 +完整候选尚未采用的多行标题或 Explore 指导共享,在此前及 authoring head 都失败。 +下述 guidance 增量解决其中两项,标题增量解决另外两项。历史失败继续保留,不豁免或改写。 +这些切片不证明已安装 App 的采用。 + +固定的合成 authoring fixture 中,原未分阶段 CLI 为 22,062 个紧凑 UTF-8 JSON 字节, +融合契约为 23,266(+5.46%)。启用 capture 分阶段时,原 entry/review/writeback 合计 +24,311,融合为 23,349。原 CLI projection 模块冻结在 `895f38fc5`,输入及投影读取阶段 +保持一致。追加读取、请求包装、tokens/cache、延迟和模型成果尚未测量。共享消除了 +候选中的重复实现和重复指令,但不能证明优于 quota 已有共享或完整成本 diff 正向。 + + +Explore guidance 增量删除 Python 的精确匹配循环,完整契约与旧展示调用者复用同一个 +TypeScript composition 边界。仅当指令完全一致、已有 durable-writeback Explore +附件 owner 且引用更小时,才共享同一 capture 的 owner。独有/短文本及缺失 owner +保留原文。非法、冲突或成链引用拒绝;不缩短指令,也不给可选附件新增义务。 +历史分阶段及未分阶段 reader 在移动上下文前解析引用,再复用 Explore 既有领域投影。 +独立 Explore 读取仍返回完整指导。兼容 helper 随旧展示调用者退役,不拥有独立决策或共享算法。 + +真实隔离 File/SQLite CLI capture 现在通过此前失败的两项 Explore 共享用例, +包括独立材料对照、历史回读及非法 capture 在状态/额度不变时拒绝。 +既有分阶段 CLI 测试仍执行 registry 不可用时读取、篡改拒绝及实际写回/结算。 +差分重建保留变化后的指令并支持 baseline 丢失恢复;不完整上下文回退完整交付。 +这些证明传输及本地集成,不证明已安装 App 或模型成果。 + + +扩大调用者验证也将旧测试假设迁移到准入后的完整契约:native 子进程 capture/重试 +比较整份原始契约,生成的结算命令仍仅结算原 Turn。历史 capability reader 维持 +显式初始化隔离 canonical fixture、拒绝事实及 scheduler 信息,不因此授予执行权。 +capability 准入被拒时仍交付 typed diagnostic/历史投影,准入成功才交付完整契约。 +这个失败路径迁移仍属于 C1 切换前缺口,不是永久第二套契约。 +合成 native/stdio provider 不证明模型收益。 + +同样冻结 `895f38fc5` 原投影,合成 guidance fixture 的原未分阶段路径为 22,848 个 +紧凑 UTF-8 JSON 字节,融合为 24,320(+6.44%)。启用 capture 后,原 +entry/review/writeback 合计 26,081,融合为 24,403。不含 guidance 的 fixture +未分阶段仍为 20,543 对 21,738 字节。必需追加读取、请求包装、tokens/cache、延迟及 +模型验收成果尚未测量。代码共享及恢复 quota 已有的信息效率不能证明完整成本 diff 正向; +C1 继续保持未完成。 + +当前 Task 标题增量删除 Python 的精确来源匹配算法,完整 composition 和旧展示委托 +共用 TypeScript owner。只有与唯一、已核验、完整的当前选中 Task 的 `text` 或 `title` +精确重复时,才转换为同一 capture 的 `title_ref`;完整原始声明及来源继续内联。 +来源缺失、不同、不完整、歧义、失败、已完成或已归档均不符合共享条件。历史字符阈值 +(包括 Unicode 码点计数)保持不变。旧展示按 label 前缀省略标题的逻辑留在展示层, +不应用于完整契约;委托 helper 随旧展示调用者退役。 + +完整 reader 再次验证身份及引用归属,即使 hash 有效,也拒绝冲突原文、引用链、 +非法路径及不可用目标。历史 envelope 保留完整 Task 来源,不携带移动后悬空的 lane +引用。真实 File/SQLite CLI 在差分关闭时已通过此前两项多行标题用例;capture 变体 +还验证精确回读及状态/额度变化前拒绝。差分及 baseline 丢失/全量恢复保留变化后的要求; +独立 Todo detail 仍返回完整声明。这证明本地传输语义,不证明已安装 App 或模型行为。 + +固定合成当前 Task fixture 中,冻结 `895f38fc5` 的原未分阶段 CLI 为 28,585 个紧凑 +UTF-8 JSON 字节,融合契约为 29,780(+4.18%)。启用 capture 后,原 +entry/review/writeback 合计 29,906,融合为 29,863。不含当前 Task 的控制样例 +未分阶段仍为 20,543 对 21,738 字节。这些总量未含请求包装、追加材料读取、tokens/cache、 +延迟及验收成果;它们将 quota 已有共享恢复到共同路径,不能证明完整成本收益正向。 + +vision audit 增量现已将 Python 嵌套精确匹配算法迁入同一 TypeScript owner。完整契约 +和历史展示只在引用更小时共享完全相同的 audit,包括未知事实、负面证据及有序义务。 +不同 JSON 类型不相等:旧 Python 的 `True == 1` 比较可能抹掉 channel 差异,现保留 +该差异原文;短 audit 也保持内联。根保留完整 audit 和 judge,旧展示 metadata 留在 adapter。 + +完整恢复即使面对重新计算的有效 hash,也拒绝缺失、非法、链式或冲突的 audit/judge +引用。历史 envelope 仍从内联根取得 judge,不产生移动后的悬空引用;其已有投影限制 +不变。真实隔离 File/SQLite CLI 在含活动历史 vision、差分关闭时,验证完整 judge、 +精确 capture 回读及状态/额度变化前拒绝。差分/全量及 baseline 丢失恢复保留变化的 +要求。没有活动 vision 的 fixture 正确地不产生 audit,不能用来验收这条路径。 + +冻结原 CLI projection 于 `895f38fc5`,固定合成 audit 样例的未分阶段紧凑 UTF-8 JSON +为原 22,337 字节对融合 23,333(+4.46%);capture 原 entry/review/writeback 合计 +23,658 对融合 23,416。不含 audit 的控制样例仍为 20,543 对 21,738。它们不计 +tokens/cache、延迟、追加读取、请求包装及验收成果。恢复共享、减少规则 owner 仍不 +证明完整成本正向。旧 audit 委托随展示调用者退役;剩余 consumer 退役及打包/成果 +资格继续使 C1 保持开放。 + +拒绝准入现在只要已有 interaction contract,就在不可变 capture 前使用同一完整 +composer,包括 health 为 false 的暂停来源。`ok=false` 仍阻止 host handoff 和原生 +context baseline 发布,保留失败退出码;组合不授予交付或结算权限。非法完整来源在 +capture 前验证失败。工作契约形成前的错误则在两种 CLI flag 写法下保留原 typed +诊断及恢复事实,不补造工作契约,也不再经过历史 envelope renderer。 + +真实隔离 File/SQLite CLI 覆盖 App heartbeat 和 generic 两种 profile 下的工作 +缺失、能力不可用及 selection-required reentry。重入保留原 receipt,不产生额度 +记账、baseline 或越权状态修改。Capture consumer 正迁向完整原件精确回读,同时 +显式保留历史长路径恢复覆盖。这验收本地传输和拒绝语义,不代表已安装 App 采用或 +全部 provider/入口交付。剩余 consumer 退役及打包后的单会话成果/完整成本资格 +继续使 C1 保持开放。 + +后续观察验证区分了两个问题。#7464 修复测试对两次独立实时观察时钟的误比,同时 +保留其他全部事实。#7468 让 `quota status/plan` 保留既有权威 owner 的 typed 拒绝 +及备份/迁移指引,修复提前返回错误时丢失这些信息的问题。按照已接受的 #7032 +截止规则,未迁移 Goal 的普通读取继续拒绝;File/SQLite 保留范围隔离断言。 +新的恢复断言在旧实现上失败,修复后的范围/诊断/权威集合 156 项通过。这些可独立 +评审的修复已由集成候选吸收,不代表安装采用或成果/成本改善。早期失败运行仍作为 +历史证据保留;这几项已归因失败不再列为未完成调查。 + +固定 unhealthy-paused 合成来源在原 CLI projection `895f38fc5` 下为 6,325 个 +紧凑 UTF-8 JSON 字节,完整契约为 6,639(+4.96%)。新增 binding 保留统一验证, +这不是效率收益;该样例的 tokens/cache、延迟、追加读取、请求包装及验收成果仍未 +测量。这些检查不代表启动过真实模型实验。 + +共享 reference owner 已通过 #7457 合入。Task 标题与 Explore 操作在旧投影中合用 +一次粗粒度调用;完整 composition 在既有调用内部复用相同函数。集成分支吸收 +前置提交,不复制一份 owner。新的 `should-run` emission 只接受已组合契约或 +原始 predecision 诊断,不再回退旧 packet/envelope 投影;历史 capture 恢复 +仍为显式路径。组件测量显示桥接成本比两次调用更低,但高于原 Python 投影, +不能作为完整 quota 路径净收益的证据。 + +[打包 heartbeat 对照](2026-10-28-packaged-heartbeat.zh-CN.md) +已使用真实隔离 File/SQLite CLI,相对原 quota 核对冷态、温态和同 capture 恢复。 +首组默认上下文和 stdout 增长。后续让旧调用方和 scoped native 复用同一个 typed +诊断 owner,删除对应 Python 算法;可独立使用的旧读取方切片已在 +[#7557](https://github.com/loopx-project/loopx/pull/7557) 提案,集成版本使用相同模块。 +未知字段/列表、完整保留条目、候选和 portfolio 不变。重跑后冷态/恢复约少 5.3 KB, +温态仍多约 2.8 KB;全部 peer 补读仍增加 13,940 字节和十次 CLI。公开 v4 预算探针 +在前一版及当前集成 wheel 上仍失败。完整成本正向、默认性能及模型收益均未资格化。 +继续在原 C1 诊断温态重建/元数据成本及剩余消费者,不提升默认,也不验收独立的 +controller 实验。 + +集成版本也在相同 context codec 内采用已合入的 +[#7528](https://github.com/loopx-project/loopx/pull/7528) overlay:搬移的精确证据可共用 +一份基线子树,当前及未知控制仍字面交付,包含 C1 scoped wrapper。Ledger 将局部 +搬移的正向字节结果与重跑的打包对照分开:普通温态输入仍多约 2.8 KB,v4 预算仍失败。 +这移除了已证实的传输冗余,尚不能证明完整周期或成果收益正向。 + +上述成本与预算结果仍绑定各自 ledger 版本。[后续主线集成](2026-10-28-packaged-heartbeat.zh-CN.md#主线集成与不可变-reader-身份) +修复原生投影及原 capture reader 的接线,未重跑或认证那些模型/完整成本对照。 +后续[签名完整输入材料分阶段检查点](2026-10-28-packaged-heartbeat.zh-CN.md#签名完整输入的材料分阶段) +让已验证完整输入复用相同材料 owner,并在范围筛选后保留材料的原始位置。 +当分阶段呈现的传输字节更少时,该消费者不再回退完整材料。这不改变 Host 默认阅读 +策略,也不认证模型保留、完整成本、剩余调用方/writer 迁移或历史 reader 退役。 +C1 及相对原 quota 基线的验收保持开放。 + +## 历史候选区块 5 + +### 本地注册 Goal 材料交付检查点 + +完整 Turn writer 和现有 native context-delivery 显式启用路径,现在在 capture 前 +请求完整的注册 Goal 材料。源 adapter 为未标记或混合文件返回原始 UTF-8 全文; +现有 TypeScript context owner 核对完整文件 revision 后完成该项读取。已标记区域 +的 lineage 和 canonical Todo 权威保留。普通 quota 在 delivery 关闭时继续渐进读取。 +桥接要求 `complete_goal_v1` 回执;旧 runtime 不能静默忽略这个要求。 + +自动业务执行的 Host 上下文使用 `host_dispatch_context`,在加载 provider 前拒绝未完成或无效的 +Goal 材料。历史 `host_context` 元数据读取继续用于按原版本解释与必要结果收尾; +已保存的 capture 不被重写。本项是范围有限的材料交付前置。通用 capability 必读 +强制、当前条件复核、安装采用、真实模型遵守和完整成本,仍各需独立证据。C1 未获 +完整资格。Replan 材料读取调用仍按原有阶段与工作限制执行。 + +### 当前偏好首读集成 + +C1 候选接入 [#7935](https://github.com/loopx-project/loopx/pull/7935) 的既有 selector +修复:首读交付偏好 owner 完整的当前作用域视图,包含纠偏、退役、空替换、来源和 +advisory 权限边界。仍复用同一 selector 与来源 owner;不改变启用设置、不授予 +权限,也不替代后续动作要求的精确作用域新读。 + +集成验证复用 native capture reader 和 executor 投影,不再要求完整来源根部携带 +旧 capsule,也不把导航当作内联决策。验证保留 delivery-off 的渐进 Goal 读取, +并核 native 默认路径的完整内联 Goal、canonical Task、后续要求更新、偏好存储 +损坏和签名拒绝。五处旧布局假设在集成前候选上同样失败;适配测试后,六个完整 +模块 143 项通过。确定性 loopback provider 下实际 native exec、CodeMode 两项 +通过,六个 TypeScript 模块 124 项通过;这些计数只对应各自范围。 + +完整 CLI 预算模块仍有四个测试组失败、39 项通过和一个环境相关跳过。实测小型 +Markdown、拥挤 plan 和兼容视图仍超限;原五个体积门及历史测量均保留。不降低 +上限、不缩 fixture 负载或生产指令来隐藏失败。本项只交付源码集成,不代表完整 +C1 质量回执通过、merge readiness、安装采用、自然模型行为或完整成本收益。 + +### Canonical Todo 投影成本资格 + +在 main `f941b5939` 与 C1 `c59777597` 上做匹配观察,使用既有 +`todo project-markdown` 操作及新读到的 provider revision。File/SQLite 各覆盖 +一个 Todo、36 个 Todo 的无/有 Vision,以及三个 Agent 的 18 个 Todo:共 16 次 +投影转换、32 个表面条件、64 份前后 quota/plan 响应。每次转换的完整 canonical +记录逐一相同;独立核对完整文件及被排除区域 hash,重建实际交付的 Goal 正文, +包括末尾停止条件。未标记来源仍保留全文;只排除正常 writer 生成的区域。不改变 +source adapter、投影策略、输出阈值或 fixture 负载。 + +所测组件为解析后的规范 CLI argv JSON 加实际 stdout,并计入响应要求的 Goal +`cat` 命令。在 C1,投影使拥挤 plan 的一次观察在无/有 Vision 时分别少 +7,698/7,697 字节,multi-agent plan 少 3,697 字节;小型 quota/plan 反而增加 +364/75 字节。投影本身的所测成本为 1,667–1,700 字节;若将两次完整 canonical +读回也作为一次性审计成本,正向样本的条件回本点推迟到重复 7–9 次相关观察。 +这是记账情形,不是每 Turn 重新生成的建议。 + +既有投影也使 main 获益。两快照均使用生成 Goal 区域后,C1 plan 仍多 23–24 +个所测字节;quota 的小样本多 959,拥挤无/有 Vision 分别多 1,958/1,759。 +普通 multi-agent quota 在两个快照均没有内联 Goal 或 Goal 读取,故不纳入 Goal +等价成本主张。上述结果资格化既有来源/投影路径,不是 C1 新优化、完整决策语义 +相同、模型采用或整体净收益证明。RPC、CPU、账单、成果价值及自然模型使用未测。 + +原未标记来源的预算 case 和五项历史门保持不变。另行投影的负载越过阈值,并不 +修复或改写那些失败。继续沿原 writer/reader owner 和相对原 quota 的单会话验收, +不删除未标记 Goal 正文、不放宽签名来源回退,也不为这些字节新造压缩算法。 + +### 通用 Host 派发与已保存结果恢复 + +共享 executor 现在在记录、确认或启动新 Host 尝试前,调用既有 TypeScript +`host_dispatch_context` owner。此前,一个来源承诺有效但 Goal 正文仍有未完成 +读取的完整契约,可以经通用路径到达自定义回调或外部 argv;具名 adapter 已有 +各自检查。修复不新增决策 owner、状态、词汇、通用 capability 必读义务或启用设置。 + +十四项 File/SQLite case 覆盖回调及真实 argv 的合法、Goal 待读、历史请求,以及 +已保存 typed result 恢复。待读 case 没有 Host 副作用;合法与历史对照能到达 Host。 +已保存结果仍经原 validator 收尾,不新开 Host 尝试。既有分阶段 replan 材料读取 +例外仍由同一 TypeScript 规则管理。确定性 loopback provider 下,两条真实 native +exec/CodeMode 路径通过。这只资格化合成源码入口,不证明自然模型采用、安装行为 +或完整 C1 验收。 + +完整 capture、Turn-driver 与 manager-context consumer 三个模块在集成源码上 +共 345 项通过,已包含上述新增覆盖;未重跑所有历史 adapter、预算或 backend 资格。 + +匹配的组件观察显示:完整来源的新尝试多一次 `host_dispatch_context` RPC。在固定 +fixture 中,规范 params JSON 加 result JSON 在 File 为 42,771 字节,SQLite 为 +42,828 字节。已保存结果恢复仍为原有一次 lineage RPC,所测字节完全相同;不含 +完整来源的历史请求不增加 RPC。基线函数从冻结的修复前 commit 读取,使用同一 +owner 与 fixture 运行;这是派发组件隔离观察,不是完整分支重放。未测 RPC framing、 +CPU、模型输入、账单、成果或整体净收益。该正确性检查增加新尝试成本,不是字节 +节省、同 capture 正文体积测量,也未修复原五项体积门。共享的既有 phase/helper +已足够;另造 wrapper 或策略 owner 没有局部重构价值。writer/reader 退役,以及 +相对原 quota 的单会话成果与完整成本比较保持开放。 + +### Goal 拒绝先于自动启动间隔预留 + +通用派发检查现在位于原始 capture staging 选定输入之后、自动启动间隔预留、 +发布或新 journal 写入之前。有 staging 时检查其原始 plan,否则检查当前 request。 +此前的顺序可以在未启动 Host 的情况下拒绝 Goal 待读,却已预留间隔并写入 +journal/capture,导致后续合法 Turn 仍须等该间隔。本次只移动同一 TypeScript +规则,不新增规则、状态、配置、豁免、持久缓存或额外 RPC。 + +四项 File/SQLite 拒绝 case 在冻结的修复前源码复现了该等待状态,六项合法/历史 +对照通过。加强后的公开矩阵覆盖回调及真实 argv、staged capture、真实 cadence +状态与已保存结果恢复,共 22 项通过。确定性 loopback provider 下,两条真实 +native exec/CodeMode case 通过。已有结果仍走元数据校验与收尾,不另预留或 +启动尝试。 + +完整 capture、Turn-driver、manager-context 与 cadence 四个模块共 357 项通过。 +首次合跑的 356 过及一处旧根布局失败保留,后者也在干净的冻结修复前 checkout +复现。该 cadence 测试现在经真实不可变 capture reader 取得 scheduler 字段, +原周期下限及拒绝降低周期的断言均保持不变。 + +十个匹配的合成条件用冻结 executor 函数与当前函数,经同一真实 owner、固定 +来源输入及等长隔离 namespace 对照。socket 观察计完整 JSON 请求/响应行, +包含错误与 framing,不保留凭证。拒绝的非 capture 路径从 5 次 RPC 降至 2 次, +capture 路径从 6 次降至 3 次;File/SQLite 所测字节分别减少 95,293/95,405 与 +97,665/97,777。消除的是一次 cadence admission 和两次 journal 写入。拒绝后 +不新建 journal/capture,lane 保持 eligible;四个后继合法尝试均可启动,而其 +冻结对照仍等待间隔。 + +六个合法/历史条件的 RPC 次数及所测字节完全相同,Host 输入在只替换独立 +capture namespace 后相同。完整来源派发检查的原有 RPC 成本仍在。这只资格化 +暖态 RPC 组件,Host 被有意停止;不是完整分支的模型/成果实验、同 capture +正文缩减、CPU、账单或整体净收益。原五项体积门、完整 C1 writer/reader 退出 +及成果验收保持开放。合并 journal 写入仍需独立的中断/恢复资格;本次没有合并 +Host attempt 的持久 checkpoint 或确认边界。 + + +### 当前 main 集成与原 quota 完整任务 + +完整来源路径现复用 main 的 Progressive 与 Delta owner。既有完整决策 owner 先校验 +原始源,再应用展示计划。保存 capture 后选择的 transport 参数只改变派生视图中的 +selection recipe,不修改签名原件,也不重新准入。共享的保源 edit transport 保留 +稀疏数字身份、当前完整要求、显式关闭行为及同次 capture 恢复;被替代的 native quota +与有界结算 adapter 已退役,不保留两条竞争的生产路径。 + +原固定 quota 任务对照 main `24f46874bc97` 与集成运行时 `675cd9d23b5b`,在 File 和 +SQLite 上各做三次冷读、温态与压缩恢复,共 36 个条件。各条件交付同一份独立校验 +artifact,含重放均只扣一次额度。两边使用同一 Python 可执行文件及未修改的任务/ +observer;来源检查覆盖 252 次父进程与记账子进程观察。统计包含完整调用者输出、 +记账子进程双向 RPC 及可观察的 Python 普通文件 IO。并行验证使延迟/CPU 不具资格; +provider 原生 IO、模型输入/缓存/输出、账单与自然效果仍未测量。 + +| Provider/场景 | 完整调用者 stdout,main → 候选(字节) | RPC 次数 | RPC 线上字节 | +| --- | ---: | ---: | ---: | +| File/冷读 | 55,754 → 35,834 | 242 → 209 | 1,468,459 → 1,474,720 | +| File/温态 | 68,136 → 62,107 | 334 → 292 | 2,151,083 → 2,217,775 | +| File/恢复 | 89,861 → 61,384 | 336 → 294 | 2,156,745 → 2,214,069 | +| SQLite/冷读 | 56,155 → 35,908 | 242 → 209 | 1,470,295 → 1,476,592 | +| SQLite/温态 | 68,557 → 62,249 | 334 → 292 | 2,153,959 → 2,218,459 | +| SQLite/恢复 | 90,349 → 61,522 | 336 → 294 | 2,159,660 → 2,216,837 | + +以上为中位数,不代表效率晋升。温态连同基线准备的总输出少约 9%,但排除准备后的 +当前步骤输出在 File 增 7.0%、SQLite 增 6.2%;温态线上字节增约 3%,可观察的 Python +读写合计增约 4%。主指标“同次完整 capture 到所选正文文件”的缩减率在 main 温态 +约 87.8%,候选 File/SQLite 分别约 82.6%/85.4%。候选冷读与恢复选择完整正文, +主指标为 0%,不等于净收益为零。RPC 次数减少及完整源校验都不能证明整体净收益; +原 quota、writer/reader 退役及长程验收保持未闭合,既有负面对照及冻结体积失败不改判。 + +集成源码验证通过 448 个完整调用者/结算用例、156 个 context 用例及 14 个验收绑定 +用例;其中分别保留的五个、十个跳过用例不在本次通过范围内。两个相关 TypeScript +模块 67 项测试及 control-plane typecheck 通过。隔离安装的 wheel 通过 258 项,另有 +一个平台跳过;476 次已完成进程与 136,450 次 Core 模块观察没有来源污染,突然退出 +探针不产生该审计的退出时观察。比较的 1,897 个打包源码文件与本次测量产品源一致。 +这些结果只验收上述打包路径,不代表正式安装或尚未成立的净收益门通过。 + + +### 所选读取与已结算记录的传输 + +显式 reader 现在只传送所请求的字面转义地址沿途的来源容器。既有 TypeScript +selector 仍独占 RFC 6901、数组下标、整批失败与恢复父节点的校验;Python 只从 +完整摘要校验的原件渲染原值。数组长度、容器类型、初读导航、完整发现、历史固定 +顺序和 native section-read 核验均保留。不新增缓存、metadata 文件、pointer parser、 +读取义务或 retention 声明;复用 main 的 selected-source IO 和共享 native 回放 owner。 + +组合 refresh 调用方也向既有 TypeScript 结算 owner 请求更小的最终读取。该 owner +核验 Turn 已结算后,显式投影保留相同身份、控制与三张回执,将六个未消费的 Run/event +正文置为 null。默认/完整读取以及全部待恢复状态保留完整原正文。这个内部 RPC +可选字段不改变 admission 或记账,也不增加 CLI 或产品流程。 + +未修改的原 quota 完整任务对 main `886f2cdff4b2` 重复三次:同一 Python、材料、独立 +产物检查和重放,覆盖 File/SQLite 的冷读、温态与 compaction 恢复,共 36 条件。 +两边均产生相同产物并只扣一次。252 次父进程/记账 child 来源观察无污染;测量期间 +产品源码摘要不变。以下中位数包括双向 RPC 和全部必要读取: + +| Provider/场景 | 全部调用方 stdout,main → 候选(字节) | RPC 次数 | RPC wire 字节 | +| --- | ---: | ---: | ---: | +| File/冷读 | 55,946 → 35,930 | 241 → 208 | 1,465,253 → 1,429,981 | +| File/温态 | 68,364 → 62,287 | 332 → 290 | 2,143,831 → 2,147,306 | +| File/恢复 | 90,181 → 61,556 | 334 → 292 | 2,149,657 → 2,143,784 | +| SQLite/冷读 | 56,343 → 36,004 | 241 → 208 | 1,467,027 → 1,431,735 | +| SQLite/温态 | 68,793 → 62,429 | 332 → 290 | 2,146,719 → 2,149,912 | +| SQLite/恢复 | 90,666 → 61,694 | 334 → 292 | 2,152,475 → 2,146,508 | + +温态 RPC 少 12.7%,但 wire 仍增 0.16%/0.15%;不含准备的当前步骤 stdout 增 +7.0%/6.2%,已观测 Python 读写合计增约 4%。主指标“同次完整 capture 到所选正文” +在候选温态约 82.6%,main 约 87.8%;候选冷读/恢复仍选完整正文,主指标 0% 不表示 +净收益为零。先前仅精简结构的 cohort 也仍是负数,不能与本 cohort 相加。冷读/恢复 +传输减少不构成整体净益;CPU/latency、原生 provider IO、模型输入/缓存/生成输出、 +账单和自然长程成果仍未资格化。此前 cohorts、冻结体积失败与原 C1 验收继续保留。 + +真实公开 CLI 与 main 对照保留 15 个成功/拒绝观察,覆盖精确大整数、转义键、非法 +下标及整批拒绝;同入口丢弃所选来源结构的 mutation 会使独立原值 oracle 失败。 +结算套件覆盖默认完整读取及六种恢复状态的完整等价,137 个 TypeScript 测试和 +control-plane typecheck 通过。最终安装 wheel 与 premerge 的读回随提交的精确 head +单独记录,不代表正式安装。 + +最终隔离安装 wheel 通过 325 项,另有 1 项 Linux-only skip;1,897 个已打包源码文件 +与测量产品源相符。完成进程的模块来源审计无污染,突然退出不在该审计观察内。 +扩大后的 source 结算运行有 274 passed、4 failed、1 项平台 skip。四项 File/SQLite +失败在 main `886f2cdff4b2` 原样复现:回执绑定任务转 deferred 后返回 `quota_skip`, +未保留原 closeout recovery;到期 successor-replan 的重放也丢失动作。正向 guard +中的 `should_run`/`delivery_allowed` 事实曾被初步解释为互相矛盾。下文修正该诊断, +保留原失败运行。更小记录投影不在这些失败路径上执行;不放宽回执规则来换取通过。 + +### 执行准备与原 Turn 恢复 + +普通 guard 可以要求领取任务,同时禁止业务交付。此时 `should_run=true` 与 +`delivery_allowed=false` 一致:已有领取后置条件要求在同一 Turn 重新进入,并明确 +取得 `execution_preparation.state=ready`。此前两个 File/SQLite 测试在产出 artifact +前遗漏了这一步。现在测试遵循已有调用契约,并核验同一结算身份下从负向到正向的 +追加式 guard lineage;既不改写原负向事件,也不放宽 native result admission。 + +另外两个失败暴露了产品缺陷:selected-Todo IO adapter 对 canonical obligation 已经 +禁止交付的规划操作,仍应用普通执行准备。任务为 deferred 时,到期 successor replan +因此被压制,重放也丢失原动作。adapter 现在先消费 TypeScript interaction owner +使用的同一明确 `delivery_allowed=false` 事实,再决定是否读取执行租约。规划仍不 +授予普通交付或扣额;省略该事实时保留全部原执行准备检查。普通领取、冲突、回执身份 +及 once-only 恢复仍由原 owner 管理,不新增决策 owner、协议字段、权限、cadence +顺序变更或 RPC。 + +使用同一套修正后的测试 harness,冻结的修复前产品源码通过两个普通交付用例, +仍失败于两个规划用例;候选四项全部通过,完整执行准备矩阵共 30 项通过。原四失败 +cohort 保留为历史证据,调用者顺序修复与产品路由修复分别记账。这只闭合已复现的 +规划路径缺陷,不代表完整 C1 验收或整体效率成立。 + + +未修改的原 quota 任务也再次与同一 main 源码对照,File/SQLite 的冷读、温态与恢复 +条件各重复三次。36 个条件均保留同一独验产物及含重放的一次扣额;252 次父进程/ +记账 child 来源观察无污染,产品源摘要不变。温态 RPC 仍为 332 → 290,wire 在 +File 增 0.165%、SQLite 增 0.073%;排除准备后的当前步骤 stdout 分别增 9.5% 和 +6.2%,已观测 Python 读写合计增 4.1% 和 3.8%。主指标“同次完整 capture 到所选正文” +候选为 84.1%/85.5%,main 为 89.2%/87.8%;候选冷读/恢复仍选完整正文。这是 +独立 cohort,不能与前一 cohort 相减作因果归因。规划路径正确性未解决普通温态路径 +的成本取舍;provider 原生 IO、latency/CPU、模型/缓存/生成输出、账单及自然长程 +效果仍未测量。 + +扩大后的 source 结算套件现有 278 项通过,另跳过一项原生 Windows PowerShell 用例。 +新建的隔离安装 wheel 通过 246 项,覆盖四个修正后的 CLI 用例、普通/native 执行 +准备、结算、组合收尾及 runtime 集成;原生 Windows PowerShell 与 Linux thread-group +exit 两项不适用于当前 Host。1,897 个比较的打包源码文件与本次源码一致,包括修改的 +adapter;227 个已完成进程及 102,420 次 Core 模块观察无来源污染。突然退出不在退出时 +审计的观察范围内。原隔离 guard 保留;这不代表活动 runtime 的安装或晋升。局部改动 +复用共享 IO adapter,另造 contract projection 或 lifecycle wrapper 会增加顺序风险, +没有必要调用者。 + + +### Native quota 的 capture 发布 + +已具备资格的 native quota 调用方现在复用刚发布的完整 decision,作为 source recovery +引用。此前,它在向同一个 TypeScript owner 请求可选展示前,还会保存一份逐字节相同 +的完整 projection;前一轮合格工作负载的 30 对 capture 均确认字节一致。adapter 现将 +生产者自有的原始引用传入既有 native preparation,外部 continuity 输入不能提供该引用。 +内容确实不同时,required view 仍单独保存;独立 API 与未初始化 native fallback 保留 +原发布路径。不新增 hard link、持久缓存、文件格式、语义 owner、读取义务、权限或 RPC。 +历史路径仍按原身份和摘要读取。 + +原 quota 工作负载与 main `6a9264034605` 对照,File/SQLite 的冷读、温态和 compaction +恢复各重复三次。36 个条件均产出同一份独验 artifact,含重放只扣一次;252 次父进程/ +记账 child 来源观察无污染,测量期间产品源摘要不变。30 个候选 capture 均不再保存 +重复的完整 projection。这消除了重复生产写入,未省略完整来源,也不声明模型保留。 + +| Provider/场景 | 全部调用方 stdout,main → 候选(B) | RPC 次数 | RPC wire B | 已观测 Python 读 B | 已观测 Python 写 B | +| --- | ---: | ---: | ---: | ---: | ---: | +| File/冷读 | 55,429 → 35,654 | 241 → 208 | 1,459,302 → 1,424,420 | 336,589 → 287,832 | 127,933 → 120,437 | +| File/温态 | 67,723 → 61,768 | 332 → 290 | 2,133,937 → 2,137,552 | 552,218 → 511,741 | 238,580 → 201,925 | +| File/恢复 | 89,316 → 61,059 | 334 → 292 | 2,139,532 → 2,134,660 | 580,809 → 519,604 | 233,054 → 195,818 | +| SQLite/冷读 | 55,826 → 35,728 | 241 → 208 | 1,461,076 → 1,426,174 | 344,133 → 295,172 | 129,145 → 122,147 | +| SQLite/温态 | 68,136 → 61,910 | 332 → 290 | 2,136,689 → 2,141,039 | 560,254 → 519,489 | 240,008 → 204,526 | +| SQLite/恢复 | 89,801 → 61,197 | 334 → 292 | 2,142,354 → 2,137,296 | 588,955 → 527,354 | 234,484 → 197,664 | + +温态已观测 Python 读写合计少 9.75%/9.53%,写入少 15.36%/14.78%;RPC 少 +12.65%,wire 仍增 0.169%/0.204%,排除准备后的当前步骤 stdout 增 7.02%/6.24%。 +主指标“同次完整 capture 到所选正文”在候选为 86.1%/84.7%,main 为 87.9%;候选 +冷读/恢复仍选完整正文。工具 stdout 不代表模型生成输出;原生/provider IO、 +latency/CPU、模型输入/缓存/输出、账单及自然长程成果仍未资格化。历史 cohort +保留原负数,不把不同 cohort 相减当成此次改动的因果成本收益。 + +同一测试 harness 在冻结的修复前 C1 源码上保留四项语义对照,并失败于四项重复存储 +断言。候选完整 native/lifecycle/reader/cost 套件 265 项通过;最终按实际公布的 +引用修改正文后,reader 拒绝变化字节且不改 native journal。公开 capture/model/ +恢复运行 64 项通过。新隔离安装 wheel 有 493 项通过,另有一项 Linux thread-group +exit skip;1,897 个比较的打包源与实测产品相符,包括两个修改的 IO adapter。278 个 +已完成进程和 45,049 次 Core 模块观察无来源污染;17 个未分发 tracked assets/dev +fixtures 另列,突然退出不在退出时审计范围内。这只资格化上述打包路径,不代表活动 +安装或独立 PR 批准。有界改动复用既有 recovery 引用,没有新增 writer、helper 框架 +或第二语义 owner。 + +### 已结算 result value 的传输 + +既有组合收尾调用方在 TypeScript 结算 owner 验证原身份及全部回执后,请求 +`include_record_bodies=false`。此前该投影删除顶层 Run 记录,却仍在四个 result +value 中重复返回相同的写回/扣额正文;调用方并不使用这些 value。现在既有 bundle +helper 在已经请求且完全 settled 的投影中清空这些正文,身份、回执 payload、失败 +及其它控制保持原值。默认完整读取和全部待恢复状态保留原正文;持久 Run、历史 +reader、记账及公开 CLI 结果不变。不新增选项、schema、RPC、缓存、Python 规则 +或模型读取义务。 + +这是既有内部 opt-in 读取投影的有意变化,默认 reader 不变。唯一生产 opt-in +消费者仍是组合 refresh/spend adapter。同一 TypeScript harness 先拒绝旧版的 +正文重复,修复后 137 项全过,包含完整读取与 pending 状态等价。真实 File/SQLite +CLI 独立核对正文省略、回执不变、持久读回及重放只扣一次。新增断言通过后暴露了 +测试局部变量覆盖问题;修正未改变任何断言或产品规则,原失败 cohort 保留。 + +较广源码运行保留 276 项通过、一项 native Windows 渲染 skip 及上述两项 fixture +失败;修正后的 File/SQLite 两例通过。隔离 wheel 保留其它 387 项通过、两项平台 +skip 及相同两项失败,随后在产品不变时通过修正后的两例。其 1,897 个比较的打包源 +与实测产品一致,包含修改的 TypeScript owner;17 个未分发 asset/dev fixture 另列。 +两次 wheel 运行合计 1,297 次已完成进程观察、535,308 次 Core 模块观察,无来源 +污染;突然退出不在退出时审计范围内。这只资格化已测安装包路径,不代表活动安装、 +独立评审或合并权限。 + +原 quota 工作负载不变,以冻结 main `0423908e9cf4` 为基线,各 provider/场景重复 +三次;候选包含该目标及此前 C1 改动。36 个条件均达到同一份独验 artifact,含重放 +只扣一次。252 次父/child 来源观察匹配各自固定版本,测量期间产品摘要不变。 +父进程记账已包含 child RPC,不再重复相加。 + +| Provider/场景 | 全部调用方 stdout,main → 候选(B) | RPC 次数 | RPC wire B | 已观测 Python 读 B | 已观测 Python 写 B | +| --- | ---: | ---: | ---: | ---: | ---: | +| File/冷读 | 55,472 → 35,678 | 241 → 208 | 1,459,815 → 1,400,685 | 336,894 → 288,097 | 128,010 → 120,512 | +| File/温态 | 67,892 → 61,813 | 332 → 290 | 2,135,559 → 2,114,908 | 552,831 → 512,164 | 238,851 → 202,786 | +| File/恢复 | 89,386 → 61,102 | 334 → 292 | 2,140,392 → 2,111,166 | 581,330 → 520,030 | 233,207 → 195,945 | +| SQLite/冷读 | 55,868 → 35,752 | 241 → 208 | 1,461,586 → 1,402,351 | 344,435 → 295,437 | 129,221 → 122,222 | +| SQLite/温态 | 67,403 → 61,955 | 332 → 290 | 2,136,570 → 2,116,685 | 559,999 → 519,924 | 239,399 → 203,919 | +| SQLite/恢复 | 89,875 → 61,240 | 334 → 292 | 2,143,241 → 2,113,734 | 589,491 → 527,788 | 234,645 → 197,795 | + +以上是三次观察的中位数,不声明统计显著性。温态 wire 少 0.97%/0.93%;File 范围 +为 2,134,771–2,135,559 对 2,113,851–2,115,192,SQLite 为 +2,136,570–2,138,375 对 2,115,544–2,117,498。温态已观测 Python 读写合计少 +9.69%/9.45%,RPC 少 12.65%;这些是累计 C1 对照,不将既有 RPC/IO 下降 +归给此次小投影变化。 + +排除准备后的当前步骤 stdout 仍增 6.66%/8.73%。主指标“同次完整 capture 到所选 +正文”中位数为 84.7%/86.1%,main 为 87.7%/89.2%;三次范围分别为候选 +84.6%–86.2%/84.7%–87.6%,main 87.7%–87.9%/87.7%–89.2%。候选冷读/恢复 +仍选择完整正文。本次改动减少内部传输,不等于模型生成输出下降。CPU/latency、 +原生/provider IO、模型输入/缓存/输出、账单、自然采用及完整净收益仍未资格化。 +历史正负 cohort 保留原版本与结果,不跨 cohort 相减作因果归因。原 C1、最后 reader +退出及整体验收保持开放。 + +验证期间 main 推进到 `7f550aef58a8`,修改 Chat 原会话 fallback 及两个前端 fixture。 +该后续组合尚未资格化;本 cohort 和集成基线仍为 `0423908e9cf4`,不改记为移动后的 +实际目标。 + +### Main 集成与独立上下文层 + +实现 `6f00db17c654` 集成 main `918844a01746`,保留调用内首读计划复用,并接入 +main 的独立 Delta 路径:显式关闭 Progressive、开启 Delta auto 时,不发布渐进导航 +或已见字段复用;绑定 digest 的文件差分及当前完整恢复仍可用。普通 quota presentation +与 managed preview 已消费共享完整源 owner;本次不重复其迁移,也不退役绑定原版本的 +历史 journal。C1 的 RFC 增量随 main 迁到附录,两种语言的义务均保留。 + +实际 Codex 配合静态本地回环,在源码及隔离 wheel 中验证默认 Progressive 与独立 +Delta。完整未变大验收字段的匹配温态所选 BODY 仍由 14,386 降至 2,583 字节; +未经验证的已见字段连续性恢复 14,386 字节。独立 Delta 用例重建全部原字段,并通过 +实际客户端读取当前完整恢复。wheel 中的保存源身份拒绝、显式 off、前驱丢失及压缩 +恢复也通过。这些是传输检查,不是新增模型实验或安装态采用。 + +新的匹配工程 cohort 沿 main 原 quota 产品入口使用同一合成三步骤 Task:File/SQLite、 +冷/温/恢复各三次,成果由同一独立检查验证,扣额各一次。共 36 场景、60 Turn,包含 +准备及子进程 RPC/IO,后者只累计一次。BODY 按返回页的字节顺序重建,不取后备文件 +大小。SQLite 温态当前步骤 BODY 为 23,617 → 22,970 字节(−2.74%),CLI stdout +58,949 → 48,401(−17.89%),RPC 294 → 290,framed RPC 字节约少 3.74%。含准备时, +stdout 为 115,568 → 93,613,RPC 586 → 578,framed 流量约少 4.01%;已观测 Python +普通文件读/写约少 8.80%/26.18%。未测 Node/kernel/provider IO 与模型费用。File 温态 +带观测 CLI 时间反增约 7.5%,不据此资格化延迟。此轻量 quota fixture 没有大型验收 +正文,不能将其收益归因于字段复用。它只验证已测步骤,不代表原三步骤 Task 完成、 +自然模型采用或整体 C1 净益;历史失败、剩余 reader、质量和独立验收义务仍开放。 + +### Main 采用后的首读收敛 + +后续集成 `339f01e08782` 接入 main `39770a960483` 及已落地的首读生产者/读取器。 +最后一个 `project_codex_context` 测试 caller 改用 `prepare_codex_context`,删除未再 +使用的 Python wrapper;已记录源版本与 journal 恢复 codec 仍保留各自支持义务。 +benchmark 预检测试沿实际首份 BODY 读到 EOF,核 reference/source/selection 摘要及 +必要字段,并保留完整原件,不再把首个回复当成导航。 + +以该 main 重跑的 36 场景 cohort 全程保持产品源字节不变,沿用同一合成 Task、成果、 +一次扣额及成本边界。SQLite 温态 BODY 为 24,016 → 23,285 字节(−3.04%),CLI +stdout 59,898 → 49,136(−17.97%),RPC 292 → 290;framed RPC 字节反增 **2.93%**。 +含准备时,stdout 117,466 → 95,041(−19.09%),RPC 582 → 578,framed 字节反增 +**2.14%**,已观测 Python 读/写少 9.12%/26.28%。这些结果不改写上一 cohort,也不 +替代自然模型资格。当前 main 的原生对照温态 BODY 仍为 14,386 字节,字段复用为 +2,583;此大字段组件不在上述轻量 quota fixture 中。 + +配置内 Python 类型检查仍未通过:原 C1 为 4,809 条,本组合为 4,814 条。新增五条 +位于与 main Git 对象逐一相同的模块,保留失败,不予豁免。reader 退出、独立审阅、 +安装态采用及整体 C1 净益仍开放。 + +### 完整来源资格与 native 执行顺序 + +无写入行为资格工具现可在两个实验臂接收经 Core 校验的完整 v1 来源,并报告实际 +packet 版本。保留材料与反事实候选默认调用既有完整 composer;已捕获的完整来源 +保留原 Host 绑定与结算组合。原始 fixture 使用 Core 默认组合,不从候选元数据推断 +另一绑定。版本化 v0 状态矩阵继续作为明确的历史对照,包括当前 owner 拒绝的旧 +action 别名;这不退役仍受支持的历史 codec。 + +配对预检在任一 actor 调用前检查两臂的保密边界。完整候选继续校验来源、完整性与 +精确配对出处;provider 提示与编码 scheduler 扫描依实际 packet 布局选择字段, +不再依实验臂名称推断。当前格式删字段负例在 actor 前拒绝。语义负例改动原始 +source 后由 Core 组合,因此即使两侧绑定有效且彼此一致,仍须通过独立的固定 +战略链 oracle;签名篡改保留独立负例。 + +集成后的 native Host 暴露执行顺序缺口:delivery 守卫要求 Task 租约,而模型回调 +要等启动后才申请它。显式非报告 Task 现于守卫前进入既有租约生命周期,managed +回调复用并核对同一 Task。canonical 中不存在的工作仍进入 kernel 的结构化拒绝, +权限来源不可用时拒绝执行,也不借用冲突的执行租约。报告与已记录 resume 路径 +保留原生命周期;未放宽守卫或独立验收,也未资格化未显式指定 Task 的自动选择。 + +冻结的 main 集成先记录 646 通过、22 失败;开发运行保留 292/4 和 356/1,其中 +后一次发现过早申请租约的异常取代了缺失工作的原拒绝。修正后,新的一次八模块 +运行全程保持源码稳定,357 项全部通过,包含 61 项 native File/SQLite、原会话、 +HTTP、拒绝与独立验收。main conversation-binding TypeScript 模块通过 59 项, +五个改动资格 Python 模块通过类型检查。这是本地合成 actor/provider 检查,不是 +真实模型行为或完整成本证据。 + +新鲜校验的 Chat bundle 与隔离 wheel 中,1,815 个 Python/TypeScript 源与实测 +产品字节一致。安装环境中的完整请求、当前与显式历史配对、错源拒绝及实际适配器 +配合本地 transport double 均通过;已观测 300 个 LoopX 模块,无 checkout Core +借用。native Host 仅做安装导入,未作为安装态旅程执行。首次旧/缺 bundle 构建、 +harness 准备失败和历史 v0 大整数来源不匹配均保留;旧格式正向对照回到原可表示 +fixture,当前格式的大整数检查仍保留。这些结果不构成活动安装、真实模型运行、 +整体 C1、质量/readiness 或净收益资格。 + +后续直接 writer 审计发现,公开 task-orchestration smoke 仍生成 v0 输入,另有一个 +场景 packet builder 已无调用方。示例现以各自原 scheduler context 组合完整来源, +并读回 Codex、Claude 的最终 Host 请求:完整来源、主 Task 选择及原有子任务 +上下文与原生操作断言均保留。闲置 builder 直接删除,不再添加无人调用的替代 +抽象。明确版本化的 v0 状态矩阵及受支持历史 writer/reader 继续保留;产品代码与 +示例中的 Python 直接调用审计只剩该历史矩阵调用旧 writer,不声称覆盖动态调用。 + +公开示例在迁移前后均通过。默认配置的 Mypy 在前一 `a706379f70` 检查点及本次 +改动后均通过全部 17 个入口;这更新当前类型资格,不重写较早 4,809/4,814 的 +失败。这些检查没有执行真实子任务创建,不证明真实模型采用或新安装包资格。 + +新的一次四模块回归全程源码稳定,247 项全部通过,覆盖真实 Turn driver、活动 +portfolio 来源、历史 corpus 及重规划 Host-context 投影。这是本次调用方资格, +不与较早的 357 项或安装运行合并记账。 + +### 集成 main 后的安装态 native 生命周期 + +集成 `5091fb82a9` 接入 main `9d276f6cb9` 的原上下文补答修复。native Turn Host 与 +私有会话两个模块的新一轮源码回归全程源码稳定,466 项全部通过。重建并校验 +Chat bundle 后,同样两个模块在隔离安装包上以原样夹具运行,覆盖真实 File/SQLite、 +native 协议与 HTTP、原会话、独立 Task 验收、来源/权限拒绝及恢复。模型与外部 +provider 仍为合成实现;这已超出 native 只做导入的范围,但不资格化活动 App 或 +真实模型采用。 + +首轮安装运行保留 459 通过、7 项准备失败:明确启用账户路由的七个用例缺少单独 +分发的可选包。安装同提交的 0.15.3 wheel 后,新的一次完整回归 466 项全部通过, +未将局部复跑拼接成全绿。原失败及审计 helper 的 61 条弃用警告保留;helper 改用 +关键字参数,与产品代码分开处理。 + +Core 包内 1,815 个 Python/TS 文件及可选分发的 24 个文件,均与提交和安装字节 +一致;已有私有故障进程测试 driver 不在此 wheel 资格范围。48 个已观测 Python +进程中的 1,228 个 Core 模块、7 个可选 provider 模块及 4 个已观测子进程源码 +路径均来自安装分发,无 checkout Core/provider 导入。夹具与安装源保持不变。 +默认配置 17 入口 Mypy、集成后的会话绑定 TS 模块 60 项通过。较早 357/247 项及 +PostgreSQL 证据保留各自版本;这些合成正确性与来源检查不能证明完整成本收益。 + +### 可见 Goal 读取与已声明的验收审计 + +集成 `d80b3860ab` 接入 main `ac62962255`。独立审阅发现,可见 Goal 提示新增了 +无条件完整 capture 前置读取,连普通/off 输入也受影响,并拒绝了三个原本合法的 +4,000 字符配置。捕获提示现要求读取所需原始章节;普通/off 不新增 capture +前提。work_context 与 required_reads、明确完整读取义务、原身份/恢复、传输 +flags、结算和停止规则均保留,4,000 字符 Host 上限不变。24 个同条件 builder +输入中,main 接受 21 个、候选接受 23 个,没有丢失 main 的合法输入;一个过大 +输入在两侧仍被拒绝。 + +完整 structured、Codex Host 输入复用已声明审计的原触发条件:判断 Goal 验收 +或提出关闭前先读取。八个 File/SQLite 反事实覆盖两种 Host 和有/无审计;缺失 +审计的负例捕获并否决了首次无条件提示。十二个合成历史 structured renderer +用例保持输出逐字一致、输入不变。这是限定范围的指令资格,不证明模型记忆保留。 + +heartbeat 消费方现校验完整来源,通过带摘要校验的分页 reader 读取调用方原本 +持有的 capture。原 scheduler、选择、回执及一次结算 oracle 保留。安装运行暴露 +测试调用方隐含借用 checkout 工作目录:refresh 应在其实际 disposable project +执行。首次安装全组 60 通过、18 失败;同一 wheel 仅修正调用目录的对照通过, +没有放宽生产工作区守卫。 + +最终九模块源码运行全程来源稳定,记录 **855 通过、2 失败**;三个模块的完整 +安装复跑记录 **80 通过、2 失败**。两侧失败均保留原始 JSON 预算:两个长 scope +后端用例 5,519 字符超过 5,400,而同条件 main 的原四个预算用例全部通过。 +没有调高预算、缩小夹具或减少有用义务来隐藏回归。早期失败组及一次私有审计目录 +准备失败保留。默认 17 入口 Mypy、六个改动路径的 Ruff 和有限语义 advisory +通过。1,815 个 Core wheel 源与冻结实测及安装字节一致;五个已观测 Python +进程、1,179 个模块和六处已观测子进程来源无 checkout Core 导入。部分子进程 +覆盖审计环境,故不声称观测了所有进程。这些合成检查资格化修复后的 Goal/审计/ +调用方切片;整体 C1、剩余预算回归、真实 App/模型采用及完整成本收益继续开放。 + +### 保留生产者已绑定的 heartbeat Turn 身份 + +运行时 `3736048363` 在既有生产者实际替换时间戳占位符后,移除不再适用的唤醒 +指令。绑定后的提示已包含原具体赋值及独立 guard,再要求模型换成新唤醒时间戳 +既重复又可能丢失原身份。未绑定的可复用模板保留原指引。四种提示模式共用既有 +绑定 owner,不增字段、开关或 reader;历史正文、命令、传输 flags、必读内容和 +恢复/停止/结算规则不变。 + +八个模式/宿主语法反事实在修复前失败、修复后通过;Windows 语法为模拟,不是 +Windows 安装资格。32 个实际 builder 对照中,16 个未绑定的默认/off 输出逐字 +一致,16 个已绑定输入只移除已履行的指令,其余生成字段和上限不变。原四个真实 +CLI 预算用例的路径、scope 和断言保持:长用例从 5,519 降至 **5,379 个原始 JSON +字符**,正文少 139 字符,另少一个 JSON 转义字符;同条件 main 仍为 5,363。 +这是修复候选回归,不证明相对 main 的完整流程节省。5,400/5,500/4,000 上限及 +独立溢出负例保持。 + +新的一次九模块回归全程源码稳定,**865 项全过**;三个模块的隔离安装完整运行 +**90 项全过**,保留原 worker 选择、修复、capture、重放及一次结算 oracle。 +较早 855/2、80/2 保留各自原版本。默认 17 入口 Mypy 和改动 Ruff 通过。新鲜 +bundle 校验及 wheel 来源检查将 1,815 个 Core 源、24 个可选 provider 文件绑定 +到冻结实测字节;五个已观测 Python 进程、1,179 个 Core 模块及六处已观测子进程 +来源无 checkout Core 导入。审计覆盖限制、合成 provider、真实模型采用和完整 +成本尚未资格的边界沿用;独立审阅和整体 C1 验收仍开放。 + +### 可见宿主的调度观测 + +Pi、OpenCode 和 OpenCode 2 已绑定 Agent 时,共用现有调度观测。可运行状态、重置 +标记、等待限制和终止来源均取自同一 Core 决定。此前三个调用方用普通模型上下文 +接口做调度探测,收到渐进导航时读不到续跑所需字段。OpenCode 和 OpenCode 2 读取 +当前的按需调度详情,继续接受历史调度形状。两者显式请求的宿主轮询回执每次探测 +沿既有写入方记录一次。 + +调度观测不启动 Turn,不捕获模型上下文,不触发结算。工作交付仍按原上下文策略。 +旧宿主绑定缺 Agent ID 时沿显式完整观测,绑定 Agent 后切换。升级或回退时使用 +同一构建的宿主适配器和 CLI。原版本 Turn reader 在受支持的恢复窗口继续服务尚未 +结清的工作。 + +### 恢复被拒绝的完整来源组合 + +组合失败时,capture 根记录既有传输失败契约,明确 `ok=false` 和 +`should_run=false`。原始输入的全部事实保存在 `source_diagnostic`,同时保留 +原回执及运行时的类型化组合诊断。语义拒绝和运行时启动失败共用这一路径,诊断 +恢复沿现有带摘要校验的按需 reader。 + +当前来源经成功组合后才能发布工作或原生认领准备。这修复了被拒绝的当前输入 +可能被误当成未版本化历史 capture 的路径。真实历史 capture 沿显式恢复 reader。 +成功组合后才发生的交付失败,保留已验证的原 capture。 + +限定范围的合成 File/SQLite 用例覆盖准入后未知 action、未知交互版本和组合 +不可用。独立 oracle 检查完整诊断回读、执行投影拒绝、原生 journal 与认领来源 +副作用、一个原回执及零 spend。既有暂停、capture、handoff 和历史恢复覆盖共同 +资格化相邻边界。整体 C1 验收及真实模型效果继续开放。 + +### Codex SSH 准入命令与 managed retry + +新生成的 Codex SSH Goal prompt 和 onboarding guard 使用完整 Turn 来源,并沿用 +原生 begin-Turn 身份。已保存的 bootstrap 若带旧显示参数调用生成器,仍可生成 +当前 guard。显式关闭 context delivery 时直接返回完整来源。启用时按返回命令 +读取同一 capture,并按原 Turn 的结算计划执行。标准包和独立 Core 包使用共有 +的 CLI 入口和参数语法执行待结算命令。 + +TypeScript controller 的 managed-step 入口要求新鲜的完整决定。已保存的失败 +Turn journal 仍沿原版本读取。在实时入口注入签名有效的 v0 preview 会在启动 +Host、改写 journal 或扣额前拒绝。重试继续使用原 Turn。 + +源码和隔离安装包的 File/SQLite 用例覆盖启用、显式关闭、旧 bootstrap 重生、 +同一 capture 读取和结算重放。原生 Turn 测试还覆盖丢失扣额响应。 + +### Benchmark 和 MCP 实时读取 + +新 benchmark heartbeat 在两种 context-delivery 设置下都请求完整决定。 +新 checkpoint 选择要求带签名的来源。历史 checkpoint 接续沿用原捕获 reader 和 +Turn 身份。Benchmark 的显式 v0 展示入口仍待退役。 + +共用 MCP 实时读取请求完整决定,返回原始 JSON 和 MCP 指引块。来源绑定缺失或 +被改动时拒绝交付,实时无版本投影已移除。现有 `complete_task` 事务继续负责 +认领校验及结算。真实 stdio、重放与历史恢复测试在隔离 authority 运行。 +MCP 客户端的安装态验收仍待完成。 + +普通 quota、App 安装态采用、剩余结算调用方及单会话成果与完整成本仍待验证。 + +### 分阶段派发与过期任务重试 + +分阶段派发沿用发布捕获与预留启动前最后一次 TypeScript 来源校验。当前 plan +只组装完整 Host 请求。外部进程与进程内 Host 收到同一份已检查的请求; +stdin 写入不再重建旧版适配器。已存过渡格式的转换仍保留在历史读取边界。 + +原生重试仍读原捕获。启动检查拒绝进入时,日志为未派发模型的尝试记录明确的 +契约拒绝,覆盖缺少所需能力和任务变更。日志保留原会话的恢复要求。若操作 Host +已经绑定会话,模型启动检查随后拒绝派发,下一次显式重试必须恢复该会话。任务 +与所需能力恢复后,重试须通过当前启动检查。变更后的任务须取得新的合格 Turn。 +派发结果不明时仍须沿原尝试对账。 + +原生和外部 stdio 派发检查绑定原硬租约的执行标识。续租保留该标识。释放后重新取得 +租约必须使用新的 Turn,即使同一 Agent 仍负责同一 Todo。File/SQLite 上的 +Codex CLI 和操作模式 app-server 实跑确认,换租约会在模型派发和结算前拒绝首次派发 +与显式重试。stdio 适配器在换租约后的重试中也拒绝启动进程。以上路径在原租约续期后 +仍可派发。 + +当前检查和派发共用 Todo 与租约权威写入锁。在普通 Codex CLI、操作型 Host +和外部 stdio 重试中,如果独立进程在检查完成后、进程创建或发送 `turn/start` +前请求释放租约,写入会等派发完毕。Host 仍在执行时即可完成释放。竞态用例 +使用真实 File 与 SQLite 和合成 Host。若 registry 正被其他操作锁定,当前派发会 +在发送请求前拒绝,原尝试可供重试。 + +写入锁期间,租约计时仍继续。启动作用域保留原准入代的当前到期时间,将它传到 +原生进程启动或写入 `turn/start` 的位置。stdio 桥收到请求后,在启动 Host 前 +再次校验该时间。租约已到期时,在任务执行、工作写回和扣额前拒绝派发,包括 +适配器已为原 Turn 绑定会话的情况。 + +桥确认尚未派发 Host 后,父进程等待它正常退出。该分支保留原租约到期错误,继续 +要求清理确认。File/SQLite 回归同时断言派发拒绝、桥正常退出及终止调用次数为零。 + +File/SQLite 用例覆盖任务不变时重试、能力和任务变更、原会话恢复、历史格式及 +子进程 stdin。可见 Codex CLI 的 JSON 默认使用完整来源,生成的 Turn 绑定命令 +继续沿用该来源。通用 quota 对照保留精简输出。用例使用隔离的合成 Host,实际 +安装态与模型成果仍需另行验收。 + +### 绑定 Turn 的通用 CLI 心跳 + +DSH 在 `generic_cli` 配置下为明确的 Agent 和 Turn 启动生成的薄心跳。该 JSON 路径 +现在由 Codex 已有的完整来源组合器生成当前捕获,绑定路径退出普通无版本 quota +writer 和 compactor。选题与结算恢复沿用已有的传输绑定,扣额仍由 Agent 执行。 +显式 Off 在选题和原 Turn 恢复中持续生效。未绑定的探测和 EdgeBench 的显式 v0 +对照仍有活跃调用方。原版本捕获读取器用于固定版本的历史工作。 + +同一合成任务在主干 `f7e3f427197b`、前一个 C1 头 `6415e3607502` 和本次产品代码 +`0057a1dbd129` 上实跑。每组交付设置及后端重复三次,计入薄心跳、选择、绑定、 +从原捕获读回必需内容、写回、恢复待扣额、扣额和重放八步。36 次均取得同一经独立 +检查的夹具产物,同一 Turn 留下首次准入和绑定两条回执,扣额一次。 + +| 交付设置和后端 | 主干 stdout 中位数(B) | 前一个 C1(B) | 当前(B) | +| --- | ---: | ---: | ---: | +| On / File | 48,950 | 48,819 | 48,644 | +| On / SQLite | 48,998 | 48,867 | 48,692 | +| Off / File | 127,838 | 127,707 | 126,327 | +| Off / SQLite | 127,926 | 127,795 | 126,377 | + +主干原 Off 选题命令遗漏两个交付参数,后续恢复使用默认渐进交付。File 和 SQLite +全程输出分别为 73,710 和 73,758 字节。表内 Off 对照在基线的选题与恢复中补齐 +两个 Off 参数,候选由生成命令直接带齐。四个场景的 CLI 端到端耗时有升有降。 +夹具计入 CLI 输出与调用次数并实跑原捕获恢复。RPC、文件 I/O 总量、模型实际决策与 +费用,以及已安装 DSH 或 App 会话的采用还需补证。 + +### EdgeBench 新 heartbeat 统一使用完整契约 + +EdgeBench CLI、SForge/Harbor 启动配置、普通 worker 唤醒与 checkpoint +预检使用同一份完整契约。显式请求旧展示会在登记试验或创建新唤醒前拒绝。 +显式关闭上下文交付仍传到 quota guard,原完整来源与结算身份保留。 + +原生 checkpoint 恢复继续核对记录的展示方式和精确待完成命令,覆盖旧 v0 +记录。归档重跑使用已记录的产品及 runner 固定版本。支持恢复窗口结束且 +无未结记录需要旧 reader 后,再退役它。通用旧 CLI 的其他调用方与实际安装态 +采用仍需各自验收。 + +### 已绑定捕获的 heartbeat 入口统一使用完整契约 + +薄 heartbeat 共享生成器为使用旧 `--turn-envelope` 参数的捕获唤醒输出完整 guard。 +新保存的入口写 `--complete-turn`。托管升级按原字节核对旧入口,携带显式身份、 +捕获和交付设置。显式捕获 Turn 的两种入口拼写共用原薄提示词余量。 + +直接 quota 兼容入口继续服务现有原始调用方,待这些调用方迁移后退出旧 writer。 +原捕获和待完成命令在恢复窗口内使用各自版本的读取器。 + +六组本地 File/SQLite 对照使用同一选定 Todo,显式关闭上下文交付。首个 guard +从 22.1 KB 增至 37.9 KB。读取完整契约时,两种后端上入口、guard 和捕获分页的 +总输出由 71.7–71.9 KB 降至 42.9–43.0 KB。每组都保留同一结算身份,每臂仅一份 +心跳回执。选读成本、模型实际成果及实装采用仍需验证。 + +### Kiro CLI 薄心跳使用完整 Turn 来源 + +生成的 Kiro 启动指令为绑定 Agent 和 Turn 的 JSON 工作调用共享的完整来源组合器。 +显式关闭交付时,完整决定以内联方式返回。可见 Goal 的写回、恢复和扣额沿用原 Todo +与 Turn。无 Turn 的普通探测保留紧凑输出。Kiro 的 MCP 工具此前已使用完整来源组合器。 + +对照前一候选 `3f527c468b2f`,每个后端及交付设置各跑三组,实跑生成的启动指令、 +绑定 guard、交付读回、合成成果检查、写回、扣额和重放。两个后端也在新版本上恢复了 +前一版本保存的 Kiro 原捕获。恢复时拒绝身份不符的 Agent,原 Turn 只扣额一次。 +下表的 CLI 标准输出中位数在 guard 返回引用时计入完整读回。 + +| 交付设置和后端 | 前一候选(B) | 当前(B) | +| --- | ---: | ---: | +| 默认 / File | 70,190 | 71,182 | +| 默认 / SQLite | 70,252 | 71,244 | +| 关闭 / File | 61,578 | 61,142 | +| 关闭 / SQLite | 61,640 | 61,204 | + +直接 quota 的显式关闭入口另做了短 v0 改为内联全量的试验。同一夹具的 JSON 从 +23.1 KB 增至 48.4–48.5 KB,Markdown 从 2.4 KB 增至 48.2 KB。该显式入口保留有界 +writer,待实际调用方的替代路径通过验收再退役。历史解码器在受支持的恢复窗口内继续 +服务未结原记录。实际 Kiro 会话采用,以及和原 quota 的模型成果与完整成本对照仍需验证。 + +### 生成的外部 CLI 启动器使用完整工作契约 + +手动 shell 和自定义外部驱动现在从 onboarding 与 bootstrap 获得既有的 +`generic_cli` 配置。Agent 和 Turn 均已绑定时,生成的 guard 走共享完整来源。 +上一版本的启动命令返回后续操作文字,缺少绑定的结算计划。新的 guard 携带原 Todo +与 Turn 做持久写回和一次心跳扣额。显式关闭交付时以内联方式返回完整来源。 + +相对 `e3d470c1903f` 的十六组本地对照实跑生成的 onboarding 和 heartbeat 命令、 +捕获与读回、相同夹具产物的验证、写回、扣额及重试。基线夹具在结算时显式提供 +原 Turn。两类启动器均在 File 和 SQLite 上恢复旧版无版本捕获,错误 Agent 被拒绝, +原 Turn 只扣额一次。 + +从执行生成的 heartbeat 命令起计,计入完整引用读回和结算后,默认交付每轮的 CLI 输出 +从 58.3 KB 增至 71.2–71.3 KB,显式关闭从 50.3 KB 增至 61.2–61.3 KB。Full 安装通过 +`agent-onboard` 生成命令,独立 Core 可运行生成的 heartbeat 及其 quota、捕获和结算命令。 +已复制的启动器可经原 onboarding 入口重新生成,为新工作采用完整来源。手写 raw CLI 和 +显式有界 v0 保留兼容入口。模型实际采用和完整成本仍需原 quota 单会话对照。 + +### 绑定的直接 quota CLI 使用完整来源 + +携带显式 Agent 和 Turn 的 JSON `quota should-run` 现在共用完整来源,包括未声明 +调度配置和逐项写出 `generic_cli` 宿主字段的直接调用。普通 CLI 复用已声明 +generic CLI 的结算计划生成器。发出的写回、心跳扣额命令绑定回执中的原 Todo 和 +Turn,并分别执行。缺少调度声明仍不授予调度权限。显式 Off 内联完整来源。无 Turn +的普通读取与显式有界 v0 显示沿用兼容入口。 + +八组 File/SQLite 同条件对照比较直接命令与主干 `f3bdad238739`,并另以前一 C1 +候选 `6cbc9a4aa56a` 对照。旧响应缺少绑定的结算计划,基线夹具在结算时显式提供 +原 Turn。两臂验收相同合成成果,各扣额一次。候选读回原捕获,拒绝错 Agent,期间 +没有重新准入。guard、完整引用读回、写回、扣额和重试的调用次数相同。相对主干, +默认交付的 CLI 标准输出从 52.0 KB 增至 64.3 KB,显式关闭从 44.0–44.1 KB 增至 +55.8 KB。该输出比较不计额外的恢复探测。长路径显式 v0 预算和已有完整诊断格式 +均通过原检查。模型成果、选读成本与实装宿主采用仍需验证。 + +### 保留 EdgeBench 显式短视图对照 + +同一 heartbeat 适配器配置在主干 `f3bdad238739` 接受 `--turn-envelope`, +在 C1 `efa342224084` 的首次唤醒之前拒绝。EdgeBench 现将显式选择传到 +SForge、Harbor、唤醒回执和 checkpoint 预检。绑定的 `generic_cli` +心跳在选题重入时保留此参数。显式 Off 使用既有 v0 投影并链接原始完整 v1 +捕获。启用交付时原生 reader 呈现同一来源。完整默认入口沿用原结算路径。 + +File 和 SQLite 用例覆盖两种交付设置下的实际渲染、选题、私有交接和 +checkpoint 预检。验证原认领和签名捕获,从实际返回的引用恢复原件, +按原身份结算一次,并在启动前拒绝冲突的视图选择。隔离标准 wheel +通过 24 个 worker 用例。外部 worker 取消用例改用真实调度观察, +实际启动并回收独立夹具进程,读回取消回执,额度扣减为零。 + +历史对照沿用原 runner 与 LoopX 的固定版本。具名调用方替代和回退 +均验收后,再退役这个显式兼容视图。合成验证之外,实装宿主采用、 +匹配单会话的模型成果及完整成本仍待验收。 + +### 直接 quota 内联交付复用诊断字段 + +上下文交付关闭且完整决策以内联方式返回时,普通的已绑定 generic CLI JSON 复用 +既有的紧凑投影行和 Todo 摘要引用。校验按原服务时刻重建来源行,并按原顺序 +还原 Todo 列表。完整捕获保存任务、边界和原结算计划。 + +与 `f8d0eb588c7e` 同条件运行 File 和 SQLite 夹具时,普通 Turn 在显式 Off +下的标准输出从 55.7–55.8 KB 降至 54.3–54.4 KB,含 guard、写回、扣额和 +扣额重试。两版本均恢复原捕获、拒绝错误 Agent 并只扣额一次。篡改紧凑捕获后 +即使重算文件摘要,也未通过完整来源的完整性校验。尚未选题的初次 replan 输出由 +47.4 KB 降至 45.5 KB,同一 Turn 均无扣额。小型和多 Agent 决策以同一来源 +比较,解码签名捕获后重建的诊断事实全部相同。 + +默认交付含完整引用读回的标准输出仍为 64.0–64.1 KB,同一普通工作夹具在主干 +`f3bdad238739` 为 51.7–51.8 KB。默认采用仍需验证真实选读及匹配模型的成果和成本。 + +### 在初次读取交付当前 Goal 修订 + +共享的初次读取先交付由权威存储提供的当前 Goal 目标、修订号和摘要,再交付 +原 Goal 正文。现有 Goal 验收模块提供修订并判断采用状态。同一捕获可读回支持 +历史和其他 Agent 的采用状态。 + +绑定的通用 CLI 和 Codex App CLI 在 File 与 SQLite 上运行普通 guard 及其实际 +发出的读取命令。四组用例在 `7a37d7d02e79` 的首读均缺当前目标,须从同一捕获 +另行选择这三个字段。候选在同一夹具中使初次读取增加 552 字节,读完相同事实则 +各少一次调用、少 629 字节。现行目标先于原正文到达,读回保持原回执,额度操作为零。 + +在没有 Goal 修订的另一组直接 CLI 对照中,较主干的全文读回差额约有 10.6 KB +来自新增结算计划。这些比较涵盖 CLI 输出和读取调用,匹配模型的成果和完整成本 +仍待验收。 + +### Windows 通过私有引用恢复有输出上限的上下文读取 + +选区游标失效且输出上限容不下完整恢复命令时,Windows 路径复用现有的私有捕获 +目录分配方式。发出引用前校验源文件及所在目录。引用绑定原捕获摘要、读取器入口 +与选区,读取器据此从零偏移重新读取。 + +CLI 夹具用 macOS 私有文件执行 Windows 分支,上限为 700 字节。 +`dead3c8ce709` 对私有捕获的拒绝响应缺少恢复命令。更新后,CLI 返回恢复命令, +执行命令可逐页读回完整的原选区。源文件或目录权限放宽时,CLI 不生成引用。 +改动原捕获字节后,已发出的命令拒绝读取。Windows 原生 DACL 与 PowerShell +执行仍需在 Windows 宿主上验证。 + +### Windows 带输出上限的 quota 守卫在准入前预留私有恢复入口 + +JSON quota 守卫收到输出上限后,在准入前为恢复读取器预留空间。预留与保存选区 +的重新读取共用私有目录分配。Windows 分支使用实际临时目录,并对新目录应用既有 +的仅所有者访问策略。 + +File 和 SQLite 夹具在 macOS 上执行 Windows 分支。两者在 `e9339babfc71` 均因 +1,700 字节上限在准入前被拒绝。修复后各准入一次。模拟宿主交付失败后,实际执行 +返回的命令可在上限内读回原捕获和回执。上限为 96 字节时,两者均在写入捕获和 +回执前拒绝。各组均无扣额。Windows 原生执行仍待验证。 + +### Benchmark 检查点预检后沿用保存的动作 + +非原生检查点的提示要求 worker 遵循保存视图中的动作、必读材料和结算指引。 +在 `e9339babfc71`,File 和 SQLite 共四个显式旧视图的用例缺少动作指引。 +同一组用例核对返回的读取命令、保存的来源和一次 guard 后交付的提示。 + +在 `f220690bef2f`,默认完整视图的提示缺少遵循交互契约的指引,显式 Off +短视图缺少有输出上限的原选题命令读取入口。现在完整视图提示涵盖适用的 +replan 审查和写回必读项,v0 提示提供校验摘要的原捕获字段读取器。 + +File 和 SQLite 的原捕获全文为 31,497–31,509 字节。按字段读取选题命令 +返回 2,049–2,055 字节。计入预检提示、短视图各页和原捕获读回输出,读全文时为 +47,449–47,479 字节,按字段读取时为 18,756–18,782 字节。CLI 用例执行 +读取到的命令在原 Turn 内选题,拒绝错误摘要,扣额为零。模型成果和端到端成本 +仍待验收。 + +### 带上限的 quota 恢复使用调用方显式指定的 PowerShell 启动器 + +共享命令解析器接受显式路径上实际存在的 PowerShell 脚本。PowerShell 可以调用 +没有 POSIX 执行位的脚本。quota 守卫在准入前使用调用方指定的启动器预留恢复读取入口。 + +File 和 SQLite 夹具在 1,700 字节预算下均准入,返回的恢复命令可在 macOS 的 +PowerShell 7 中原样执行。启动器路径含空格、直撇号和弯撇号。两种存储均在上限内 +读回原回执,保留一次 guard 和零扣额。预算为 96 字节时,两者均在准入前拒绝。 +Windows 文件访问控制和原生 Windows Python 入口仍需在 Windows 宿主验证。 + +### 搬迁检查点后读回已提交的扣额回执 + +精确结算读回可以使用搬迁到另一 runs 目录的扣额工件。记账读取器将本地已提交 +事务回执与原索引行匹配,核对记录的工件名,再用回执校验本地扣额工件。 +扣额与撤销仍按既有规则校验活动目录。 + +在 `a1f34097805a`,File 和 SQLite 共四个用例因副本索引仍指向旧目录而失败。 +修复后,移走来源 runs 目录仍可读回同一结算身份和扣额。缺少工件或已提交回执、 +记录被改写、工件是指向原扣额的符号链接时,读取器拒绝。检查点及回执副本保留原字节。 diff --git a/docs/architecture/rfcs/ledger/controller-executor-unified-contract-v0/2026-10-30-c1-source-convergence.zh-CN.md b/docs/architecture/rfcs/ledger/controller-executor-unified-contract-v0/2026-10-30-c1-source-convergence.zh-CN.md index 9d03822d89..08f26774f1 100644 --- a/docs/architecture/rfcs/ledger/controller-executor-unified-contract-v0/2026-10-30-c1-source-convergence.zh-CN.md +++ b/docs/architecture/rfcs/ledger/controller-executor-unified-contract-v0/2026-10-30-c1-source-convergence.zh-CN.md @@ -4,12 +4,13 @@ - **状态:** 未合并的集成证据;C1 仍处于开放状态。 - **来源:** 尚未合入的 C1 统一分支及其对 `main` 各检查点的集成(另见 [打包 heartbeat 对照](2026-10-28-packaged-heartbeat.zh-CN.md))。 - **语言镜像:** [English](2026-10-30-c1-source-convergence.md) +- **完整仅追加原始归档:** [2026-10-30-c1-source-convergence.raw-archive.zh-CN.md](2026-10-30-c1-source-convergence.raw-archive.zh-CN.md)(`sha256: b371a2b464e88401615ee78fd93fd36d54bba08f836a86322ae7b717b8a1325c`)——原样保留完整历史时序、反例与验证边界;本摘要仅作导航索引,不宣称全文逐句语义等价。 ## 已合入与未合入的收敛边界 | 边界/Owner | 当前 C1 状态 | 保留兼容性与退出门禁 | | --- | --- | --- | -| 完整来源 `work_contract`(`compose_turn_decision`、`completePlanningFacts`) | **C1 未合入:** 统一守卫、Host、driver、MCP、Benchmark、Kiro、DSH、SSH 及已绑定 `generic_cli`(`quota_settlement_plan_v2`、沿 `#8691` 共享 `task_context`)。 | 无 Turn 观察(`--scheduler-observation`)、显式 `--turn-envelope` v0 短视图(`EdgeBench` 及显式兼容调用方)与历史 v0 捕获保留显式读取器,直至替代路径与恢复窗口验收完毕。 | +| 完整来源 `work_contract`(`compose_turn_decision`、`completePlanningFacts`) | **C1 未合入:** 统一守卫、Host、driver、MCP、Benchmark、Kiro、DSH、SSH 及已绑定 `generic_cli`(`quota_settlement_plan_v2`、沿 `#8691` 共享 `task_context`)。 | 无 Turn 观察(`--scheduler-observation`)、仅存于 `model_behavior_corpus.py` 的 `build_turn_envelope` 旧对照构造器(现直接转发同一 TypeScript 操作)、显式 `--turn-envelope` v0 短视图(`EdgeBench`)及历史 v0 plan/capture/回执保留显式边界,直至最后受支持对照调用方与恢复窗口退出。 | | 文件优先渐进/差分与字段复用(`#7560`、`#7627`、`#7935`、`#8186`) | **已合入 `main` 并由 C1 采用:** 单次调用初始计划、已观测字段复用与摘要绑定文件差分替代已退役的未合入原型 `outcome_context_projection_v0` 强制阅读计划。 | 部分或截断读取永不建立基线;`context_delivery=off` 配 `delta_delivery=auto` 不发布渐进导航;普通 CLI 默认采用仍须 §9 验收。 | | 数值保真(`#7557`、`#7633`、`#7643`、[数值检查点](2026-10-29-complete-numeric-integrity.zh-CN.md)) | **主干 owner + C1 传输:** 稀疏数值标记(`1.0` 与 `1`、`-0.0`、大整数)与 `hash_codec` v1/v2 经 TypeScript 修改计划保留原 Python JSON 值。 | 持久化 Python JSON/action-hash 原像保持不变以兼容既有 Turn key;精确字节 capture 摘要仍与 JS 归一化哈希分离。 | | 原生选区与重放检查点(`codex_context_history.py`) | **C1 未合入:** 将 hook 重放(`native_resume`/`selected_resume`)绑定物理 inode/区间摘要与仅追加记录字节覆盖,支持连续 resume 保留已核验选区。 | 缺少输出、Todo/正文变更、非仅追加尾部或压缩强制重读;`cli_version` 仅表征原写入者版本,不证明模型保留。 | @@ -25,7 +26,7 @@ Python 保留持久化 action-hash 数值编码)。 | --- | --- | --- | | Turn CLI 与启动决策 → plan | 直接传递完整来源;planner 拒绝同时携带完整来源和 v0 adapter 的输入。 | 默认检查保留完整来源、portfolio 与写回且不可执行(`12,388 → 26,524 B` 读回增量)。 | | Capture → Host / `turn_driver` / MCP / DSH / Ark | `host_dispatch_context` 与 `driver_lineage` 在派发、session 谱系或完成意图前一次校验完整来源与 `selectedWorkTodo`。 | 省略合同保留历史 v0 解码;显式 `null`、非对象、畸形或与来源不一致的 `work_contract` 在 Host/写回/扣额前拒绝。 | -| Journal 写入、检查与恢复 | 通过共享 TypeScript reader 校验 v1 与过渡期 `v0+work_contract`;在 `turn/start` 前施加 hard-lease 执行键与锁共享。 | 缺来源的 v0 记录在支持恢复窗口内保留原身份校验与原字节(`14` 组 File/SQLite plan JSON `-29.33%`,journal 字节 `-28.32%`,最终 Host 字节相等)。 | +| Journal 写入、检查与恢复 | 通过共享 TypeScript reader 校验 v1 与过渡期 `v0+work_contract`;在 `turn/start` 前施加 hard-lease 执行键、锁共享与 stdio 桥派发前到期校验(拒绝时等桥正常退出不强杀)。 | 缺来源的 v0 记录在支持恢复窗口内保留原身份校验与原字节(`14` 组 File/SQLite plan JSON `-29.33%`,journal 字节 `-28.32%`,最终 Host 字节相等)。 | ## 当前 quota 与 managed-controller 切换 diff --git a/loopx/cli_commands/quota_context_reader.py b/loopx/cli_commands/quota_context_reader.py index 86fa56dc55..192aa6336f 100644 --- a/loopx/cli_commands/quota_context_reader.py +++ b/loopx/cli_commands/quota_context_reader.py @@ -368,9 +368,9 @@ def compact_selection_fits_one_page(reference_file: Path, content: bytes, *, out reader_argv: list[str] | None) -> bool: """Measure the actual compact receipt frame without widening its channel.""" try: - return _capture_page(reference_file, content, "", offset=0, size=max(1, len(content)), + return bool(_capture_page(reference_file, content, "", offset=0, size=max(1, len(content)), output_limit=output_limit, instruction=False, select=[], reference_file=reference_file, - reader_argv=reader_argv, compact_reader=True)["eof"] + reader_argv=reader_argv, compact_reader=True)["eof"]) except ValueError: return False