Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
515dda5
docs(harness): plan bounded child and service process shutdown
rickylabs Nov 16, 2026
5c671c5
docs(harness): record Redis-backed process exit reproduction
rickylabs Nov 16, 2026
2913e2a
docs(harness): bound cleanup within process shutdown deadlines
rickylabs Nov 16, 2026
f86b889
docs(harness): lock signal termination and resource disposal contracts
rickylabs Nov 16, 2026
a7c3439
test(runtime): reproduce retained Redis handles and early telemetry exit
rickylabs Nov 16, 2026
029b9e6
fix(runtime): bound process shutdown and close signal-owned dependencies
rickylabs Nov 16, 2026
eab4bc2
fix(runtime): dispose generated role resources without acquiring unus…
rickylabs Nov 16, 2026
16fae69
docs(runtime): explain shutdown budgets cleanup ownership and exit codes
rickylabs Nov 16, 2026
20229b8
docs(runtime): retain existing reference layout around shutdown addit…
rickylabs Nov 16, 2026
bd33beb
docs(runtime): refresh shipped shutdown documentation and record stat…
rickylabs Nov 16, 2026
ae7c159
test(runtime): preserve embedding and watch lifecycle assertions
rickylabs Nov 16, 2026
26e945e
docs(harness): record runtime evidence and clean owned resources
rickylabs Nov 16, 2026
0cea585
fix(plugins): forward child health bind address in generated launches
rickylabs Nov 16, 2026
a142ac6
chore(docs): refresh generated child hostname consumers
rickylabs Nov 16, 2026
d6ef1fa
fix(cli): preserve native resource restart failure diagnostics
rickylabs Nov 16, 2026
582372c
docs(harness): record complete supported shutdown runtime verdict
rickylabs Nov 16, 2026
faeb05b
docs(harness): retain independent bounded shutdown approval
rickylabs Nov 16, 2026
212a8d3
fix(service): keep signal disposers independent of work hook types
rickylabs Nov 16, 2026
02711c9
docs(harness): retain final runtime type-closure approval
rickylabs Nov 16, 2026
3dc8957
Merge origin/main into fix/runtime-child-drain
rickylabs Nov 17, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Context pack

Issues #2630/#2631 share PR #2641, branch fix/runtime-child-drain from origin/main b0eb07957. Implementation and documentation are complete; independent IMPL-EVAL and a full supported-runner runtime verdict remain. Do not merge, publish, rebase, force-push or mark ready-merge. No excluded saga transport was modified and no Redis Streams command was added.

PLAN-EVAL cycle two passed before source implementation: https://github.com/rickylabs/netscript/pull/2641#issuecomment-6923762411. The accepted plan locks explicit clean/fatal/timeout process exit 0/1/2; child loopback plus native hostname override; monotonic total budgets with reserved cleanup; signal-only singleton closeKv and identity-deduplicated raw-builder/host Prisma disposal; standalone OTel bounded flush without exit. Manual stop/external abort retain host resource ownership. No generic lifecycle registry.

Real Redis reproductions failed on the base for all four child/service clean/timeout subprocess cases, then passed 4/4 after the fix. Child bind and OTel order regressions also failed before and passed after. Generated acquired/unused owner disposal tests and all three installed runtime artifact checks pass 37/37. Full service/plugin structured tests pass 820/820 with four optional Redis cases skipped in that broader run; those four were separately executed successfully against isolated real Redis. The two old assertions updated at the end retain database usability/owner disposal and Deno-watch crash-loop/reload behavior.

Structured changed-source check/lint/fmt, quality:gate, docs:accuracy, release:preflight and generated-carrier freshness pass. Service doc lint is clean. Plugin doc-lint 18 and telemetry 7 match measured base distributions; plugin JSR audit fails only for missing module tags in three untouched entrypoints, while dry-run succeeds. Service/telemetry/CLI JSR audits pass with pre-existing warnings. Worklog has the detailed gate trail; no lock changes.

Local one-pass scaffold.runtime was attempted twice. First stopped at PostgreSQL loopback readiness because Docker is remote. An owned-only temporary bridge made native PostgreSQL readiness and infrastructure/service/worker health pass. The second stopped at plugin doctor's explicit unsupported remote-Docker guard; no guard was disabled. The bridge also interfered with one persistent-network cleanup, recorded as a harness failure. Full local smoke is not green: the supported CI runner must supply that verdict.

All temporary bridges and the exact diagnostic AppHost are stopped. Teardown preview/apply removed one positively attributed diagnostic PostgreSQL container; zero containers remain with this worktree's mounts or the bridge ownership label. Foreign/unknown resources remain untouched; raw ownership receipts are outside the public run.

Next: dispatch supported CI runtime on this branch, independent feature-tier IMPL-EVAL (pinned Muse Spark 1.3 xhigh, separate vendor family/session), address findings, then truthful issue evidence/closing keywords, ready-for-review transition and required head checks/thread gate. Do not watch PRs from this delegated lane.


IMPL-EVAL cycle one FAIL_FIX (evaluate.md): F1 full supported-runner runtime verdict pending; F2 generated hostname delivery missing. F2 repaired by forwarding NETSCRIPT_CHILD_HEALTH_HOSTNAME from all three generated launchers to the native option. Regression: base 3/6 fails on defaults; pre-repair PR 3/6 fails on ignored override; repaired 6/6 pass with real native bind and non-loopback HTTP. Combined installed artifact suite31/31. New source/docs/carriers must be pushed, then supported CI run at final head and cycle-two independent evaluation.

S4FULLPASS: supported workflow43951994678 SUCCESS atd6ef1fa71: PG124/124, SQLite116/116+showcase8/8, static/native/cleanupallpass. F1resolved. F2alreadyfixed6/6generatedbind plusinstalled31/31, actualnonloopbackHTTPoverride and fullAspirehealthready200. Native restart error diagnostic2red->green, fulladjacent14/14, allsmallgatespass. No unproven product fix for the intermittent native restart symptom. Final proof comment6929449167. Evidence-only commit before cycle2 independent IMPL-EVAL required; preserve oldFAIL_FIX history. No source change after greenfullsmoke.

Cycle2IMPL-EVAL PASS582372c4a, comment6929922874, all7acceptance verified and both earlierfindings resolved. Independent6/6bind+4/4realRedis, fullsupported124/116+8, static/fitness/docsbaseline allgreen. CurrentdraftrequiredpolicySkip/threads0. Verdict-retention commit onlyrunartifacts; ready transition and final head checks next.
32 changes: 32 additions & 0 deletions .llm/runs/fix-runtime-child-drain--issues-2630-2631/drift.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Drift

- Owner-selected existing implementation session uses Sol xhigh. All subsequent eval routes follow the pinned matrix with session/family independence.
- Current main exposes explicit service hostname options, not the environment convention claimed by #2631. Reuse native hostname option and document this evidence.
- Deno KV alone is not a process-retaining handle in this environment; use real Redis sockets to test the reported lifecycle failure.

- S2 file scope expands from 12 to 17 (<30): embedded signal tests must opt out of process termination, and new cleanup contract tests follow type definition. No acceptance weakened.
- T3 requires a new delegate for each review/re-check; cycle two used the same selected model/route with the full prior verdict carried in its brief instead of re-steering the prior session. Session/family independence remained intact.

- S3 composition revealed the same DB client can be both raw-builder registered and owned by the host disposal callback. Added disposeDatabaseOnSignal (default true); generated service composition sets false when its explicit context disposer owns DB cleanup. A real signal subprocess proves exactly one disconnect. This keeps the accepted ownership rule without a global registry.
- Auth serve wiring lives in auth-service-runtime.ts, so that sibling composition file changes instead of main.ts. Sagas runner DB acquisition is already tracked by the generated host resolver; no runner implementation edit is needed. Generated host disposal handles DB only; process edges call closeKv once.
- S2 touched 18 files including its scrubbed resource evidence, still below 30. S3a expands to at most 22 to include the ownership refinement and tests.

- S3b source-derived child-health documentation requires updating its existing generator symbol list; it now includes the public process options/function. Subprocess self-imports are corrected to local module URLs to satisfy release:preflight. This adds three scoped files to the prose slice and remains below 30.

- Baseline-only doc/JSR findings were measured rather than assumed: plugin doc-lint 18 and telemetry 7 match base distribution exactly; plugin module-tag audit fails on three untouched entrypoints. Service doc-lint is clean. No unrelated publishability repair is folded into runtime lifecycle work.

- The required runtime smoke was repeated only after diagnosing a concrete environment failure: container loopback endpoints were in the Docker daemon's namespace. A temporary, owned-only port bridge supplies local reachability without changing generated output or weakening gates. Native PostgreSQL readiness passed through it.
- S4 includes two pre-existing test expectation updates: manual-stop host DB ownership and Deno-watch's explicit-exit diagnostic. Both retain their behavioral assertions; the slice remains below 30 files.

- S4 hostname decision is now resolved after IMPL-EVAL F2: generated workers/sagas/triggers forward NETSCRIPT_CHILD_HEALTH_HOSTNAME as the existing native hostname option. Unset retains loopback, including generated Aspire host executables. Containers explicitly request 0.0.0.0. No generic HOSTNAME fallback and no new service hostname behavior. All three generated artifacts have a native bind plus non-loopback HTTP regression.
- Cycle one IMPL-EVAL FAIL_FIX is preserved. F1 waits on supported-runner runtime evidence; the hostname repair requires a new final-head CI run and a new evaluator session under T3 re-check policy.


## Native supported-runner restart evidence

Full S4 gate remains unresolved at a native web-resource restart. To stop discarding the only decisive diagnostic, minimally include native exit code plus stderr/stdout fallback in the existing CLI refresh error, with two red-before/green-after tests. No retry/bypass/resource-target changes, no new command/API. This is bounded S4 failure diagnosis within the required full-runtime gate, not a new lifecycle design. Two CLI files plus run evidence, below30files. No new local smoke attempt on the unsupported Docker host.


## Ready-transition public type closure repair

Current CI shard1 receipt (workflow43960706867, job133627460342) reports786pass/1fail/9ignored: the existing workers non-contract doc-lint test exposes ServeOptions.onCleanup reaching private ShutdownHook through the worker facade. Reproduced that existing test locally red before fixing. Cleanup is always the process-owned signal disposal phase and needs no reason argument: narrow the new onCleanup contract to zero-argument disposers, leaving reason-aware work hooks on onShutdown. This avoids increasing the separately bounded workers/streams native type closure debt. No executable control flow, generated launch or budget changes. Existing worker public contract suite plus service resource ownership tests7/7green; scoped type check/lint/fmt0; release:preflight/docs:accuracyPASS. Supported full smoke and independent cycle2 remain behavior evidence because the delta is type/JSDoc only. Refresh generated documentation carriers before final head CI confirmation.
Loading
Loading