Repository navigation
Fail doctor only on a piece a supported command needs - #1
Merged
Merged
Conversation
doctor gave every check a binary pass/fail and exited 1 whenever any row was not a pass, so a clean host whose ffmpeg carries the libwebp encoder failed on the missing cwebp binary the CLI never runs there. Checks now carry pass, warn, or fail, and only a fail moves the exit code. cwebp warns beside an ffmpeg with libwebp, encoder_libwebp warns beside a usable cwebp, and the two fail together when the host has neither and no image can be transcoded. libx265, HDR tone mapping, and the server-advertised feedback feature warn as well. The envelope gains data.status, the worst row in the list. Co-authored-by: Gersham Meharg <gersham@users.noreply.github.com>
Adds a preflight section covering pass, warn, and fail, which rows are required, and the host dependencies neither the plugin launcher nor the npm package installs. Co-authored-by: Gersham Meharg <gersham@users.noreply.github.com>
Co-authored-by: Gersham Meharg <gersham@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.
Sequencing
Do not merge yet. This waits behind the Caddy-orphan
activate.shfix onscreenrig/backend. Nothing in this PR depends on backend code — the change islocal host probing — but the merge order is held deliberately. No deploy, no
npm publish, no plugin bundle change, and no production ingest is part of it.
The regression
screenrig doctor --jsonagainst production returned a valid success envelopeand still exited 1 on a clean machine, because the
cwebprow was afail.doctorgave every check a binarypass/failand exited non-zero wheneverany row was not a
pass.cwebpis only the fallback the image planner useswhen the ffmpeg build has no
libwebpencoder (src/media/transcode.ts), so ahost whose ffmpeg carries
libwebp— the ordinary prod/dev machine — faileddoctorover a binary the CLI never runs there.encoder_libx265(
--codec hevconly),filter_hdr_tonemap(documented warn-and-fallback), andthe server-advertised
feedbackfeature had the same false-failure shape.The change
Checks now carry
pass,warn, orfail, and only afailmoves the exitcode, so a host missing nothing required exits 0.
cwebp, ffmpeg haslibwebpnot required because this ffmpeg build has the libwebp encodercwebp, ffmpeg has nolibwebpcwebponPATH, orSCREENRIG_CWEBPencoder_libwebp,cwebpusableencoder_libwebp, nocwebpencoder_libx265--codec hevc is unavailablefilter_hdr_tonemapfeedbackencoder_libx264node,config_permissions,token,api_url,ffmpeg,ffprobe, and thefour control-plane rows keep failing.
encoder_libwebpandcwebpare the twoways to produce the one delivery format for images, so they fail together in
the one case that is a genuine defect: the host has neither and no image can be
transcoded. The
encoder_libwebpdetail still describes the ffmpeg encoderalone and never implies the fallback covers it.
The envelope gains
data.status, the worst row in the list, so an agent canbranch without scanning the rows. Stdout stays a success envelope, as before.
cwebp remains a host dependency: neither the plugin launcher nor the npm
package installs ffmpeg, ffprobe, or cwebp, and the new README section says so
alongside the
PATH/SCREENRIG_CWEBPresolution order.Evidence
Real host in this run (ffmpeg 6.1.1 with
libwebp, nocwebpbinary), which isexactly the reported configuration:
npm run smoke:mockon that same host now runsdoctorend to end throughdist/bin.jsand asserts exit 0 when no check failed, plus thatcwebpisnever a
failwhileencoder_libwebppasses.Four new unit tests cover the matrix (clean host without cwebp, optional
encoder/filter warnings, libwebp missing with cwebp present, and neither
present). Checked out against the pre-fix
src/commands.ts, the clean-host testfails as the reported bug and passes after the change.
Gates run from this checkout:
npm ci,check:public,vendor:check,typecheck,lint,test(346 tests, 0 failures),smoke:mock,pack:dry,pack:release,check:npm-install— all pass. No vendored file changed.smoke:serverwas not run (needs an owned local backend) and neither wasvendor:check:drift(needs a backend checkout). Nothing here proves playbackon player hardware or in production.
Not in this PR
No deploy, no publish, no plugin bundle change. The plugin picks this up when it
pins a newer CLI artifact.