Doctor: expose session artifact findings#95976
Conversation
713025a to
88b539e
Compare
|
Codex review: needs maintainer review before merge. Reviewed June 25, 2026, 11:25 AM ET / 15:25 UTC. Summary PR surface: Source +191, Tests +123. Total +314 across 6 files. Reproducibility: not applicable. This PR adds a structured diagnostic surface around existing Doctor session artifact scanners and repairs rather than fixing a reported bug. The behavior is source-checkable and the PR body includes terminal proof for default lint versus explicit info-threshold lint. Review metrics: 1 noteworthy metric.
Stored data model Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Risk before merge
Maintainer options:
Next step before merge
Security Review detailsBest possible solution: Land this only after maintainers explicitly accept exposing legacy session artifacts as advisory structured Doctor findings while keeping real mutations in the existing Doctor repair paths. Do we have a high-confidence way to reproduce the issue? Not applicable: this PR adds a structured diagnostic surface around existing Doctor session artifact scanners and repairs rather than fixing a reported bug. The behavior is source-checkable and the PR body includes terminal proof for default lint versus explicit info-threshold lint. Is this the best way to solve the issue? Yes, if maintainers accept the product direction. The patch reuses existing detectors and keeps mutating repairs in legacy Doctor paths; the safer alternative is narrower gating if maintainers do not want this advisory surface yet. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 210ea659f77f. Label changesLabel justifications:
Evidence reviewedPR surface: Source +191, Tests +123. Total +314 across 6 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
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. How this review workflow works
|
|
@clawsweeper re-review Current head |
|
🦞🧹 I asked ClawSweeper to review this item again. |
c77bedf to
adf2f9a
Compare
|
@clawsweeper re-review Rebased onto current main; current head is Validation refreshed in the PR body: focused Doctor Vitest shard is green, changed-file oxfmt/oxlint are green, tsgo core/test-src are green, plugin SDK surface report is clean, and diff check is clean. The only post-rebase patch is test portability for Windows JSON path escaping; Doctor behavior remains the same advisory info-level session artifact surface. |
|
🦞🧹 I asked ClawSweeper to review this item again. |
adf2f9a to
482ff8a
Compare
|
Merged via squash.
|
* feat(doctor): expose session artifact findings * fix(doctor): make session artifact findings advisory
* feat(doctor): expose session artifact findings * fix(doctor): make session artifact findings advisory
Summary
infofindings so defaultdoctor --lintdoes not fail existing users with legacy artifacts.runpaths authoritative for realdoctor/doctor --fixmutations.This is intentionally the next narrow session-artifacts slice before returning to the broader dry-run preview PR. It does not change transcript repair behavior, snapshot repair behavior, session store target resolution, or the public health-check contract.
Stack
Rebased onto current
mainat2e6e17f7c5(fix(media-generation): preserve trimmed default model flag (#96430)). Current branch head is482ff8a570(fix(doctor): make session artifact findings advisory).Conflict resolution was limited to
src/flows/doctor-health-contributions.test.ts; the check ID assertion now keeps the already-merged sandbox, gateway-services, config-audit, session-transcripts, and session-snapshots IDs.Validation
Current head
482ff8a570:OPENCLAW_VITEST_MAX_WORKERS=1 node scripts/run-vitest.mjs run src/commands/doctor-session-transcripts.test.ts src/commands/doctor-session-snapshots.test.ts src/flows/doctor-health-contributions.test.ts --reporter=dot- 76 tests passed across 2 Vitest shardsnode_modules/.bin/oxfmt --check src/commands/doctor-session-snapshots.test.ts src/commands/doctor-session-snapshots.ts src/commands/doctor-session-transcripts.test.ts src/commands/doctor-session-transcripts.ts src/flows/doctor-health-contributions.test.ts src/flows/doctor-health-contributions.tsnode_modules/.bin/oxlint src/commands/doctor-session-snapshots.test.ts src/commands/doctor-session-snapshots.ts src/commands/doctor-session-transcripts.test.ts src/commands/doctor-session-transcripts.ts src/flows/doctor-health-contributions.test.ts src/flows/doctor-health-contributions.tsnode node_modules/@typescript/native-preview/bin/tsgo.js -p tsconfig.core.json --incremental --tsBuildInfoFile .artifacts/tsgo-cache/core.tsbuildinfo --declaration false --singleThreaded --checkers 1node node_modules/@typescript/native-preview/bin/tsgo.js -p test/tsconfig/tsconfig.test.src.json --incremental --tsBuildInfoFile .artifacts/tsgo-cache/test-src.tsbuildinfo --declaration false --singleThreaded --checkers 1node scripts/plugin-sdk-surface-report.mjs --checkgit diff --check origin/main...HEADgit diff --check482ff8a570after the required main-sync rebasePrevious head
c77bedfb7dalso had source CLI proof with a temp legacy transcript andOPENCLAW_STATE_DIRoverride:corepack pnpm openclaw doctor --lint --json --only core/doctor/session-transcripts- exit 0,ok: true, no visible findings at the defaultwarningthresholdcorepack pnpm openclaw doctor --lint --json --severity-min info --only core/doctor/session-transcripts- exit 1, surfaced oneinfocore/doctor/session-transcriptsfindingnode --import tsxconfirmed both transcript and snapshot artifact adapters emitinfoseverityNotes
The post-rebase patch only changed tests to inspect parsed session-store JSON values instead of searching raw JSON for unescaped Windows paths. That makes the existing snapshot repair tests portable on Windows without changing Doctor behavior.