Skip to content

feat(examples): P1 graph-vs-loop parity harness — offline-proven, live-ready wiring - #710

Merged
drewstone merged 1 commit into
mainfrom
feat/p1-parity-harness
Aug 3, 2026
Merged

feat(examples): P1 graph-vs-loop parity harness — offline-proven, live-ready wiring#710
drewstone merged 1 commit into
mainfrom
feat/p1-parity-harness

Conversation

@drewstone

Copy link
Copy Markdown
Contributor

The measurement harness for #694 P1: replay the SAME cell through agent-eval's real runMultishot loop (the legacy arm — audited as the genuine machinery, not a reimplementation) and through runGraph's 2-node shot topology, behind one identical CellSpec, returning comparable ParityRecords with every asymmetry documented rather than papered over (the loop has no ledger, no early-stop, no enforceable budget — that asymmetry IS the migration's argument).

Adversarially audited SHIP: input-equivalence killed by 3 targeted mutations (task text, profile corruption, shot budget), offline run proven with zero inet connects under strace + scrubbed env, suite 2346 green, zero src/ changes.

The --backend cli-bridge live entry is wiring only and NOT yet valid to run — three audited gaps, to be fixed before any live number is quoted:

  1. live graph arm lacks router/brain wiring (throws at supervisor construction);
  2. live loop arm's driver leg falls back to a fake model id (parity/unspecified);
  3. substrate asymmetry: loop coder = bare chat completion, graph coder = real cli-bridge worker — as wired, a live number would compare different substrates. Align substrates (both arms through the same worker mechanism) before measuring.

Offline measurement already demonstrates the qualitative delta on one scripted cell: graph settles at shot 2/3 via the deliverable gate; the loop burns all 3 (no gate to stop it).

…ell (#694)

Replay one identical CellSpec { task, coderProfile, reviewerProfile, shots,
budget } through both loop forms and return one comparable ParityRecord per arm:

- arms.ts — runLoopArm (agent-eval multishot loop: reviewer = driver leg,
  coder = agent leg, maxTurns = shot budget) and runGraphArm (runGraph over the
  two-node reviewer->coder topology, shot budget on the delegates edge,
  completion oracle on the deliverable). The record documents the real
  asymmetries instead of hiding them: only the graph arm has an edge ledger
  (the loop's is always undefined, never synthesized), the loop cannot stop
  early (no deliverable gate), and the conserved budget reaches only the graph.
- offline.ts — scripted seams generated from one per-shot script for both arms
  (reuses examples/graphs/shared.ts leafSeam/scriptedBrain); zero network,
  zero env, $0; captures each arm's seam-level inputs for equivalence proofs.
- run-parity.ts — CLI: --backend offline|cli-bridge --cells N --shots S.
  offline is the CI-safe proof path; cli-bridge is the one-command live entry
  wiring VB_CLI_BRIDGE_URL / VB_CLI_BRIDGE_BEARER / VB_PARITY_MODEL (not
  executed by any gate).
- parity.test.ts — asserts input equivalence on CAPTURED inputs (task text,
  profiles, and shot budget reach both execution seams), well-formed records
  with the measured asymmetries (graph settles at the passing shot, loop burns
  the full budget), and the honest cap-refusal non-convergence path.

tsconfig.examples.json gains the missing ./durable path mapping — the
pre-existing typecheck:examples failure in examples/chat-handler (present on
origin/main) resolved by mapping the subpath the example already imports.

@tangletools tangletools left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Auto-approved drewstone PR — d1d2ff69

This PR was opened by the trusted drewstone account.
The full PR reviewer audit still runs separately and will publish findings if it detects issues.

tangletools · auto-approval · reason: drewstone_author · 2026-08-03T06:28:26Z

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants