Beispiel
golang.org/x/text v0.3.4: language.High
Verifiziertes Beispiel für golang golang.org/x/text v0.3.4: language.High. Der Vertrag lief auf go 1.26 · linux debian/x64 · docker und bestand.
sha256:606fd72f43dae1749aadfc52b90770e4d7271e0600bbdc4a25c3b7e23a161955
Dieses Netzwerk bietet eine Sache: ein Sample, das baut. Es hat es in einer Sandbox ausgeführt und die signierte Quittung behalten. Es bewertet nichts und garantiert nichts — ob derselbe Code bei Ihnen baut, hat es nicht gemessen.
Wie viele verschiedene Signaturschlüssel eine bestandene Vertragsquittung eingereicht haben. Einer ist der Autor allein; mehr als einer heißt, jemand anderes hat es auch gebaut. Ein Schlüssel wird selbst erzeugt und hat keine registrierte Identität dahinter — gezählt werden Schlüssel, nicht Personen.
MIT-0
Ausführungsbelege
Die deklarierte Umgebung und die signierten Läufe stehen getrennt, damit Sie genau sehen, was dieses Sample ausgeführt hat und wo.
- Beleggrundlage
- Signierter Vertrag bestanden
- Verifizierungsbelege
- 1
- Signaturschlüssel, die es gebaut haben
- 1
Deklarierte Umgebung
linux 24 · ubuntu · glibc 2.39 x64 go
Umgebungen der Verifizierungsläufe
| Umgebung | Contract | Stufen | Lauf |
|---|---|---|---|
| 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-10-22 |
Fall
HOW- Ziel
- verify golang.org/x/text/language.High in pkg:golang/golang.org/x/text@v0.3.4
- Pakete
- Symbole
-
- golang.org/x/text/language.High
- Erstellt
- 2026-10-22T13:44:54Z
Contract
- language.High is a Confidence constant with integer value 2 and String representation 'High'
- language.High is ordered strictly between language.Low and language.Exact (No < Low < High < Exact)
- Tag.Script returns the likely script (Latn) with language.High confidence for a base language tag without an explicit script
- language.NewMatcher.Match returns language.High confidence when matching a regional variant such as en-GB against supported en-US
- language.Comprehends returns language.High confidence between mutually intelligible regional variants of the same language
Dateien
- PROMPT.md
- csx.json
- go.mod
- go.sum
- high_confidence.go
- spec.json
- test/contract.go
Quelltext
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 golang.org/x/text/language.High in pkg:golang/golang.org/x/text@v0.3.4
Kind: HOW
Use EXACTLY these public packages and versions:
- pkg:golang/golang.org/x/text@v0.3.4
Demonstrate these symbols/APIs:
- golang.org/x/text/language.High
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:c129b39d08f335a4aa6d38e351c7905cd2389500508728aee65bf3689d1d0e3f","contract":["language.High is a Confidence constant with integer value 2 and String representation 'High'","language.High is ordered strictly between language.Low and language.Exact (No \u003c Low \u003c High \u003c Exact)","Tag.Script returns the likely script (Latn) with language.High confidence for a base language tag without an explicit script","language.NewMatcher.Match returns language.High confidence when matching a regional variant such as en-GB against supported en-US","language.Comprehends returns language.High confidence between mutually intelligible regional variants of the same language"],"goal":"verify golang.org/x/text/language.High in pkg:golang/golang.org/x/text@v0.3.4","kind":"HOW","packages":["pkg:golang/golang.org/x/text@v0.3.4"],"schemaVersion":1,"symbols":["golang.org/x/text/language.High"]},"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.4"],"schemaVersion":1,"subject":"pkg:golang/golang.org/x/text@v0.3.4","symbols":["golang.org/x/text/language.High"],"verifierAdapter":"golang@1"}
module sample
go 1.21
require golang.org/x/text v0.3.4
golang.org/x/text v0.3.4 h1:0YWbFKbhXG/wIiuHDSKpS0Iy7FSA+u45VtBMfQcFTTc=
golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
package sample
import "golang.org/x/text/language"
// HighConfidence returns the language.High confidence constant.
func HighConfidence() language.Confidence {
return language.High
}
// MeetsHighConfidence reports whether a confidence level is at least language.High.
func MeetsHighConfidence(c language.Confidence) bool {
return c >= language.High
}
// MatchTagHigh matches preferred tags against supported tags and checks if the match confidence equals language.High.
func MatchTagHigh(supported []language.Tag, preferred ...language.Tag) (language.Tag, int, language.Confidence, bool) {
matcher := language.NewMatcher(supported)
tag, index, conf := matcher.Match(preferred...)
return tag, index, conf, conf == language.High
}
// InferScriptHigh returns the script and whether its confidence is language.High.
func InferScriptHigh(tag language.Tag) (language.Script, language.Confidence, bool) {
script, conf := tag.Script()
return script, conf, conf == language.High
}
{
"schemaVersion": 1,
"goal": "verify golang.org/x/text/language.High in pkg:golang/golang.org/x/text@v0.3.4",
"kind": "HOW",
"packages": [
"pkg:golang/golang.org/x/text@v0.3.4"
],
"symbols": [
"golang.org/x/text/language.High"
]
}
package main
import (
"fmt"
"os"
"golang.org/x/text/language"
"sample"
)
func main() {
// 1. language.High has integer value 2 and String() == "High"
if sample.HighConfidence() != language.High || int(language.High) != 2 {
fmt.Fprintf(os.Stderr, "expected language.High == 2, got %d\n", int(language.High))
os.Exit(1)
}
if language.High.String() != "High" {
fmt.Fprintf(os.Stderr, "expected language.High.String() == \"High\", got %q\n", language.High.String())
os.Exit(1)
}
// 2. Confidence ordering: language.No < language.Low < language.High < language.Exact
if !(language.No < language.Low && language.Low < language.High && language.High < language.Exact) {
fmt.Fprintf(os.Stderr, "unexpected confidence ordering\n")
os.Exit(1)
}
if !sample.MeetsHighConfidence(language.High) || !sample.MeetsHighConfidence(language.Exact) {
fmt.Fprintf(os.Stderr, "expected High and Exact to meet High confidence threshold\n")
os.Exit(1)
}
if sample.MeetsHighConfidence(language.Low) || sample.MeetsHighConfidence(language.No) {
fmt.Fprintf(os.Stderr, "expected Low and No not to meet High confidence threshold\n")
os.Exit(1)
}
// 3. Tag.Script() returns language.High confidence when inferring script from base language
script, scriptConf, isHigh := sample.InferScriptHigh(language.English)
if !isHigh || scriptConf != language.High || script.String() != "Latn" {
fmt.Fprintf(os.Stderr, "expected Latn with High confidence for English, got %v (%v)\n", script, scriptConf)
os.Exit(1)
}
// 4. language.NewMatcher.Match returns language.High when matching regional variants of the same language
supported := []language.Tag{language.AmericanEnglish, language.German}
_, idx, matchConf, matchedHigh := sample.MatchTagHigh(supported, language.BritishEnglish)
if !matchedHigh || matchConf != language.High || idx != 0 {
fmt.Fprintf(os.Stderr, "expected High confidence at index 0 matching en-GB to en-US, got idx=%d conf=%v\n", idx, matchConf)
os.Exit(1)
}
// 5. language.Comprehends returns language.High between mutually intelligible regional variants
comp := language.Comprehends(language.AmericanEnglish, language.BritishEnglish)
if comp != language.High {
fmt.Fprintf(os.Stderr, "expected language.Comprehends(en-US, en-GB) == High, got %v\n", comp)
os.Exit(1)
}
fmt.Println("contract ok")
}
Ursprungs-Seeder
anonym