Title: treaty: doctor's tool check passes on a version read from a failed command's output · Issue #528 · cloudfall-dev/cloudfall · GitHub
Open Graph Title: treaty: doctor's tool check passes on a version read from a failed command's output · Issue #528 · cloudfall-dev/cloudfall
X Title: treaty: doctor's tool check passes on a version read from a failed command's output · Issue #528 · cloudfall-dev/cloudfall
Description: treaty's doctor tool check passes on a version read from a failed command's output. It holds no issue: #527 works around it for cloudfall doctor's ansible-playbook entry (#524), but a nonzero exit still never fails a tool check by itself...
Open Graph Description: treaty's doctor tool check passes on a version read from a failed command's output. It holds no issue: #527 works around it for cloudfall doctor's ansible-playbook entry (#524), but a nonzero exit ...
X Description: treaty's doctor tool check passes on a version read from a failed command's output. It holds no issue: #527 works around it for cloudfall doctor's ansible-playbook entry (#524), but a n...
Opengraph URL: https://github.com/cloudfall-dev/cloudfall/issues/528
X: @github
Domain: github.com
IPv4 address: 140.82.114.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"treaty: doctor's tool check passes on a version read from a failed command's output","articleBody":"treaty's doctor tool check passes on a version read from a failed command's output. It holds no issue: #527 works around it for `cloudfall doctor`'s `ansible-playbook` entry (#524), but a nonzero exit still never fails a tool check by itself.\n\n## Reproduce\n\nWith treaty 1.1.0, declare a tool in `required_tools` whose `--version` fails at start and prints a traceback naming a Python version. On Python 3.15 with ansible-core 2.21.0, `uv run --python 3.15 --with ansible-core==2.21.0 cloudfall doctor` on main before #527 reported the `ansible-playbook` entry as `\"ok\": true, \"version\": \"3.15\"` while ansible raised `AttributeError: module 'dataclasses' has no attribute '_is_type'`.\n\n## Touches\n\nThe `treaty` package 1.1.0: `doctor`'s tool checks, for every `required_tools` entry and every `Dependency`\n\n## Suspected code\n\n`treaty/_deps.py` `find(argv, pattern, ctx)` runs `ctx.run(list(argv), check=False)` and searches `stdout + stderr` for the version pattern without looking at `done.returncode`. `treaty/_builtins.py` `register_doctor` uses it for every `required_tools` entry with the generic `(\\d+(?:\\.\\d+)+)`, and for every `Dependency` with its own `version_regex`. A `Dependency(version_regex=...)` narrows the parse (what #527 does), but nothing makes a nonzero exit fail.\n\nProposed shape: in `find`, return a not-found result naming the exit status (`\u003cargv> exited \u003ccode>`) when `done.returncode != 0`, before the regex search. For a tool whose `--version` legitimately exits nonzero, an opt-out such as `Dependency(accept_exit_codes=(0, 1))`. Optionally, a per-tool regex on `required_tools`, so an app needn't declare a `Dependency` only to narrow the parse.\n\n\u003c!-- shipmill:agent -->\n","author":{"url":"https://github.com/apps/shipmill-romamo","@type":"Person","name":"shipmill-romamo"},"datePublished":"2026-11-17T18:35:32Z","url":"https://github.com/cloudfall-dev/cloudfall/issues/528"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:ed883ad7-4b9e-8602-27ed-c4e24deed337 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C136:2D8E06:E19069:133B72F:6B0554C7 |
| html-safe-nonce | b7d6c9425c6b7593f5aa854150afd0165db0365833e0afe30a86493482e8ba42 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDMTM2OjJEOEUwNjpFMTkwNjk6MTMzQjcyRjo2QjA1NTRDNyIsInZpc2l0b3JfaWQiOiIxMDUyOTkwNjgyNzE0OTUyOTAzIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 72f3dd463565d67df94b76992e1ca91deb8efeeb2ae40739ddec99ae38133eb8 |
| hovercard-subject-tag | issue:6451507099 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/cloudfall-dev/cloudfall/528/issue_layout |
| twitter:image | https://opengraph.githubassets.com/7f978c89a444e84d249ba5ee3072ee2eb21b826c09bee4bc07ce7fbfafc3be6c/cloudfall-dev/cloudfall/issues/528 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/7f978c89a444e84d249ba5ee3072ee2eb21b826c09bee4bc07ce7fbfafc3be6c/cloudfall-dev/cloudfall/issues/528 |
| og:image:alt | treaty's doctor tool check passes on a version read from a failed command's output. It holds no issue: #527 works around it for cloudfall doctor's ansible-playbook entry (#524), but a nonzero exit ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | shipmill-romamo[bot] |
| hostname | github.com |
| expected-hostname | github.com |
| None | 854d880890b5e847b3fce9d1b31f032107baeddeebad2aa379c48aa4f1451f6b |
| turbo-cache-control | no-preview |
| go-import | github.com/cloudfall-dev/cloudfall git https://github.com/cloudfall-dev/cloudfall.git |
| octolytics-dimension-user_id | 339512759 |
| octolytics-dimension-user_login | cloudfall-dev |
| octolytics-dimension-repository_id | 1360999777 |
| octolytics-dimension-repository_nwo | cloudfall-dev/cloudfall |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 1360999777 |
| octolytics-dimension-repository_network_root_nwo | cloudfall-dev/cloudfall |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 220e980097d94ce616d5d11fbd5316d208e3fc93 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width