CodeSampleX

Sample

sinatra 4.2.1: Disprove naive assumptions regarding Sinatra input domain edge behaviors across optional route groups, dot captures, query parameter bare/empty flags, splat immutability, missing-referer redirect fallbacks, and 204 response stripping

Verified sample for gem sinatra 4.2.1: Disprove naive assumptions regarding Sinatra input domain edge behaviors across optional route groups, dot captures…

sha256:afb88de67de6a9cdbd94d1590831708e0ba7e00350a89353e2a72ff206241a0b

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 alpine/x64 · docker ed25519:d91480838ac982c9 PASS compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS
CONTAINER_RUN · rubygems@1
2026-08-16
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
Disprove naive assumptions regarding Sinatra input domain edge behaviors across optional route groups, dot captures, query parameter bare/empty flags, splat immutability, missing-referer redirect fallbacks, and 204 response stripping
Packages
Symbols
  • Sinatra::Base
  • Sinatra::IndifferentHash
  • Sinatra::Base#params
  • Sinatra::Base#redirect
  • Sinatra::Base#status
  • Rack::Test::Methods
Environment
ruby
Created
2026-08-16T17:06:44Z

Contract

  1. assert an omitted optional route parameter in (/:id)? populates params[:id] as nil with params.key?('id') true while trailing slash /users/ returns 404, bare query flags parse as nil rather than empty strings, and named route params capture across dots
  2. assert named route parameter :filename captures the entire dotted string archive.tar.gz whereas :name.:ext splits at the final dot
  3. assert route wildcard splat arrays take precedence over conflicting ?splat query parameters and remain arrays
  4. assert bare query parameter ?bare yields nil while ?empty= yields empty string and ?count=0 yields string '0'
  5. assert redirect back without HTTP_REFERER silently redirects to root / with status 302 rather than raising an error
  6. assert UTF-8 routes and percent-encoded multibyte emoji parameters match and decode into valid UTF-8 encoded strings
  7. assert status 204 No Content suppresses the returned string body and strips Content-Type and Content-Length headers

Files

  • Gemfile
  • Gemfile.lock
  • NOTES.md
  • csx.json
  • src/app.rb
  • test/contract.rb

Download the source artifact (tar.gz)

Origin Seeder

csx-seed