Skip to content

feat: add repl preload state and checkpoint flags#140

Merged
rlippmann merged 4 commits into
mainfrom
codex/repl-preload-state-checkpoint
May 23, 2026
Merged

feat: add repl preload state and checkpoint flags#140
rlippmann merged 4 commits into
mainfrom
codex/repl-preload-state-checkpoint

Conversation

@rlippmann
Copy link
Copy Markdown
Owner

@rlippmann rlippmann commented May 23, 2026

What changed

  • Added explicit preload flags for REPL/CLI:
    • --initial-state-json
    • --initial-state-file
    • --initial-checkpoint-json
    • --initial-checkpoint-file
  • Implemented strict mutual exclusion between state preload and checkpoint preload options.
  • State preload uses engine.import_json(...); checkpoint preload uses engine.import_checkpoint_json(...).
  • Added UTF-8 file loading for preload file flags.
  • Added fail-fast preload validation before processing stdin.
  • Kept default REPL behavior unchanged when no preload flags are provided.
  • Added/updated tests for preload success paths, mutual exclusion, invalid payloads, JSON-mode compatibility, and preload file I/O failures.
  • Added brief README and CLI help coverage clarifying authoritative state preload vs checkpoint continuation preload.
  • Added CI contract coverage job for controller module (100% gate), aligned with existing REPL and engine coverage jobs.

Why this was needed

  • Supports explicit host-controlled startup state for scripting and REPL workflows.
  • Keeps authoritative state transport and runtime continuation restoration as separate concepts.
  • Preserves deterministic behavior and clear boundary semantics for 0.7.

Closes #138

@rlippmann rlippmann merged commit 9dbd821 into main May 23, 2026
14 checks passed
@rlippmann rlippmann deleted the codex/repl-preload-state-checkpoint branch May 23, 2026 08: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.

Add explicit REPL/CLI preload support for authoritative state and checkpoints

1 participant