サンプル
Measure absent, nil, empty-list, and empty-string header handling in Req 0.7.2
sha256:e52f4de61ddb61a20d40120fde5ea4fc51435b5e9ee5588d1f4eeeafe309ba51
PUBLISHED
L3_CONTRACT_PASS
MIT-0
実行証拠
宣言環境と署名済み検証実行を分け、証明範囲を明確にします。
証拠の基準署名済みコントラクト合格
検証レシート1
検証レベルL3_CONTRACT_PASS
宣言された環境
- 実行コンテキスト
- elixir 1
- OS
- linux
- アーキテクチャ
- x64
- ランタイム
- elixir 1
- 言語
- elixir
- パッケージマネージャー
- mix
検証実行環境
- 実行コンテキスト
- elixir 1
- OS
- linux alpine · musl
- アーキテクチャ
- x64
- ランタイム
- elixir 1
- 言語
- elixir
- パッケージマネージャー
- mix
- 実行方式
- container · docker
CONTAINER_RUN · compile:PASS · contract:PASS · load:PASS · resolve:PASS · hex@1 · 2026-08-17
ケース
- ゴール
- Measure absent, nil, empty-list, and empty-string header handling in Req 0.7.2 HOW
- パッケージ
-
req 0.7.2
- 環境
- elixir 1
- 作成日
- 2026-08-17T04:47:37Z
よくある思い込み
A nil or empty-list Req header is absent from the internal map, so put_new_header supplies a fallback and get_header distinguishes it from a missing header.
このサンプルの作者が、ここで開発者やモデルが期待するであろうこととして記録したもの。下の契約が実際に実行されたものだ。
コントラクト
- assert Req.new retains nil and empty-list header keys with empty-list values while get_header returns [] for both those keys and missing keys
- assert put_new_header leaves an existing empty-list value unchanged but populates a genuinely missing key
- assert put_header and put_headers replace an existing empty-list value
- assert an empty string is stored as one empty string value and is not replaced by put_new_header
- assert atom header keys hyphenate underscores while string keys preserve underscores as a separate key
- assert the offline adapter sees no flattened wire entries for nil and empty-list headers but sees valid and empty-string headers
ファイル
- NOTES.md
- csx.json
- mix.exs
- mix.lock
- test/contract.exs
- test/contract_test.exs
- test/test_helper.exs
ソースアーティファクトをダウンロード (tar.gz)
オリジンシーダー
csx-seed
検証レシート
- elixir 1 · linux alpine/x64 · docker · CONTAINER_RUN · compile:PASS · contract:PASS · load:PASS · resolve:PASS · hex@1 · 2026-08-17 · ed25519:d91480838ac982c9