Skip to content

fix: unblock local checks by removing dead exports - #204246

Merged
steipete merged 1 commit into
mainfrom
steipete/perf-micro-dead-exports-204094-204178-203470-20260919
Nov 23, 2026
Merged

steipete merged 1 commit into
mainfrom
steipete/perf-micro-dead-exports-204094-204178-203470-20260919

Conversation

@steipete

Copy link
Copy Markdown
Contributor

What Problem This Solves

The local pnpm check:changed export scan fails on main because it still sees five unused exports from #204094, #204178, and #203470.

User Impact

Developers can run the changed-file checks without tripping over these inherited findings. No runtime behavior, configuration, or public API changes.

Why This Change Was Made

Make the Windows task supervisor implementation, requester-history append helper, and project grant type private. Keep the Windows and completion tests running through their existing entry points, and delete the two registry fixture helpers that no longer have callers.

Evidence

The export scan reported three production and three full-tree findings on the base (one type appears in both). It reports zero production, full-tree, or script findings with this change. All 26 focused tests passed. The generated Windows probe's arguments also reached the production supervisor entry point on macOS; the native Task Scheduler lifecycle requires Windows. pnpm check:changed and Codex autoreview passed.

Remove unused exports left by #204094, #204178, and #203470. Preserve focused coverage through the existing Windows supervisor and completion-settlement entry points.
@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.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor
Codex Review Summary: ✅ Completed

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-23T21:25:44.249113Z 4194cde PR opened
ℹ️ 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.

@openclaw-barnacle openclaw-barnacle Bot added gateway Gateway runtime cli CLI command changes agents Agent runtime and tooling size: S labels Nov 23, 2026
@steipete

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

Please review 4194cde0fda1aea84d663a98bc10374fc61d5eeb. The export scan and pnpm check:changed are clean. For the Windows probe, buildGatewayTaskSupervisorProgramArguments constructs gateway --port <port> before the fixture's positional paths; the real bootstrap parser accepts the sliced Gateway arguments.

@clawsweeper

clawsweeper Bot commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. 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. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. 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 makes unused implementation exports private, removes uncalled fixture helpers, and routes retained tests through existing production entry points.

Example: A developer runs pnpm check:changed.

  • Before: The export scan reports five unused exported symbols.
  • After: The reported export findings are removed without changing runtime behavior.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused maintenance patch with retained behavioral assertions, reported clean local checks, and an independently documented inherited CI failure.
Proof confidence 🐚 platinum hermit (4/6) This behavior-preserving cleanup requires no shipped-entry-point demonstration; retained tests cover the existing settlement owners, and native Windows lifecycle execution is expressly not claimed.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Maintenance · Worth it: Yes · Fix scope: Complete
User problem: Developers encounter inherited unused-export findings when running changed-file checks.
Reason: The maintainer-authored direction matches the existing export policy and removes test-only exposure without changing application contracts.

Merge readiness

✅ Ready for maintainer review

This PR is a useful, minimal cleanup with no introduced correctness or security findings; the failing session-access check is documented as inherited.

Priority: P3
Reviewed head: 4194cde0fda1aea84d663a98bc10374fc61d5eeb

Before merge

None.

Findings

None.

Agent review details

How this fits together

The export checker scans production and test modules; the affected runtime owners supervise Windows Gateway children, settle subagent completion history, and check project access.

flowchart TD
  A[Changed-file checks] --> B[Unused export scans]
  B --> C[Production modules]
  B --> D[Test fixtures]
  E[Retained tests] --> F[Existing production entry points]
  F --> C
Loading

Technical review

Best possible solution:

Keep the existing runtime owners private and retain behavioral coverage through their established entry points.

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

Source inspection confirms the unused exports and hard-zero checker contract; the author reports the failing base scan and clean head scan, and this read-only review executed no target code.

Is this the best way to solve the issue?

The change follows the smallest complete fix: remove unused visibility and dead fixtures while preserving runtime implementations and testing their existing callers.

AGENTS.md: found and applied where relevant.

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

Provenance checked

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit c00dc77 adds src/cli/gateway-cli/task-supervisor.ts:57 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: c00dc778c510; files: src/cli/gateway-cli/task-supervisor.ts)
  • Ayaan Zaidi: Raw commit e2973f9 adds src/cli/gateway-cli/task-supervisor.ts:25 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: e2973f933f10; files: src/cli/gateway-cli/task-supervisor.ts)

PR surface

Source -2, Tests -21. Total -23 across 9 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 3 3 5 -2
Tests 6 48 69 -21
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 9 51 74 -23

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 is developer-check maintenance with no intended application behavior change.
  • 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 is developer-check maintenance with no intended application behavior change.
  • 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 23, 2026, 4:37 PM ET / 21:37 UTC.

@steipete
steipete merged commit bc6acd2 into main Nov 23, 2026
139 of 145 checks passed
@steipete
steipete deleted the steipete/perf-micro-dead-exports-204094-204178-203470-20260919 branch November 23, 2026 21:50
@steipete

Copy link
Copy Markdown
Contributor Author

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

tideclaw-bot pushed a commit that referenced this pull request Nov 24, 2026
Closes #204085

Every release-path update that changes the state schema fails on Windows today: the startup swap renames over the live SQLite files while retained handles are still open. This also affects a successful migration chain, not only its generic-copy fallback (`state-upgrade.ts:566–584,660–663`). The launcher restores the previous release, but the update cannot complete. Shipped first hops use their existing in-place update route and are not affected by this release-path defect.

The candidate releases its closed databases' retained file descriptors before the startup swap. The Windows task supervisor now skips Gateway state and config bootstrap entirely, so it holds no database connection while its child runs. The child still loads its own dotenv files and selects its database and environment. Migration and rollback keep their existing owners and preserved files. There is no schema change or new user action.

An interrupted Windows swap that already created `.pre-*` hard links can still retain admission custody and roll back; this existing, visible recovery edge is unchanged.

Closing SQLite leaves the admission owner's identity descriptor open. A native Windows control reproduces the failure with both SQLite connections closed, then permits the same rename immediately after the existing admission-retirement operation runs. The durable swap now performs that retirement for both database paths before it preserves or replaces either file.

The next open must admit the replacement's physical identity again. The launcher, trial budget, attempts, rollback policy, and SQLite file-sharing mode are unchanged. This requires the candidate fix, not a new installed launcher.

The real Windows replay exposed a second holder: the waiting task supervisor had opened the shared database during Gateway pre-bootstrap. Its only job is to launch and wait for the real Gateway. Supervisor dispatch now happens before SQLite runtime, dotenv, database-engine selection, and Gateway environment selection. The late dispatch is removed.

- Original real Control UI failure: run `4adf1716-1734-4ed5-9eee-38083120fdfc`, two starts, schema 41→42 attempt, both blocked at the canonical WAL; the previous release served after rollback.
- Native Windows reproduction on Azure: a candidate with isolated state holds its own live and prepared file descriptors when replacement fails. No supervisor targets that isolated state.
- Product-API causal control on that lease:
  ```json
  {"file":"live.sqlite","nativeClosed":true}
  {"file":"next.sqlite","nativeClosed":true}
  {"beforeRetirement":"refused","code":"EPERM","syscall":"rename"}
  {"afterRetirement":"renamed"}
  ```
- One swap-owner regression checks descriptor release, new database contents, and the preserved old contents.
- AWS Linux run [`run_604041d54425b8c7e03ba43362072ac2`](https://crabbox.openclaw.ai/portal/runs/run_604041d54425b8c7e03ba43362072ac2): all 46 focused tests passed; the new regression fails on the base because the two descriptors remain retained (not a setup failure).
- Final-head T, next and crash full distribution builds, repository packing, and archive identity/SHA-256 checks passed in AWS run [`run_60ba70a2d1888c2d832aef9a1c6c3665`](https://crabbox.openclaw.ai/portal/runs/run_60ba70a2d1888c2d832aef9a1c6c3665). The corrected fixture declares its predecessor/runtime catalog inputs before generation.
- AWS run [`run_1af4700e569a25502494c17898d4839d`](https://crabbox.openclaw.ai/portal/runs/run_1af4700e569a25502494c17898d4839d): all 37 run-main tests passed; both new supervisor cases fail on clean main base `38f4f8fe018c` because the supervisor enters SQLite startup. Final parser consumer replay [`run_e6e98aa9e306b3332caadeefe5a8615c`](https://crabbox.openclaw.ai/portal/runs/run_e6e98aa9e306b3332caadeefe5a8615c) passes `cli-root-options` and `run-main`. Final-head local review and CI are owned by the lead.
- Fixed candidate-only Windows click on `3c150b5bfa`, run `36fec6f8-d822-409f-9f00-dfb6633e0d70`, still rolled back after two canonical-WAL `EPERM` failures. Native samples every two seconds show the old task supervisor retaining that WAL across candidate starts. Final head `69f58bc4e8` includes the early, database-free supervisor dispatch, its owner regression, and the preserved ordinary parser result.
- **Windows migrating UI update passed:** run `47295f8d-1098-407b-ac2d-160cdca32158`, committed on its first start, T+1 build `0322afdd098e` serving, shared schema 42 and the new STRICT table present. The startup log explicitly reports `by migration chain`. Across 491 native `openclaw.sqlite` handle samples, task-supervisor PID 404 has zero matching lines; other processes have 12,165 matching lines, confirming the sampler was active.
- **Linux chain-mode UI update passed:** run `137ae66a-ab63-4c64-af4b-9c90ee345278`, committed on its first start, T+1 serving schema 42 with the STRICT table. The startup journal explicitly reports `by migration chain`, not generic copy.
- The retained Doctor log explains the old fixture's generic-copy fallback: its schema-41 predecessor catalog was undeclared. Earlier Linux and macOS proof used that fallback. Those runs are not counted as chain-mode proof; the corrected final-head passes above are.

Crash rollback plus healthy recovery, and reboot-before-candidate recovery, cover paths this PR does not change; they run as follow-up proof after merge. Optional plugin maintenance refused old-Gateway-owned schema mutation in the passing runs; those advisory/plugin/channel checks are not claimed as passed.

The swap repair reuses admission retirement. The supervisor repair removes its unnecessary Gateway bootstrap. There is no new user-facing API, flag, configuration, retry, timer, or stored state.

Co-authored-by: Ayaan Zaidi <[email protected]>
(cherry picked from commit e2973f9)
Release adaptation: Place the custody regression before the baseline-only legacy registry fixture and integrate the startup contract in the baseline update docs. Retain the in-place update flow. Fold in only the supervisor dead-export cleanup and its test consumers from #204246.
Release companions: #204246 supervisor-only cleanup included; #204224 IPC release launcher and #204127 prepared-release plugin maintenance not applicable (src/update absent). #204275 early-main Git release check and #204253 reporting-only changes are independent, not required. #204230 and #204299 SHA mentions unrelated.
Co-authored-by: RomneyDa <[email protected]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 24, 2026
Remove unused exports left by openclaw#204094, openclaw#204178, and openclaw#203470. Preserve focused coverage through the existing Windows supervisor and completion-settlement entry points.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling cli CLI command changes gateway Gateway runtime P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: S 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