feat: use neutral current input filenames - #37
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: cc27e36eff
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| func (s Service) uploadCachedToolsFile(ctx context.Context, a *auth.RequestAuth, filename, modelType, text, hash string) (string, bool, error) { | ||
| key := generatedFileCacheKey{ | ||
| AccountScope: currentInputCacheScope(a), | ||
| ModelType: strings.TrimSpace(modelType), |
There was a problem hiding this comment.
Include filename policy in tools cache key
uploadCachedToolsFile now accepts a generated filename, but the cache lookup key still hard-codes currentToolsFilename. If current_input_file.filename_policy is changed at runtime (for example from legacy to neutral_random), requests within the 5-minute cache TTL can reuse a previously uploaded file_id whose visible filename does not match the new policy, so the policy change does not take effect immediately and can still expose DS2API_* names. The cache key should include a stable policy dimension (or non-randomized filename class) so cache hits respect the active filename policy.
Useful? React with 👍 / 👎.
cc27e36 to
404ea68
Compare
Summary
Tests
Phase 2 PR2, stacked on #36.