|
| 1 | +# Packaged source fidelity and the remaining C1 cost gap |
| 2 | + |
| 3 | +中文镜像:[同名检查点](2026-10-29-packaged-source-comparison.zh-CN.md)。 |
| 4 | + |
| 5 | +This checkpoint supports the [single-session comparison](../../controller-executor-unified-contract-v0.md#9-validation-and-acceptance). |
| 6 | +It qualifies source delivery and recovery on a bounded engineering workload; |
| 7 | +it does not establish a net efficiency gain or complete C1. |
| 8 | + |
| 9 | +## Versions and workload |
| 10 | + |
| 11 | +The comparison pins original quota to mainline |
| 12 | +`b201da8bab305d053866aa0d4516b97ba4a4499e` and the proposed unified contract to |
| 13 | +`3afc2d547f6f9ca41368fd4f3f34d8f8dae9edcf` in |
| 14 | +[#7430](https://github.com/loopx-project/loopx/pull/7430). |
| 15 | +These are the tested versions, not a qualification of later mainline changes. |
| 16 | +Each isolated wheel has its own verified frontend source fingerprint; |
| 17 | +1,857 packaged product files match that arm's source, excluding generated Chat |
| 18 | +assets, which pass their separate bundle check. Both use Python 3.14. |
| 19 | + |
| 20 | +Each arm uses the same synthetic active Goal, full selected task and final stop, |
| 21 | +one current-Agent outcome and five peer outcomes with four requirements each. |
| 22 | +Both real File and SQLite authorities are initialized in disposable runtimes. |
| 23 | +The original 24 descriptions, owners, work links and global stop conditions are |
| 24 | +retained. No active Goal or installed host is used as a fixture. |
| 25 | + |
| 26 | +The packaged CLI runs thin heartbeat bootstrap, one admitted App-heartbeat guard, |
| 27 | +saved-file reads, native lifecycle hooks, warm presentation, compaction recovery, |
| 28 | +refusal controls, writeback/spend and their replays. Hook events are synthetic; |
| 29 | +the actual packaged hook and CLI implementations execute. A deterministic |
| 30 | +observer reads full sources to check equivalence. That observer is not a model, |
| 31 | +a recommendation to read every peer body, or evidence of model retention. |
| 32 | +The actual emitted warm delta is separately read and reconstructed against its |
| 33 | +digest-verified baseline and current files. |
| 34 | + |
| 35 | +This is a new matched workload, not a rerun or replacement of the historical |
| 36 | +13,000-byte experiment. The earlier **25,862 > 13,000** failure is unchanged. |
| 37 | + |
| 38 | +## Source and recovery results |
| 39 | + |
| 40 | +Both arms retain the selected task, all 24 requirements and global stops. Early |
| 41 | +spending is refused. Restoring the original capture recovers the same source |
| 42 | +without another admission; repeated writeback and spending commit one effect |
| 43 | +and one debit, leaving the original task open. |
| 44 | + |
| 45 | +The mainline generic codec changes the admitted source's `quota.compute` from |
| 46 | +`1.0` to `1`; its cold, warm-recovery and missing-baseline exact-source predicates |
| 47 | +fail on both backends. Its native cold presentation also carries `1` rather |
| 48 | +than the admitted `1.0`. The C1 candidate preserves the original source through |
| 49 | +these paths. This exercises the source-preservation repairs also proposed |
| 50 | +separately in [#7661](https://github.com/loopx-project/loopx/pull/7661) and |
| 51 | +[#7657](https://github.com/loopx-project/loopx/pull/7657), rather than creating a |
| 52 | +caller-specific numeric policy. Those proposals and C1 adoption are distinct |
| 53 | +from a mainline or installed rollout. |
| 54 | + |
| 55 | +Both native warm files use `captured_file` continuity. Their actual deltas |
| 56 | +reconstruct the current file exactly; missing baselines and damaged deltas |
| 57 | +recover its full body. This proves saved-file reconstruction, not retained |
| 58 | +model input. Mainline's reconstruction is exact relative to its already |
| 59 | +normalized presentation; that does not repair the preceding source loss. |
| 60 | + |
| 61 | +A numeric-only capture mutation distinguishes two integrity boundaries. In C1, |
| 62 | +changing `quota.compute` from `1.0` to `1` still passes the standalone complete |
| 63 | +contract's JavaScript-normalized hash check. Reading the changed file against |
| 64 | +its original byte SHA-256 is refused; restoring the original bytes recovers it. |
| 65 | +The exact-byte capture boundary is qualified for this caller. The standalone |
| 66 | +contract's numeric commitment remains open; neither check substitutes for the |
| 67 | +other or qualifies arbitrary Host input. |
| 68 | + |
| 69 | +Three preliminary author runs remain failed observations: the first fixture |
| 70 | +used a non-active Goal for refinement, the second exceeded the existing |
| 71 | +512-character requirement limit, and the third supplied the forbidden fixed |
| 72 | +output-directory option to `context-project`. The corrected matched cohort |
| 73 | +uses an active synthetic Goal, bounded complete descriptions and the existing |
| 74 | +output-root option. No product limit, assertion or acceptance criterion changes. |
| 75 | + |
| 76 | +## Measured costs and decision |
| 77 | + |
| 78 | +One observation per arm/backend gives the following byte counts: |
| 79 | + |
| 80 | +| Measurement | File: quota → C1 | SQLite: quota → C1 | |
| 81 | +| --- | --- | --- | |
| 82 | +| Initial guard stdout (file manifest) | 5,413 → 5,440 | 5,429 → 5,456 | |
| 83 | +| Cold saved presentation | 65,756 → 68,411 | 65,866 → 68,519 | |
| 84 | +| Cold full-read CLI stdout | 70,568 → 73,533 | 70,680 → 73,643 | |
| 85 | +| Actual warm delta file | 3,761 → 3,755 | 3,769 → 3,763 | |
| 86 | +| Complete observer CLI stdout | 482,505 → 494,464 | 483,299 → 495,250 | |
| 87 | + |
| 88 | +The six-byte warm difference includes fixture-path and surface spelling; it |
| 89 | +does not demonstrate an encoding gain. |
| 90 | + |
| 91 | +The observer makes 38 CLI calls in every arm, including fixture authoring, |
| 92 | +full recovery, refusals and readback. Separate warm-file qualification adds one |
| 93 | +CLI read per arm. In-process codec checks add nine coarse operations per arm; |
| 94 | +C1 also performs one extra standalone-hash negative control. These are explicit |
| 95 | +qualification costs, not a normal Turn's mandatory read policy. |
| 96 | + |
| 97 | +The 38-call elapsed sums are 10.08 → 10.98 seconds for File and 9.41 → 9.57 |
| 98 | +seconds for SQLite. Sequential single samples, process/broker startup and the |
| 99 | +chosen full-read observer do not establish a latency effect. The warm follow-up |
| 100 | +timer includes CLI and codec verification and is not a CLI-latency measurement. |
| 101 | +Memory, model tokens/cache/billing, accepted task outcomes, installed App |
| 102 | +behavior and human-attention costs remain unmeasured. Construction and failed |
| 103 | +author probes also remain costs; they are not erased by the completed cohort. |
| 104 | + |
| 105 | +The useful delta is source fidelity and a more complete contract, with modest |
| 106 | +additional cold/output bytes on this workload. There is no demonstrated net |
| 107 | +cost reduction. Continue through existing source/context/journal owners and |
| 108 | +independently usable repair PRs. Use actual caller failures to choose the next |
| 109 | +hash or bridge change; do not infer a need for another full-source carrier or |
| 110 | +parallel hash policy from an isolated assertion. Keep numeric integrity, |
| 111 | +caller/writer cutover, historical-reader retirement and the original-quota |
| 112 | +decision/outcome/full-cost comparison open. The optional two-session study |
| 113 | +remains separate. |
0 commit comments