fix(shadow-call): preserve foreground Luna turns - #885
Closed
kimrinking-cell wants to merge 1 commit into
Closed
Conversation
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
Owner
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
x-codex-turn-metadata.request_kindto bypass interception only for explicitturnrequests.Root cause
The issue #311 follow-up expanded the default source prefixes to include
gpt-5.6-luna. The runtime still classified requests only by model prefix, so a user-selected Luna foreground turn could be rewritten to the configured shadow model and have its reasoning effort forced tolow.Codex 0.145.0 and later project the request purpose through
x-codex-turn-metadata. This change uses the explicitrequest_kind: "turn"signal while preserving the prior all-matching contract when that signal is absent or unrecognized.Related: #311
Compatibility
turn: preserve the requested model and effort.prewarm,compaction, andmemory: keep shadow interception.Smaller UI-only alternative
If maintainers prefer to keep the broad runtime contract unchanged, the smallest mitigation would be a warning/confirmation dialog when enabling Shadow Call Intercept or when a selected foreground model overlaps
sourceModels. The dialog should state that matching foreground requests can be redirected and forced to low effort.That warning would help dashboard users, but it would not protect config-file users or clients that change models later, so this PR keeps the runtime classification fix focused and does not mix in GUI changes.
Verification
Validated locally on macOS only:
bun test tests/responses-shadow-intercept.test.ts— 14 passedbun test --isolate tests— 6,964 passed, 8 skipped, 0 failedbun run typecheckbun run privacy:scancd gui && bun test tests— 493 passedcd gui && bun run lintcd gui && bun run buildcd docs-site && bun run buildgit diff --checkLinux and Windows behavior has not been claimed from local testing; the repository CI matrix should validate those platforms for this commit.
Checklist