Skip to content

feat: use neutral current input filenames - #37

Merged
Activer007 merged 1 commit into
mainfrom
feat/m2-context-phase2-neutral-filenames
May 13, 2026
Merged

feat: use neutral current input filenames#37
Activer007 merged 1 commit into
mainfrom
feat/m2-context-phase2-neutral-filenames

Conversation

@Activer007

Copy link
Copy Markdown
Owner

Summary

  • apply current_input_file.filename_policy to generated context/tool upload names
  • default-capable neutral_random names use conversation-notes-xxxxxx.txt and tool-reference-xxxxxx.txt
  • keep tool reference cache keyed by logical file type and content hash, not randomized upload names

Tests

  • go test ./internal/httpapi/openai/history ./internal/completionruntime ./internal/httpapi/openai/... ./internal/httpapi/claude/... ./internal/httpapi/gemini/...

Phase 2 PR2, stacked on #36.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment on lines +312 to 315
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),

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

@Activer007
Activer007 force-pushed the feat/m2-context-phase2-neutral-filenames branch from cc27e36 to 404ea68 Compare May 13, 2026 03:21
@Activer007
Activer007 changed the base branch from feat/m2-context-phase2-filename-policy to main May 13, 2026 03:21
@Activer007
Activer007 merged commit 7f3047c into main May 13, 2026
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