Skip to content

refactor(cli): isolate transfer execution and delivery - #1043

Closed
aaltshuler wants to merge 12 commits into
ModernRelay:mainfrom
aaltshuler:codex/cli-transfer-boundary
Closed

aaltshuler wants to merge 12 commits into
ModernRelay:mainfrom
aaltshuler:codex/cli-transfer-boundary

Conversation

@aaltshuler

Copy link
Copy Markdown
Contributor

What & why

A closed output pipe after a successful load or Blob write currently panics while printing its receipt, bypassing command-outcome reporting. This change makes transfer input and output explicit: load, export, and blob get/stat/put/clear live in commands/transfer, and receipt or stream delivery errors return through application completion. Dispatched writes retain unknown effects and reconcile guidance without replay.

Public arguments and successful output are unchanged. The existing client still owns transport, streaming, managed load limits, and source reads. The extraction preserves overwrite consent, Blob precondition/input validation order, embedded load's writable-open-before-input-read order, and deferred Blob output-file behavior. No new commands, flags, dependencies, or storage changes.

Backing issue / RFC

The draft coherency RFC in #675 supplies refactor sequencing; its proposed targeting grammar is not introduced here.

Checklist

  • Change is focused on transfer execution and delivery
  • Existing input/output/application and CLI integration owners extended
  • User/developer guides and permanent release note updated
  • Architectural invariants reviewed; no publication, snapshot, policy, or retry boundary changed

Local verification

  • Clean baseline: env CARGO_TARGET_DIR=/Users/andrew/code/omnigraph/target CARGO_BIN_EXE_omnigraph-server=/Users/andrew/code/omnigraph/target/debug/omnigraph-server cargo test -p omnigraph-cli --locked — 512 passed, 19 ignored.
  • Same full CLI command after refactor — 522 passed, 19 ignored, including the existing real-server integration suite. A subsequent extension of the receipt test covering target-announcement failure passed with cargo test -p omnigraph-cli --locked --lib app::tests::transfer_receipt_delivery_failure_keeps_write_evidence_without_replay.
  • cargo clippy -p omnigraph-cli --all-targets --locked -- -D warnings -W clippy::dbg_macro — passed.
  • cargo fmt --all --check, python scripts/check-docs.py in the existing documentation environment (315 files), targeted typos, and git diff --check — passed.
  • Baseline/current binary comparison: 106 help/argument cases and 14 successful transfer cases matched exact exit status, stdout, and stderr; transfer request logs matched too.
  • Six real-process closed-stdout cases (load/blob put/blob clear, human and JSON): baseline panicked with exit 101; current binary exits 1 with retained outcome guidance and exactly one write.
  • Whole-workspace, GQT, and cloud suites not run locally for this CLI-only slice. Query semantics and engine behavior are unchanged.

Notes for reviewers

Depends on #1042 at 72f9d44225e96fb170311189489df1215dce3d3f, which is still open. The transfer slice is commit 8b22f353; the PR includes predecessor commits until that stack lands. init remains with the later schema/lifecycle extraction.

Tests reuse the existing HTTP fixture and parity/fault owners. They cover bounded binary stdin, interrupted/erroring input, validation before requests, output-file preservation and partial transfers, write/flush failures, retained dispatch evidence, and no replay.

@aaltshuler

Copy link
Copy Markdown
Contributor Author

Superseded by #1047, which merged the complete CLI refactor, its delivery and configuration fixes, and the latest main integrations as 02026b5. Closing this incremental slice because its implementation is now on main.

@aaltshuler aaltshuler closed this Oct 17, 2026
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