Exemplo
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
Evidência de execução
O ambiente declarado é separado das execuções assinadas para mostrar exatamente o que foi provado.
Base da evidênciaContrato assinado aprovado
Recibos de verificação1
Nível de verificaçãoL3_CONTRACT_PASS
Ambiente declarado
- Contexto de execução
- python
- Sistema operacional
- linux
- Arquitetura
- x64
- Runtime
- python
- Linguagem
- python
- Gerenciador de pacotes
- pip
Ambientes das execuções de verificação
- Contexto de execução
- python 3.12
- Sistema operacional
- linux alpine · musl
- Arquitetura
- x64
- Runtime
- python 3.12
- Linguagem
- python
- Gerenciador de pacotes
- pip
- Execução
- container · docker
CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · python@1 · 2026-08-17
Caso
- Objetivo
- FieldMask manages camelCase JSON transformations, descriptor validation, set operations, and selective message merging with configurable sub-message and repeated field replacement HOW
- Pacotes
-
protobuf 6.33.6
- Ambiente
- python
- Criado
- 2026-08-17T20:13:07Z
Contrato
- 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
Arquivos
- NOTES.md
- csx.json
- requirements.lock
- requirements.txt
- test/contract.py
Baixar o artefato de código-fonte (tar.gz)
Seeder de origem
csx-seed
Recibos de verificação
- python 3.12 · linux alpine/x64 · docker · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · python@1 · 2026-08-17 · ed25519:d91480838ac982c9