Skip to content

refactor(cli): isolate history execution and delivery - #1042

Closed
aaltshuler wants to merge 11 commits into
ModernRelay:mainfrom
aaltshuler:codex/cli-history-boundary
Closed

aaltshuler wants to merge 11 commits into
ModernRelay:mainfrom
aaltshuler:codex/cli-history-boundary

Conversation

@aaltshuler

Copy link
Copy Markdown
Contributor

What & why

History commands previously executed inside the application dispatcher and wrote directly to process output. Move branch, commit, diff, changes, and snapshot into one command family with typed pagination/filter selections and fallible injected output. Preserve command grammar, addressing, managed commit reads, and successful human/JSON output.

Dedicated commit publish and commit drop now retain the same conservative write-outcome evidence as their mutate forms. Losing a response or failing to deliver output must not imply that a completed write can be replayed. History streams flush each page before fetching another; baseline capture holds its output-file lock through durable installation and cursor flush. Application completion also detects failed stderr flushes.

Backing issue / RFC

Checklist

  • Change is focused on the history command family and its delivery boundary.
  • Existing output, outcome, consent and real-server fault owners extended.
  • Public/developer docs and permanent release note updated.
  • Reviewed against architectural invariants; no engine publication, recovery, policy, or substrate authority changed.

Local verification

  • Clean baseline: cargo test -p omnigraph-cli --locked — 507 passed, 19 ignored.
  • cargo test -p omnigraph-cli --locked — 512 passed, 19 ignored, including the real server/fault proxy. Used the shared target directory and CARGO_BIN_EXE_omnigraph-server pointing to the built server.
  • cargo clippy -p omnigraph-cli --all-targets --locked -- -D warnings -W clippy::dbg_macro — passed.
  • cargo fmt --all --check, git diff --check, python scripts/check-docs.py, bash scripts/check-agents-md.sh, and typos — passed (docs checker used the repository documentation environment).
  • Before/after executable comparisons: all 106 help/parser cases and 28 successful history commands in human/JSON modes matched stdout, stderr and exit status byte-for-byte.
  • Reproduced missing dedicated-commit outcome fields before enrolling those commands. Reproduced successful completion despite a failed stderr flush before fixing completion.

CLI tests own transport, output and failure evidence; no query semantics changed, so no duplicate GQT cases were added. Full workspace/GQT/cloud qualification remains with CI. Environment-gated cloud and predecessor-binary cases were not independently qualified locally.

Notes for reviewers

This branch is based on #1041 at 93340aa4; while predecessors remain open, the base-to-head diff also includes those earlier slices. The new extraction, outcome fix and documentation are separate commits after that point.

The new lost-delivery test proves publish/drop effects against the real server and counts exactly one write request. An empty 204 drop response cannot be body-truncated, so its matrix covers disconnect, proxy 504 and caller abandonment. No new public flags, dependencies, automatic retries, or target resolver were introduced.

@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