fix(cli): render running-no-probe containers as healthy in doctor#1870
Merged
Conversation
Contributor
Contributor
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
Contributor
There was a problem hiding this comment.
Code Review
This pull request updates the renderDoctorContainers function in cli/cmd/doctor.go to treat containers in a "running" state as healthy when no explicit Docker healthcheck is defined. This ensures that containers without healthchecks, such as NATS, are correctly reported as healthy rather than appearing indefinitely in progress. I have no further feedback to provide.
Aureliolo
pushed a commit
that referenced
this pull request
May 12, 2026
<!-- HIGHLIGHTS_START --> ## Highlights > _AI-generated summary (model: `openai/gpt-4.1-mini` via GitHub Models). Commit-based changelog below._ ### What you'll notice - Password and secret fields now include an eye-toggle for easier visibility control. - Containers running without probes are shown as healthy in the doctor command. - Unloaded and missing PR-review agents are restored and available again. ### What's new - Gate baseline protection is enhanced to block em-dashes during writing. ### Under the hood - Replaced Atlas with yoyo-migrations for persistence management. - Refactored codebase extensively, including context-bound user authentication and registry pattern for enums. - Improved linting by draining magic number usages and tightening mock and constant checks. - Updated CI to retry Docker pushes on network timeout errors. - Updated apko lockfiles for dependency management. <!-- HIGHLIGHTS_END --> :robot: I have created a release *beep* *boop* --- ## [0.8.3](v0.8.2...v0.8.3) (2026-05-12) ### Features * harden gate baseline protection + block em-dashes at write time ([#1860](#1860)) ([b41f151](b41f151)) * **web:** eye-toggle on every password / secret field ([#1873](#1873)) ([9070387](9070387)) ### Bug Fixes * **ci:** retry Docker push on Go net/http deadline + cancellation errors ([#1877](#1877)) ([23a0bfa](23a0bfa)) * **cli:** render running-no-probe containers as healthy in doctor ([#1870](#1870)) ([6263795](6263795)) * restore unloaded and missing PR-review agents ([#1875](#1875)) ([db004fd](db004fd)), closes [#1871](#1871) ### Refactoring * bind authenticated user via ContextVar ([#1858](#1858)) ([57ed0b4](57ed0b4)) * code-structure cleanup (sub-tasks D + F + G + H + I) ([#1859](#1859)) ([362e5c8](362e5c8)) * convert enum dispatch to registry pattern ([#1854](#1854)) ([e90550e](e90550e)) * drain no_magic_numbers baseline to zero via Final hoists ([#1856](#1856) phase 2) ([#1872](#1872)) ([ec8109e](ec8109e)) * drain pagination + loop-init + kill-switch baselines ([#1857](#1857)) ([#1868](#1868)) ([115c3c2](115c3c2)) * **persistence:** replace Atlas with yoyo-migrations ([#1876](#1876)) ([1b7e975](1b7e975)), closes [#1874](#1874) * protocols audit follow-up (REVIEW + fold pass) ([#1869](#1869)) ([af33ddb](af33ddb)) * protocols audit follow-up REMOVE pass ([#1867](#1867)) ([dd1eebc](dd1eebc)) * tighten check_mock_spec gate, add mock_of[T], drain baseline ([#1862](#1862)) ([240a253](240a253)) * tighten check_no_magic_numbers for named module constants ([#1856](#1856)) ([#1866](#1866)) ([90c933b](90c933b)) ### CI/CD * update apko lockfiles ([#1863](#1863)) ([2bd32e6](2bd32e6)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --------- Co-authored-by: synthorg-repo-bot[bot] <279117679+synthorg-repo-bot[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
synthorg doctorwas rendering NATS as● running(blue step icon) while peers with docker-level healthchecks rendered as✓ healthy(green success icon). NATS has no docker healthcheck declared; application-level liveness is surfaced via/api/v1/readyzinstead.Before:
After:
Change
Add an explicit
case c.State == "running"arm inrenderDoctorContainers(cli/cmd/doctor.go:436-440) ahead of the catch-all default, rendering without.Success(...)and label"healthy". The case is only reached whenHealth == ""(all non-empty Health values are caught upstream).Cross-file parity
cli/cmd/status.go:252-269healthIcon()already does the same thing (running + empty Health ->IconSuccess) with a doc-comment explaining the rationale. Doctor was inconsistent with status; this aligns them.Test plan
go -C cli build ./...: clean.go -C cli vet ./...: clean.go -C cli test ./...: all packages pass (cmd, completion, compose, config, diagnostics, docker, health, images, scaffold, selfupdate, ui, verify).synthorg doctoragainst a running stack renders NATS row as green check + "healthy" matching the other services.Review coverage
Pre-PR review pipeline (
/pre-pr-review) ran 4 applicable agents (go-reviewer, go-conventions-enforcer, docs-consistency, comment-quality-rot). Zero findings; all agents approved. Triage record at_audit/pre-pr-review/triage.md.Restarting / paused / created / dead states with empty Health still fall through to the default
out.Step(...)arm and render with the in-progress icon, matchinghealthIcon()'s behaviour for the same states.