Sample
golang.org/x/net v0.51.0: atom.Form
Verified sample for golang golang.org/x/net v0.51.0: atom.Form. The contract ran on go 1.26 · linux debian/x64 · docker and passed.
sha256:148d20fb7309f7687d579d04f671b1d1b58d909ed7c23eda4934d4bf53d35356
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
- 1
- 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 | PASS | compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS CONTAINER_RUN · golang@1golang:1.26@sha256:e30143be198a… |
2026-09-07 |
Case
HOW- Goal
- verify golang.org/x/net/html/atom.Form in pkg:golang/golang.org/x/net@v0.51.0
- Packages
- Symbols
-
- golang.org/x/net/html/atom.Form
- Created
- 2026-09-07T00:06:11Z
Contract
- atom.Form is a non-zero Atom constant representing the form HTML tag
- atom.Form String method returns lowercase string "form"
- atom.Lookup with byte slice "form" returns atom.Form
- atom.Lookup is case-sensitive and returns 0 for byte slice "FORM"
- atom.String with byte slice "form" returns "form"
- atom.Form is distinct from atom.Input, atom.Div, and atom.Formaction
- html.Tokenizer yields a start tag token with DataAtom equal to atom.Form when tokenizing a form tag
- html.Parse generates an ElementNode with DataAtom equal to atom.Form for a form element
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 golang.org/x/net/html/atom.Form in pkg:golang/golang.org/x/net@v0.51.0
Kind: HOW
Use EXACTLY these public packages and versions:
- pkg:golang/golang.org/x/net@v0.51.0
Demonstrate these symbols/APIs:
- golang.org/x/net/html/atom.Form
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:b8278b2caed46c81a90886be97faa5abfacd110c2dea4f577023bef377c01cc6","contract":["atom.Form is a non-zero Atom constant representing the form HTML tag","atom.Form String method returns lowercase string \"form\"","atom.Lookup with byte slice \"form\" returns atom.Form","atom.Lookup is case-sensitive and returns 0 for byte slice \"FORM\"","atom.String with byte slice \"form\" returns \"form\"","atom.Form is distinct from atom.Input, atom.Div, and atom.Formaction","html.Tokenizer yields a start tag token with DataAtom equal to atom.Form when tokenizing a form tag","html.Parse generates an ElementNode with DataAtom equal to atom.Form for a form element"],"goal":"verify golang.org/x/net/html/atom.Form in pkg:golang/golang.org/x/net@v0.51.0","kind":"HOW","packages":["pkg:golang/golang.org/x/net@v0.51.0"],"schemaVersion":1,"symbols":["golang.org/x/net/html/atom.Form"]},"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.51.0"],"schemaVersion":1,"subject":"pkg:golang/golang.org/x/net@v0.51.0","symbols":["golang.org/x/net/html/atom.Form"],"verifierAdapter":"golang@1"}
module example.com/sample
go 1.26.6
require golang.org/x/net v0.51.0
golang.org/x/net v0.51.0 h1:94R/GTO7mt3/4wIKpcR5gkGmRLOuE/2hNGeWq/GBIFo=
golang.org/x/net v0.51.0/go.mod h1:aamm+2QF5ogm02fjy5Bb7CQ0WMt1/WVM7FtyaTLlA9Y=
package main
import (
"fmt"
"io"
"strings"
"golang.org/x/net/html"
"golang.org/x/net/html/atom"
)
func main() {
// Demonstrating atom.Form properties
fmt.Printf("atom.Form: value=%d, string=%q\n", atom.Form, atom.Form.String())
// Lookup atom from bytes
lookupForm := atom.Lookup([]byte("form"))
fmt.Printf("atom.Lookup(\"form\") == atom.Form: %t\n", lookupForm == atom.Form)
// Tokenize HTML containing a form
htmlSnippet := `<form action="/submit" method="post"><input type="text" name="q"/></form>`
z := html.NewTokenizer(strings.NewReader(htmlSnippet))
for {
tt := z.Next()
if tt == html.ErrorToken {
if z.Err() == io.EOF {
break
}
fmt.Printf("Token error: %v\n", z.Err())
break
}
tok := z.Token()
if tok.DataAtom == atom.Form {
fmt.Printf("Matched token DataAtom == atom.Form: type=%s, tag=%s\n", tt.String(), tok.Data)
}
}
}
{
"schemaVersion": 1,
"goal": "verify golang.org/x/net/html/atom.Form in pkg:golang/golang.org/x/net@v0.51.0",
"kind": "HOW",
"packages": [
"pkg:golang/golang.org/x/net@v0.51.0"
],
"symbols": [
"golang.org/x/net/html/atom.Form"
]
}
package main
import (
"fmt"
"os"
"strings"
"golang.org/x/net/html"
"golang.org/x/net/html/atom"
)
func main() {
if err := runTests(); err != nil {
fmt.Fprintf(os.Stderr, "Contract test failed: %v\n", err)
os.Exit(1)
}
fmt.Println("All contract assertions passed.")
}
func runTests() error {
// 1. atom.Form is a non-zero Atom constant representing the form HTML tag
if atom.Form == 0 {
return fmt.Errorf("expected atom.Form != 0, got 0")
}
// 2. atom.Form String method returns lowercase string "form"
if s := atom.Form.String(); s != "form" {
return fmt.Errorf("expected atom.Form.String() == \"form\", got %q", s)
}
// 3. atom.Lookup with byte slice "form" returns atom.Form
if a := atom.Lookup([]byte("form")); a != atom.Form {
return fmt.Errorf("expected atom.Lookup([]byte(\"form\")) == atom.Form, got %v", a)
}
// 4. atom.Lookup is case-sensitive and returns 0 for byte slice "FORM"
if a := atom.Lookup([]byte("FORM")); a != 0 {
return fmt.Errorf("expected atom.Lookup([]byte(\"FORM\")) == 0, got %v", a)
}
// 5. atom.String with byte slice "form" returns "form"
if s := atom.String([]byte("form")); s != "form" {
return fmt.Errorf("expected atom.String([]byte(\"form\")) == \"form\", got %q", s)
}
// 6. atom.Form is distinct from atom.Input, atom.Div, and atom.Formaction
if atom.Form == atom.Input || atom.Form == atom.Div || atom.Form == atom.Formaction {
return fmt.Errorf("atom.Form collides with another atom")
}
// 7. html.Tokenizer yields a start tag token with DataAtom equal to atom.Form when tokenizing a form tag
z := html.NewTokenizer(strings.NewReader(`<form action="/submit" method="post"><input type="text"/></form>`))
tt := z.Next()
if tt != html.StartTagToken {
return fmt.Errorf("expected html.StartTagToken, got %v", tt)
}
tok := z.Token()
if tok.DataAtom != atom.Form {
return fmt.Errorf("expected tok.DataAtom == atom.Form, got %v", tok.DataAtom)
}
if tok.Data != "form" {
return fmt.Errorf("expected tok.Data == \"form\", got %q", tok.Data)
}
// 8. html.Parse generates an ElementNode with DataAtom equal to atom.Form for a form element
doc, err := html.Parse(strings.NewReader(`<html><body><form id="test-form"></form></body></html>`))
if err != nil {
return fmt.Errorf("html.Parse failed: %w", err)
}
var foundForm *html.Node
var findForm func(*html.Node)
findForm = func(n *html.Node) {
if n.Type == html.ElementNode && n.DataAtom == atom.Form {
foundForm = n
return
}
for c := n.FirstChild; c != nil; c = c.NextSibling {
findForm(c)
}
}
findForm(doc)
if foundForm == nil {
return fmt.Errorf("expected to find form node with DataAtom == atom.Form in parsed HTML")
}
if foundForm.Data != "form" {
return fmt.Errorf("expected foundForm.Data == \"form\", got %q", foundForm.Data)
}
return nil
}
Origin Seeder
anonymous