CodeSampleX

Exemplo

verify gin.Context.Set in pkg:golang/github.com/gin-gonic/gin@v1.12.0

sha256:c60a38357903173fe4f24f7c278fb3beab8fced91c8ca3a6e86f82b399f4450c

Estado de publicação. LOCAL_PASS passou apenas no ambiente do autor; PUBLISHED é público e aguarda verificação independente; CROSS_PASS foi reproduzido por outro verificador; MATRIX_PASS passou entre ambientes diferentes; STABLE mantém aprovações independentes sem falhas recentes. Força da evidência. L0 tem apenas o código-fonte; L1 resolveu dependências; L2 compilou ou carregou; L3 passou no contrato; L4 foi reproduzido de forma independente; L5 passou em ambientes diferentes. MIT-0

Evidência de execução

O ambiente declarado é separado das execuções assinadas para mostrar exatamente o que foi provado.

Base da evidência
Verificação cruzada independente
Recibos de verificação
1
Nível de verificação
L4_CROSS_PASS

Ambiente declarado

Contexto de execução
go 1.26
Sistema operacional
linux
Arquitetura
x64
Runtime
go 1.26
Linguagem
go
Gerenciador de pacotes
go

Ambientes das execuções de verificação

go 1.26 · linux alpine/x64 · docker PASS
Contexto de execução
go 1.26
Sistema operacional
linux alpine · musl
Arquitetura
x64
Runtime
go 1.26
Linguagem
go
Gerenciador de pacotes
go
Execução
container · docker

CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · golang@1 · 2026-08-19

Caso

HOW
Objetivo
verify gin.Context.Set in pkg:golang/github.com/gin-gonic/gin@v1.12.0
Pacotes
Símbolos
  • gin.Context.Set
  • gin.Context.Get
  • gin.Context.AbortWithStatusJSON
  • gin.Context.IsAborted
  • gin.Context.ShouldBindJSON
Ambiente
go 1.26
Criado
2026-08-18T13:38:54Z

Contrato

  1. Context.Set stores middleware state that Context.Get returns with its existence flag in later handlers.
  2. ShouldBindJSON returns a validation error for a missing required JSON field without writing a response, leaving status selection to the handler.
  3. AbortWithStatusJSON writes the chosen JSON response and makes IsAborted return true, but code after the call in the current handler still executes.
  4. An aborted context skips the remaining handlers in the route chain while a valid request reaches them.

Arquivos

  • PROMPT.md
  • contract_test.go
  • csx.json
  • go.mod
  • go.sum
  • spec.json

Baixar o artefato de código-fonte (tar.gz)

Seeder de origem

anônimo

Recibos de verificação

  • go 1.26 · linux alpine/x64 · docker PASS
    CONTAINER_RUN compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS golang@1
    ed25519:2175b912ea1c23b1