Skip to content

docs(doctor): Doctor repairs session provider aliases instead of refusing them - #163729

Merged
steipete merged 1 commit into
mainfrom
docs/doctor-session-provider-aliases
Oct 2, 2026
Merged

steipete merged 1 commit into
mainfrom
docs/doctor-session-provider-aliases

Conversation

@steipete

@steipete steipete commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

Related: #163171

What Problem This Solves

The Doctor state-and-sessions page still says session rows with provider or lastProvider aliases are refused and must be migrated with an older OpenClaw release. Since #163171, current Doctor repairs those rows itself, so operators following the page would take an unnecessary intermediate-upgrade detour.

User Impact

User impact: the Doctor docs now match current behavior. Session reads refuse rows with provider/lastProvider aliases with a migration-required error until openclaw doctor --fix runs; Doctor backs up the affected SQLite databases and rewrites the aliases into the canonical delivery state and its query projections. Rows that still need the retired room → groupChannel conversion remain refused, with the same 2026.9.5 intermediate-upgrade guidance already given on the CLI Doctor state-migrations page. No runtime behavior changes.

Why This Change Was Made

#163171 split the old combined refusal: room stays refused (assertSupportedSessionStoreEntry), while provider/lastProvider became Doctor-owned repairs (hasLegacySessionProviderState → repairLegacySessionEntryStates, with projectCanonicalSessionEntryShape throwing SessionStoreMigrationRequiredError until then). That PR updated docs/cli/doctor/state-migrations.md but not the gateway Doctor page.

The session schema reference also listed provider and room as current group/channel labeling fields. Neither is a SessionEntry field anymore; the metadata writer stores subject, groupChannel, space, and displayName, so that list now names those.

Evidence

  • Read fix(sessions): retain Doctor repair for July provider aliases #163171's diff and current src/config/sessions/{supported-session-store,session-entry-state-format,store-entry-shape,metadata,types}.ts, src/commands/doctor-session-delivery-state.ts, src/commands/doctor/shared/session-entry-shape.ts, and src/infra/state-migrations.legacy-session-store.ts; no later commits touch these owners.
  • Grepped docs/ for lastProvider, provider alias, and the old refusal wording; the gateway Doctor page was the only remaining stale statement (other provider alias hits are unrelated model/secret provider aliases).
  • pnpm check:docs: passed (docs format 1326 files clean, markdownlint 0 issues, MDX check, i18n glossary, 14763 internal links with 0 broken, config examples, changelog check).
  • git diff --check: clean.

Since #163171, Doctor repairs session rows that still carry provider/lastProvider aliases and runtime reads raise a migration-required error until it runs; only room-without-groupChannel rows stay refused with 2026.9.5 intermediate-upgrade guidance. Also drop the retired provider/room names from the session labeling-field list.
@clawsweeper

clawsweeper Bot commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@steipete
steipete marked this pull request as ready for review October 2, 2026 19:08
@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation gateway Gateway runtime size: XS labels Oct 2, 2026
@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Oct 2, 2026
@clawsweeper

clawsweeper Bot commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed October 2, 2026, 3:13 PM ET / 19:13 UTC.

ClawSweeper review

What this changes

Updates Doctor’s session migration guidance and replaces retired session labeling fields with their current names.

Merge readiness

✅ Ready for maintainer review

This PR remains useful: current main still contains both stale descriptions, and the corrections match the merged repair implementation. No actionable patch defects were found.

Priority: P3
Reviewed head: ff9d51f788ccee1b02601d4e29dd76a7927851f5

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, source-verified documentation correction with no actionable findings.
Proof confidence 🌊 off-meta tidepool Not applicable: Real behavior proof is not required because this PR only changes files under docs/.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: Real behavior proof is not required because this PR only changes files under docs/.
Evidence reviewed 8 items Pinned documentation-only change: The introduced delta changes two prose lines; frontmatter, runtime code, schemas, dependencies, and permissions are unchanged.
Current main still needs the documentation correction: Fetched main still groups provider aliases with retired room conversion and instructs operators to use an older release.
Repair implementation matches the revised guidance: The repair converts provider aliases before delivery normalization, enables delivery projection updates, and backs up databases before applying rewrites. These inspected owners have no differences between the reviewed checkout and fetched main.
Findings None None.
Security None None.

How this fits together

Doctor repairs older session records before the Gateway reads them. These documentation pages explain the repair commands and the metadata stored for conversations.

flowchart TD
 A[Older session records] --> B{Legacy fields}
 B -->|Provider aliases| C[Doctor backup and repair]
 C --> D[Canonical delivery state]
 D --> E[Gateway session reads]
 B -->|Retired room conversion| F[Intermediate release migration]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Docs 0. Total 0 across 2 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 0 0 0 0
Docs 2 2 2 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 2 2 2 0

Review metrics

None.

Technical review

Best possible solution:

Keep the documentation aligned with Doctor’s existing repair owner and preserve the separate guidance for retired room conversion.

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

Not applicable to a prose-only patch; source inspection confirms the stale guidance on current main and the existing repair behavior.

Is this the best way to solve the issue?

Yes. Correcting the two descriptions is the narrowest solution and agrees with the existing CLI migration documentation.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 59c4f37a8f95.

Labels

Label changes:

  • add P3: This is a focused documentation correction with no runtime or stored-state changes.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: Real behavior proof is not required because this PR only changes files under docs/.

Label justifications:

  • P3: This is a focused documentation correction with no runtime or stored-state changes.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: Real behavior proof is not required because this PR only changes files under docs/.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit f1be744 adds src/commands/doctor/shared/session-entry-shape.ts:34 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: f1be74485a89; files: src/commands/doctor/shared/session-entry-shape.ts)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • 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.

@steipete
steipete merged commit 965c76d into main Oct 2, 2026
123 of 126 checks passed
@steipete
steipete deleted the docs/doctor-session-provider-aliases branch October 2, 2026 20:26
@steipete

steipete commented Oct 2, 2026

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 3, 2026
…nclaw#163729)

Since openclaw#163171, Doctor repairs session rows that still carry provider/lastProvider aliases and runtime reads raise a migration-required error until it runs; only room-without-groupChannel rows stay refused with 2026.9.5 intermediate-upgrade guidance. Also drop the retired provider/room names from the session labeling-field list.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Improvements or additions to documentation gateway Gateway runtime P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: XS status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant