OpenCodeReview Version
open-code-review v1.9.7 (f269d0ce0) darwin/arm64
Operating System
macOS (Apple Silicon)
Installation Method
npm (global)
LLM Provider
Other OpenAI-compatible endpoint
Bug Description
SessionTaskKey builds prompt-cache affinity keys in this format:
<session UUID>-<task type>-<scope hash>
When {ocr_session_key} is mapped to OpenAI's prompt_cache_key, some task names produce keys longer than the API's 64-character maximum.
plan_task and main_task happen to fit. Later phases such as review_filter_task, memory_compression_task, and re_location_task exceed the limit. A review can therefore complete its main analysis and then fail during filtering, relocation, compression, or summary work.
This behavior was introduced by the task-scoped session-affinity implementation in #332.
Steps to Reproduce
- Configure an OpenAI-compatible provider with:
{
"extra_body": {
"prompt_cache_key": "{ocr_session_key}"
}
}
- Run a review that produces at least one comment, causing
review_filter_task to execute.
- Observe the provider reject the generated cache key.
A UUID session identifier, review_filter_task, and the current 16-character scope hash produce a 72-character key.
Expected Behavior
Every generated prompt-cache affinity key should satisfy OpenAI's 64-character limit while remaining deterministic and unique per task conversation.
One option is to preserve readable short keys and return a SHA-256 hex digest whenever a derived key would exceed the limit.
Tests should cover every OCR task type and assert that generated keys never exceed the provider-safe maximum.
Logs / Error Output
Invalid 'prompt_cache_key': string too long.
Expected a string with maximum length 64,
but got a string with length 72 instead.
Additional Context
The provider retries this validation failure, then marks the review-filter task and review item as failed. There were no matching open issues for this failure mode when this report was created.
OpenCodeReview Version
Operating System
macOS (Apple Silicon)
Installation Method
npm (global)
LLM Provider
Other OpenAI-compatible endpoint
Bug Description
SessionTaskKeybuilds prompt-cache affinity keys in this format:When
{ocr_session_key}is mapped to OpenAI'sprompt_cache_key, some task names produce keys longer than the API's 64-character maximum.plan_taskandmain_taskhappen to fit. Later phases such asreview_filter_task,memory_compression_task, andre_location_taskexceed the limit. A review can therefore complete its main analysis and then fail during filtering, relocation, compression, or summary work.This behavior was introduced by the task-scoped session-affinity implementation in #332.
Steps to Reproduce
{ "extra_body": { "prompt_cache_key": "{ocr_session_key}" } }review_filter_taskto execute.A UUID session identifier,
review_filter_task, and the current 16-character scope hash produce a 72-character key.Expected Behavior
Every generated prompt-cache affinity key should satisfy OpenAI's 64-character limit while remaining deterministic and unique per task conversation.
One option is to preserve readable short keys and return a SHA-256 hex digest whenever a derived key would exceed the limit.
Tests should cover every OCR task type and assert that generated keys never exceed the provider-safe maximum.
Logs / Error Output
Invalid 'prompt_cache_key': string too long. Expected a string with maximum length 64, but got a string with length 72 instead.Additional Context
The provider retries this validation failure, then marks the review-filter task and review item as failed. There were no matching open issues for this failure mode when this report was created.