fix(glr): certify Python clean-tie election across mixed GSS stacks - #1026
Merged
odvcencio merged 4 commits intoSep 2, 2026
Merged
Conversation
- Merge a flat stack with an already-packed GSS stack in tryGSSMainMergeResult. The incoming stack can supply the physical graph receiver while the incumbent keeps the logical survivor slot, byte offset, and version. - Check a mixed pair against the existing status, shift, state, byte-offset, clean-zero, and distinct-shape gates before it stages. Rejected pairs keep the flat survivor unchanged and consume no GSS scratch nodes. - Certify the structural election for Python's exact blob, so the producer elects expression_list for assignment-right and f-string tuples the way the C reference does. - Reduce normalizePythonInterpolationPatterns to a counted no-op. The producer now owns the choice, so a post-build rewrite would undo it. - Retire the two family-D Python known divergences, flip the arm no-op confirmation, and update the blocker-receipt digests and the 2026-09-02 PARTIAL-GO section in docs/root-normalization-retirement.md. - Drop meson from the certified acceptance-frontier candidates. Its compact tree intentionally differs from Go's historical tree and stays covered by the locked-C parity test. - Add unit tests and diagnostic topology receipt tests for mixed merges, distinct-shape rejection, sticky error inheritance, and scratch-budget bounds. Buckley-Change-Hash: sha256:59e05a80ccabbd9fc163998be0042d4d552ee8ece1c6bc7b3cbfb40263fa4f5b Buckley-Change-Stats: files=14 insertions=697 deletions=209 binaries=0
- Add Language.CompactMixedGSSMergeCertified. A mixed boundary merge in tryGSSMainMergeResult now runs only for a certified grammar artifact, so uncertified grammars keep one stack representation instead of adopting C's physical receiver ownership. - Certify python for the mixed merge in its exact built-in runtime profile, and require the flag there under the locked blob hash. - Restore the meson case in TestAdmissionCandidateCertifiedAcceptanceFrontiers. The narrower gate makes its compact tree match the historical production tree again. - Keep a nil language on the current merge route so profiles without a language object behave as before. Buckley-Change-Hash: sha256:4124c9fa9104c3f55ae6ff281ab1117e07c13d19f7104c9a56732906eafcf816 Buckley-Change-Stats: files=5 insertions=21 deletions=7 binaries=0
- Set CompactMixedGSSMergeCertified on the Language fixture in TestTryGSSMainMergeResultMixedDistinctShapesRejectWithoutMutation. - Match the language flags that the mixed GSS merge path checks before it selects the compact representation. - Keep the assertions unchanged: the distinct-shape check must still reject the merge and must not mutate the inputs. Buckley-Change-Hash: sha256:9c5cd648647a5b5fc413177375bf539015089e20fffa69e6d8b31cfe2b804433 Buckley-Change-Stats: files=1 insertions=4 deletions=1 binaries=0
- Count certified flat/GSS representation joins in MergeEventCensusCounts. The C runtime has no version merge for these joins, so they no longer share the lane's Successes counter. - Record the attempt in tryGSSMainMergeResult before the remaining gate checks, and record the success on the merged-path side. This separates representation joins from ordinary main merges. - Stop recording a distinct-shapes refusal for that rejection branch, because the census now classifies that event on its own. - Report RefuseNoGSSHead and RefuseNoGSSHeadOne for each mixed attempt, so the packed-head baseline stays a gate observation. - Add the matching no-op hooks for the disabled census build tag. - Sum the new counters in the cgo_harness census totals and print them in the totals line. - Update the test to cover both new counters, and refresh the pinned baselines: python sources 26 to 30, and the constructed-source denominator 104 to 108. Buckley-Change-Hash: sha256:d92b1482343939da9cc2ffa58b50dcd9b4e0d0e08d647945f77d6a1b062afe13 Buckley-Change-Stats: files=5 insertions=50 deletions=13 binaries=0
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
Fix compact acceptance for Python clean ties that arrive as a flat stack and a packed graph stack.
The support lane in PR #1025 merged before this branch.
Smallest falsifiers
x, y, z = 1, 2, 3versus the C oracle.f"{x, y}"versus the C oracle.f"{*xs,}"versus the C oracle.The old Python paths selected
pattern_listfor these producer ties. C selectsexpression_list.Proof
Focused Docker tests pass for mixed flat/GSS merges, logical version ownership, distinct-shape rejection, sticky error inheritance, topology receipts, and the C comparator.
The generated Python corpus from the pinned grammar source passes the A3 sweep: 3 real files plus 30 constructed files, 33 accepted, and zero divergences.
The Python route receipt reports exact C digests for raw, production, compact, and incremental trees. Scanner reuse remains true. Compact counters report one routed parse and zero fallbacks for all three blocker witnesses.
The forest splat witness remains a known forest-only difference (
pattern_listversus C'sexpression_list). The compact gate does not certify forest output, anddispatch.pythonremains live.Verification commands
No performance changes are included.