P4: scope cleanup — de-scope experimental surface, emit @glyph (Stage 6)#9
Merged
Conversation
…glyph Per the P4 roadmap + maintainer decisions. No public APIs removed; this is documentation/comments plus the header-spelling switch. Experimental / de-scoped (code kept, marked in comments, "not integrated into the core Parse/Emit path; experimental, may change"): - Decimal128 (decimal128.go): standalone, no GType, unreferenced by the codec. - EmitV2 / EmitV2Patch (parse_header.go): emit-only; no ParseV2Document exists, so output cannot be round-tripped. - EncodeDictFrame (streaming.go): emit-only; no DecodeDictFrame, no round-trip test. Per roadmap "add DecodeDictFrame OR mark experimental", chose the de-scope route. Deprecated / experimental zero-caller emitters (confirmed no production callers via grep before annotating): - EmitTokenAware (token_aware.go) - CanonicalHash (emit.go) — points users to FingerprintLoose instead. Two supported emitter layers documented in doc.go: Loose (CanonicalizeLoose, LLM-facing) and Typed (Emit, schema-bound). The secondary/experimental emitters are listed as not part of that surface. Header spelling (maintainer decision): EmitHeader now emits the full "@glyph" spelling; ParseHeader still accepts both "@glyph" and legacy "@Lyph". Updated the three emit-output assertions in v2_test.go accordingly (parser-input tests that use "@Lyph" are left as-is, since both spellings still parse). Note: no user-facing README/feature-list edits were needed — none of these symbols were ever advertised as features (verified by grep across READMEs/docs). Headers are not in the cross-impl/parity gate (only CanonicalizeLoose is), so the spelling change does not affect parity. Full Go suite green. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
phenomenon0
force-pushed
the
feat/p4-scope-cleanup
branch
from
June 20, 2026 01:52
34a1227 to
ec9c148
Compare
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.
Stage 6 — P4 scope cleanup
Branches off
main. Go-only. No public APIs removed — this is comments/docs plus the header-spelling switch (a one-token change with parser back-compat preserved).Experimental / de-scoped (code kept, marked in comments)
Each carries a
"not integrated into the core Parse/Emit path; experimental, may change"note:Decimal128(decimal128.go) — standalone, noGType, unreferenced byparse.go/emit.go/types.go/token.go. Known rough edges noted as consequences of it not being wired in.EmitV2/EmitV2Patch(parse_header.go) — emit-only; there is noParseV2Document, so output can't be round-tripped through a single v2 decoder.EncodeDictFrame(streaming.go) — emit-only; noDecodeDictFrame, no round-trip test. Per the roadmap's "addDecodeDictFrameOR mark experimental", I took the de-scope route.Deprecated / experimental zero-caller emitters
Confirmed no production callers via grep before annotating:
EmitTokenAware(token_aware.go)CanonicalHash(emit.go) — points users toFingerprintLoose(the cross-language-stable SHA-256 fingerprint) instead.Two supported emitter layers (documentation)
doc.gonow documents the collapse to two supported layers — Loose (CanonicalizeLoose, LLM-facing) and Typed (Emit, schema-bound) — and lists the secondary/experimental emitters as not part of that surface. Public APIs are untouched.Header spelling (maintainer decision)
EmitHeadernow emits the full@glyphspelling;ParseHeaderstill accepts both@glyphand the legacy@lyph. Updated the three emit-output assertions inv2_test.go; parser-input tests that feed@lyphare left as-is (both spellings still parse).Notes
docs/).CanonicalizeLooseis), so the spelling change does not affect parity.@lyph(both parsers accept both spellings, so interop is unaffected); aligning their emit spelling is a small recommended follow-up outside this Go-scoped branch.Verification
ulimit -v 6000000; go test -C go ./glyph/ -skip 'Industrial|Cliff|Perf|Savings|Benchmark' -count=1→ green.go/streamtests green.go vet+go build ./...clean.🤖 Generated with Claude Code