Skip to content

test: verify the omachat-ctl executable contract - #229

Merged
tcballard merged 2 commits into
mainfrom
test/ctl-process-contract
Sep 5, 2026
Merged

test: verify the omachat-ctl executable contract#229
tcballard merged 2 commits into
mainfrom
test/ctl-process-contract

Conversation

@tcballard

@tcballard tcballard commented Sep 4, 2026

Copy link
Copy Markdown
Owner

Purpose

Refs #23. Verify the real omachat-ctl executable's scripting contract without changing production code.

Seven tests use a deterministic Unix-socket peer to exercise command arguments and hello negotiation, repeatable single-line JSON, plain redirected output, meaningful exit codes, version and remote errors, five-second timeouts at both request boundaries, and malformed/oversized/uncorrelated/disconnected replies.

The follow-up review removes redundant JSON parsing, ANSI and equality assertions and the output collection. Each invocation still must match the exact expected JSON bytes.

Clarify existing exit codes in the man page and document the test command. Add the already-locked tempfile = "=3.27.0" as a dev dependency: one lockfile dependency edge, no new packages or versions.

Verification

For head e8417f698aaaa4af3ce67c73a52724e61baa5eed:

  • CI: full workspace tests, formatting, Clippy and dependency checks pass. Release-build, size and packaging gates are still running.
  • Portable G0 probes and relay interoperability: all pass.
  • Formatting and focused Clippy pass locally. The absent-daemon/usage test passes; six socket tests fail at bind with EPERM because this workspace denies Unix sockets. CI executes all seven successfully.

This is independent of #228 and does not implement event consumption (#223) or modify contributor work in #224/#226. Hermetic tests do not establish live-phone or target-host conformance.

Exercise hello, core commands, JSON, exit codes, timeouts and invalid responses against a deterministic IPC peer. Refs #23.
@tcballard
tcballard marked this pull request as ready for review September 4, 2026 23:43
@tcballard
tcballard merged commit 31bbcc7 into main Sep 5, 2026
6 checks passed
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