Close callback contexts when callbacks panic

This commit is contained in:
2026-10-25 21:25:57 +00:00
parent ea27f17f5c
commit 08a8c25542
4 changed files with 90 additions and 6 deletions

View File

@@ -184,6 +184,9 @@ Focused check: `go test ./internal/engine -run 'Projection|Inline|Resolution'`.
Finding: **B01**.
Owners: `internal/engine/resolution.go`, `validation.go`, callback tests.
Status: **complete** (B01). Prior stage commits: `2736ddf`, `deb9aa5`,
`ae3408a`, `ea27f17`. Validation passed: `GOTOOLCHAIN=local GOPROXY=off GOTELEMETRY=off go test ./internal/engine -run 'Callback|Resolution|Validation|Version' -count=1` and `GOTOOLCHAIN=local GOPROXY=off GOTELEMETRY=off go test ./internal/engine -count=1`.
Wrap each application callback invocation in a small function with deferred
context deactivation. The defer must run when that callback returns or panics,
not at the end of subsequent projection/auditing work. Apply this independently