Repository navigation
Keep bounded codes from the actual Context error class - #39
Merged
Merged
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.
Change
DRAFT. Round 4 is the one repair after review. Do not merge or release yet.
The first model-change send can still fail; this PR changes failure reporting only.
This change alone does not remove the first failure of a model change in a long chat.
A real Context error can copy a backend exception's code. The earlier lowercase pattern therefore allowed synthetic private source text into
generation.failed. This repair forwards only a code from the closedCONTEXT_ERROR_CODESlist. It has the 18 main-list members plus 50 developer-written model-transition, recovery, summary and journal codes. Other codes are omitted, even if they look like identifiers. All 18 earlier payloads stay word for word.The real-class check stays exact and reads only sys.modules; no optional Context import occurs inside failure reporting. Forged classes remain rejected. A broken installed Context package cannot replace the original failure. Main 97b2c35 and its event-driven waiting stay unchanged.
Exact head: e289585. No rebase or force-push.
Closed catalog and paired host
The list is literal source in failures.py, not a pattern or a live provider result. Its producers are Context boundary/checkpoint/recovery/transition/ordinary_transition/single_pass/working_history code and Unified context_continuity/portable_handoff/uncounted_rebuild.
native_compaction_failedis retained from main although no current producer was found in those sources. The model-transition refusal is raised by ordinary_transition.py:154. The four journal words come from Unified uncounted_rebuild.py and Context's reserved-call boundary. The W7 round-4 result lists every code and its producer.Every one of the 54 codes mapped by Unified 2536's context_failures.py is in the list; the static audit found zero missing. The other 14 preserve older Context/host projection vocabulary. An unmapped future or foreign code is omitted, giving the generic notice rather than disclosing it. Host exception supplementation is a separate existing boundary and is not expanded here.
Accept Context 62 and this independent PR in either order. Move accepted pins and requalify Unified 2536 before its merge. No unmerged pin is committed.
Validation
Local whole suite: 378 passed, 3 platform skips, 8 subtests passed. Direct failures file: 143 passed. New tests forward each closed-list member, compare all 18 earlier payloads, and send a real Context-wrapped backend code through the actual live runtime: the public terminal has no error_code and no private text. Restoring the pattern on a copy fails that regression. Previous no-import, class identity, malformed-code and input/no-replay tests remain.
The existing native-adapter CI job now installs optional Context and runs the complete failure file, so the real-class and wrapped-foreign-code tests are no longer local-only. The other jobs still run without that optional dependency. The workflow retains its pre-existing streaming candidate override; this is candidate-graph evidence, not a new accepted pin.
Exact-head CI 46197584749 passed all six jobs; logs were read. Each Ubuntu/macOS Python 3.11/3.13 job reported 331 passed, 10 optional/platform skips and 8 subtests passed. Native adapter reported 50 passed, then the new real-Context step reported all 143 failure cases passed without skips. Windows installed ledger reported 21 passed and 8 subtests passed, without skips. Package/installed-wheel checks and CLA passed. The longest job was 8m38s. Counts overlap.
No paid/live request, personal transcript, credential, owner's Windows PC, version, tag or release change.