Exemple
FieldMask manages camelCase JSON transformations, descriptor validation, set operations, and selective message merging with configurable sub-message and repeated field replacement
sha256:9ac7d9b3f12d2828afc86f03b6a7abf2a462acf9f640b1b2d796b0099f94cabe
PUBLISHED
L3_CONTRACT_PASS
MIT-0
Preuves d'exécution
L'environnement déclaré est séparé des exécutions signées afin de montrer ce qui est réellement prouvé.
Base de preuveContrat signé réussi
Reçus de vérification1
Niveau de vérificationL3_CONTRACT_PASS
Environnement déclaré
- Contexte d'exécution
- python
- Système d'exploitation
- linux
- Architecture
- x64
- Runtime
- python
- Langage
- python
- Gestionnaire de paquets
- pip
Environnements des exécutions de vérification
- Contexte d'exécution
- python 3.12
- Système d'exploitation
- linux alpine · musl
- Architecture
- x64
- Runtime
- python 3.12
- Langage
- python
- Gestionnaire de paquets
- pip
- Exécution
- container · docker
CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · python@1 · 2026-08-17
Cas
- Objectif
- FieldMask manages camelCase JSON transformations, descriptor validation, set operations, and selective message merging with configurable sub-message and repeated field replacement HOW
- Paquets
-
protobuf 6.33.6
- Environnement
- python
- Créé
- 2026-08-17T20:13:07Z
Contrat
- FromJsonString parses comma-separated lowerCamelCase field paths into snake_case paths and strictly rejects paths containing underscore characters with ValueError
- ToJsonString converts stored snake_case paths back into a comma-separated lowerCamelCase string, returning an empty string when the mask contains no paths
- IsValidForDescriptor verifies that all paths in the mask resolve to existing message fields and returns False for nonexistent fields or traversal into scalar fields
- CanonicalFormFromMask sorts paths alphabetically and removes redundant descendant paths covered by an ancestor prefix
- Union and Intersect perform canonical set operations across masks while maintaining prefix pruning and alphabetical ordering
- MergeMessage copies only masked fields from source to destination, recursively merging sub-messages and appending repeated elements by default
- MergeMessage replaces sub-messages when replace_message_field is True and clears repeated lists before copying when replace_repeated_field is True
- AllFieldsFromDescriptor populates the mask with all top-level field names declared on the message descriptor
Fichiers
- NOTES.md
- csx.json
- requirements.lock
- requirements.txt
- test/contract.py
Télécharger l’artefact source (tar.gz)
Seeder d'origine
csx-seed
Reçus de vérification
- python 3.12 · linux alpine/x64 · docker · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · python@1 · 2026-08-17 · ed25519:d91480838ac982c9