fix(orchestrator): own startup and shutdown resources (CL16)
This commit is contained in:
parent
21666242f4
commit
8546fce4a9
8 changed files with 384 additions and 117 deletions
|
|
@ -38,3 +38,13 @@ The durable runner now requires canonical engine/repository capabilities. Legacy
|
|||
Implemented by `/root/implement_cl14`; independently reviewed/integrated by `/root`. Root rebuilt the orchestrator and passed application typecheck/contract tests. Focused runner/workflow/worker/pool/isolation/architecture suite: 91 passed, 6,888 assertions. Disposable PostgreSQL canonical and retained durable-run suites: 33 passed, 181 assertions. No SQL/native/economic policy changes. Worker tests required execution outside the sandbox; two transient worktree Bun dependency-reading failures passed on separate reruns and root integration. Legacy-only provider-spy assertions were removed with the unused injection, not replaced with fabricated coverage. Full combined repository gate follows CL16 integration.
|
||||
|
||||
CL15 implementation commit: `bc2b8a89`.
|
||||
|
||||
### CL16 — accepted
|
||||
|
||||
`ServiceContainerBuilder.buildOwned()` adds an explicit shared-resource lifetime while preserving `build()` for existing callers. Orchestrator composition returns `{services, shutdown}`; registration rollback and normal shutdown share idempotent application cleanup. Startup route/bind failures release the runtime. Shutdown finishes accepted HTTP requests and durable work before closing queue/database/cache adapters. The obsolete ModeManager closer and unowned delayed self-test timer are removed from the canonical entrypoint.
|
||||
|
||||
Implemented by `/root`; independently reviewed by `/root/review_cl16` with no blocking findings. Focused lifecycle/composition tests: 39 passed, 166 assertions. Independent architecture rerun: 17 passed. Native worker lifecycle outside sandbox: 10 passed, 33 assertions. The new test was explicitly typechecked and linted because the default application tsconfig excludes tests; controlled fixture adapters have an explicit test-only container widening. Tests cover registration/resolution/bind failure, original-error retention, repeated stop, continued cleanup and a delayed terminal write before PostgreSQL closes.
|
||||
|
||||
Combined `CARGO_BUILD_JOBS=2 bun run check` passed on CL14+CL15+CL16: 132 tooling, 43 utility, 44 calculation, 1,231 integration and 150 Rust tests. Fourteen existing integration conditional skips and four Rust ignored tests remain. Builds, application/contract typechecks, lint and secret audit passed. Scoped disposable PostgreSQL gate remains the CL14 33-case result; no UI or financial schema/transition changed, so browser/full database suites were not rerun. Logs are under `/tmp/stock-bot-engine-cleanup-20261026/` (`combined-check.log`, `cl14-root-postgres.log`, `cl16-worker-accepted.log`). No performance profiling or activation was performed.
|
||||
|
||||
CL14 implementation commit: `21666242`. First wave completes CL14, CL15 and CL16; CL17–CL20 are the next ready tasks and CL21 remains conditional. Prior 68 task records retain their pre-wave state.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue