Sample
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8
Verified sample for golang golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8. The contract ran on go 1.26 · linux debian/x64 · docker and passed.
sha256:dd3840d7a1d9f3fea8ad7c71aa8533dd73ba35bcc24210b8ea9e0684bb50c2d9
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-10-10 |
Case
HOW- Goal
- verify pkg:golang/golang.org/x/sys@v0.0.0-20220715151400-c0bba94af5f8
- Created
- 2026-10-10T05:54:25Z
Contract
- unix.Getpid returns a positive process identifier
- unix.Getpagesize returns a valid page size of at least 4096 bytes
- unix.Uname populates Utsname with non-empty system metadata
- unix.ByteSliceToString properly decodes null-terminated byte slices
- unix.EINVAL matches errno 22 and is recognized by errors.Is
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/sys@v0.0.0-20220715151400-c0bba94af5f8
Kind: HOW
Use EXACTLY these public packages and versions:
- pkg:golang/golang.org/x/sys@v0.0.0-20220715151400-c0bba94af5f8
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:5214fdad7c7b3c70c8c0f3e9d7d8bb1bf0914ce21cd25acad84e6d2551a0a87e","contract":["unix.Getpid returns a positive process identifier","unix.Getpagesize returns a valid page size of at least 4096 bytes","unix.Uname populates Utsname with non-empty system metadata","unix.ByteSliceToString properly decodes null-terminated byte slices","unix.EINVAL matches errno 22 and is recognized by errors.Is"],"goal":"verify pkg:golang/golang.org/x/sys@v0.0.0-20220715151400-c0bba94af5f8","kind":"HOW","packages":["pkg:golang/golang.org/x/sys@v0.0.0-20220715151400-c0bba94af5f8"],"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/sys@v0.0.0-20220715151400-c0bba94af5f8"],"schemaVersion":1,"subject":"pkg:golang/golang.org/x/sys@v0.0.0-20220715151400-c0bba94af5f8","verifierAdapter":"golang@1"}
module example.com/sample
go 1.26.6
require golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8 h1:0A+M6Uqn+Eje4kHMK80dtF3JCXC4ykBgQG4Fe06QRhQ=
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
package main
import (
"fmt"
"golang.org/x/sys/unix"
)
func main() {
pid := unix.Getpid()
pageSize := unix.Getpagesize()
fmt.Printf("Process ID: %d, Page size: %d\n", pid, pageSize)
var uname unix.Utsname
if err := unix.Uname(&uname); err == nil {
sysname := unix.ByteSliceToString(uname.Sysname[:])
fmt.Printf("System: %s\n", sysname)
}
}
{
"schemaVersion": 1,
"goal": "verify pkg:golang/golang.org/x/sys@v0.0.0-20220715151400-c0bba94af5f8",
"kind": "HOW",
"packages": [
"pkg:golang/golang.org/x/sys@v0.0.0-20220715151400-c0bba94af5f8"
]
}
package main
import (
"errors"
"fmt"
"os"
"golang.org/x/sys/unix"
)
func main() {
// Assertion 1: unix.Getpid returns a positive process identifier
pid := unix.Getpid()
if pid <= 0 {
fmt.Fprintf(os.Stderr, "FAIL: expected unix.Getpid() > 0, got %d\n", pid)
os.Exit(1)
}
// Assertion 2: unix.Getpagesize returns a valid page size of at least 4096 bytes
pageSize := unix.Getpagesize()
if pageSize < 4096 {
fmt.Fprintf(os.Stderr, "FAIL: expected unix.Getpagesize() >= 4096, got %d\n", pageSize)
os.Exit(1)
}
// Assertion 3: unix.Uname populates Utsname with non-empty system metadata
var uname unix.Utsname
if err := unix.Uname(&uname); err != nil {
fmt.Fprintf(os.Stderr, "FAIL: unix.Uname failed: %v\n", err)
os.Exit(1)
}
sysname := unix.ByteSliceToString(uname.Sysname[:])
if len(sysname) == 0 {
fmt.Fprintf(os.Stderr, "FAIL: expected non-empty Sysname from unix.Uname\n")
os.Exit(1)
}
// Assertion 4: unix.ByteSliceToString properly decodes null-terminated byte slices
testSlice := []byte{'h', 'e', 'l', 'l', 'o', 0, 'w', 'o', 'r', 'l', 'd'}
if got := unix.ByteSliceToString(testSlice); got != "hello" {
fmt.Fprintf(os.Stderr, "FAIL: expected ByteSliceToString to return 'hello', got %q\n", got)
os.Exit(1)
}
// Assertion 5: unix.EINVAL matches errno 22 and is recognized by errors.Is
if int(unix.EINVAL) != 22 {
fmt.Fprintf(os.Stderr, "FAIL: expected unix.EINVAL == 22, got %d\n", int(unix.EINVAL))
os.Exit(1)
}
err := unix.Nanosleep(&unix.Timespec{Sec: 0, Nsec: -1}, nil)
if !errors.Is(err, unix.EINVAL) {
fmt.Fprintf(os.Stderr, "FAIL: expected errors.Is(err, unix.EINVAL) to be true, got %v\n", err)
os.Exit(1)
}
fmt.Println("PASS: golang.org/x/sys contract verified successfully")
}
Origin Seeder
anonymous