Skip to content

fix: preserve shutdown errors and finish tracked cleanup - #38

Merged
cppla merged 1 commit into
mainfrom
codex/http-shutdown-close-results
Oct 2, 2026
Merged

cppla merged 1 commit into
mainfrom
codex/http-shutdown-close-results

Conversation

@cppla

@cppla cppla commented Oct 2, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • Treat entirely already-closed listener errors as benign, including net/http's duplicate close during HTTP shutdown.
  • Preserve mixed/unknown/context error trees and original error identities.
  • Do not skip tracked-connection cleanup after a genuine listener-close failure. Continue caller-bounded graceful/forced cleanup and report both close and deadline failures.
  • Add deterministic real-TCP shutdown regressions, 41 error-tree controls and canceled/deadline identity controls. Document source-build behavior; no v1.0.1 artifact or release change.

Validation of d71d30a

  • Same selected final API regressions fail as expected against preserved prior production; final candidate race x3 passes all 27 actual API cases. The old-production overlay excludes only the new, unselected helper-only test file to permit compilation; selected API assertions are unchanged.
  • Full make check and make race passed on the final frozen files. Includes vet, shuffled Go tests, dependency/module/notices checks and 49 release-script tests.
  • Additional classifier/HTTP race controls and healthy CONNECT upload-half-close control passed.
  • Actual Linux arm64 binary (Go 1.25.13) passed 15 new top-level executions and 22 existing controls in two isolated existing-image containers. No networking, capabilities, image pull or Docker configuration change; source/module/doc inventories remained unchanged, containers removed.
  • Independent implementation/fixture reviews found no blocker.

An initial fixture vet failure was corrected with explicit cancellation before final full gates. An initial offline Go-launcher setup error occurred before Linux compilation/tests; final verification used the hashed cached compiler directly. Prior logs are retained rather than counted as final successes.

Scope

No protocol/authentication/admission/relay/half-close/default-budget change. Injected unrelated listener failures are regression controls, not an OS incidence estimate. No browser-equivalence, large corpus, remote-host, deployment or new release claim. Caller context remains the cleanup bound; a noncooperative custom Listener.Close is not forcibly interruptible.

GitHub verification completed on the exact head: CI run 37039232746 (all 11 jobs), CodeQL 37039232784, Linux netem 37039232676, all successful on attempt 1. Container integration and completed dual-platform OCI export, plus netem success, were confirmed in the actual job logs. Automated review reported no findings (COMMENTED, not a human approval); no review threads remained.

Post-merge verification

Merged as 1b1ebaaeaa1a81ad0c21af3614fd28ca1c37fe59. The full tree matches tested head d71d30a4b05ea1865baf9b8aa4a1d77341a891d4 (c71b2c01ee45a532361b95ad46b041f0bdb528b5), and local/remote main and five frozen file hashes agree. Main-focused race x3 passed (15 top-level executions). Main push runs also succeeded on attempt 1: CI 37039655691 (all 11 jobs), CodeQL 37039655679, Linux netem 37039655828. Actual main container/OCI and netem job logs confirmed successful integration and completed export. Worktree clean; no tag/release/deployment.

Copilot AI balanced review requested due to automatic review settings October 2, 2026 17:13

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟢 Approval recommended

The implementation consistently preserves genuine errors, handles benign duplicate closes, and includes comprehensive regression coverage.

Review effort: Balanced
Findings: None

What changed in this PR

Improves shutdown error handling while ensuring tracked connections are cleaned up.

Changes:

  • Classifies only wholly closed-listener error trees as benign.
  • Preserves listener and context errors while completing cleanup.
  • Adds deterministic shutdown regressions and deployment documentation.
File Description
internal/​proxy/​lifecycle.go Preserves shutdown errors and completes tracked cleanup.
internal/​proxy/​http.go Normalizes duplicate HTTP listener-close errors.
internal/​proxy/​listener_close_error_test.go Tests error-tree classification and context identity.
internal/​proxy/​http_shutdown_close_result_test.go Tests real-TCP shutdown and close-error preservation.
docs/​DEPLOYMENT.md Documents source-build shutdown behavior.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@cppla
cppla merged commit 1b1ebaa into main Oct 2, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants