Skip to content

[BUG][Medium]- Predictor cache conflates empty and absent instructions #100

Open

Description

@arthurianresolve

Summary

The global predictor instance cache hashes instruction bytes without the Option discriminant. None and Some("") therefore produce the same instruction contribution to the key. In a shared process, a caller that primes the same signature type and predictor name with an empty instruction can cause a later no override request to reuse that predictor, changing the later prompt instruction.

Affected code

Suggested resolution

  • Hash the presence of an instruction separately from its content, or compare the complete requested predictor state on cache hits.
  • Add a regression case for None versus Some("") under the same signature and predictor name.

Acceptance criteria

  • Absent and explicitly empty instructions resolve to distinct cached predictors.
  • Other equivalent predictor requests still share cache entries.

Related issues

#71 is about the LM response cache key at the request boundary. This ticket concerns the separate global predictor instance cache and a specific absent versus empty instruction collision.

Validation performed

Static source review of upstream main at 72b247e2bddc7337f923461fb27b4127c7d104f3. No runtime exploit or deployed service test was performed.

Tracking

  • Finding ID: csf_742f819251f0a2566a8090ef
  • Fingerprint: codex-security/v1:sha256:83a5def6f9fbf27498ae7cc6c07e2c64bbb46e7e17dce7d6aa655810d6094d38

AI disclosure

OpenAI Codex assisted with the static source review and organization of this issue. No code change is included.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions