Sample
github.com/gin-gonic/gin v1.12.0: Enable ContextWithFallback on gin.Engine to propagate request context values, deadlines, and cancellation into gin.Context
Verified sample for golang github.com/gin-gonic/gin v1.12.0: Enable ContextWithFallback on gin.Engine to propagate request context values, deadlines, and…
sha256:2c139c1991c19c63c17986ca4307d5ac05335de1a7e2799034fe0d4102827d83
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
- 2
- Signing keys that built it
- 2
Declared environment
go 1.26 linux x64 go 1.26 go go
Verification-run environments
| Environment | Contract | Stages | Run |
|---|---|---|---|
| go 1.26 · linux alpine/x64 · docker ed25519:d91480838ac982c9 | PASS | compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS CONTAINER_RUN · golang@1 |
2026-08-17 |
| go 1.26 · linux alpine/x64 · docker ed25519:2175b912ea1c23b1 | PASS | compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS CONTAINER_RUN · golang@1 |
2026-08-18 |
Case
HOW- Goal
- Enable ContextWithFallback on gin.Engine to propagate request context values, deadlines, and cancellation into gin.Context
- Packages
- Symbols
-
- Engine.ContextWithFallback
- gin.New
- Engine.ServeHTTP
- Context.Value
- Context.Done
- Context.Deadline
- Context.Err
- Context.Get
- Context.GetString
- Context.Set
- Environment
- go 1.26
- Created
- 2026-08-17T11:45:39Z
Contract
- By default gin.Engine has ContextWithFallback disabled, causing gin.Context to return nil for all http.Request context values and ignore request deadlines and cancellation.
- assert setting ContextWithFallback to true enables gin.Context.Value to resolve values from http.Request.Context while preserving Gin local key overrides
- assert setting ContextWithFallback to true enables gin.Context to propagate cancellation and deadlines from http.Request.Context via Done, Deadline, and Err
- assert Context.Get and Context.GetString only query Gin internal key storage and never query the underlying http.Request.Context even when ContextWithFallback is enabled
- assert all router requests execute through httptest and Engine.ServeHTTP in memory without binding network listeners
Files
- NOTES.md
- csx.json
- fallback.go
- fallback_test.go
- go.mod
- go.sum