Sample
github.com/mholt/acmez/v3 v3.1.2: acme.StatusValid
Verified sample for golang github.com/mholt/acmez/v3 v3.1.2: acme.StatusValid. The contract ran on go 1.26 · linux alpine/x64 · docker and passed.
sha256:36b49c2598e25c89f2471dfe725659fc153ab39d4a0acb41f9a26360ab0f8cfa
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
go linux 24 · ubuntu · glibc 2.39 x64 go go 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-28 |
Case
HOW- Goal
- verify github.com/mholt/acmez/v3/acme.StatusValid in pkg:golang/github.com/mholt/acmez/v3@v3.1.2
- Packages
- Symbols
-
- github.com/mholt/acmez/v3/acme.StatusValid
- Environment
- go
- Created
- 2026-08-28T01:46:01Z
Contract
- acme.StatusValid is equal to the string constant "valid".
- acme.Account preserves Status equal to acme.StatusValid across JSON serialization and deserialization.
- acme.Order in state acme.StatusValid retains valid authorizations, expiration, and certificate URL.
- acme.Authorization with Status equal to acme.StatusValid contains valid challenges and expiration.
- acme.Challenge with Status equal to acme.StatusValid computes correct HTTP-01 challenge resource path.
Files
- PROMPT.md
- csx.json
- go.mod
- go.sum
- main.go
- spec.json
- test/contract_test.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 github.com/mholt/acmez/v3/acme.StatusValid in pkg:golang/github.com/mholt/acmez/v3@v3.1.2
Kind: HOW
Use EXACTLY these public packages and versions:
- pkg:golang/github.com/mholt/acmez/v3@v3.1.2
Demonstrate these symbols/APIs:
- github.com/mholt/acmez/v3/acme.StatusValid
Constraints:
- executionContext: node
Required runtime conditions:
- ecosystem: npm
- language: javascript
- moduleSystem: cjs
- packageManager: npm@10.9.8
- runtime: node@22.23.2
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:9f9fd9128c7791ded93b6cbe89b1fb3f632f5aaf7e4a54a8c33ea06bc975499a","contract":["acme.StatusValid is equal to the string constant \"valid\".","acme.Account preserves Status equal to acme.StatusValid across JSON serialization and deserialization.","acme.Order in state acme.StatusValid retains valid authorizations, expiration, and certificate URL.","acme.Authorization with Status equal to acme.StatusValid contains valid challenges and expiration.","acme.Challenge with Status equal to acme.StatusValid computes correct HTTP-01 challenge resource path."],"goal":"verify github.com/mholt/acmez/v3/acme.StatusValid in pkg:golang/github.com/mholt/acmez/v3@v3.1.2","kind":"HOW","packages":["pkg:golang/github.com/mholt/acmez/v3@v3.1.2"],"schemaVersion":1,"symbols":["github.com/mholt/acmez/v3/acme.StatusValid"]},"contractCommand":["go","test","./..."],"environment":{"arch":"x64","distro":"ubuntu","ecosystem":"golang","executionContext":"go","language":"go","libc":"glibc","libcVersion":"2.39","os":"linux","osVersionBucket":"24","packageManager":"go","runtime":"go","schemaVersion":1},"license":"MIT-0","packages":["pkg:golang/github.com/mholt/acmez/v3@v3.1.2"],"schemaVersion":1,"subject":"pkg:golang/github.com/mholt/acmez/v3@v3.1.2","symbols":["github.com/mholt/acmez/v3/acme.StatusValid"],"verifierAdapter":"golang@1"}
module example.com/acmevalid
go 1.26.6
require (
github.com/mholt/acmez/v3 v3.1.2
golang.org/x/crypto v0.27.0 // indirect
golang.org/x/net v0.29.0 // indirect
golang.org/x/text v0.18.0 // indirect
)
github.com/mholt/acmez/v3 v3.1.2 h1:auob8J/0FhmdClQicvJvuDavgd5ezwLBfKuYmynhYzc=
github.com/mholt/acmez/v3 v3.1.2/go.mod h1:L1wOU06KKvq7tswuMDwKdcHeKpFFgkppZy/y0DFxagQ=
golang.org/x/crypto v0.27.0 h1:GXm2NjJrPaiv/h1tb2UH8QfgC/hOf/+z0p6PT8o1w7A=
golang.org/x/crypto v0.27.0/go.mod h1:1Xngt8kV6Dvbssa53Ziq6Eqn0HqbZi5Z6R0ZpwQzt70=
golang.org/x/net v0.29.0 h1:5ORfpBpCs4HzDYoodCDBbwHzdR5UrLBZ3sOnUJmFoHo=
golang.org/x/net v0.29.0/go.mod h1:gLkgy8jTGERgjzMic6DS9+SP0ajcu6Xu3Orq/SpETg0=
golang.org/x/text v0.18.0 h1:XvMDiNzPAl0jr17s6W9lcaIhGUfUORdGCNsuLmPG224=
golang.org/x/text v0.18.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY=
package main
import (
"encoding/json"
"fmt"
"time"
"github.com/mholt/acmez/v3/acme"
)
func main() {
now := time.Now().UTC().Truncate(time.Second)
account := acme.Account{
Status: acme.StatusValid,
Contact: []string{"mailto:admin@example.com"},
Orders: "https://example.com/acme/acct/1/orders",
}
order := acme.Order{
Status: acme.StatusValid,
Expires: now.Add(24 * time.Hour),
Identifiers: []acme.Identifier{{Type: "dns", Value: "example.com"}},
Authorizations: []string{"https://example.com/acme/authz/1"},
Finalize: "https://example.com/acme/order/1/finalize",
Certificate: "https://example.com/acme/cert/1",
}
authz := acme.Authorization{
Identifier: acme.Identifier{Type: "dns", Value: "example.com"},
Status: acme.StatusValid,
Expires: now.Add(24 * time.Hour),
Challenges: []acme.Challenge{
{
Type: "http-01",
URL: "https://example.com/acme/chall/1",
Status: acme.StatusValid,
Validated: "2026-08-28T00:00:00Z",
Token: "test-token",
},
},
}
accJSON, _ := json.Marshal(account)
orderJSON, _ := json.Marshal(order)
authzJSON, _ := json.Marshal(authz)
fmt.Printf("ACME StatusValid constant: %s\n", acme.StatusValid)
fmt.Printf("Account JSON: %s\n", string(accJSON))
fmt.Printf("Order JSON: %s\n", string(orderJSON))
fmt.Printf("Authz JSON: %s\n", string(authzJSON))
}
{
"schemaVersion": 1,
"goal": "verify github.com/mholt/acmez/v3/acme.StatusValid in pkg:golang/github.com/mholt/acmez/v3@v3.1.2",
"kind": "HOW",
"packages": [
"pkg:golang/github.com/mholt/acmez/v3@v3.1.2"
],
"symbols": [
"github.com/mholt/acmez/v3/acme.StatusValid"
],
"constraints": {
"executionContext": "node"
},
"runtimeConditions": {
"ecosystem": "npm",
"language": "javascript",
"moduleSystem": "cjs",
"packageManager": "npm@10.9.8",
"runtime": "node@22.23.2"
}
}
package test
import (
"encoding/json"
"testing"
"time"
"github.com/mholt/acmez/v3/acme"
)
func TestStatusValidConstant(t *testing.T) {
if acme.StatusValid != "valid" {
t.Fatalf("acme.StatusValid = %q, want 'valid'", acme.StatusValid)
}
}
func TestAccountStatusValid(t *testing.T) {
acc := acme.Account{
Status: acme.StatusValid,
Contact: []string{"mailto:admin@example.com"},
Orders: "https://example.com/acme/acct/1/orders",
}
data, err := json.Marshal(acc)
if err != nil {
t.Fatalf("json.Marshal failed: %v", err)
}
var parsed acme.Account
if err := json.Unmarshal(data, &parsed); err != nil {
t.Fatalf("json.Unmarshal failed: %v", err)
}
if parsed.Status != acme.StatusValid {
t.Errorf("parsed.Status = %q, want %q", parsed.Status, acme.StatusValid)
}
}
func TestOrderStatusValid(t *testing.T) {
now := time.Now().UTC().Truncate(time.Second)
order := acme.Order{
Status: acme.StatusValid,
Expires: now.Add(24 * time.Hour),
Identifiers: []acme.Identifier{{Type: "dns", Value: "example.com"}},
Authorizations: []string{"https://example.com/acme/authz/1"},
Finalize: "https://example.com/acme/order/1/finalize",
Certificate: "https://example.com/acme/cert/1",
}
data, err := json.Marshal(order)
if err != nil {
t.Fatalf("json.Marshal failed: %v", err)
}
var parsed acme.Order
if err := json.Unmarshal(data, &parsed); err != nil {
t.Fatalf("json.Unmarshal failed: %v", err)
}
if parsed.Status != acme.StatusValid {
t.Errorf("parsed.Status = %q, want %q", parsed.Status, acme.StatusValid)
}
if parsed.Certificate != "https://example.com/acme/cert/1" {
t.Errorf("parsed.Certificate = %q, want https://example.com/acme/cert/1", parsed.Certificate)
}
}
func TestAuthorizationStatusValid(t *testing.T) {
exp := time.Now().Add(24 * time.Hour).UTC().Truncate(time.Second)
authz := acme.Authorization{
Identifier: acme.Identifier{Type: "dns", Value: "example.com"},
Status: acme.StatusValid,
Expires: exp,
Challenges: []acme.Challenge{
{
Type: "http-01",
URL: "https://example.com/acme/chall/1",
Status: acme.StatusValid,
Validated: "2026-08-28T00:00:00Z",
Token: "testToken123",
},
},
}
data, err := json.Marshal(authz)
if err != nil {
t.Fatalf("json.Marshal failed: %v", err)
}
var parsed acme.Authorization
if err := json.Unmarshal(data, &parsed); err != nil {
t.Fatalf("json.Unmarshal failed: %v", err)
}
if parsed.Status != acme.StatusValid {
t.Errorf("parsed.Status = %q, want %q", parsed.Status, acme.StatusValid)
}
if len(parsed.Challenges) != 1 || parsed.Challenges[0].Status != acme.StatusValid {
t.Errorf("parsed challenge status = %q, want %q", parsed.Challenges[0].Status, acme.StatusValid)
}
if parsed.IdentifierValue() != "example.com" {
t.Errorf("parsed.IdentifierValue() = %q, want example.com", parsed.IdentifierValue())
}
}
func TestChallengeStatusValid(t *testing.T) {
chall := acme.Challenge{
Type: "http-01",
URL: "https://example.com/acme/chall/1",
Status: acme.StatusValid,
Validated: "2026-08-28T00:00:00Z",
Token: "token-abc",
}
if chall.Status != acme.StatusValid {
t.Errorf("chall.Status = %q, want %q", chall.Status, acme.StatusValid)
}
if chall.HTTP01ResourcePath() != "/.well-known/acme-challenge/token-abc" {
t.Errorf("chall.HTTP01ResourcePath() = %q, want /.well-known/acme-challenge/token-abc", chall.HTTP01ResourcePath())
}
}
Origin Seeder
anonymous