Repository navigation
python serialization_parsing: cover the contract's codecs (JSON/YAML/XML/CSV/protobuf) - #8894
Merged
Merged
Conversation
…protobuf codecs (Closes #8882) Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Contributor
|
No description provided. |
Contributor
|
No description provided. |
Contributor
This was referenced Nov 21, 2026
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.
Closes #8882
What changed
The Python
serialization_parsingrule matched onlypickle.load(s),pickle.Unpickler,marshal.load(s)andast.literal_eval, sojson.dumps/json.loads/yaml.safe_loadfired 0 times against a contract that names JSON, XML, YAML, CSV, protobuf and marshal (encode and decode). The rule now covers the contract (decision: widen the rule, not narrow the contract; this also settles question 1 in #8862):json/ujson/orjson/simplejson.load(s)/.dump(s)), YAML (yaml.[safe_|full_|unsafe_]load/dump[_all]), XML (ElementTree/ET/etree/minidomparse, fromstring, tostring, parseString), CSV (reader,writer,DictReader,DictWriter), protobuf (ParseFromString,SerializeToString,json_format.*),pickle/marshalload and dump,ast.literal_eval.myjson.loads,json_data,import jsondo not match. Flat alternation, no nested quantifiers.embedded_python(same family, same mechanism) gainsjson.loads?/dumps?beside itsujsonforms.Class / Sibling gaps
Class: a
serialization_parsingrule narrower than its declared contract. Members handled here: python and embedded_python (each with positive tests per format and direction, and negatives for aliases and non-calls).Sibling gaps: about 40 other languages'
serialization_parsingrules are unscored against the contract (for example rubyJSON.parse|YAML.load|Marshal.load|Nokogirilacks encode and CSV, lua, javascriptJSON.*only, shelljq|yq|xmlstarlet); the keyword-family grid (#8876) shows them as untested. No burned-estate program needs them (these are non-mainframe languages): scope is sweep, one language-family audit each. Why not here: different languages, different libraries, and the 5-file limit.Golden re-bless (why output changed)
Blessed via
golden-lock.sh crucible_check.py --update --yes(both legs). The drift isarch_serializationcounts in the Python corpus (fastapi tests and others: Expected 0, Got N) plus the derived function and file cluster centroids, drift-centroid distance, and the llm_brief/gpu_json/graph_sqlite snapshots that carry them.rosetta:rebless-owedif the keyword-rosetta python counts move.Gates
pr_gates --fast: 9/9 pass;--ratchets: 9 pass, 0 fail, 0 skipped🤖 Generated with Claude Code