Skip to content

refactor: narrow private operator and lifecycle inputs - #179952

Merged
steipete merged 2 commits into
mainfrom
deslop/z28-55-operator-inputs-20261015
Oct 21, 2026
Merged

steipete merged 2 commits into
mainfrom
deslop/z28-55-operator-inputs-20261015

Conversation

@steipete

@steipete steipete commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Operator, installation, and lifecycle helpers still accept private inputs or return fields that no production caller uses. This leaves alternate paths, forwarding, and test-only plumbing to maintain.

User Impact

No user-visible behavior change. Config keys, CLI flags, Gateway protocol, Plugin SDK contracts, persisted formats, security checks, and lifecycle settlement are unchanged.

Why This Change Was Made

Remove unused private arguments and always-defaulted options, inline their actual values, and drop unread result projections. Keep each producer with its callers and existing tests. Tests use the existing clock, transport, or lower-owner seams rather than unused outer injection points.

This is the operator/core area of a wider cleanup, split to keep CI attribution bounded: 66 files; 150 net production lines and 36 net test/support lines removed; one obsolete mock-baseline row removed; zero net documentation lines. The execution, plugin-adapter, and presentation areas are not included.

Fresh-main changes to diagnostic redaction, secret-masking regressions, and lifecycle fixtures are preserved. All 64 files have the same ordered added/removed lines as the previously reviewed cleanup; fresh caller/export checks found no new supplier or public escape.

Best-effort tradeoffs accepted

No new operating failure mode is accepted. These alternate inputs had no serving supplier; real defensive checks remain.

Evidence

Whole-tree caller/alias/export census includes extensions, packages, UI, and scripts, with introducing history and in-flight activation checks. Fresh-main caller drift and complete cutover were checked before publication.

Fresh focused owner proof: 149 tests passed across status formatting, channel status, package-update lifecycle, Doctor health, credential preservation, and the real Doctor output/redaction regression. Unchanged owner/sibling proof from the individually reviewed source cuts is retained; hosted exact-head CI is the broad proof. No local broad suite, build, E2E, added skips, retries, or timeout increases.

Known inherited local failure: test/scripts/lint-suppressions.test.ts finds the unchanged scripts/perf/provider-request-prepare-measure.ts|typescript/unbound-method|3 entry missing from its allowlist (99 versus 98). It reproduces on exact clean base 9bd9b07fe1d59a2fa148da45609c581a033017e5 with 13 passing cases and one failure. The script came from #179456; this PR changes neither it nor the guard and adds no suppression. The cleanup was restored after the serial base replay, with all 64 file hashes verified identical. No allowlist expansion or dropped cleanup hunk.

Targeted native types, exact-file typed lint, formatting, and whitespace checks passed. Runtime-value and Madge cycle checks both report zero cycles. The four selected native PR-wrapper inventory/import-closure cases passed (the unrelated eager-import fixture cases were not selected). Fresh independent P0–P2 review is scoped-clean with no accepted/actionable finding. The inherited suppression failure above is not claimed green.

Initial exact-head CI found two PR-caused test-tooling omissions: a diagnostic cancellation test still supplied the removed lock-reader argument, and the changed lifecycle mock invalidated its grandfathered closed-factory hash. The repair keeps cancellation-before-inspection proof through the existing native identity mock and preserves real lifecycle exports with importOriginal; its obsolete baseline tuple is deleted, not replaced. Both changed suites pass (29 tests, 62.25 seconds wrapper), the focused test-type graph passes, and independent P0–P2 repair review is clean. No production code, real behavior assertion, timeout, retry, skip, or suppression was added to repair CI. Hosted proof must pass on the repaired head; the original red is not classified as inherited.

@clawsweeper

clawsweeper Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

ClawSweeper review in progress

ClawSweeper is reviewing this revision. This supersedes any previous blocked status.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation gateway Gateway runtime cli CLI command changes commands Command implementations size: L labels Oct 21, 2026
@steipete
steipete marked this pull request as ready for review October 21, 2026 21:58
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 21, 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-21T22:25:59.059527Z 3200860 New commits
ℹ️ 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.

@github-actions

github-actions Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

⚠️ Security sensitive changes

This maintainer PR changes sensitive security components.

No secops approval is required. This comment is informational because the PR author has Maintain or Admin access.

  • Current SHA: 320086076370115ec274e9ee51630d85e8e59e62
  • Maintainer: @steipete
  • Repository role: admin

These security sensitive changes were made:

  • src/secrets/provider-env-vars.ts: Controls credential persistence, secret resolution, or redaction. Check storage permissions, credential scope, and exposure in logs or responses.
  • src/security/safe-regex.ts: Controls product security checks or trust decisions. Check whether the change weakens detection, protection, or remediation.

Carefully review these changes before merging.

@steipete

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

The repaired head migrates the leftover diagnostic lock-reader test argument and converts the lifecycle mock to real-export pass-through, removing its obsolete baseline row. Both focused suites (29 tests), targeted types, scoped lint/format, and both cycle checks passed; the repair also has a clean independent review. The PR body records the initial CI failures and the separately proven inherited local suppression failure.

@clawsweeper

clawsweeper Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@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 21, 2026
@clawsweeper

clawsweeper Bot commented Oct 21, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR removes unused private overrides and ignored result fields while adapting existing tests to their underlying owners.

Example: Doctor requests cached memory status.

  • Before: The helper accepts an unused timeout override; production callers use 8,000 milliseconds.
  • After: The helper directly uses the same 8,000-millisecond budget.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The patch is coherent and source-supported; runtime confidence rests on reported owner tests, with broad hosted validation still unfinished.
Proof confidence 🦐 gold shrimp (3/6) This maintainer-authored refactor is outside the ordinary contributor proof gate; supplied evidence reports focused owner tests and repaired-suite passes, without claiming a fresh shipped-entry-point run.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Refactor · Worth it: Yes
Reason: The maintainer-authored direction reduces private maintenance surface while retaining the existing user-facing contracts.

Merge readiness

✅ Ready for maintainer review

Keep this PR open: the maintainer-approved cleanup preserves the serving paths, and the repaired head has no actionable finding from this review.

Priority: P3
Reviewed head: 320086076370115ec274e9ee51630d85e8e59e62

Before merge

None.

Findings

None.

Agent review details

How this fits together

These internal helpers connect CLI, Doctor, setup, and update operations to config parsing, plugin metadata, process inspection, transport, and lifecycle owners.

flowchart TD
  A[CLI and Doctor] --> B[Private operation helpers]
  C[Setup and updater] --> B
  B --> D[Config and metadata owners]
  B --> E[Process and transport owners]
  B --> F[Package lifecycle owner]
Loading

Technical review

Best possible solution:

Retain this private-interface reduction and let the existing exact-head CI gate complete before merging.

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

This is a behavior-preserving refactor rather than a bug report; source inspection establishes the removed private alternatives, and no target code was executed during this read-only review.

Is this the best way to solve the issue?

The change uses existing owners, removes unused forwarding and projections, and preserves production defaults without adding replacement machinery.

AGENTS.md: found and applied where relevant.

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

Provenance checked

  • Gateway lock inspection keeps the original intent (fix: detect PID recycling in gateway lock on Windows/macOS + startup progress [AI-assisted] #59843: Reader injection supported platform-specific PID-recycling tests; later ownership repairs retain native identity checks and reject unverifiable reclamation.)
  • Package lifecycle completion keeps the original intent (fix(update): complete package lifecycle outside dist inventory #133908: Complete interrupted installation scripts outside dist inventory; subsequent lifecycle ownership work requires settlement before activation or disposal.)
  • Plugin metadata scope keeps the original intent ([AI-assisted] fix(plugins): scope startup metadata manifest reads #84628: Avoid broad startup manifest reconstruction while preserving exact scoped selection; current callers supply none of the removed compatibility overrides, and runtime-generation admission remains.)
  • Provider usage transport keeps the original intent (fix(provider-usage): honor proxy env for usage fetch #93943: Honor proxy environment variables for usage requests; removing the unused explicit transport override retains the serving proxy-first branch.)
  • Config parsing and recovery keeps the original intent (unknown: The base normalizes the parser to JSON5 and all inspected suppliers use that implementation; git log and follow reached the dependency-type split, but deeper follow-history failed on an unavailable old blob.)
  • Bounded regex matching and dispatch inspection keeps the original intent (031bf0c: Bound regex work and preserve security parsing; the cleanup fixes unused parameters to the same 2,048-character window and four-wrapper depth used by callers.)
  • Delivery queue readers keeps the original intent (refactor(conversations): move binding and delivery authority to workers #166259: Separate worker-owned delivery authority and recovery; the narrowed plural reader retains pending selection and ordering without changing the distinct bound recovery readers.)
  • Update finalization budget keeps the original intent (290613f: Derive generous budgets from measured state and serial work; no inspected caller supplies the removed observed-startup input.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit 782e8d2 adds src/infra/package-lifecycle.ts:383 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 782e8d2f8364; files: src/infra/package-lifecycle.ts)
  • Jason (Json): Raw commit 616a395 adds src/infra/package-lifecycle.ts:388 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: medium; commits: 616a3958329f; files: src/infra/package-lifecycle.ts)
  • Vincent Koc: Raw commit 2f25e9c adds src/snapshot/manifest.ts:163 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: medium; commits: 2f25e9cba384; files: src/snapshot/manifest.ts)

PR surface

Source -150, Tests -36, Docs 0, Other -1. Total -187 across 66 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 42 102 252 -150
Tests 22 128 164 -36
Docs 1 1 1 0
Config 0 0 0 0
Generated 0 0 0 0
Other 1 0 1 -1
Total 66 231 418 -187

Labels

Label changes:

  • add P3: This is internal maintenance with no intended user-visible behavior change or established urgent defect.
  • 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 maintenance with no intended user-visible behavior change or established urgent defect.
  • 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 21, 2026, 6:24 PM ET / 22:24 UTC.

@steipete
steipete enabled auto-merge (squash) October 21, 2026 22:27
@steipete
steipete disabled auto-merge October 21, 2026 22:41
@steipete

Copy link
Copy Markdown
Contributor Author

Exact-head CI attribution for 320086076370115ec274e9ee51630d85e8e59e62 (run39685344476, attempt1):

Failed job Attribution
checks-ui-e2e(2/9),119518860318 Inherited stale heading expectation. Scheduled main39679539559 at399a360fdfbb15546498a97886cef41fd8cac66b, job119498588185, fails the same complete chat-boot case at line233 with the same sharing-menu/Message permissions locator and30000ms timeout. Main#179752 renamed that heading to Session members without updating this test. Determining test, renderer and English catalog are unchanged by this PR.
openclaw/ci-gate,119526817947 Downstream of that single failed test job. All other selected CI jobs completed successfully; security-fast passed.

This is an inherited-failure native admin exception under the standing cleanup campaign authority, not green CI. The actual tested checkout980afec9e1492e2dad053fb00852e718b5848ac6 has ordered parents868f0aa0959a15d4d2ab37931daff20dee6db181 and the exact PR head, with its merge tree verified. The six latest completed scheduled-main runs and coordinator flake ledger were checked before attribution. No CI rerun or source push was used to chase green. The accepted auto request was explicitly retired through native recovery before selecting this exception.

Focused proof remains149 owner cases plus29 CI-repair cases, targeted native types, typed lint, formatting and zero runtime/Madge cycles. The separate local suppression guard remains13PASS/1FAIL on the unchanged perf row99vs98, reproduced on clean base; no allowlist expansion. Initial PR-caused test-type/mock-export failures were repaired before this head and are not called inherited.

@steipete
steipete merged commit 9eef399 into main Oct 21, 2026
168 of 174 checks passed
@steipete
steipete deleted the deslop/z28-55-operator-inputs-20261015 branch October 21, 2026 22:49
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via explicitly authorized admin squash with attributed pre-existing CI failures.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 22, 2026
* refactor: narrow private operator and lifecycle inputs

* test: migrate private lifecycle and lock reader fixtures
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cli CLI command changes commands Command implementations docs Improvements or additions to documentation 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. security-sensitive-changed size: L 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