Skip to content

test: backfill transport/logging/cli coverage#34

Merged
ernestprovo23 merged 1 commit into
mainfrom
wave3/test-gaps-transport-logging-cli
Jun 9, 2026
Merged

test: backfill transport/logging/cli coverage#34
ernestprovo23 merged 1 commit into
mainfrom
wave3/test-gaps-transport-logging-cli

Conversation

@ernestprovo23

Copy link
Copy Markdown
Member

closes #18

Wave 3 test-backfill. No production code changed; suite stays offline and key-free.

Per-module coverage (before → after):

  • transport.py: 58% → 100%
  • logging.py: 100% → 100% (now with real behavioral assertions, not just import-time line hits)
  • cli.py: 43% → 89%
  • TOTAL: 86% → 94%

Tests added:

  • tests/test_transport.py (8): real post_json via httpx.MockTransport — success/JSON decode, error-status returned-not-raised, non-JSON text fallback, timeout & connect-error → leak-free TransportError, client reuse/pooling, rebuild-after-close, aclose idempotency.
  • tests/test_logging.py (5): CONCLAVE_LOG_LEVEL resolution (default WARNING, case-insensitive, unknown → WARNING), root-vs-child factory contract, one-shot configuration.
  • tests/test_cli.py (+7): human renderers (synthesize/raw/debate/adversarial), skipped-no-key warning, providers table (asserts key value never prints).

102 → 121 tests passing.

Wave 3 of the engineering-health backlog. Pure test-backfill: no
production code changed. The suite stays offline and key-free.

- tests/test_transport.py (8 tests): drive the real post_json through an
  httpx.MockTransport mounted on the pooled client -- success/decoded JSON,
  error-status JSON returned-not-raised, non-JSON text fallback, timeout and
  connect-error -> leak-free TransportError, client reuse/pooling, rebuild
  after close, aclose idempotency. transport.py 58% -> 100%.

- tests/test_logging.py (5 tests): CONCLAVE_LOG_LEVEL resolution (default
  WARNING, case-insensitive, unknown -> WARNING), root-vs-child factory
  contract, one-shot configuration (no handler stacking).

- tests/test_cli.py (+7 tests): human renderers (synthesize/raw/debate/
  adversarial), skipped-no-key warning, and the providers table (asserts the
  key value never prints). cli.py 43% -> 89%.

TOTAL coverage 86% -> 94%; 102 -> 121 tests passing.
@ernestprovo23 ernestprovo23 merged commit dfff691 into main Jun 9, 2026
5 checks passed
@ernestprovo23 ernestprovo23 deleted the wave3/test-gaps-transport-logging-cli branch June 9, 2026 02:35
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.

test gaps: transport/cli/logging untested + end-to-end redact test

1 participant