Skip to content

[CLI-002] Add Go bridge integration tests #4

@AdeGneus

Description

@AdeGneus

Context

The Go CLI bridge runner exists, but it needs integration coverage against the Python bridge command shape before real bridge-backed commands are expanded.

Scope

  • Add bridge integration tests in CLI repo.
  • Invoke Python subprocess against a fixture or fake bridge module.
  • Assert stdout/stderr separation and JSON parsing.

Non-Goals

  • Does not implement new CLI commands.

Technical Specification

Tests should verify bridge.DefaultRunner().Run(ctx, "config-validate") invokes python3 -m ori.cli_bridge config-validate and maps errors deterministically.

Acceptance Criteria

  • Bridge command name is passed exactly.
  • JSON stdout parses.
  • stderr remains separate.
  • go test ./... passes.

Tests Required

Test Verifies
TestBridgeRunnerInvokesPythonModule Subprocess command shape.
TestBridgeRunnerParsesError Error mapping.

Additional Test Coverage / Edge Cases

  • Verify command arguments preserve ordering and quoting when passed to Python subprocess.
  • Verify non-zero bridge exit maps to CLI non-zero exit without swallowing stderr.
  • Verify malformed bridge JSON becomes a clear CLI error.
  • Verify context cancellation/timeout terminates the subprocess.
  • Verify stdout and stderr are kept separate.

Invariants — Do Not Violate

  • CLI must delegate runtime-owned behavior through bridge.

Dependencies

Blocked by:

Unblocks:

Contract References

  • CLI Implementation Reference
  • Runtime bridge contract

Priority

poc-critical

Suggested Labels

blocked, poc-critical

Metadata

Metadata

Assignees

No one assigned

    Labels

    blockedWaiting on another issue or external dependency.poc-criticalMust be complete before PoC deployment.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions