Sample
Show that trie matching changes which Mustermann::Set value is chosen for an overlapping static route.
sha256:afb7382535fb243b7a565f691412bed7f98690dabfec4e13d7e188c4ad47f1dc
PUBLISHED
L3_CONTRACT_PASS
MIT-0
Case
- Goal
- Show that trie matching changes which Mustermann::Set value is chosen for an overlapping static route. HOW
- Packages
- mustermann 4.0.0
- Environment
- ruby
- Created
- 2026-08-17T02:44:26Z
Commonly assumed
Mustermann::Set always returns the earliest-added matching route value regardless of matching strategy.
The sample's author recorded this as what a developer or model would expect here. The contract below is what actually ran.
Contract
- assert Mustermann::Set.new(use_trie: true).tap { |set| set.add('/:path', :dynamic); set.add('/static', :static) }.match('/static').value == :static
- assert Mustermann::Set.new(use_trie: true).tap { |set| set.add('/:path', :dynamic); set.add('/static', :static) }.match_all('/static').map(&:value) == [:static, :dynamic]
- assert Mustermann::Set.new(use_trie: true, strict_order: true).tap { |set| set.add('/:path', :dynamic); set.add('/static', :static) }.match('/static').value == :dynamic
Files
- Gemfile
- Gemfile.lock
- NOTES.md
- csx.json
- test/contract.rb
Download the verified artifact (tar.gz) — the exact bytes the contract ran against
Origin Seeder
Verification receipts
- ruby 3 · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · rubygems@1 · 2026-08-17 · ed25519:d91480838ac982c9