|
| 1 | +# Bounded primary-body producer proof |
| 2 | + |
| 3 | +- Status: historical proof recipe/artifact, not an operator runbook |
| 4 | +- Scope: raw primary issue/PR body and PR files through production hydration, |
| 5 | + compaction, and final review-prompt JSON; media discovery and complete-source |
| 6 | + freshness |
| 7 | +- Source: [producer script](../../../scripts/e2e/proof-context.ts), |
| 8 | + [shared fixture](../../../test/primary-body-fixture.ts), and |
| 9 | + [primary compactor](../../../src/clawsweeper-primary-body.ts) |
| 10 | + |
| 11 | +From a checkout with Node 24 or newer and the pinned pnpm 11.10.0 installed: |
| 12 | + |
| 13 | +```sh |
| 14 | +pnpm run build |
| 15 | +node scripts/e2e/proof-context.ts > proof-context-receipt.json |
| 16 | +``` |
| 17 | + |
| 18 | +The default synthetic case contains 60,641 UTF-16 units: early supplemental |
| 19 | +mock text, a later inert native-proof heading at offset 14,235, and an inert |
| 20 | +HTTP/native-row trace at 19,562. The script executes the real |
| 21 | +`collectItemContext` and final `reviewPrompt` path with locally supplied GitHub |
| 22 | +transport; neither the compactor nor renderer is replaced. It shares fixture |
| 23 | +wiring with the regression tests but runs as an ordinary executable, without |
| 24 | +the test runner. Unexpected hydration capabilities fail closed. |
| 25 | + |
| 26 | +The stdout JSON receipt records the current checkout HEAD, environment, source |
| 27 | +and prompt hashes, exact retained ranges and excerpt hashes, omissions, and |
| 28 | +serialized allocation. Both issue and PR representations must retain verbatim |
| 29 | +excerpts within 12,000 serialized units per long body, including coverage and |
| 30 | +indentation. An equal-length edit in omitted text must leave displayed evidence |
| 31 | +unchanged while changing source revision, snapshot, content, and structural |
| 32 | +identities. The default case edits the final source unit. Separate synthetic |
| 33 | +media cases must produce zero supplemental runner calls, with one recording-only |
| 34 | +prefix control call. PR patch-only cases cover a loopback fixture and harmless |
| 35 | +prefix controls through the real collection and media-preparation owners. Each |
| 36 | +must produce zero runner calls and no manifest or artifacts, while preserving |
| 37 | +the compact patches in final prompt JSON. The same URL in the primary issue |
| 38 | +body, PR body, or comment must still produce one recording-only call even when |
| 39 | +also present in a patch. No runner call performs remote or loopback I/O. |
| 40 | + |
| 41 | +Media fixture URLs are constructed from obvious parts at runtime, preserving |
| 42 | +their assertion values without placing downloadable literals in this PR's |
| 43 | +aggregate diff. This keeps existing reviewers safe before the patch-discovery |
| 44 | +exclusion is deployed; it does not replace that production boundary. |
| 45 | + |
| 46 | +An optional `--body-file path/to/body.md` reads authorized local text instead of |
| 47 | +the synthetic body. It reports no file path or full body/trace bytes. Replay |
| 48 | +requires a long body with an editable omitted range; recognized native-proof |
| 49 | +and HTTP/native trace anchors must survive. Media checks always use synthetic |
| 50 | +input. Do not commit private source bodies or prompts. The receipt identifies |
| 51 | +HEAD but does not certify a clean working tree; rebuild and rerun after the |
| 52 | +final commit before citing it as committed proof. |
| 53 | + |
| 54 | +This is **input delivery and omission proof only**. The provider is a local |
| 55 | +Node process, with no container image or lease. It does not invoke a model, |
| 56 | +GitHub, cloud services, embedded scripts, or the original runtime described by |
| 57 | +any saved body. Local GitHub transport is a fixture boundary, not live GitHub |
| 58 | +integration proof. Verbatim excerpts do not establish source authenticity, |
| 59 | +proof sufficiency, or a guaranteed reviewer verdict. Unrecognized or crowded |
| 60 | +layouts can still omit material; coverage remains explicitly incomplete. |
| 61 | +PR patches remain reviewer-only media inputs. No body-budget increase, extra |
| 62 | +media fetch, proof-status/schema enum change, or weakened proof requirement is |
| 63 | +part of this fix. OpenClaw Bay is unaffected: no observer fields, routes, |
| 64 | +lifecycle states, or controls change. |
0 commit comments