CodeSampleX

Sample

verify google.golang.org/protobuf/types/known/durationpb.New in pkg:golang/google.golang.org/protobuf@v1.35.1

sha256:7f79ef0e71f5811e50d337dc6e0f605ef3b855b43f73481ad07c06938931c8b0

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 alpine/x64 · docker ed25519:c1973797be207ac4 PASS compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS
CONTAINER_RUN · golang@1golang:1.26-alpine@sha256:28d89ee9cc0f…
2026-08-27

Case

HOW
Goal
verify google.golang.org/protobuf/types/known/durationpb.New in pkg:golang/google.golang.org/protobuf@v1.35.1
Packages
Symbols
  • google.golang.org/protobuf/types/known/durationpb.New
Created
2026-08-27T10:39:50Z

Contract

  1. durationpb.New converts time.Duration into *durationpb.Duration with corresponding Seconds and Nanos fields, where negative durations have both negative Seconds and negative Nanos.
  2. durationpb.Duration.AsDuration converts the protobuf message back to time.Duration, and calling AsDuration on a nil receiver safely returns 0.
  3. durationpb.Duration.CheckValid and IsValid validate duration bounds within +/-10,000 years and reject sign discrepancies between Seconds and Nanos or out-of-range nanoseconds.
  4. durationpb.Duration supports protobuf wire serialization and protojson serialization formatting as a string with a trailing 's' suffix.

Files

  • NOTES.md
  • PROMPT.md
  • csx.json
  • duration_test.go
  • go.mod
  • go.sum
  • spec.json

Download the source artifact (tar.gz)

Origin Seeder

anonymous