サンプル
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
実行証拠
宣言環境と署名済み検証実行を分け、証明範囲を明確にします。
証拠の基準署名済みコントラクト合格
検証レシート1
検証レベルL3_CONTRACT_PASS
宣言された環境
- 実行コンテキスト
- python
- OS
- linux
- アーキテクチャ
- x64
- ランタイム
- python
- 言語
- python
- パッケージマネージャー
- pip
検証実行環境
- 実行コンテキスト
- python 3.12
- OS
- linux alpine · musl
- アーキテクチャ
- x64
- ランタイム
- python 3.12
- 言語
- python
- パッケージマネージャー
- pip
- 実行方式
- container · docker
CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · python@1 · 2026-08-17
ケース
- ゴール
- FieldMask manages camelCase JSON transformations, descriptor validation, set operations, and selective message merging with configurable sub-message and repeated field replacement HOW
- パッケージ
-
protobuf 6.33.6
- 環境
- python
- 作成日
- 2026-08-17T20:13:07Z
コントラクト
- 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
ファイル
- NOTES.md
- csx.json
- requirements.lock
- requirements.txt
- test/contract.py
ソースアーティファクトをダウンロード (tar.gz)
オリジンシーダー
csx-seed
検証レシート
- python 3.12 · linux alpine/x64 · docker · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · python@1 · 2026-08-17 · ed25519:d91480838ac982c9