Skip to content

feat(swarm): SP4 — honest demo + visible honest pipeline (korg run-once)#12

Closed
New1Direction wants to merge 5 commits into
feat/swarm-honest-pipelinefrom
feat/swarm-honest-demo
Closed

feat(swarm): SP4 — honest demo + visible honest pipeline (korg run-once)#12
New1Direction wants to merge 5 commits into
feat/swarm-honest-pipelinefrom
feat/swarm-honest-demo

Conversation

@New1Direction

Copy link
Copy Markdown
Owner

Track B SP4: stop faking the demo, expose the honest pipeline

Pivotal finding (from grounding): the orchestrated korg campaign does NOT do real work — its workers idle, get killed, get a faked recovery, and attest total_mutations_so_far: 0 (Benjamin's DAG package is literally "Implement (simulate-crash): …"). The SP1 honest pipeline is real but only fires below this broken orchestration. So an honest demo can't record the campaign — it needs a real, working entrypoint. (Fixing the campaign itself is SP2.)

What shipped

korg run-once — the honest pipeline made visible (6cf38af)

  • New Commands::RunOnce { task, repo } → drives the SP1 pipeline on a temp git-inited copy of fixtures/honest-demo-repo: DeterministicProvider → apply → real git diff --numstat → real cargo check → honest attestation.
  • Prints files_changed=N · cargo check=PASSED · attested mutation count=N (== real git diff) and a ✓ SP1 invariant holds equality check.
  • Writes a korg-ledger@v1 ledger that korg-verify independently accepts (✓ journal VALID — 4 events, hash-chain + DAG intact).
  • Never fabricates: the fixture task → real patch → attested 1; any other task → honest-null → attested 0. TDD'd against a real temp git repo + real cargo check (both cases).

README honesty (d88c83c, 113057a)

  • Hero alt text drops the false "fork" claim.
  • Removed phantom runnable commands (korg fork, korg checkpoints list|restore — no such variants) and corrected korg-tuikorg, korg goal/run --preview/--mode→ the real top-level --goal/--preview/--mode flags.
  • Fixed the comparison table + status checklist that still marked Speculative branches / Execution checkpoints as shipped, contradicting the "planned, not yet shipped" disclaimer. Now 🚧 planned.

Honest demo recording (78640d1)

  • demo.tape rewritten to type+run only the real binary (korg run-oncekorg-verify → real korg rewind); deleted demo-sim.sh (the fabrication source).
  • Regenerated demo.gif/.mp4/.webp from real output — verified frame-by-frame to show the genuine honest-attestation block, not sim. (The webp encoder failure that almost re-shipped the old sim GIF was caught and corrected.)

Independent review

Built by a fresh implementer, then independently reviewed: run-once honesty confirmed (attested == real numstat, no fabrication), ledger verified, tape de-simulated, 0 regressions. The review caught the README table/checklist contradiction (an honesty defect), now fixed.

Test plan

  • cargo test -p korg-runtime --test run_once — both fixture→1 and unrelated→0 cases pass against real git+cargo
  • korg run-once "Fix the add function in src/lib.rs so it adds" → honest attestation + ledger that korg-verify accepts
  • cargo test --workspace — 32 binaries, 0 failures
  • hero GIF verified to show real binary output (no sim frames)
  • no remaining false runnable-command claims in README

Stacked on feat/swarm-honest-pipeline (SP1). For review — not intended to merge ahead of the stack.

Spec: docs/superpowers/specs/2026-06-14-korg-swarm-sp4-honest-demo-design.md

…ture

A new run-once subcommand and korg_runtime::run_once::run_once_honest drive
the SP1 honest pipeline directly (below the broken campaign orchestration):
build Benjamin's system+user messages, ask the hermetic DeterministicProvider
for a patch, parse + apply_mutations to a real git worktree, then measure
reality (numstat + cargo_check). The attested mutation count equals the real
git-diff file count by construction — the fixture task yields 1 (compiling),
an unrelated task yields an honest null (0, no fabrication).

It writes a verifiable korg-ledger@v1 JSONL journal (hash-chained via the
conformance-tested korg-ledger primitives re-exported through
korg_registry::ledger_chain) that korg-verify accepts (journal VALID).

TDD: tests/run_once.rs asserts both cases (fixture->1, unrelated->0) and the
attested==numstat invariant. Default repo = temp git-inited copy of
fixtures/honest-demo-repo, mirroring the keystone test setup.
- Hero alt text: drop the false 'fork' claim → 'record, verify, and rewind an
  AI agent session as a hash-chained ledger' (what the binary actually does).
- Reversibility bullet: 'rewind, fork, or branch' → 'rewind the ledger to any
  prior sequence point' (only rewind is shipped).
- 'Rewind & Fork' section: the phantom 'korg checkpoints list|restore' commands
  (no such variant in enum Commands) replaced with the real run-once + verify
  flow, and a note marks fork/checkpoints as planned, not shipped.
demo.tape now types and runs ONLY real commands: korg run-once (real patch +
real cargo check + honest attestation), korg-verify on the emitted
korg-ledger@v1 journal (independent green verdict), cat of the real applied
fix, and a real korg rewind. Every Type line is the actual binary — there is
no simulation script and no pre-scripted output.

demo-sim.sh (the fabrication source, which printed fake seq/timestamps/
mutations) is deleted so the tape can't be re-pointed at it.

demo.gif/mp4/webp regenerated with vhs from the real binaries; frames verified
to show the real HONEST ATTESTATION block and the real fixed add(). (webp built
via gif2webp from the same real GIF — this ffmpeg has no webp encoder.)
…real CLI flags)

Review of SP4 found the README still marked Speculative branches + Execution
checkpoints as shipped (✅ in the comparison table, [x] in the status checklist)
— contradicting the 'planned, not yet shipped' disclaimer 3 lines above. Also
corrected phantom runnable commands: korg-tui→korg, 'korg goal/run --preview/
--mode'→top-level --goal/--preview/--mode flags (there is no run/goal subcommand).
New1Direction added a commit that referenced this pull request Jun 15, 2026
… run-once)

Lands the stacked branch 'feat/swarm-honest-demo' (PR #12) onto main.
@New1Direction

Copy link
Copy Markdown
Owner Author

Landed on main via the full stack merge — main is now 0eaefb4. This branch's commits are fully contained in main (GitHub: 'no new commits between main and this branch'), recorded by merge commit 33fa55e ("Merge PR #12"). Closing as merged-by-stack; deleting the now-redundant branch.

@New1Direction New1Direction deleted the feat/swarm-honest-demo branch June 15, 2026 00:22
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.

1 participant