Skip to content

fix(install): name the failed preflight checks in the install error - #77

Merged
RockChinQ merged 1 commit into
mainfrom
fix/preflight-name-failed-checks
Nov 30, 2026
Merged

RockChinQ merged 1 commit into
mainfrom
fix/preflight-name-failed-checks

Conversation

@RockChinQ

Copy link
Copy Markdown
Member

Problem

lbctl install --driver docker preflight failures surface only as Installation preflight failed / 安装前置检查未通过. The failed check list exists in the result data, but the error message (and so cli_operation telemetry error) doesn't name it. The telemetry details.log then attaches the tail of an older native install.log, which is misleading.

Stability patrol LANG-775 (2026-11-30): 6 Windows install.ps1 reinstalls on v0.6.4 (2 instances) failed preflight with only this generic text. In each case a previous install was still in the same directory or Compose project, but telemetry couldn't show which check failed.

Fix

PreflightInstall now builds the precondition error from every failed check's reason and detail. Passed checks are left out. CJK punctuation is converted to ASCII in English mode via i18n.Punct.

  • zh: 错误:安装前置检查未通过:目标目录不为空或不可用(/path/inst)
  • en: Error: Installation preflight failed: Target directory is not empty or unavailable (/path/inst)

Paths still go through the existing telemetry identity sanitizer.

Tests

  • New TestPreflightErrorNamesFailedChecks (non-empty dir + existing Compose project). It fails on master and passes with the fix.
  • go test ./internal/deploy ./internal/app ./internal/i18n ./internal/telemetry pass.
  • Ran the real binary: lbctl install --driver docker --dir <non-empty> --dry-run (zh and en) prints the messages shown above.

🤖 Generated with Claude Code

Docker install preflight returned a bare "Installation preflight failed",
so cli_operation telemetry (error + install.log tail from an earlier native
install) could not tell which precondition blocked the reinstall. Six
Windows install.ps1 reinstalls on v0.6.4 hit this on 2026-11-30.

The error now lists every failed check with its detail, e.g.
"Installation preflight failed: Target directory is not empty or
unavailable (<dir>)". Passed checks are omitted.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@RockChinQ
RockChinQ merged commit b69b9fd into main Nov 30, 2026
21 of 22 checks passed
@RockChinQ
RockChinQ deleted the fix/preflight-name-failed-checks branch November 30, 2026 19:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant