Skip to content

test(observability): cover console-metrics, batch, reqlog & readiness branches#201

Open
mauripunzueta wants to merge 1 commit into
mainfrom
test/observability-coverage
Open

test(observability): cover console-metrics, batch, reqlog & readiness branches#201
mauripunzueta wants to merge 1 commit into
mainfrom
test/observability-coverage

Conversation

@mauripunzueta

@mauripunzueta mauripunzueta commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Stacked on top of #150 (feat/observability-uptime). Adds tests for the genuinely-uncovered behavioral branches that PR #150's Codecov report flagged.

Context

Most of PR #150's reported patch-coverage gap is not new-test-addressable:

  • error-handling closures (.map_err(|e| internal_error(...)) on SQL failures) — unreachable without fault injection;
  • stale carryforward — code that already has in-tree tests but shows uncovered because Codecov's snapshot predates this branch's own test commits (a fresh coverage run clears these);
  • Docker/OTLP-bound — mongodb/postgres/composite/telemetry.

This PR covers the branches that were actually uncovered and cheaply testable.

Tests added

  • reqlog — 3xx / 4xx / sub-200 status-class classification arms (existing tests only exercised 2xx/5xx).
  • console resource-distribution — the other roll-up bucket taken when distinct types exceed top.
  • console tenants — a tenant present only in request-log traffic (reported with resources: 0).
  • batch — exhaustive TransactionError -> (status, code) mapping and the status_text reason-phrase table.
  • health — the /_readiness handler response shape.

Adds helios-observability as a dev-dependency of helios-rest so the console integration test can seed the in-process request log directly (the test router has no request-tracking middleware).

CI note

Because the repo gates pull_request CI to base: main, this stacked PR (base feat/observability-uptime) will not run CI/Codecov until #150 merges and GitHub auto-retargets it to main.

@mauripunzueta mauripunzueta force-pushed the feat/observability-uptime branch from 90e3aca to cddea94 Compare July 6, 2026 22:33
…branches

Add tests for the genuinely-uncovered behavioral branches surfaced by the
PR #150 Codecov report (as opposed to stale-carryforward lines, which a fresh
coverage run clears, or error-handling closures, which need SQL fault injection):

- reqlog: 3xx / 4xx / sub-200 status-class classification arms (existing tests
  exercised only 2xx and 5xx)
- console resource-distribution: the `other` roll-up bucket taken when the
  number of distinct types exceeds `top`
- console tenants: a tenant present only in the request-log traffic, with no
  stored resources (reported as `resources: 0`)
- batch: exhaustive TransactionError -> (status, code) mapping and the
  status_text reason-phrase table
- health: the /_readiness handler response shape

Adds helios-observability as a dev-dependency of helios-rest so the console
integration test can seed the in-process request log directly (the test router
has no request-tracking middleware).
@mauripunzueta mauripunzueta force-pushed the test/observability-coverage branch from e33438a to 3f1203f Compare July 6, 2026 23:10
Base automatically changed from feat/observability-uptime to main July 7, 2026 14:43
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