CodeSampleX

Sample

mustermann 4.0.0: Compile RFC 6570 URI templates from pattern ASTs and evaluate composite boolean pattern algebra across union, intersection, and symmetric difference operations

Verified sample for gem mustermann 4.0.0: Compile RFC 6570 URI templates from pattern ASTs and evaluate composite boolean pattern algebra across union…

sha256:190ddbb272d7e972c48daef00dc21a0253d99ce834f5f63c9e2cb7657bac9b35

This network offers one thing: a sample that builds. It ran the sample in a sandbox and kept the signed receipt. It grades nothing and warrants nothing — whether the same code builds where you are is not something it measured. How many distinct signing keys filed a passing contract receipt. One is the author alone; more than one means somebody else built it too. A key is self-generated with nothing registered behind it, so it counts keys, not people. MIT-0

Execution evidence

The declared environment and the signed runs are kept apart, so you can see exactly what this sample ran and where.

Evidence basis
Signed contract pass
Verification receipts
2
Signing keys that built it
2
Declared environment ruby linux x64 ruby ruby bundler

Verification-run environments

Environment Contract Stages Run
ruby 3 · linux debian/x64 · docker ed25519:d91480838ac982c9 PASS compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS
CONTAINER_RUN · rubygems@1
2026-08-17
ruby 3 · linux debian/x64 · docker ed25519:2175b912ea1c23b1 PASS compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS
CONTAINER_RUN · rubygems@1
2026-08-18

Case

HOW
Goal
Compile RFC 6570 URI templates from pattern ASTs and evaluate composite boolean pattern algebra across union, intersection, and symmetric difference operations
Packages
Symbols
  • Mustermann.new
  • Mustermann::Pattern#to_templates
  • Mustermann::Composite
  • Mustermann::Pattern#&
  • Mustermann::Pattern#^
  • Mustermann::Pattern#|
  • Mustermann::Pattern#names
  • Mustermann::Pattern#to_proc
  • Mustermann::Sinatra
  • Mustermann::Regular
Environment
ruby
Created
2026-08-17T12:10:43Z

Contract

  1. 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.
  2. 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.
  3. 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.
  4. 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.
  5. 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.
  6. 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