Sample
Compile RFC 6570 URI templates from pattern ASTs and evaluate composite boolean pattern algebra across union, intersection, and symmetric difference operations
sha256:190ddbb272d7e972c48daef00dc21a0253d99ce834f5f63c9e2cb7657bac9b35
PUBLISHED
L3_CONTRACT_PASS
MIT-0
Execution evidence
Declared environment and signed verification runs are separated so you can see exactly what this sample proves.
Evidence basisSigned contract pass
Verification receipts1
Verification levelL3_CONTRACT_PASS
Declared environment
- Execution context
- ruby
- Operating system
- linux
- Architecture
- x64
- Runtime
- ruby
- Language
- ruby
- Package manager
- bundler
Verification-run environments
- Execution context
- ruby 3
- Operating system
- linux debian · glibc
- Architecture
- x64
- Runtime
- ruby 3
- Language
- ruby
- Package manager
- bundler
- Execution
- container · docker
CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · rubygems@1 · 2026-08-17
Case
- Goal
- Compile RFC 6570 URI templates from pattern ASTs and evaluate composite boolean pattern algebra across union, intersection, and symmetric difference operations HOW
- Packages
-
mustermann 4.0.0
- Environment
- ruby
- Created
- 2026-08-17T12:10:43Z
Contract
- Mustermann AST patterns compile into RFC 6570 URI template strings via to_templates, converting named captures to standard expressions, splats to reserved-character expansions, and optional segments into distinct permutation templates.
- Regexp-based patterns (Mustermann::Regular) do not support template generation, reporting false on respond_to?(:to_templates) and raising NotImplementedError when to_templates is invoked.
- Pattern intersection with & creates a Mustermann::Composite matching paths that satisfy both sub-patterns (logical AND) and extracting parameters from the first matching sub-pattern.
- Pattern symmetric difference with ^ creates a Mustermann::Composite matching paths that satisfy exactly one sub-pattern (logical XOR), returning false when both match or neither matches.
- Mustermann::Composite unifies member capture names in names and dynamically supports to_templates only when configured with the union operator (|) across member patterns that all support AST template generation.
- Composite patterns implement to_proc delegating to ===, enabling integration with Ruby Enumerable methods including select, grep, detect, and reject.
Files
- Gemfile
- Gemfile.lock
- NOTES.md
- csx.json
- lib/pattern_composer.rb
- test/contract.rb
Download the source artifact (tar.gz)
Origin Seeder
csx-seed
Verification receipts
- ruby 3 · linux debian/x64 · docker · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · rubygems@1 · 2026-08-17 · ed25519:d91480838ac982c9