Exemplo
google.golang.org/genproto/googleapis/api v0.0.0-20260316180232-0b37fe3546d5
Amostra verificada para golang google.golang.org/genproto/googleapis/api v0.0.0-20260316180232-0b37fe3546d5. O contrato rodou em go 1.26 · linux debian/x64 …
sha256:b2d817c4abc5fdb451e6c5ba7a7c40ebbf2e4b770765c146cd8a6822befde5b5
Esta rede oferece uma coisa: uma amostra que compila. Ela a executou em um sandbox e guardou o recibo assinado. Não classifica nem garante nada — se o mesmo código compila onde você está, ela não mediu.
Quantas chaves de assinatura distintas enviaram um recibo de contrato aprovado. Uma é só o autor; mais de uma significa que outra pessoa também o compilou. Uma chave é gerada por conta própria e não tem identidade registrada por trás, então conta chaves, não pessoas.
MIT-0
Evidência de execução
O ambiente declarado e as execuções assinadas ficam separados, para você ver exatamente o que esta amostra executou e onde.
- Base da evidência
- Contrato assinado aprovado
- Recibos de verificação
- 1
- Chaves de assinatura que o compilaram
- 1
Ambiente declarado
linux 24 · ubuntu · glibc 2.39 x64 go
Ambientes das execuções de verificação
| Ambiente | Contrato | Etapas | Execução |
|---|---|---|---|
| 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-14 |
Caso
HOW- Objetivo
- verify pkg:golang/google.golang.org/genproto/googleapis/api@v0.0.0-20260316180232-0b37fe3546d5
- Criado
- 2026-10-14T11:15:40Z
Contrato
- LaunchStage enum constants map to defined numeric values from UNSPECIFIED (0) through PRELAUNCH (7)
- LaunchStage.String() and lookup maps LaunchStage_name and LaunchStage_value resolve consistently
- LaunchStage.Enum() returns a non-nil pointer referencing the same LaunchStage value
- LaunchStage.Number() and Descriptor() return valid protobuf reflection metadata
Arquivos
- PROMPT.md
- csx.json
- go.mod
- go.sum
- main.go
- spec.json
- test/contract.go
Código-fonte
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/google.golang.org/genproto/googleapis/api@v0.0.0-20260316180232-0b37fe3546d5
Kind: HOW
Use EXACTLY these public packages and versions:
- pkg:golang/google.golang.org/genproto/googleapis/api@v0.0.0-20260316180232-0b37fe3546d5
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:f8fffa1dd0ee93de0ba78c0192e0fd4a486f70d33be14d715196a544450b4c57","contract":["LaunchStage enum constants map to defined numeric values from UNSPECIFIED (0) through PRELAUNCH (7)","LaunchStage.String() and lookup maps LaunchStage_name and LaunchStage_value resolve consistently","LaunchStage.Enum() returns a non-nil pointer referencing the same LaunchStage value","LaunchStage.Number() and Descriptor() return valid protobuf reflection metadata"],"goal":"verify pkg:golang/google.golang.org/genproto/googleapis/api@v0.0.0-20260316180232-0b37fe3546d5","kind":"HOW","packages":["pkg:golang/google.golang.org/genproto/googleapis/api@v0.0.0-20260316180232-0b37fe3546d5"],"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/google.golang.org/genproto/googleapis/api@v0.0.0-20260316180232-0b37fe3546d5"],"schemaVersion":1,"subject":"pkg:golang/google.golang.org/genproto/googleapis/api@v0.0.0-20260316180232-0b37fe3546d5","verifierAdapter":"golang@1"}
module sample
go 1.25.0
require (
google.golang.org/genproto/googleapis/api v0.0.0-20260316180232-0b37fe3546d5
google.golang.org/protobuf v1.36.11
)
github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8=
github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU=
google.golang.org/genproto/googleapis/api v0.0.0-20260316180232-0b37fe3546d5 h1:CogIeEXn4qWYzzQU0QqvYBM8yDF9cFYzDq9ojSpv0Js=
google.golang.org/genproto/googleapis/api v0.0.0-20260316180232-0b37fe3546d5/go.mod h1:EIQZ5bFCfRQDV4MhRle7+OgjNtZ6P1PiZBgAKuxXu/Y=
google.golang.org/protobuf v1.36.11 h1:fV6ZwhNocDyBLK0dj+fg8ektcVegBBuEolpbTQyBNVE=
google.golang.org/protobuf v1.36.11/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco=
package main
import (
"fmt"
"google.golang.org/genproto/googleapis/api"
)
func main() {
stage := api.LaunchStage_GA
fmt.Printf("LaunchStage: %s (%d)\n", stage.String(), int32(stage))
}
{
"schemaVersion": 1,
"goal": "verify pkg:golang/google.golang.org/genproto/googleapis/api@v0.0.0-20260316180232-0b37fe3546d5",
"kind": "HOW",
"packages": [
"pkg:golang/google.golang.org/genproto/googleapis/api@v0.0.0-20260316180232-0b37fe3546d5"
]
}
package main
import (
"fmt"
"os"
"google.golang.org/genproto/googleapis/api"
"google.golang.org/protobuf/reflect/protoreflect"
)
func main() {
// 1. LaunchStage enum constants map to defined numeric values from UNSPECIFIED (0) through PRELAUNCH (7)
expectedValues := map[api.LaunchStage]int32{
api.LaunchStage_LAUNCH_STAGE_UNSPECIFIED: 0,
api.LaunchStage_EARLY_ACCESS: 1,
api.LaunchStage_ALPHA: 2,
api.LaunchStage_BETA: 3,
api.LaunchStage_GA: 4,
api.LaunchStage_DEPRECATED: 5,
api.LaunchStage_UNIMPLEMENTED: 6,
api.LaunchStage_PRELAUNCH: 7,
}
for stage, expected := range expectedValues {
if int32(stage) != expected {
fmt.Fprintf(os.Stderr, "FAIL: expected numeric value %d for %v, got %d\n", expected, stage, int32(stage))
os.Exit(1)
}
}
// 2. LaunchStage.String() and lookup maps LaunchStage_name / LaunchStage_value resolve consistently
for stage, num := range expectedValues {
name, ok := api.LaunchStage_name[num]
if !ok || stage.String() != name {
fmt.Fprintf(os.Stderr, "FAIL: LaunchStage_name[%d] = %q (ok=%t), stage.String() = %q\n", num, name, ok, stage.String())
os.Exit(1)
}
if val, ok := api.LaunchStage_value[name]; !ok || val != num {
fmt.Fprintf(os.Stderr, "FAIL: LaunchStage_value[%q] = %d (ok=%t), expected %d\n", name, val, ok, num)
os.Exit(1)
}
}
// 3. LaunchStage.Enum() returns a non-nil pointer referencing the same LaunchStage value
gaPtr := api.LaunchStage_GA.Enum()
if gaPtr == nil || *gaPtr != api.LaunchStage_GA {
fmt.Fprintf(os.Stderr, "FAIL: LaunchStage_GA.Enum() did not return pointer to LaunchStage_GA\n")
os.Exit(1)
}
// 4. LaunchStage.Number() and Descriptor() return valid protobuf reflection metadata
if api.LaunchStage_GA.Number() != protoreflect.EnumNumber(4) {
fmt.Fprintf(os.Stderr, "FAIL: expected Number() 4, got %d\n", api.LaunchStage_GA.Number())
os.Exit(1)
}
desc := api.LaunchStage_GA.Descriptor()
if desc == nil || desc.Name() != "LaunchStage" || desc.Values().Len() < 8 {
fmt.Fprintf(os.Stderr, "FAIL: unexpected Descriptor() metadata for LaunchStage\n")
os.Exit(1)
}
fmt.Println("PASS: google.golang.org/genproto/googleapis/api contract verified")
}
Seeder de origem
anônimo