Skip to content

docs: remove retired diagnostics.cacheTrace detail fields from docs - #114593

Closed
AAliKKhan wants to merge 4 commits into
openclaw:mainfrom
AAliKKhan:docs/fix-retired-cachetrace-config
Closed

AAliKKhan wants to merge 4 commits into
openclaw:mainfrom
AAliKKhan:docs/fix-retired-cachetrace-config

Conversation

@AAliKKhan

Copy link
Copy Markdown
Contributor

What Problem This Solves

The diagnostics.cacheTrace config in docs/reference/prompt-caching.md still documents filePath, includeMessages, includePrompt, and includeSystem fields — all of which were retired.

Why This Change Was Made

The runtime schema only accepts { enabled?: boolean }. Doctor proactively strips extra fields. Showing retired fields misleads users.

Evidence

  • src/config/zod-schema.root-shape.ts:97: z.strictObject({ enabled: z.boolean().optional() })
  • src/commands/doctor/shared/legacy-config-migrations.runtime.retired.ts:236-243: strips extra fields
  • src/config/dead-config-keys.test.ts:76: diagnostics.cacheTrace.filePath listed as dead

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation size: XS triage: low-signal-docs Candidate: docs-only change looks low signal; maintainer review needed. labels Jul 27, 2026
@clawsweeper clawsweeper Bot added 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. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. labels Jul 27, 2026
@clawsweeper

clawsweeper Bot commented Jul 27, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 9, 2026, 5:48 PM ET / 21:48 UTC.

ClawSweeper review

What this changes

Updates the prompt-caching reference so diagnostics.cacheTrace documents only its supported enabled JSON field, while retaining environment controls and the default JSONL trace location.

Merge readiness

⚠️ Ready for maintainer review - 1 item remains

This docs-only PR is still necessary: current main documents retired JSON fields that its strict schema rejects. The branch removes that contradiction while preserving the active environment-only trace controls; no blocking findings found.

Priority: P3
Reviewed head: e8d2754b8bcc97c643d264b74a99d84f86ce69f1

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, source-aligned docs correction with successful exact-head documentation validation and no remaining correctness finding.
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 6 items Current documentation mismatch: Current main still presents filePath, includeMessages, includePrompt, and includeSystem inside the JSON configuration example and defaults table.
Canonical configuration contract: The strict root schema accepts only optional boolean diagnostics.cacheTrace.enabled.
Migration and runtime behavior: Doctor removes unsupported cache-trace detail fields; runtime reads enabled from config, uses environment variables for path and capture controls, and defaults output to the state-directory JSONL path.
Findings None None.
Security None None.

How this fits together

Prompt caching can produce cache-trace JSONL diagnostics during agent-run preparation. Operators enable tracing through canonical configuration or environment overrides, and the runtime writes the resulting records for debugging.

flowchart LR
  A[Operator JSON configuration] --> C[Cache trace settings]
  B[Environment controls] --> C
  C --> D[Agent-run preparation]
  D --> E[Cache trace runtime]
  E --> F[JSONL diagnostics]
Loading

Before merge

  • Complete next step (P2) - No repair lane is needed: the contributor branch already supplies the bounded, correct documentation change.
Agent review details

Security

None.

PR surface

Docs -3. Total -3 across 1 file.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 0 0 0 0
Docs 1 9 12 -3
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 1 9 12 -3

Review metrics

None.

Technical review

Best possible solution:

Merge the focused documentation correction so the public reference matches the canonical schema, doctor migration, and supported environment debugging path.

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

Not applicable: this is a documentation-only correction; current main source directly establishes the documented contract.

Is this the best way to solve the issue?

Yes: correcting this reference page is the narrowest maintainable fix because the schema, doctor migration, runtime, and existing tests already agree on the supported behavior.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 4b4be7448edd.

Labels

Label justifications:

  • P3: This is a narrowly scoped documentation accuracy correction without a runtime behavior change.
  • 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:

  • steipete: Current blame for the prompt-caching page, cache-trace schema, runtime, and doctor migration resolves to Peter Steinberger's current-main commit; deeper local history is unavailable beyond that boundary. (role: recent documentation and runtime contributor; confidence: medium; commits: 34b8a6515d78; files: docs/reference/prompt-caching.md, src/agents/cache-trace.ts, src/config/zod-schema.root-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.

History

Review history (10 earlier review cycles; latest 8 shown)
  • reviewed 2026-07-27T20:27:52.319Z sha d28c664 :: found issues before merge. :: [P1] Keep the supported cache-trace fields documented
  • reviewed 2026-07-30T11:46:38.636Z sha dcea37e :: needs changes before merge. :: [P1] Keep the supported cache-trace fields documented
  • reviewed 2026-07-30T11:50:46.017Z sha dcea37e :: needs changes before merge. :: [P1] Keep the supported cache-trace fields documented
  • reviewed 2026-08-02T23:22:49.245Z sha dcea37e :: needs changes before merge. :: [P1] Retain the active cache-trace environment controls | [P2] Keep the JSONL trace destination explicit
  • reviewed 2026-08-02T23:29:51.128Z sha dcea37e :: needs changes before merge. :: [P1] Document the active environment-only cache-trace controls | [P2] State the JSONL trace destination explicitly
  • reviewed 2026-08-03T00:58:03.575Z sha e8d2754 :: needs maintainer review before merge. :: none
  • reviewed 2026-08-03T08:56:26.506Z sha e8d2754 :: needs maintainer review before merge. :: none
  • reviewed 2026-08-09T20:49:26.146Z sha e8d2754 :: needs maintainer review before merge. :: none

@AAliKKhan
AAliKKhan force-pushed the docs/fix-retired-cachetrace-config branch from 0d520b9 to eec25b0 Compare July 27, 2026 14:07
@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. and removed 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. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. labels Jul 27, 2026
@AAliKKhan

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Command router queued. I will update this comment with the next step.

…ace fields

- Rename 'were removed' to 'are retired' with doctor migration note
- Keep simplified YAML, defaults table, and removed env toggles section
@AAliKKhan

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Jul 30, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@clawsweeper clawsweeper Bot added rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. labels Jul 30, 2026
@AAliKKhan

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Aug 3, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@clawsweeper clawsweeper Bot added 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. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. P2 Normal backlog priority with limited blast radius. labels Aug 3, 2026
@steipete

Copy link
Copy Markdown
Contributor

Closing as superseded on main. This exact fix landed as part of the docs config-example sweep in #121336 (merge commit a0ad38e71ab7): docs/reference/prompt-caching.md now shows only diagnostics.cacheTrace.enabled in the example and defaults table, with the output-path/payload toggles documented as environment-only debugging controls; docs/gateway/configuration-reference.md likewise shows only enabled. Proof: git grep cacheTrace origin/main -- docs/ returns no retired detail fields in teaching examples.

You called this drift correctly — thank you @AAliKKhan! The same PR also added a CI gate (pnpm docs:check-config-examples plus a lockstep test in src/config) that validates whole-document JSON5 config examples in docs against the strict schema, so this class of retired-key drift now fails CI automatically instead of needing manual sweeps.

@steipete steipete closed this Aug 10, 2026
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 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. triage: low-signal-docs Candidate: docs-only change looks low signal; maintainer review needed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants