fix(context): make provider-dropping note truthful for declared windows - #5174
Open
SummerC0zyR0ck wants to merge 1 commit into
Open
fix(context): make provider-dropping note truthful for declared windows#5174SummerC0zyR0ck wants to merge 1 commit into
SummerC0zyR0ck wants to merge 1 commit into
Conversation
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
Fixes #5137
context_provider_droppingcould be emitted for requests with an already-declared context window, but its Desktop and TUI copy always told the user to declare one. This produced contradictory system notes whencontext_window_overrunsimultaneously acknowledged the existing declaration.The note now records the declaration state at call time, using
midTurnState.capacityas the Runtime authority. Rendering handles all three cases:The behavior is consistent across Runtime data, Desktop materialization, English, zh-CN, zh-TW, and TUI rendering.
Verification
The issue reproduction was confirmed on the current main branch: the existing declared-window Runtime fixtures passed while the zh-CN renderer still told the user to declare a context window. After the fix, the declaration state is recorded in the durable note and the rendered guidance is truthful for declared, undeclared, and legacy records.
Passed affected builds and regressions:
contextWindowDeclaredvalue.npm run format:checknpm run check:tui-copynpm run check:locale-hygieneThe commit-time ASF license-header and protocol-epoch checks also passed.
The full repository test suite and full repository lint/typecheck suite were not run.
AI use
Tool(s) and scope: OpenAI Codex investigated the defect and fixed, authored the implementation review, Runtime/UI/TUI regression tests.
Checklist
Does this PR entail a change in behavior?