Skip to content

Ship fake-engine dogfood and TUI default#338

Merged
spytensor merged 1 commit into
mainfrom
codex/v0.9-332-fake-engine-default
May 25, 2026
Merged

Ship fake-engine dogfood and TUI default#338
spytensor merged 1 commit into
mainfrom
codex/v0.9-332-fake-engine-default

Conversation

@spytensor
Copy link
Copy Markdown
Owner

Closes #332
Updates #320

Summary

  • Adds gated Engine::Fake behind COREROOM_ENABLE_FAKE_ENGINE=1, implemented through the existing EngineAdapter path with deterministic chunked output and a permission-bridge probe.
  • Flips interactive plain cr to the executable full-screen TUI room from v0.9.x: implement TuiSink and ratatui room hosting run_with_options_and_sink #331. Non-TTY plain cr still falls back to the stdout runtime; cr start remains the explicit stdout entrypoint; cr console remains the read-only dashboard; cr console --live-room is the explicit TUI-room spelling.
  • Rewrites the v0.9 dogfood harness to drive the TUI over a PTY, assert role status, streaming, permission overlay, and durable .coreroom/messages.jsonl events, then regenerates README images and updates v0.9.8 release docs/splash/version metadata.

Acceptance Criteria

  • AC-1: Deterministic local fake engine implemented behind EngineAdapter; response text and chunk timing are env-configurable; no network/API path.
  • AC-2: Fake engine is gated by COREROOM_ENABLE_FAKE_ENGINE=1; config validation and --engine fake reject it unless explicitly enabled.
  • AC-3: scripts/dogfood-v09-user-cases.py drives the TUI room over PTY and checks idle/working status, streamed chunks, durable messages, and permission overlay behavior.
  • AC-4: docs/v0.9-real-user-dogfood.md and docs/v0.9.4-live-room-dogfood.md now describe behavioral proof and authenticated-engine non-goals.
  • AC-5: run_console_first_default routes interactive plain cr to the TUI room; cr start and cr console keep their existing roles.
  • AC-6: README, CHANGELOG, splash content, v0.9.8 metadata, and README screenshot are updated; make readme-images ran via dogfood.
  • AC-7: Validation and dogfood pass.
  • AC-8: Dogfood proves execution through the fake engine plus default/explicit TUI routing. It does not prove authenticated Claude Code, Codex, or Gemini execution.

Validation

  • cargo fmt --all -- --check passed.
  • git diff --check passed.
  • cargo clippy --all-targets --all-features --locked -- -D warnings passed.
  • cargo test --all-features --locked passed: 608 lib tests passed, 1 ignored, integration/doc tests passed.
  • python3 scripts/dogfood-v09-user-cases.py passed, including PTY plain cr, fake-engine streaming, permission overlay, durable messages.jsonl, cr console --live-room, read-only console paths, Nerd Font mode, and make readme-images.

Evidence Packet

The dogfood run proves executable-equivalent default behavior without quota burn:

  • cr --version reported cr 0.9.8.
  • Plain cr in a PTY rendered the TUI composer, dispatched fake-engine turns, showed idle and working, rendered fake-stream-1 through fake-stream-3, opened the FakeTool permission overlay, accepted denial, and rendered fake-permission-denied.
  • .coreroom/messages.jsonl gained turn_dispatched, role_spoke, and permission_denied events with real turn ids.
  • cr console --live-room opened the executable TUI room.
  • cr console and cr console --snapshot remained read-only dashboard paths.
  • make readme-images regenerated docs/images/boot-dashboard.png, docs/images/work-cards.png, and docs/images/control-room-console.png; only boot-dashboard.png changed with v0.9.8 splash copy.

Changed Files Summary

  • Runtime/config: src/adapter/fake.rs, src/adapter/mod.rs, src/repl.rs, src/main.rs, src/config*.rs, src/engines.rs, init/splash labels.
  • Dogfood/docs: scripts/dogfood-v09-user-cases.py, v0.9 dogfood docs, README, CHANGELOG, development notes, proposed amendment note.
  • Release metadata/assets: Cargo/npm versions to 0.9.8, src/lib.rs docs root, splash content, README image.

Risks and Remaining Gaps

  • Fake-engine dogfood proves CoreRoom runtime/TUI/permission/durable-event plumbing, not real vendor CLI authentication or model behavior.
  • The fake engine is intentionally hidden from normal engine help and rejected unless the env gate is set.
  • macOS Unix socket path length is covered by the dogfood harness using a short /tmp/cr-v09-* project path.

Rollback Plan

Revert this PR to restore plain cr to the previous default path, remove the fake engine adapter, and restore the previous v0.9.7 docs/assets. If only the TUI default is problematic, revert the run_console_first_default change and leave cr console --live-room as the explicit executable TUI entrypoint.

Tracker Update

After merge, update #320:

  • Check AC-6: deterministic fake-engine PTY dogfood now proves runtime dispatch, streaming, permission prompt, completion, and durable transcript state.
  • Check AC-7: plain cr now defaults to the executable full-screen TUI room.
  • Progress ledger: add this PR with validation evidence above and note remaining risk is authenticated vendor-engine dogfood only.
  • Close v0.9.x: implement true full-screen runtime parity before making live room default #320 once the tracker body reflects AC-1 through AC-7 complete.

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.

v0.9.x: add fake-engine dogfood and flip default cr to TUI room v0.9.x: implement true full-screen runtime parity before making live room default

1 participant