Skip to content

refactor(process): remove private options and unread results - #177134

Merged
steipete merged 1 commit into
mainfrom
deslop/z28-14-process-private-options-20261015
Oct 19, 2026
Merged

steipete merged 1 commit into
mainfrom
deslop/z28-14-process-private-options-20261015

Conversation

@steipete

@steipete steipete commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Internal process and worker APIs still carry test-only alternatives and delivery results that production never uses.

User Impact

No user-visible change, migration or configuration change. Signal forwarding, terminal/process-tree policy, background capacity, FIFO, cancellation, native cleanup and error reporting stay with their existing owners. Public plugin SDK, protocol and persisted shapes are unchanged; the standalone session memory backend is untouched.

Why This Change Was Made

Remove the unread per-packet delivery Promise while retaining receipt tracking, byte/message quotas and failure callbacks. Use canonical platform signals and actual process-stream TTY state instead of private overrides. The remaining Workshop background owner has width one and only consumes its lane; remove its unused enqueue method and specialize that width. Inline the worker dispatcher's sole error factory and require the resource closer its only host already supplies.

This is a process/worker AREA split of the original over-80-path options family. Against base acb98dbf5bc37b7ae9598615aed158c4144e640e: 61 net production lines and 33 net test lines removed across 20 files. Existing tests now use actual queue publication and quota observations rather than the removed private alternatives; no new test-only production seam is added.

Best-effort tradeoffs accepted

Evidence

Whole-tree caller/type/export closure includes src, extensions, ui/src, packages, scripts and plugin SDK barrels. Author simplify/test audit retained live lifecycle, capacity, ordering and cancellation coverage. Independent isolated P2 review completed on all 20 changed files with no actionable P0–P2 findings.

Targeted native typechecks passed. All 144 selected runtime cases passed across worker-native exchange/private retirement (8), worker serving/owned lifecycle (25), real subprocess/resource transport (12), startup respawn (17), compile-cache (23), process/background/resource contracts (47), TUI launch (9), changed Gateway cases (2), and exec bridge integration (1). Four wrapper inventory/source-closure guards also passed. This combines focused runs on unchanged inputs, not a full-suite claim. An initial five-case compile-cache failure exposed a missed old callback-object assertion; migrating only that matcher made all 23 cases pass.

Type-aware lint and formatting passed on all 20 changed files; runtime value cycles are zero, the 20-file line-cap ratchet passed with no new violation/growth, and whitespace checks passed. No source formatting changes were needed.

Known local gap: the lint-suppression guard fails with 99 rows versus 97 expected, naming unchanged src/agents/native-mcp-connect.ts entries (typescript/unbound-method and unicorn/prefer-add-event-listener). Neither that source nor its guard is changed here; both are byte-identical between the pinned base and observed main 077fcccbdfdee2d755dc4d248d82412222e638d0. No baseline replay or CI-inherited attribution is claimed, and no suppression/baseline was added. Exact-head PR CI remains the broad gate.

No broad local build, whole-graph typecheck, standard madge pass, E2E, live-device proof or full-suite result is claimed.

Exact-head CI run 39222314148 (attempt 1) completed successfully for 808f4ca1e69828cafc06735edbc6076c46c5c4c4; the pinned watcher reported GREEN with zero pending checks. No CI rerun or green re-push. Main subsequently reconciled the native-MCP inventory and retired provider-error row in ab762397af2f3cce0c3d7c80b7c92e32d1b8997d; the original local failure above remains recorded, not relabeled passing. No failed-CI exception is requested.

@clawsweeper

clawsweeper Bot commented Oct 19, 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.

@openclaw-barnacle openclaw-barnacle Bot added gateway Gateway runtime size: M labels Oct 19, 2026
@steipete
steipete marked this pull request as ready for review October 19, 2026 08:22
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-19T08:26:45.557767Z 808f4ca Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Oct 19, 2026
@clawsweeper

clawsweeper Bot commented Oct 19, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR removes unused process options, background enqueue helpers, and unread packet-delivery promises.

Example: A background Windows CLI respawn has neither stdin nor stdout attached to a terminal.

  • Before: The child starts with windowsHide enabled, using the process streams when no private override is supplied.
  • After: The child still starts with windowsHide enabled, directly using the process streams.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) Focused, source-supported cleanup with no actionable finding; available validation is harness-based rather than a shipped-entry-point demonstration.
Proof confidence 🦐 gold shrimp (3/6) This maintainer-authored refactor falls outside the ordinary contributor proof gate; its reported selected tests exercise process and worker owners, while inspected linked Windows media belongs to an earlier repair.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Refactor · Worth it: Yes · Fix scope: Complete
User problem: No direct user-visible problem is claimed; unused private alternatives increase maintenance work around process lifecycle code.
Reason: The maintainer-authored direction is established, and verified caller closure supports removing these alternatives without changing public capabilities.

Merge readiness

✅ Ready for maintainer review

Keep open: this maintainer-directed cleanup removes unused private contracts while preserving production lifecycle behavior; no actionable introduced bug was found.

Priority: P3
Reviewed head: 808f4ca1e69828cafc06735edbc6076c46c5c4c4

Before merge

None.

Findings

None.

Tests

  • Missing end-to-end proof: No shipped CLI or Gateway execution of this refactor is supplied; selected owner and subprocess tests provide the available validation.
Agent review details

How this fits together

CLI startup, Workshop reviews, and worker adapters enter existing process and queue owners, which forward signals, schedule work, deliver resource packets, and retain cleanup through completion.

flowchart TD
  A[CLI startup] --> B[Respawn child runner]
  B --> C[Child signal bridge]
  D[Workshop reviews] --> E[Command queue]
  F[Worker host adapter] --> G[Worker runtime]
  G --> H[Spawn broker resource claims]
Loading

Technical review

Best possible solution:

Retain this focused cleanup while preserving the existing signal, queue, receipt, and native-resource lifecycle owners.

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

This is a behavior-preserving refactor rather than a bug report; source inspection confirms the removed alternatives lack production consumers.

Is this the best way to solve the issue?

The diff is a small complete cleanup using existing owners, with no replacement abstraction or unnecessary production machinery.

AGENTS.md: found and applied where relevant.

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

Provenance checked

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit 2409cd6 adds src/process/background-work.ts:18 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 2409cd6489b4; files: src/process/background-work.ts)
  • Vincent Koc: Raw commit 1d53b74 adds src/process/respawn-child-runner.ts:20 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 1d53b7459200; files: src/process/respawn-child-runner.ts)

PR surface

Source -61, Tests -33. Total -94 across 20 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 8 21 82 -61
Tests 12 77 110 -33
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 20 98 192 -94

Review metrics

Metric Value Why it matters
Production versus test LOC Production +21/-82; tests +77/-110. Both shrink overall; test additions migrate retained contracts to real queue publication and observable quota behavior.

Labels

Label changes:

  • add P3: This is internal cleanup with no intended user-visible behavior change or demonstrated current incident.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp 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 is internal cleanup with no intended user-visible behavior change or demonstrated current incident.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp 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 October 19, 2026, 4:39 AM ET / 08:39 UTC.

@steipete
steipete merged commit b8cf2f3 into main Oct 19, 2026
219 checks passed
@steipete
steipete deleted the deslop/z28-14-process-private-options-20261015 branch October 19, 2026 09:13
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

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

Labels

gateway Gateway runtime P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: M 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