Skip to content

doctor: talk.provider/providers normalize is a no-op but re-suggested on every run #90446

Closed

Description

@nocode-ananas

Environment

  • OpenClaw 2026.6.1 (commit 2e08f0f)
  • Node 24.14.1
  • Linux 6.8.0-124-generic x86_64 (Ubuntu 24.04.4 LTS)
  • Install: npm, single instance, gateway running as systemd user service

Symptom

Every openclaw doctor run shows a "Doctor changes preview" box: "Normalized talk.provider/providers shape (trimmed provider ids and merged missing compatibility fields)."

Running openclaw doctor --fix succeeds, claims to have applied the normalization, and updates the .bak file. But the next openclaw doctor run immediately re-suggests the same normalization — endlessly.

Reproduction

  1. Have any talk block with both top-level provider and realtime.providers.<id>, e.g.:
"talk": {
  "provider": "openai",
  "realtime": {
    "mode": "realtime",
    "transport": "provider-websocket",
    "brain": "agent-consult",
    "provider": "openai",
    "model": "gpt-realtime-2",
    "voice": "cedar",
    "providers": {"openai": {"apiKey": {"source": "env", "provider": "openai", "id": "OPENAI_API_KEY"}}}
  }
}
  1. Backup openclaw.json.
  2. Run openclaw doctor --fix.
  3. diff -u <(jq .talk backup.json) <(jq .talk ~/.openclaw/openclaw.json)
  4. Run openclaw doctor again.

Expected

Either the normalize op changes something (then no re-suggestion), or doctor recognizes the no-op and stops showing the preview box.

Actual

  • Step 4 diff is empty — the talk block is byte-for-byte identical before and after --fix. Only meta.lastTouchedAt, wizard.lastRunAt, and end-of-file newline change.
  • Step 5 doctor shows the same "Normalized talk.provider/providers shape" preview again.

Impact

  • Operators see a persistent "needs repair" hint that points at nothing.
  • Easy to mistake for an unrelated config drift problem.
  • Encourages mechanical "yes" to all repair prompts (which is dangerous because some repairs would remove intentional config).

Likely cause

The detect step computes a normalized form and compares it back, but the comparison or canonicalization is off by a small detail (key ordering, whitespace, empty compat field), so detect always finds a difference even though the write step produces the same bytes.

Workaround

Ignore the preview box; verify after each --fix run that the actual talk config diff is empty before assuming anything changed.

Activity

  1. clawsweeper commented on Jun 4, 2026

    @clawsweeper
    Contributor

    Codex review: keeping this open for maintainer follow-up; there is still a little grit to resolve. Reviewed June 4, 2026, 3:26 PM ET / 19:26 UTC.

    Summary
    Keep open: current main still has a plausible source-level path for the repeated Talk normalization preview, and the existing convergence tests do not cover the reporter's top-level talk.provider plus talk.realtime.providers shape.

    Reproducibility: yes. source inspection gives a high-confidence reproduction path: feed the reported talk block through normalizeCompatibilityConfigValues or a two-run doctor config-flow test and assert that the second run emits no Talk normalization. I did not run the CLI in this read-only pass.

    Next step
    This is a narrow doctor/config convergence bug with clear likely files and a focused regression-test path.

    Review details

    Best possible solution:

    Add a focused regression for the reported Talk shape and adjust doctor normalization so it only previews or applies a repair when the persisted canonical config would actually change.

    Do we have a high-confidence way to reproduce the issue?

    Yes, source inspection gives a high-confidence reproduction path: feed the reported talk block through normalizeCompatibilityConfigValues or a two-run doctor config-flow test and assert that the second run emits no Talk normalization. I did not run the CLI in this read-only pass.

    Is this the best way to solve the issue?

    Yes: a narrow doctor-normalizer/test fix is the best path, because the runtime Talk schema and docs already define the canonical fields and no new config surface is needed.

    AGENTS.md: found and applied where relevant.

    Remaining risk / open question:

    • This read-only review did not execute openclaw doctor; the fix PR should prove the exact persisted output with a two-run doctor regression.

    Codex review notes: model gpt-5.5, reasoning high; reviewed against 3140bb695d69.

    Label changes

    Label changes:

    • add P2: This is a normal-priority doctor/config bug with limited blast radius but real operator confusion.
    • add impact:other: The issue affects doctor repair trust and operator config diagnostics, which is maintainer-visible but outside the specific owned impact classes.
    • add issue-rating: 🦞 diamond lobster: Current issue advisory state selects this label.
    • add clawsweeper:source-repro: Current issue advisory state selects this label.
    • add clawsweeper:queueable-fix: Current issue advisory state selects this label.
    • add clawsweeper:fix-shape-clear: Current issue advisory state selects this label.

    Label justifications:

    • P2: This is a normal-priority doctor/config bug with limited blast radius but real operator confusion.
    • impact:other: The issue affects doctor repair trust and operator config diagnostics, which is maintainer-visible but outside the specific owned impact classes.
    Evidence reviewed

    Acceptance criteria:

    • node scripts/run-vitest.mjs src/commands/doctor-config-flow.test.ts -t "talk provider normalization"
    • node scripts/run-vitest.mjs src/commands/doctor-legacy-config.migrations.test.ts -t "normalizeCompatibilityConfigValues"

    What I checked:

    • Current normalizer reports changes after semantic normalization: normalizeLegacyTalkConfig normalizes the raw talk section, compares the normalized object back to the raw object, and pushes the reported Talk normalization message whenever they differ. (src/commands/doctor/shared/legacy-talk-config-normalizer.ts:51, 3140bb695d69)
    • Realtime voice compatibility can make an otherwise canonical realtime block differ: normalizeTalkRealtimeConfig derives speakerVoice from legacy voice while preserving voice, which matches the reporter's sample and can make the detector see a difference even when provider/providers are already present. (src/config/talk.ts:113, 3140bb695d69)
    • Existing regression coverage is narrower than the report: The current two-run doctor convergence test covers top-level talk.provider/providers only, not the reported talk.realtime.provider/providers and voice combination. (src/commands/doctor-config-flow.test.ts:2897, 3140bb695d69)
    • Latest-release-to-main check does not show a behavioral fix: The relevant files only gained comments between latest release v2026.6.1 and current main, so the reported release behavior does not appear fixed on main. (src/config/talk.ts:1, 3140bb695d69)
    • Related history shows this exact class has prior fixes: Commit a26b844b88437406ea93d03dec151db207fa918c added the prior repeat-normalization key-order regression test, but it did not cover the realtime Talk shape from this report. (src/commands/doctor-legacy-config.migrations.test.ts:1231, a26b844b8843)

    Likely related people:

    • Peter Steinberger: Blame and local history point to this person on the current Talk normalizer, Talk config normalization, and adjacent doctor config tests in the checked-out history. (role: current source owner signal; confidence: medium; commits: bb6c3ce26287, ff7a8425090a, 8ddd9b8aac69; files: src/commands/doctor/shared/legacy-talk-config-normalizer.ts, src/config/talk.ts, src/commands/doctor-config-flow.test.ts)
    • Evan Newman: Authored the earlier repeat Talk normalization regression test for key-order convergence, which is adjacent to this failure mode. (role: prior related fix author; confidence: medium; commits: a26b844b8843; files: src/commands/doctor-legacy-config.migrations.test.ts)
    How this review workflow works
    • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
    • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
    • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
    • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
    • Maintainers can also comment @clawsweeper review to request a fresh review only.
    • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
    • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
    • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.
  2. added
    P2Normal backlog priority with limited blast radius.
    impact:otherThis issue has meaningful maintainer-visible impact outside the owned taxonomy.
    issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.
    clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.
    clawsweeper:queueable-fixClawSweeper marked this issue as an existing queue_fix_pr work candidate.
    clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.
    on Jun 4, 2026
  3. self-assigned this
    on Jun 6, 2026
  4. vincentkoc commented on Jun 6, 2026

    @vincentkoc
    Member

    Fixed on main in b77ef4d6df347aa38c8ffba202469d12239c0433.

    What changed:

    • src/commands/doctor/shared/legacy-talk-config-normalizer.ts no longer treats talk.realtime.speakerVoice derived only from an existing deprecated talk.realtime.voice alias as a persisted provider-shape repair.
    • Runtime normalization still maps voice to speakerVoice for clients; doctor just stops re-suggesting a no-op config write.

    Proof:

    • node scripts/run-vitest.mjs src/commands/doctor/shared/legacy-config-migrate.provider-shapes.test.ts src/commands/doctor-legacy-config.migrations.test.ts -t "talk provider normalization|Talk provider repair|realtime voice aliases|existing realtime voice alias" -> 3 passed.
    • node scripts/run-vitest.mjs src/commands/doctor-config-flow.test.ts -t "talk provider normalization" -> 1 passed.
    • OPENCLAW_VITEST_MAX_WORKERS=1 node scripts/run-vitest.mjs src/commands/doctor/shared/legacy-config-migrate.provider-shapes.test.ts src/commands/doctor-legacy-config.migrations.test.ts src/commands/doctor-config-flow.test.ts -> 101 passed across 3 touched test files.
    • ./node_modules/.bin/oxfmt --check --threads=1 src/commands/doctor/shared/legacy-talk-config-normalizer.ts src/commands/doctor/shared/legacy-config-migrate.provider-shapes.test.ts src/commands/doctor-legacy-config.migrations.test.ts src/commands/doctor-config-flow.test.ts -> clean.
    • node scripts/run-oxlint.mjs --tsconfig config/tsconfig/oxlint.json src/commands/doctor/shared/legacy-talk-config-normalizer.ts src/commands/doctor/shared/legacy-config-migrate.provider-shapes.test.ts src/commands/doctor-legacy-config.migrations.test.ts src/commands/doctor-config-flow.test.ts -> clean.
    • git diff --check -> clean.
    • .agents/skills/autoreview/scripts/autoreview --mode local -> clean, no accepted/actionable findings.
    • Testbox-through-Crabbox tbx_01ktesn1h8dhgfhpj4a2ctfghw, Actions run 27066616852, check:changed lanes core, coreTests -> exit 0. The wrapper reported a non-fatal portal sync 401 after the completed green run.

    Duplicate search for the doctor talk/provider normalization wording only returned this issue.

  5. locked as resolved and limited conversation to collaborators on Jun 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

P2Normal backlog priority with limited blast radius.clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.clawsweeper:queueable-fixClawSweeper marked this issue as an existing queue_fix_pr work candidate.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.impact:otherThis issue has meaningful maintainer-visible impact outside the owned taxonomy.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.

Type

No type

Fields

Priority

None yet

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions