Sample
golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e
Verified sample for golang golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e. The contract ran on go 1.26 · linux debian/x64 · docker and passed.
sha256:59e052fbf46af2ee888ec8e96f4d20453eb9490cdd69ddc97975d559963beacb
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
- 1
Declared environment
linux 24 · ubuntu · glibc 2.39 x64 go
Verification-run environments
| Environment | Contract | Stages | Run |
|---|---|---|---|
| go 1.26 · linux debian/x64 · docker ed25519:c1973797be207ac4 | SKIPPED | compile:SKIPPED · contract:SKIPPED · load:SKIPPED · resolve:FAIL CONTAINER_RUN · golang@1golang:1.26@sha256:e30143be198a… |
2026-10-21 |
| 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-21 |
Case
HOW- Goal
- verify pkg:golang/golang.org/x/net@v0.0.0-20200324143707-d3edc9973b7e
- Created
- 2026-10-21T06:59:31Z
Contract
- html.Parse and html.Render round-trip HTML document trees and decode entity text into atom.P element nodes
- html.EscapeString and html.UnescapeString round-trip special HTML characters accurately
- publicsuffix.EffectiveTLDPlusOne and publicsuffix.PublicSuffix resolve ICANN effective TLD+1 and public suffix offline
- ctxhttp.Get with an already-canceled context returns context.Canceled immediately without network activity
Files
- PROMPT.md
- csx.json
- go.mod
- go.sum
- main.go
- spec.json
- test/contract.go
Source
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/net@v0.0.0-20200324143707-d3edc9973b7e
Kind: HOW
Use EXACTLY these public packages and versions:
- pkg:golang/golang.org/x/net@v0.0.0-20200324143707-d3edc9973b7e
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:626d3010095616b96b22061fe62ce2f9d75c623a0f2735a23a0bf2f474a253d5","contract":["html.Parse and html.Render round-trip HTML document trees and decode entity text into atom.P element nodes","html.EscapeString and html.UnescapeString round-trip special HTML characters accurately","publicsuffix.EffectiveTLDPlusOne and publicsuffix.PublicSuffix resolve ICANN effective TLD+1 and public suffix offline","ctxhttp.Get with an already-canceled context returns context.Canceled immediately without network activity"],"goal":"verify pkg:golang/golang.org/x/net@v0.0.0-20200324143707-d3edc9973b7e","kind":"HOW","packages":["pkg:golang/golang.org/x/net@v0.0.0-20200324143707-d3edc9973b7e"],"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/net@v0.0.0-20200324143707-d3edc9973b7e"],"schemaVersion":1,"subject":"pkg:golang/golang.org/x/net@v0.0.0-20200324143707-d3edc9973b7e","verifierAdapter":"golang@1"}
module example.com/sample
go 1.22
require golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e h1:3G+cUijn7XD+S4eJFddp53Pv7+slrESplyjG25HgL+k=
golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
package main
import (
"fmt"
"log"
"strings"
"golang.org/x/net/html"
"golang.org/x/net/publicsuffix"
)
func main() {
doc, err := html.Parse(strings.NewReader(`<!DOCTYPE html><html><body><p id="greeting">Hello & Welcome</p></body></html>`))
if err != nil {
log.Fatalf("html.Parse failed: %v", err)
}
_ = doc
domain, err := publicsuffix.EffectiveTLDPlusOne("www.sub.example.co.uk")
if err != nil {
log.Fatalf("publicsuffix.EffectiveTLDPlusOne failed: %v", err)
}
fmt.Printf("EffectiveTLDPlusOne: %s\n", domain)
}
{
"schemaVersion": 1,
"goal": "verify pkg:golang/golang.org/x/net@v0.0.0-20200324143707-d3edc9973b7e",
"kind": "HOW",
"packages": [
"pkg:golang/golang.org/x/net@v0.0.0-20200324143707-d3edc9973b7e"
]
}
package main
import (
"bytes"
"context"
"fmt"
"os"
"strings"
"golang.org/x/net/context/ctxhttp"
"golang.org/x/net/html"
"golang.org/x/net/html/atom"
"golang.org/x/net/publicsuffix"
)
func main() {
// 1. html.Parse and html.Render round-trip HTML document trees and decode entity text into atom.P element nodes
markup := `<!DOCTYPE html><html><head><title>Sample</title></head><body><p id="lead">Alpha & Beta</p></body></html>`
doc, err := html.Parse(strings.NewReader(markup))
if err != nil {
fmt.Fprintf(os.Stderr, "assertion 1 failed: html.Parse error: %v\n", err)
os.Exit(1)
}
if doc == nil || doc.Type != html.DocumentNode {
fmt.Fprintf(os.Stderr, "assertion 1 failed: expected DocumentNode root\n")
os.Exit(1)
}
var pNode *html.Node
var walk func(*html.Node)
walk = func(n *html.Node) {
if n.Type == html.ElementNode && n.DataAtom == atom.P {
pNode = n
}
for c := n.FirstChild; c != nil; c = c.NextSibling {
walk(c)
}
}
walk(doc)
if pNode == nil || pNode.FirstChild == nil || pNode.FirstChild.Type != html.TextNode || pNode.FirstChild.Data != "Alpha & Beta" {
fmt.Fprintf(os.Stderr, "assertion 1 failed: unexpected parsed <p> node content\n")
os.Exit(1)
}
var rendered bytes.Buffer
if err := html.Render(&rendered, doc); err != nil {
fmt.Fprintf(os.Stderr, "assertion 1 failed: html.Render error: %v\n", err)
os.Exit(1)
}
if !strings.Contains(rendered.String(), `<p id="lead">Alpha & Beta</p>`) {
fmt.Fprintf(os.Stderr, "assertion 1 failed: unexpected rendered HTML: %s\n", rendered.String())
os.Exit(1)
}
// 2. html.EscapeString and html.UnescapeString round-trip special HTML characters accurately
raw := `<span class="tag">One & "Two" 'Three'</span>`
escaped := html.EscapeString(raw)
if escaped != `<span class="tag">One & "Two" 'Three'</span>` {
fmt.Fprintf(os.Stderr, "assertion 2 failed: unexpected EscapeString output: %s\n", escaped)
os.Exit(1)
}
if html.UnescapeString(escaped) != raw {
fmt.Fprintf(os.Stderr, "assertion 2 failed: unexpected UnescapeString output\n")
os.Exit(1)
}
// 3. publicsuffix.EffectiveTLDPlusOne and publicsuffix.PublicSuffix resolve ICANN effective TLD+1 and public suffix offline
etld1, err := publicsuffix.EffectiveTLDPlusOne("www.sub.example.co.uk")
if err != nil || etld1 != "example.co.uk" {
fmt.Fprintf(os.Stderr, "assertion 3 failed: expected example.co.uk, got %q (err=%v)\n", etld1, err)
os.Exit(1)
}
suffix, icann := publicsuffix.PublicSuffix("www.sub.example.co.uk")
if suffix != "co.uk" || !icann {
fmt.Fprintf(os.Stderr, "assertion 3 failed: expected co.uk (icann=true), got %q (icann=%v)\n", suffix, icann)
os.Exit(1)
}
// 4. ctxhttp.Get with an already-canceled context returns context.Canceled immediately without network activity
ctx, cancel := context.WithCancel(context.Background())
cancel()
_, err = ctxhttp.Get(ctx, nil, "http://localhost:0/")
if err != context.Canceled {
fmt.Fprintf(os.Stderr, "assertion 4 failed: expected context.Canceled, got %v\n", err)
os.Exit(1)
}
}
Origin Seeder
anonymous