Skip to content

[CloudCraft Integration] Runtime evidence chain & 2D/3D parity verifier (#2469) - #2479

Draft
OuroborosCollective wants to merge 2 commits into
mainfrom
fix/cloudcraft-2469-runtime-evidence-parity
Draft

[CloudCraft Integration] Runtime evidence chain & 2D/3D parity verifier (#2469)#2479
OuroborosCollective wants to merge 2 commits into
mainfrom
fix/cloudcraft-2469-runtime-evidence-parity

Conversation

@OuroborosCollective

Copy link
Copy Markdown
Owner

Summary

CloudCraft integration #2469 (concluding slice): prove runtime evidence and 2D/3D parity for the integrated CloudCraft slices. Build-only success is NOT runtime success — the evidence chain enforces this distinction.

Problem

The CloudCraft integration slices (#2465, #2464, #2466, #2468) had unit tests and builds, but no structured evidence chain that distinguishes build-only success from runtime success. There was no parity verifier proving that 2D and 3D derive truth from the same WorldOverlayModel contract.

What changed

Shared package (packages/shared/src/world/RuntimeEvidenceChain.ts)

  • Evidence chain: buildEvidenceChain() captures Unit → Guard → Build → Browser → Snapshot/Hash-Readback layers. Reports build-only if no runtime layer passed, pass only when a runtime layer (browser or snapshot-hash-readback) passes, fail if any entry fails.
  • Parity verifier: OverlayRendererParityContract + verifyParity() proves 2D/3D consume the same WorldOverlayModel, derive from the same shared derivation, and use server-snapshot as truth source. Display may differ, but truth must not.
  • Expected contracts: EXPECTED_PARITY_CONTRACTS for client-2d and client-3d.
  • Runtime layer classification: RUNTIME_EVIDENCE_LAYERS + isRuntimeEvidenceLayer() distinguish runtime evidence from build-only evidence.

Tests (RuntimeEvidenceChain.test.ts, 11 tests)

  • Evidence chain status logic (fail/build-only/pass).
  • Runtime layer identification.
  • Parity verification (pass/fail cases: same renderer, no overlay consumption, local-invented truth, missing derivation).
  • Contract freezing.

Documentation (docs/CLOUDCRAFT_RUNTIME_EVIDENCE.md)

Rules honored (from issue)

  • ✅ No build-only as runtime success — buildEvidenceChain enforces.
  • ✅ No fake snapshots or demo truth as test substitute — all evidence references real sources.
  • ✅ Evidence references the exact tested stand — readback points defined (§3).
  • ✅ 2D/3D may have different display but not different truth — verifyParity enforces.

Acceptance criteria

Criterion Status
Unit/Guard/Build/Browser evidence for integrated slices ✅ Unit/Guard/Build captured; Browser pending (requires dev server)
Snapshot/Hash/Source evidence documented ✅ Readback points defined
2D/3D parity proven for tested stand ✅ Parity contract + verifier defined; runtime proof pending browser smoke
Success only with real runtime evidence buildEvidenceChain enforces

What could not be validated

  • Browser smoke screenshots (2D/3D minimap overlay rendering) require a running dev server + browser session. Tracked in §7 of the evidence doc.
  • /api/gameplay/snapshot revisionHash readback against a running server requires the server to be running. Tracked in §7.
  • These are runtime evidence layers — they cannot be captured in headless unit tests. The evidence chain infrastructure is in place to record them once a browser/server session is available.

Remaining risks

  • The evidence chain currently reports build-only for the integrated slices because browser and snapshot-hash-readback layers are pending. This is honest — the chain does not claim runtime success until runtime evidence is captured.

CloudCraft integration series summary

Issue PR Status
#2465 (2D truth path) #2475 Draft
#2464 (3D parity) #2476 Draft
#2466 (chunk/Kappa contract) #2477 Draft
#2468 (donor license safety) #2478 Draft
#2469 (runtime evidence) #2479 Draft

All slices follow the prime directive: no fake progress, no fake truth, server-authoritative truth path, honest degradation.


This PR was created by an AI agent (OpenHands) on behalf of the user.

@OuroborosCollective can click here to continue refining the PR

CloudCraft integration #2469: prove runtime evidence and 2D/3D parity
for the integrated CloudCraft slices. Build-only success is NOT runtime
success — the evidence chain enforces this distinction.

Shared package:
- Add RuntimeEvidenceChain.ts: minimal evidence chain
  (Unit -> Guard -> Build -> Browser -> Snapshot/Hash-Readback).
  buildEvidenceChain() reports 'build-only' if no runtime layer has
  passed, 'pass' only when a runtime layer (browser or
  snapshot-hash-readback) passes, 'fail' if any entry fails.
- Add OverlayRendererParityContract + verifyParity(): proves 2D/3D
  consume the same WorldOverlayModel, derive from the same shared
  derivation, and use server-snapshot as truth source. Display may
  differ, but truth must not.
- Add EXPECTED_PARITY_CONTRACTS for client-2d and client-3d.
- Add RUNTIME_EVIDENCE_LAYERS + isRuntimeEvidenceLayer() to distinguish
  runtime evidence from build-only evidence.

Tests:
- Add RuntimeEvidenceChain.test.ts (11 tests): prove evidence chain
  status logic (fail/build-only/pass), runtime layer identification,
  parity verification (pass/fail cases), and contract freezing.

Documentation:
- Add docs/CLOUDCRAFT_RUNTIME_EVIDENCE.md: full evidence chain per
  slice (#2465/#2464/#2466/#2468), readback points (revision, snapshot,
  hash), 2D/3D parity contract, build-only vs runtime classification,
  and pending runtime evidence (browser smoke, hash readback).

Co-authored-by: openhands <openhands@all-hands.dev>
@OuroborosCollective OuroborosCollective added architecture determinism documentation Improvements or additions to documentation labels Aug 11, 2026 — with OpenHands AI
@mintlify

mintlify Bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
arelogic-24 🟢 Ready View Preview Aug 11, 2026, 4:11 PM

💡 Tip: Enable Workflows to automatically generate PRs for you.

Adds 2 new tests to RuntimeEvidenceChain.test.ts:
- requires both renderers to reject local-invented truth: asserts
  that both EXPECTED_PARITY_CONTRACTS (client-2d and client-3d) use
  server-snapshot as truth source, consume WorldOverlayModel, and
  derive from the shared derivation.
- runtime evidence layers are disjoint from build-only layers: asserts
  that runtime layers (browser, snapshot-hash-readback) do not overlap
  with build-only layers (unit, guard, build), proving the evidence
  chain distinguishes build success from runtime success.

Co-authored-by: openhands <openhands@all-hands.dev>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

architecture determinism documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant