From 4e20d9a1e36ef0b62398b2aac2b1b559ec3c5d8d Mon Sep 17 00:00:00 2001 From: Vijit Singh Date: Fri, 31 Jul 2026 20:39:14 -0500 Subject: [PATCH] fix(compose): tari-wallet healthcheck pattern survives ps CMD truncation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit procps' ps caps the CMD column at 15 characters, so the probe's grep for the 23-character 'minotari_console_wallet' could never match: the wallet container reported unhealthy forever while the wallet ran fine. Match on '[m]inotari_consol' — the truncated form ps actually prints. Closes #777 Co-Authored-By: Claude Fable 5 --- docker-compose.yml | 6 ++++-- tests/stack/test_compose.sh | 5 +++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 7d4f8958..c5294f18 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -355,8 +355,10 @@ services: healthcheck: # Process-liveness (like the Tari node) rather than a gRPC probe: the wallet's own gRPC is a # long stream, and a liveness ps is enough to catch a crashed daemon. '[m]' stops grep matching - # its own argv. The long start_period tolerates the first-run blockchain scan. - test: ["CMD-SHELL", "ps | grep '[m]inotari_console_wallet' || exit 1"] + # its own argv. The long start_period tolerates the first-run blockchain scan. The pattern is + # capped at 15 chars — procps' ps truncates the CMD column there, so the full binary name + # 'minotari_console_wallet' can never match (#777). + test: ["CMD-SHELL", "ps | grep '[m]inotari_consol' || exit 1"] interval: 30s timeout: 5s retries: 3 diff --git a/tests/stack/test_compose.sh b/tests/stack/test_compose.sh index f04edce6..a16c5dc7 100755 --- a/tests/stack/test_compose.sh +++ b/tests/stack/test_compose.sh @@ -283,6 +283,11 @@ jq_assert "exactly 4 service_healthy depends_on edges total (#565)" \ '[.services[] | (.depends_on // {}) | to_entries[] | select(.value.condition == "service_healthy")] | length == 4' jq_assert "exactly 5 depends_on edges total (#565)" \ '[.services[] | (.depends_on // {}) | to_entries[]] | length == 5' +# The wallet probe must fit ps's 15-char CMD column — procps truncates CMD there, so the full +# binary name never matches and the container would report unhealthy forever while the wallet +# runs fine (#777). Asserted here because tari-wallet only renders under tari_payout_confirm. +jq_assert "tari-wallet healthcheck pattern survives ps CMD truncation (#777)" \ + '(.services["tari-wallet"].healthcheck.test | tostring) | contains("[m]inotari_consol") and (contains("[m]inotari_console_wallet") | not)' # Restore $JSON to the default-profile render for every check below this point. JSON="$(docker compose --env-file "$ENV_FILE" -f "$ROOT/docker-compose.yml" config --format json 2>/dev/null)"