Wire process identity cancellation and shared HTTP server lifecycle

This commit is contained in:
2026-11-20 04:55:27 +00:00
parent 41dc1f5517
commit 7b570ed49d
12 changed files with 380 additions and 11 deletions

View File

@@ -86,8 +86,9 @@ The source-boundary guards reject committed workspaces, vendor trees, and
module replacements.
It then runs the complete suite once with the race detector and builds Linux
amd64 and arm64 binaries using `CGO_ENABLED=0`, `-trimpath`, and
`-ldflags '-s -w'`. The native test run uses the host platform and enables cgo.
amd64 and arm64 binaries using `CGO_ENABLED=0`, `-trimpath`, and linker flags
`-s -w -X main.version=<version> -X main.revision=<candidate-commit>`.
The native test run uses the host platform and enables cgo.
Validation disables workspaces, uses read-only module mode, and disables module
and toolchain downloads. Missing dependencies must be provisioned separately;
fix the environment and rerun the command. No persistent validation cache is
@@ -111,6 +112,8 @@ publishes:
The matching checked-in note supplies the hosted release body. The workflow
owns image selection, packaging, checksum generation, and upload configuration.
Its binaries receive the tag and source commit as the same version/revision
metadata used by local candidate builds.
Its upload step skips existing files and does not overwrite the release.
Source-publication success does not attest to workflow success or asset
availability.

View File

@@ -581,6 +581,27 @@ explanation identifies the failure. No exhaustive filesystem matrix.
## Stage 7: Wire Process Metadata, Cancellation, And Server Startup
**Status: Complete.** Entrypoint execution now uses an interrupt/SIGTERM context,
cleans signal registration before process exit, and returns the native finalized
status. Version/revision string variables support linker metadata; local and
hosted release builds supply the selected version and full source commit without
changing targets, toolchain, publication guards, or release-completion semantics.
`serve` loads resolved settings once, constructs one restricted reader and shared
engine, retains the HTTP handler/limits/header timeout, and closes listener and
active connections on cancellation. Startup uses native Info reporting; canceled
and unrelated server failures retain operational outcomes and typed causes.
Verified on Go 1.27.4: focused native-adapter tests/race checks and vet, existing
HTTP race regressions (including reader/report/capacity behavior), release-script
tests, and local/hosted shell syntax checks. Explicit readiness coordination
covers server startup, a file-backed HTTP run with its execution report, and
shutdown during active engine work. Timeout checks distinguish native operation
budgets, earlier parent cancellation/deadline, zero/negative budgets, and a
per-attempt timeout. Framework load failures retain their native diagnostics.
Entrypoint package tests and the linked version/revision binary check are
deferred until the legacy files are removed; include them in Stage 9's full
application verification. No release was published.
**Primary files:** `cmd/scriptorium/main.go`, CLI `serve` declaration,
`scripts/release.sh`, `.woodpecker/release.yml`, and lifecycle tests.