Sample
google.golang.org/genproto/googleapis/rpc v0.0.0-20250728155136-f173205681a0: code.Code_OK
Verified sample for golang google.golang.org/genproto/googleapis/rpc v0.0.0-20250728155136-f173205681a0: code.Code_OK. The contract ran on go 1.26 · linux…
sha256:9e322a174ce60675052f0a6bafe1edfbf1ecea42d0bfdb73b250423edd2e89a1
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-15 |
Case
HOW- Goal
- verify google.golang.org/genproto/googleapis/rpc/code.Code_OK in pkg:golang/google.golang.org/genproto/googleapis/rpc@v0.0.0-20250728155136-f173205681a0
- Symbols
-
- google.golang.org/genproto/googleapis/rpc/code.Code_OK
- Created
- 2026-09-15T23:39:11Z
Contract
- code.Code_OK evaluates to code.Code enum value 0
- code.Code_OK String() returns OK
- code.Code_name maps Code_OK value 0 to OK
- code.Code_value maps OK to int32 value 0
- code.Code_OK descriptor and enum number are consistent
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 google.golang.org/genproto/googleapis/rpc/code.Code_OK in pkg:golang/google.golang.org/genproto/googleapis/rpc@v0.0.0-20250728155136-f173205681a0
Kind: HOW
Use EXACTLY these public packages and versions:
- pkg:golang/google.golang.org/genproto/googleapis/rpc@v0.0.0-20250728155136-f173205681a0
Demonstrate these symbols/APIs:
- google.golang.org/genproto/googleapis/rpc/code.Code_OK
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:adb27762309d1acefc38dac5df825e8303da80ea5645671b747a603fe8727212","contract":["code.Code_OK evaluates to code.Code enum value 0","code.Code_OK String() returns OK","code.Code_name maps Code_OK value 0 to OK","code.Code_value maps OK to int32 value 0","code.Code_OK descriptor and enum number are consistent"],"goal":"verify google.golang.org/genproto/googleapis/rpc/code.Code_OK in pkg:golang/google.golang.org/genproto/googleapis/rpc@v0.0.0-20250728155136-f173205681a0","kind":"HOW","packages":["pkg:golang/google.golang.org/genproto/googleapis/rpc@v0.0.0-20250728155136-f173205681a0"],"schemaVersion":1,"symbols":["google.golang.org/genproto/googleapis/rpc/code.Code_OK"]},"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/google.golang.org/genproto/googleapis/rpc@v0.0.0-20250728155136-f173205681a0"],"schemaVersion":1,"subject":"pkg:golang/google.golang.org/genproto/googleapis/rpc@v0.0.0-20250728155136-f173205681a0","symbols":["google.golang.org/genproto/googleapis/rpc/code.Code_OK"],"verifierAdapter":"golang@1"}
module sample
go 1.26.6
require google.golang.org/genproto/googleapis/rpc v0.0.0-20250728155136-f173205681a0
require google.golang.org/protobuf v1.36.6 // indirect
github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
google.golang.org/genproto/googleapis/rpc v0.0.0-20250728155136-f173205681a0 h1:MAKi5q709QWfnkkpNQ0M12hYJ1+e8qYVDyowc4U1XZM=
google.golang.org/genproto/googleapis/rpc v0.0.0-20250728155136-f173205681a0/go.mod h1:qQ0YXyHHx3XkvlzUtpXDkS29lDSafHMZBAZDc03LQ3A=
google.golang.org/protobuf v1.36.6 h1:z1NpPI8ku2WgiWnf+t9wTPsn6eP1L7ksHUlkfLvd9xY=
google.golang.org/protobuf v1.36.6/go.mod h1:jduwjTPXsFjZGTmRluh+L6NjiWu7pchiJ2/5YcXBHnY=
package main
import (
"fmt"
"google.golang.org/genproto/googleapis/rpc/code"
)
// IsOK checks whether the given gRPC status code is Code_OK.
func IsOK(c code.Code) bool {
return c == code.Code_OK
}
// CodeName returns the canonical string name of the gRPC code.
func CodeName(c code.Code) string {
return c.String()
}
func main() {
c := code.Code_OK
fmt.Printf("Code: %s (%d)\n", CodeName(c), int32(c))
fmt.Printf("IsOK: %v\n", IsOK(c))
}
{
"schemaVersion": 1,
"goal": "verify google.golang.org/genproto/googleapis/rpc/code.Code_OK in pkg:golang/google.golang.org/genproto/googleapis/rpc@v0.0.0-20250728155136-f173205681a0",
"kind": "HOW",
"packages": [
"pkg:golang/google.golang.org/genproto/googleapis/rpc@v0.0.0-20250728155136-f173205681a0"
],
"symbols": [
"google.golang.org/genproto/googleapis/rpc/code.Code_OK"
]
}
package main
import (
"fmt"
"os"
"google.golang.org/genproto/googleapis/rpc/code"
)
func main() {
if int32(code.Code_OK) != 0 {
fmt.Fprintf(os.Stderr, "assertion failed: expected code.Code_OK == 0, got %d\n", int32(code.Code_OK))
os.Exit(1)
}
if code.Code_OK.String() != "OK" {
fmt.Fprintf(os.Stderr, "assertion failed: expected code.Code_OK.String() == \"OK\", got %q\n", code.Code_OK.String())
os.Exit(1)
}
name, exists := code.Code_name[int32(code.Code_OK)]
if !exists || name != "OK" {
fmt.Fprintf(os.Stderr, "assertion failed: expected code.Code_name[0] == \"OK\", got %q (exists=%v)\n", name, exists)
os.Exit(1)
}
val, exists := code.Code_value["OK"]
if !exists || val != 0 {
fmt.Fprintf(os.Stderr, "assertion failed: expected code.Code_value[\"OK\"] == 0, got %d (exists=%v)\n", val, exists)
os.Exit(1)
}
if int32(code.Code_OK.Number()) != 0 {
fmt.Fprintf(os.Stderr, "assertion failed: expected code.Code_OK.Number() == 0, got %d\n", int32(code.Code_OK.Number()))
os.Exit(1)
}
if code.Code_OK.Descriptor() == nil {
fmt.Fprintf(os.Stderr, "assertion failed: descriptor is nil\n")
os.Exit(1)
}
if code.Code_OK.Type() == nil {
fmt.Fprintf(os.Stderr, "assertion failed: type is nil\n")
os.Exit(1)
}
fmt.Println("All contract assertions passed.")
}
Origin Seeder
anonymous