Skip to content

Repair catalog: two working repairs, plus two UI defects found by driving the real TUI - #24

Merged
felirami merged 1 commit into
mainfrom
feat/repair-catalog
Jul 27, 2026
Merged

Repair catalog: two working repairs, plus two UI defects found by driving the real TUI#24
felirami merged 1 commit into
mainfrom
feat/repair-catalog

Conversation

@felirami

Copy link
Copy Markdown
Owner

Follow-up to #23, which established that ClawFix detected five real problems and could repair
one — and that one needed systemd, so it could not fix anything in a container. This closes that
gap and fixes two UI defects that only surfaced by driving the shipped binary.

Two repairs added — ClawFix now fixes what it finds

Both use OpenClaw's own supported commands and were verified against a real OpenClaw 2026.6.11
install on a Blaxel sandbox.

Repair Does Verified by Risk
auto-update-enabled-warning openclaw config set update.auto.enabled false reads the key back via config get low
gateway-loopback-no-auth sets gateway.auth.mode to token, then doctor --fix --generate-gateway-token reads the mode back; never reads the token medium

Repairable findings go from 1 to 3. On a real install, broken on purpose:

auto-update:  before "true" → applied, verify {"ok":true,"current":"false"} → finding gone
gateway auth: before "none" → applied, verify {"ok":true,"mode":"token"}    → finding gone

gateway-loopback-no-auth is medium risk on purpose: existing clients stop working until they
carry the new token, and the preview says so before you approve. Verification reads a single
config key through OpenClaw rather than parsing openclaw.json, and the auth repair never pulls
the token into a repair record.

Two UI defects, found only by driving the real thing

The compiled musl binary was driven through a PTY with a terminal emulator attached, against a
genuinely broken install. Neither defect was visible to unit tests or frame captures.

The sidebar's numbers did not match the numbers fix <#> accepts. The sidebar sorted by
severity and renumbered its own view 1–4, while fix <#> and explain <#> index the unsorted
findings list. Reading "3. Auto-update enabled" and typing fix 3 reached an advisory finding
and answered "This finding has no reviewed automatic repair." The sidebar now carries each
finding's real position — criticals still lead, but the numbers work.

The status line printed the revision twice, pushing the finding count off the end:

before: 🦞 ClawFix v0.11.2 · revision f3e9479b-… · Revision f3e9479b-…
after:  🦞 ClawFix v0.11.2 · Revision f3e9479b-b52c-456e-8d0f-f5f25ba3b2e4 · 6 findings · AI consent required

End to end through the UI, on a real machine

Sidebar listed "4. Gateway auth missing on loopback" → typed fix 4 → approval dialog showed
Risk: medium · gateway-loopback-no-auth, composer locked, focus on Cancel → approved →
openclaw config get gateway.auth.mode returned token.

Detect, propose, review, approve, apply, verify — fixing a real problem on a real OpenClaw
install through the shipped interface.

Gates

397 node tests, 91 TUI tests, tsc clean, prove:remediation, validate:repairs, npm audit clean,
node --check sweep, and the 21-file CLI package allowlist — all run locally before pushing.

…osed

ClawFix detected five real problems and could repair one, which needed systemd.
Two repairs are added, both built on OpenClaw's own commands and both verified
against a real OpenClaw 2026.6.11 install:

- auto-update-enabled-warning sets update.auto.enabled false and verifies by
  reading the key back (low risk, rollback restores it).
- gateway-loopback-no-auth switches gateway.auth.mode to token and has OpenClaw
  generate one. Deliberately medium risk, not low: existing clients stop working
  until they carry the new token, and the preview says so. Verification reads the
  mode only — the token never enters a repair record.

Repairable findings go from 1 to 3. On a real install: auto-update "true" ->
applied, verify current "false", finding gone; auth "none" -> applied, verify mode
"token", finding gone.

Driving the compiled binary through a PTY on a broken install also exposed two
defects that unit tests and frame captures could not see:

- The sidebar sorted findings by severity and renumbered its own view, while
  `fix <#>` indexes the unsorted list. Reading "3. Auto-update enabled" and typing
  `fix 3` hit an advisory finding and answered "no reviewed automatic repair". The
  sidebar now carries each finding's real position; criticals still lead.
- The status line printed the revision twice, pushing the finding count off the
  end of the line. The bridge's status already starts with it.

Verified through the UI end to end: sidebar showed "4. Gateway auth missing on
loopback", `fix 4` opened the approval dialog for gateway-loopback-no-auth with
focus on Cancel, and approving left gateway.auth.mode = token on the real machine.
@felirami
felirami requested a review from arcabotai as a code owner July 27, 2026 03:06
@felirami
felirami merged commit 21f4435 into main Jul 27, 2026
3 checks passed
@felirami
felirami deleted the feat/repair-catalog branch July 27, 2026 03:07
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