Skip to content

ci: inventory retained native worker lifecycles - #203835

Merged
vincentkoc merged 1 commit into
mainfrom
ci/gateway-worker-lifecycle-inventory
Nov 23, 2026
Merged

vincentkoc merged 1 commit into
mainfrom
ci/gateway-worker-lifecycle-inventory

Conversation

@vincentkoc

@vincentkoc vincentkoc commented Nov 23, 2026 •

Copy link
Copy Markdown
Member

What Problem This Solves

The runtime lifecycle inventory omits the native worker supervisor and two worker entrypoints that hold resources through it. Maintainers need to see which owner starts those workers and when it releases them.

User Impact

CI's lifecycle registry now records the four existing launch modes and their cleanup owners.

Why This Change Was Made

The native worker supervisor starts on first use. Its default source joins at runtime cleanup, and a retained generation joins its supervisor before releasing the captured runtime. The same registry now tracks cleanup for plugin preparation and SQLite snapshot staging.

The lean admission ledger has executable-level heap estimates for the supervisor and plugin preparation. Per-mode heap expectations are still unmeasured, so the registry uses its supported unknown value.

Evidence

A focused source check verified four modes on three unchanged manifest entrypoints, all owner paths, and preservation of the existing declarations. Scoped autoreview with the owning implementations found no actionable P0–P2 issues. The patch adds 30 registry lines. Hosted CI passed the runtime-process lifecycle ratchet and the full PR gate. CodeQL passed on the same head.

@vincentkoc vincentkoc self-assigned this Nov 23, 2026
@clawsweeper

clawsweeper Bot commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@vincentkoc
vincentkoc marked this pull request as ready for review November 23, 2026 00:06
@openclaw-barnacle openclaw-barnacle Bot added scripts Repository scripts size: XS labels Nov 23, 2026
@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Nov 23, 2026
@clawsweeper

clawsweeper Bot commented Nov 23, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR records lifecycle owners, lazy activation, cleanup policies, and unknown heap estimates for four existing native-worker launch modes.

Example: A maintainer reviews the retainedSnapshots launch mode for sqliteSnapshotStaging.

  • Before: The lifecycle registry does not identify its owner or retirement policy.
  • After: The registry identifies src/infra/sqlite-snapshot-staging-owner.ts and describes idle rotation and shutdown cleanup.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) Focused, source-verified maintenance with successful owning CI and no actionable findings; shipped-entry-point proof is unnecessary for this metadata change.
Proof confidence 🐚 platinum hermit (4/6) This CI inventory change has no shipped-product behavior requiring demonstration; source inspection and successful reviewed-head CI provide proportional validation.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Maintenance · Worth it: Yes · Fix scope: Complete
User problem: Maintainers cannot find activation and cleanup ownership for these existing workers in the lifecycle inventory.
Reason: The maintainer-authored direction extends the established inventory contract accurately and at low maintenance cost.

Merge readiness

✅ Ready for maintainer review

This PR is useful, focused inventory maintenance with no actionable correctness or security findings; the reviewed head’s lifecycle ratchet and aggregate CI gate passed.

Priority: P3
Reviewed head: 46270464e76fa5b586bc9d648aee2586d2276cb0

Before merge

None.

Findings

None.

Agent review details

How this fits together

The CI lifecycle checker compares the core runtime manifest and declaration registry against a Git base, validates owner paths and memory declarations, and emits validation results without controlling worker execution.

flowchart TD
  A[Base manifest and registry] --> D[Lifecycle checker]
  B[Proposed manifest and registry] --> D
  C[Lifecycle owner files] --> D
  E[Baseline ratchet lane] --> D
  D --> F[CI result and diagnostics]
Loading

Technical review

Best possible solution:

Keep these declarations in the existing registry while leaving lifecycle execution and measured memory policy with their existing owners.

Do we have a high-confidence way to reproduce the issue?

Source inspection confirms that fetched main omits the four declarations; no runtime failure is claimed or requires reproduction.

Is this the best way to solve the issue?

The additions are the smallest complete inventory repair: they reuse the existing registry and checker without adding runtime machinery, duplicate policy, or test scaffolding.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against dc73bd7122c8.

Provenance checked

  • Runtime lifecycle declaration registry keeps the original intent (29446a2: Require recorded owners, activation, retirement, and memory expectations for core launchers while permitting explicitly unmeasured existing modes.)

Testing

Proof path: none.

Security

None.

Evidence

What I checked:

Likely related people:

  • Vincent Koc: Raw commit 29446a2 adds scripts/runtime-process-lifecycle.json:4 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 29446a2281fa; files: scripts/runtime-process-lifecycle.json)
  • Josh Lehman: Raw commit d486658 adds src/infra/worker-memory-budget-ledger.ts:15 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: medium; commits: d4866585915c; files: src/infra/worker-memory-budget-ledger.ts)

PR surface

Other +30. Total +30 across 1 file. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 0 0 0 0
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 1 30 0 +30
Total 1 30 0 +30

Preflight source

Source unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified.

Labels

Label changes:

  • add P3: This improves preventive CI inventory without changing runtime behavior or addressing an urgent user failure.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Label justifications:

  • P3: This improves preventive CI inventory without changing runtime behavior or addressing an urgent user failure.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

Reviewed November 22, 2026, 7:28 PM ET / November 23, 2026, 00:28 UTC.

@vincentkoc
vincentkoc merged commit 45ba297 into main Nov 23, 2026
171 of 172 checks passed
@vincentkoc
vincentkoc deleted the ci/gateway-worker-lifecycle-inventory branch November 23, 2026 00:37
@vincentkoc

Copy link
Copy Markdown
Member Author

Merged via squash.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. scripts Repository scripts size: XS status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant