Skip to content

fix: hide inaccessible session keys in cron history errors - #172807

Merged
steipete merged 2 commits into
mainfrom
dbasync/rpcscale2
Oct 15, 2026
Merged

steipete merged 2 commits into
mainfrom
dbasync/rpcscale2

Conversation

@steipete

@steipete steipete commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes cron.history errors exposing the internally selected session key when a restricted caller cannot read that session.

User Impact

Unavailable and inaccessible recorded transcripts now return the same generic unavailable response. Successful pages, cursor behavior, and current sharing checks are unchanged.

Why This Change Was Made

Cron selects a session internally from the recorded run and delegates transcript reads to the chat history owner. Chat errors can name their requested session; forwarding them is unsafe when the Cron caller supplied only a job/run identifier. The Cron response adapter now uses its existing generic failure response for every delegated error.

Related: #172386.

Evidence

The registered RPC regression covers restricted access by run ID and timestamp, missing runs, and invalid cursors. Existing sharing/binding/retention/transcript-owner revocation coverage also asserts that errors contain no hidden session keys. Existing successful archived-history and pagination coverage remains in place.

  • Passed: targeted type-aware oxlint, oxfmt, and git diff --check.
  • Independent Codex review: scoped clean through P2 (two rounds, including the test fixture correction); no accepted/actionable findings.
  • The corrected regression and full changed Cron test shard pass in exact-head CI after creating the separate caller profile. The unstarted local duplicate was cancelled.
  • Exact-head CI run 38684579272, attempt 2: all selected static checks passed, including production/test types, type-aware lint, source contracts, architecture guards, and baseline ratchets. No standalone Knip or Madge run is claimed for this response-only diff.
  • Three test jobs initially failed before checkout while downloading the pinned actions/setup-go archive. One failed-only retry recovered two; checks-node-changed-1 still failed during setup because the upstream archive returns HTTP 404. The aggregate CI gate remains red solely for that infrastructure failure.
  • Maintainer-approved CI exception: the small fixture correction was pushed once and is covered by the passing changed Cron suite; all selected static checks and the security-sensitive review passed at the reviewed head. No product failure remains. This is an infrastructure exception, not an inherited-main failure claim.
  • Gateway main-thread SQL in the affected owner (T1): 0 → 0. No database calls, worker routing, or SQL changed.
  • Statement/request delta: 0 by construction on every changed path; no warmed-turn performance claim or redundant workload run for this response-only fix.
  • Removed checks: none. Current disclosure authority checks stay because transcript delivery is a real security boundary.
  • No schema, update, Doctor, plugin-loading, service-lifecycle, or SDK change; update cell and SDK API diff do not apply.
  • LOC: production +3/−2; tests +49/−0; docs +1/−1.

@clawsweeper

clawsweeper Bot commented Oct 15, 2026

Copy link
Copy Markdown
Contributor

ClawSweeper reviews are opt-in for maintainers. If a review is required, finish the work and validation first, then comment @clawsweeper review. Please avoid repeated requests while a review is queued or running; agents should not request reviews automatically.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-15T04:34:07.966368Z fcdec33 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation gateway Gateway runtime size: S labels Oct 15, 2026
@steipete
steipete merged commit e8f2382 into main Oct 15, 2026
182 of 190 checks passed
@steipete
steipete deleted the dbasync/rpcscale2 branch October 15, 2026 05:17
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 16, 2026
…172807)

Cron selects transcript sessions internally from recorded run identifiers. Forwarding chat-history errors could expose the selected key to a caller who cannot view that session. Use the Cron owner's generic unavailable error for every delegated failure while retaining current disclosure checks.

Add registered-RPC coverage for restricted run-ID/timestamp access, missing runs, invalid cursors, and revocation errors without hidden session keys. Document the generic error contract.

Validation: corrected full Cron test shard, selected CI types/lint/source contracts/architecture guards/baseline ratchets, security-sensitive review, and two scoped Codex review rounds passed. CI run 38684579272 attempt 2 retains one pre-checkout actions/setup-go archive HTTP 404 after a failed-only retry; landed under the maintainer-approved small-fixture-fix/infrastructure exception. No product failure remains. T1 stays 0; SQL and request behavior are unchanged.
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 size: S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant