You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(server): devops serve --service leaves the process's logging alone until uvicorn applies its json config, so in-process tests keep their captured logs #1543
scope/cliCore CLI framework, Typer subcommands, options, and tablesscope/telemetryOpenTelemetry tracing spans, Prometheus metrics, and Jaegertype/bugType bug: the code does not do what it must
Before calling uvicorn.run, devops serve --service sets up the process's logging itself, through setup_service_logging (src/devops_cli/server/json_logs.py). That call clears the root logger's handlers, installs a JSON stdout handler, and gives the devops_cli logger its own handler with propagate=False.
On feat(release): v0.2.33 #1537, the Changed-Test Independence check failed run 2 of 3 (seed 281456038). tests/test_fastmcp_contracts.py::test_a_handler_failure_reports_its_exception_type and ::test_the_dispatch_record_still_reports_its_duration ran after that test and found an empty log.
Proposed design
setup_service_logging becomes service_log_config(log_level), a standard logging.config.dictConfig dict with disable_existing_loggers: False. serve --service passes it to uvicorn as log_config.
uvicorn builds the app through a factory (factory=True), as the --reload path already does, so the startup warning for a repository without a webhook secret is still logged as JSON.
Acceptance criteria
After serve --service runs in-process with uvicorn doubled, a devops_cli record still reaches caplog (tests/test_server.py).
No missing-secret warning is logged before uvicorn.run is called, and exactly one is logged once the factory builds the app (tests/test_server.py).
setup_service_logging becomes service_log_config(log_level), a dictConfig dict that serve --service hands to uvicorn as log_config. uvicorn builds the app through a factory (factory=True, as --reload does), after applying the config, so the startup warning for a repository without a webhook secret stays a JSON line.
Task file docs/agent/tasks/task-1543-serve-service-logging-left-to-uvicorn.md; changelog.d/1543.md under ### Fixed.
Acceptance Criteria of docs/agent/tasks/task-1543-serve-service-logging-left-to-uvicorn.md:
After serve --service runs in process with uvicorn doubled, a devops_cli log record still reaches caplog (tests/test_server.py); it failed before the fix.
No missing-secret warning is logged before uvicorn.run is called, and exactly one is logged once the factory builds the app (tests/test_server.py::test_serve_service_mode_builds_the_app_after_the_server_applies_its_logging); it failed against the first version of the fix.
tests/test_roadmap_run.py::test_service_wiring reads the app from the factory uvicorn receives.
The seeded run that failed on feat(release): v0.2.33 #1537 (uv run pytest -n 0 -p randomly --randomly-seed=281456038 over the changed test files) passes, and so do two other seeds.
changelog.d/1543.md holds the entry under ### Fixed.
uv run devops ci is the pull request's gate.
Pending a person, once v0.2.33 deploys: kubectl -n devops logs deploy/roadmap-service -c service --since=10m shows single-line JSON records from devops_cli and uvicorn, each once.
scope/cliCore CLI framework, Typer subcommands, options, and tablesscope/telemetryOpenTelemetry tracing spans, Prometheus metrics, and Jaegertype/bugType bug: the code does not do what it must
Activity
dan-petty-bot commentedon Oct 10, 2026
Intake placed this item kept in v0.2.33: a person placed it in v0.2.33, and that placement stands.
It causes seed-dependent CI failures (Changed-Test Independence) but does not affect production behaviour.Restores reliable test isolation for the server test suite without changing user-facing behaviour.The body scopes it to one function, one call site, and their tests in a single pull request.dan-petty-bot commentedon Oct 10, 2026
Admitted to v0.2.33: an open or merged pull request is in flight for it. (devops roadmap reprioritize)
fix(server): devops serve --service leaves the process's logging alon…
dan-petty-bot commentedon Oct 10, 2026
What changed
#1545, merged into
release/v0.2.33as 8fe21cc.6 file(s) changed.
How it was verified
Check runs at 8b48a73:
Acceptance Criteria of
docs/agent/tasks/task-1543-serve-service-logging-left-to-uvicorn.md:serve --serviceruns in process with uvicorn doubled, adevops_clilog record still reachescaplog(tests/test_server.py); it failed before the fix.uvicorn.runis called, and exactly one is logged once the factory builds the app (tests/test_server.py::test_serve_service_mode_builds_the_app_after_the_server_applies_its_logging); it failed against the first version of the fix.tests/test_roadmap_run.py::test_service_wiringreads the app from the factory uvicorn receives.uv run pytest -n 0 -p randomly --randomly-seed=281456038over the changed test files) passes, and so do two other seeds.changelog.d/1543.mdholds the entry under### Fixed.uv run devops ciis the pull request's gate.kubectl -n devops logs deploy/roadmap-service -c service --since=10mshows single-line JSON records fromdevops_clianduvicorn, each once.feat(release): v0.2.33 (#1537)