Close owned import roots during panic unwinding

This commit is contained in:
2026-10-25 21:27:47 +00:00
parent 08a8c25542
commit 877c497325
3 changed files with 126 additions and 5 deletions

View File

@@ -204,6 +204,9 @@ Focused check: `go test ./internal/engine -run 'Callback|Resolution|Validation|V
Finding: **B02**.
Owners: `internal/engine/import_acquisition.go`, `filesystem_access.go`, import tests.
Status: **complete** (B02). Prior stage commits: `2736ddf`, `deb9aa5`,
`ae3408a`, `ea27f17`, `08a8c25`. Validation passed: `GOTOOLCHAIN=local GOPROXY=off GOTELEMETRY=off go test ./internal/engine -run 'Import|SourceVersion|Filesystem' -count=1` and `GOTOOLCHAIN=local GOPROXY=off GOTELEMETRY=off go test ./internal/engine -count=1`.
Install deferred fallback closure at the entry of `acquireImportedWithAccess`,
before operations that may invoke application code. Use a local closed flag or
one local close-once function so existing explicit close sites preserve their