Skip to content

fix: use opaque cache keys in error logs - #40

Merged
ravi-pplx merged 1 commit into
pplx/mainfrom
computer/cachew-error-log-keys-20261109
Nov 9, 2026
Merged

ravi-pplx merged 1 commit into
pplx/mainfrom
computer/cachew-error-log-keys-20261109

Conversation

@ravi-pplx

Copy link
Copy Markdown

Cache keys can contain complete upstream URLs, including signed query parameters. Logging the raw key when a cache write or cached response fails can expose those values at ERROR level.

Use the existing SHA-256 cache object key in both error records instead. This preserves correlation without changing upstream requests, cache identity, error severity, or response streaming.

Regression tests exercise a storage-write failure and a failed cached-response write. They require an observable error and the corresponding opaque cache key, reject synthetic signed-query values in the logs, and preserve full delivery on a cache-write failure.

Created with Perplexity

@ravi-pplx
ravi-pplx marked this pull request as ready for review November 9, 2026 22:59
@ravi-pplx
ravi-pplx merged commit cc2f005 into pplx/main Nov 9, 2026
4 checks passed
ravi-pplx added a commit that referenced this pull request Nov 9, 2026
Cache keys can contain complete upstream URLs, including signed query parameters. Logging the raw key when a cache write or cached response fails can expose those values at ERROR level.

Use the existing SHA-256 cache object key in both error records instead. This preserves correlation without changing upstream requests, cache identity, error severity, or response streaming.

Regression tests exercise a storage-write failure and a failed cached-response write. They require an observable error and the corresponding opaque cache key, reject synthetic signed-query values in the logs, and preserve full delivery on a cache-write failure.

<sub>Created with [Perplexity](https://www.perplexity.ai/computer/tasks/5f970909-348b-4848-b2d7-6c1a3912784a)</sub>
ravi-pplx added a commit that referenced this pull request Nov 12, 2026
Cache keys can contain complete upstream URLs, including signed query parameters. Logging the raw key when a cache write or cached response fails can expose those values at ERROR level.

Use the existing SHA-256 cache object key in both error records instead. This preserves correlation without changing upstream requests, cache identity, error severity, or response streaming.

Regression tests exercise a storage-write failure and a failed cached-response write. They require an observable error and the corresponding opaque cache key, reject synthetic signed-query values in the logs, and preserve full delivery on a cache-write failure.

<sub>Created with [Perplexity](https://www.perplexity.ai/computer/tasks/5f970909-348b-4848-b2d7-6c1a3912784a)</sub>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant