Let fx own signals and the exit code in the server example (closes #86)
check / check (push) Failing after 3s
check / check (push) Failing after 3s
The lifecycle example computed an exit code that never reached os.Exit, installed its own SIGINT/SIGTERM handler beside the one fx's Run() installs, and exited from a goroutine when Sentry failed to start, so no stop hook ran. Now only fx handles those signals; a listen error asks fx to shut down with exit code 1 through fx.Shutdowner; Sentry's error is returned from the server's start hook; and the server's stop hook shuts the HTTP server down within 5 seconds and fails when requests are still running. A new paragraph says who owns signals and the exit code. SIGPIPE is still ignored, now in main. Model: opus-5-5
This commit is contained in:
@@ -21,6 +21,15 @@ fmt-check, and commit.
|
||||
|
||||
# Completed Steps
|
||||
|
||||
- 2026-10-04: Fixed the server lifecycle example in
|
||||
`prompts/GO_HTTP_SERVER_CONVENTIONS.md` (issue 86). Only fx handles SIGINT and
|
||||
SIGTERM, and `Run()` in `main` exits with the shutdown's exit code. A listen
|
||||
error asks fx to shut down with exit code 1 through `fx.Shutdowner`; a Sentry
|
||||
start failure is returned from the server's start hook instead of calling
|
||||
`os.Exit` from a goroutine, so the stop hooks of what had started still run.
|
||||
The server's stop hook shuts the HTTP server down within 5 seconds and fails
|
||||
when requests are still running. A new paragraph says who owns signals and the
|
||||
exit code.
|
||||
- 2026-10-04: `package.json` now has `"license": "MIT"`, matching `LICENSE`, so
|
||||
yarn no longer prints "No license field" when `script/bootstrap` runs it
|
||||
inside the Docker phases (issue 76). That was the only yarn warning there.
|
||||
|
||||
Reference in New Issue
Block a user