Ejemplo
golang.org/x/text v0.3.2
Muestra verificada para golang golang.org/x/text v0.3.2. El contrato se ejecutó en go 1.26 · linux debian/x64 · docker y pasó.
sha256:585e1267ba8bfebf9133a059e57b267667e86db58390189c2216baf6ec5c0a7f
Esta red ofrece una sola cosa: una muestra que compila. La ejecutó en un sandbox y guardó el recibo firmado. No califica ni garantiza nada: si el mismo código compila donde estás no es algo que haya medido.
Cuántas claves de firma distintas presentaron un recibo de contrato aprobado. Una es solo el autor; más de una significa que alguien más también lo compiló. Una clave se genera sola y no tiene identidad registrada detrás, así que cuenta claves, no personas.
MIT-0
Evidencia de ejecución
El entorno declarado y las ejecuciones firmadas se muestran por separado, para que veas exactamente qué ejecutó esta muestra y dónde.
- Base de evidencia
- Contrato firmado aprobado
- Recibos de verificación
- 1
- Claves de firma que lo compilaron
- 1
Entorno declarado
linux 24 · ubuntu · glibc 2.39 x64 go
Entornos de las ejecuciones de verificación
| Entorno | Contrato | Etapas | Ejecución |
|---|---|---|---|
| go 1.26 · linux debian/x64 · docker ed25519:c1973797be207ac4 | PASS | compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS CONTAINER_RUN · golang@1golang:1.26@sha256:e30143be198a… |
2026-09-05 |
Caso
HOW- Objetivo
- verify pkg:golang/golang.org/x/text@v0.3.2
- Paquetes
- Creado
- 2026-09-05T04:20:25Z
Contrato
- cases.Title title-cases words according to language conventions, capitalizing the first letter of each word and lowercasing the rest
- cases.Title with cases.NoLower preserves existing uppercase letters while title-casing word starts
- cases.Upper and cases.Lower handle locale-specific dotted and dotless I in Turkish
- cases.Title handles Dutch title-casing where 'ij' digraph is capitalized as 'IJ'
- cases.Fold performs Unicode case folding to canonicalize strings for case-insensitive matching
Archivos
- PROMPT.md
- csx.json
- go.mod
- go.sum
- main.go
- spec.json
- test/contract.go
Código fuente
Clean-room public code sample — generation instructions
Write a brand-new, minimal, self-contained code sample in this clean-room directory.
Do not copy, paraphrase, or reference any existing project source. Work only from this spec.
A csx.json manifest scaffold already exists. Do not recreate it from memory. Preserve its case.goal, packages and symbols; fill its empty case.contract with exact assertions and correct its environment, commands and verifierAdapter for the files you generate.
Goal: verify pkg:golang/golang.org/x/text@v0.3.2
Kind: HOW
Use EXACTLY these public packages and versions:
- pkg:golang/golang.org/x/text@v0.3.2
Rules:
- One focused purpose; the smallest project that proves the goal.
- Include a contract test (test/contract.*) that runs OFFLINE and exits 0 exactly when the goal behavior works.
- Pin every dependency with a lockfile so resolution is reproducible.
- No secrets, credentials, or tokens. No real URLs (only example.com or localhost). No absolute paths.
- No personal names, emails, company names, or project identifiers of any kind.
- No binaries and no generated output (node_modules, dist, target, venv, .git, .env).
- Keep it under 200 files and 256KB packed.
{"case":{"caseId":"case:sha256:3f357327c3f7608ad151461b03f29f77341ad6fb583c637875c96a1eca4cf542","contract":["cases.Title title-cases words according to language conventions, capitalizing the first letter of each word and lowercasing the rest","cases.Title with cases.NoLower preserves existing uppercase letters while title-casing word starts","cases.Upper and cases.Lower handle locale-specific dotted and dotless I in Turkish","cases.Title handles Dutch title-casing where 'ij' digraph is capitalized as 'IJ'","cases.Fold performs Unicode case folding to canonicalize strings for case-insensitive matching"],"goal":"verify pkg:golang/golang.org/x/text@v0.3.2","kind":"HOW","packages":["pkg:golang/golang.org/x/text@v0.3.2"],"schemaVersion":1},"contractCommand":["go","run","./test"],"environment":{"arch":"x64","distro":"ubuntu","ecosystem":"golang","libc":"glibc","libcVersion":"2.39","os":"linux","osVersionBucket":"24","packageManager":"go","schemaVersion":1},"license":"MIT-0","packages":["pkg:golang/golang.org/x/text@v0.3.2"],"schemaVersion":1,"subject":"pkg:golang/golang.org/x/text@v0.3.2","verifierAdapter":"golang@1"}
module example.com/sample
go 1.22
require golang.org/x/text v0.3.2
golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs=
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
package main
import (
"fmt"
"golang.org/x/text/cases"
"golang.org/x/text/language"
)
func main() {
// Standard English title casing
enTitle := cases.Title(language.English)
fmt.Printf("English title: %s\n", enTitle.String("the wind in the WILLOWS"))
// Title casing preserving existing uppercase letters
enTitleNoLower := cases.Title(language.English, cases.NoLower)
fmt.Printf("English title (NoLower): %s\n", enTitleNoLower.String("the wind in the WILLOWS"))
// Locale-specific uppercase and lowercase in Turkish
trUpper := cases.Upper(language.Turkish)
trLower := cases.Lower(language.Turkish)
fmt.Printf("Turkish upper of 'istanbul': %s\n", trUpper.String("istanbul"))
fmt.Printf("Turkish lower of 'ISTANBUL': %s\n", trLower.String("ISTANBUL"))
// Dutch title-casing of the 'ij' digraph
nlTitle := cases.Title(language.Dutch)
fmt.Printf("Dutch title of 'ijsland': %s\n", nlTitle.String("ijsland"))
// Unicode case folding for case-insensitive matching
folder := cases.Fold()
fmt.Printf("Folded 'Fluß': %s\n", folder.String("Fluß"))
fmt.Printf("Folded 'FLUSS': %s\n", folder.String("FLUSS"))
}
{
"schemaVersion": 1,
"goal": "verify pkg:golang/golang.org/x/text@v0.3.2",
"kind": "HOW",
"packages": [
"pkg:golang/golang.org/x/text@v0.3.2"
]
}
package main
import (
"fmt"
"os"
"golang.org/x/text/cases"
"golang.org/x/text/language"
)
func main() {
// Assertion 1: cases.Title title-cases words according to language conventions, capitalizing the first letter of each word and lowercasing the rest
enTitle := cases.Title(language.English)
got1 := enTitle.String("the wind in the WILLOWS")
expected1 := "The Wind In The Willows"
if got1 != expected1 {
fmt.Fprintf(os.Stderr, "FAIL assertion 1: expected '%s', got '%s'\n", expected1, got1)
os.Exit(1)
}
// Assertion 2: cases.Title with cases.NoLower preserves existing uppercase letters while title-casing word starts
enTitleNoLower := cases.Title(language.English, cases.NoLower)
got2 := enTitleNoLower.String("the wind in the WILLOWS")
expected2 := "The Wind In The WILLOWS"
if got2 != expected2 {
fmt.Fprintf(os.Stderr, "FAIL assertion 2: expected '%s', got '%s'\n", expected2, got2)
os.Exit(1)
}
// Assertion 3: cases.Upper and cases.Lower handle locale-specific dotted and dotless I in Turkish
trUpper := cases.Upper(language.Turkish)
got3Upper := trUpper.String("istanbul")
expected3Upper := "İSTANBUL" // \u0130
if got3Upper != expected3Upper {
fmt.Fprintf(os.Stderr, "FAIL assertion 3: expected '%s', got '%s'\n", expected3Upper, got3Upper)
os.Exit(1)
}
trLower := cases.Lower(language.Turkish)
got3Lower := trLower.String("ISTANBUL")
expected3Lower := "ıstanbul" // \u0131
if got3Lower != expected3Lower {
fmt.Fprintf(os.Stderr, "FAIL assertion 3: expected '%s', got '%s'\n", expected3Lower, got3Lower)
os.Exit(1)
}
// Assertion 4: cases.Title handles Dutch title-casing where 'ij' digraph is capitalized as 'IJ'
nlTitle := cases.Title(language.Dutch)
got4 := nlTitle.String("ijsland")
expected4 := "IJsland"
if got4 != expected4 {
fmt.Fprintf(os.Stderr, "FAIL assertion 4: expected '%s', got '%s'\n", expected4, got4)
os.Exit(1)
}
// Assertion 5: cases.Fold performs Unicode case folding to canonicalize strings for case-insensitive matching
folder := cases.Fold()
folded1 := folder.String("Fluß")
folded2 := folder.String("FLUSS")
if folded1 != "fluss" || folded2 != "fluss" || folded1 != folded2 {
fmt.Fprintf(os.Stderr, "FAIL assertion 5: expected both to fold to 'fluss', got '%s' and '%s'\n", folded1, folded2)
os.Exit(1)
}
fmt.Println("Contract passed: all assertions verified successfully.")
}
Seeder de origen
anónimo