Skip to content

fix: resolve eleven stale exports in local checks - #201014

Merged
steipete merged 1 commit into
mainfrom
steipete/perf-micro-dead-export-cleanup-20260919
Nov 18, 2026
Merged

steipete merged 1 commit into
mainfrom
steipete/perf-micro-dead-export-cleanup-20260919

Conversation

@steipete

Copy link
Copy Markdown
Contributor

What Problem This Solves

Local check:changed runs report eleven inherited dead exports from #200533, #193550, #198455, and #200817. Those findings obscure regressions in otherwise unrelated branches.

User Impact

No runtime behavior changes. Plugin authors can name the existing model-request hook and metric contracts through openclaw/plugin-sdk/plugin-entry; existing plugin types and callable APIs remain compatible.

Why This Change Was Made

Keep module-only session delivery, cron formatting, and reference-model types private, and inline the obsolete segmented-control test helper at its sole caller. Existing delivery and formatting tests now exercise their production entrypoints. Reuse the existing event-state fixture setup to keep the recovery suite within its line cap.

The six public SDK types remain owned by their existing modules and gain explicit type-only re-exports from the canonical entrypoint. The surface budget increases by exactly six, with the source PRs recorded beside the budget. No Knip ignore or baseline entry is added. Production LOC is +10, entirely those type-only re-exports; no runtime import, config, cache, schema, or dependency is added.

Evidence

  • The six-type plugin consumer fails on the parent with six missing-export errors and compiles with the fix. The committed type contract registers the typed model hook and uses the typed metric producer/exporter APIs.
  • Plugin SDK surface and package-export checks pass: 3,888 → 3,894 public exports, zero new callable exports, no unauthorized shipped removals.
  • 65 focused core tests pass, covering hook ordering/failure, metrics lifecycle, session-controller custody, recovery delivery, and Gateway cron suppression. The three cases using the consolidated fixture setup are rechecked on the final patch.
  • 186 cron unit/browser tests and all four production-build Chromium schedule-editing E2E scenarios pass. UI test time: 9.97s plus 0.806s browser layout; E2E: 29.73s, build: 13.07s. Core wrapper: 297.42s, including worker preparation and Gateway integration setup.
  • Root contract/tooling typechecks and the line-cap guard pass. The new import contract adds no runtime test process.

The untouched main parent 34d6c288fe1c46a369ff4171a103226b8c6059e3 also has four newer findings: gbrainReleaseAsset and attestsGbrainRelease from #200987 (0ff7e2772eb15), and buildMessageToolSchema and resolveMessageToolActionSchemaActions from #197553 (34d6c288fe1c4). Parent-relative source diffs identify their introduction/last-consumer removal. The original eleven findings are absent after this patch; those four remain a separately attributed main regression. Aggregate scan counts are 12 → 4 production, 9 → 1 full-tree, and 0 → 0 script entries. This does not claim a clean aggregate scan.

Codex autoreview P0–P2 on the final local patch against parent 34d6c288fe1c46a369ff4171a103226b8c6059e3: scoped-clean, no accepted/actionable findings. The three consolidated recovery cases pass in 24.26s Vitest / 31.63s wrapper. pnpm check:changed completed with every check passing except the four attributed inherited dead exports listed above. This includes core/UI/extension/script/test typechecks, SDK boundary declaration emission, scoped lint, dependency and database guards, and format checks. No check was skipped or weakened.

@clawsweeper

clawsweeper Bot commented Nov 18, 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 docs Improvements or additions to documentation app: web-ui App: web-ui gateway Gateway runtime scripts Repository scripts size: S labels Nov 18, 2026
@steipete
steipete marked this pull request as ready for review November 18, 2026 05:40
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 18, 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-18T05:42:43.389804Z 90c55ca 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.

@steipete

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

Please review ready head 90c55ca63a692a3df272623c4ec4e69ce09491f5. The branch, description, focused proof, and local Codex review are complete. The ready-event intake was deduplicated; no completed review covers this head yet.

@clawsweeper

clawsweeper Bot commented Nov 18, 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. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. 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. 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 18, 2026
@clawsweeper

clawsweeper Bot commented Nov 18, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR makes internal helpers private, exposes six existing SDK types, and updates tests to use production entry points.

Example: A plugin imports PluginHookBeforeModelRequestEvent from openclaw/plugin-sdk/plugin-entry.

  • Before: The canonical entry point does not export that named type.
  • After: The import resolves to the existing hook contract without adding runtime code.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) A focused, source-supported patch with useful compiler and integration coverage; validation results are contributor-reported and broad CI is still pending.
Proof confidence 🦐 gold shrimp (3/6) This behavior-preserving cleanup is supported by the reported consumer compilation and focused tests; inspected schedule screenshots belong to the earlier feature and are not attributed to this patch.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Maintenance · Worth it: Yes · Fix scope: Complete
User problem: Inherited dead-export findings obscure unrelated local-check regressions, and plugin authors cannot name existing hook and metric contracts through the canonical entry point.
Reason: The maintainer-authored change removes check noise while preserving runtime behavior and completing existing SDK authoring contracts.

Merge readiness

✅ Ready for maintainer review

Keep this PR open: it provides useful, narrowly scoped export cleanup, and I found no actionable correctness or security defects; exact-head CI remains pending.

Priority: P3
Reviewed head: 90c55ca63a692a3df272623c4ec4e69ce09491f5

Before merge

None.

Findings

None.

Agent review details

How this fits together

The SDK entry point supplies plugin authoring contracts, while session delivery and cron formatting retain their existing runtime owners.

flowchart LR
  A[Plugin source] --> B[SDK entry point]
  B --> C[Existing hook and metric types]
  D[Contract compiler] --> B
  E[Behavior tests] --> F[Delivery and cron owners]
Loading

Technical review

Best possible solution:

Retain the existing runtime owners, publish the six named type contracts, and keep internal helpers private as this patch does.

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

Parent source lacks the six named exports and retains the internal export declarations; the PR reports a parent-failing, head-passing consumer compilation, which was not rerun during this read-only review.

Is this the best way to solve the issue?

The patch is the smallest complete repair using existing owners: it removes unnecessary export boundaries and exposes existing contracts without new runtime machinery.

AGENTS.md: found and applied where relevant.

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

Provenance checked

  • Session delivery and recovery coverage keeps the original intent (3d2f7ca: Session admission owns scheduled conversation execution and delivery; subsequent recovery tests protect completion after invocation scopes close.)
  • Cron formatting and view test helper keeps the original intent (14b9fc3: The schedule sentence reads and writes the existing cron form; this patch preserves its outputs and tests them through the formatter.)
  • Durable reference-model types keeps the original intent (703c82d: The types support queued-input crash-recovery modeling; making two module-only names private retains all model behavior.)
  • SDK surface budget keeps the original intent (da3ac01: The budget records individually attributed accepted SDK exports; this patch attributes exactly six additional type names without weakening other limits.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit 3d2f7ca adds src/auto-reply/reply/session-event-delivery.ts:17 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 3d2f7ca06b26; files: src/auto-reply/reply/session-event-delivery.ts)
  • Vincent Koc: Raw commit 26f0c7e adds src/plugin-sdk/plugin-entry.ts:186 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 26f0c7ee9090; files: src/plugin-sdk/plugin-entry.ts)
  • Ayaan Zaidi: Raw commit 703c82d adds src/sessions/session-controller-model.test-support.ts:252 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 703c82d20c5c; files: src/sessions/session-controller-model.test-support.ts)
  • Vyctor H. Brzezowski: Raw commit 14b9fc3 adds ui/src/pages/cron/schedule-sentence.ts:67 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 14b9fc3c8d94; files: ui/src/pages/cron/schedule-sentence.ts)

PR surface

Source +10, Tests +35, Docs +6, Other +1. Total +52 across 11 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 3 12 2 +10
Tests 6 71 36 +35
Docs 1 6 0 +6
Config 0 0 0 0
Generated 0 0 0 0
Other 1 2 1 +1
Total 11 91 39 +52

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.

Review metrics

Metric Value Why it matters
Public SDK type surface +6 named types; +0 callable exports The additive authoring surface is explicitly documented, budgeted, and covered by a compiler contract.

Labels

Label changes:

  • add P3: This removes static-check noise and repairs named type availability without changing runtime behavior.
  • add merge-risk: 🚨 compatibility: The public SDK gains six named type exports; the maintainer-authored direction is additive and preserves existing callable APIs and type definitions.
  • 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 removes static-check noise and repairs named type availability without changing runtime behavior.
  • merge-risk: 🚨 compatibility: The public SDK gains six named type exports; the maintainer-authored direction is additive and preserves existing callable APIs and type definitions.
  • 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 November 18, 2026, 12:56 AM ET / 05:56 UTC.

@steipete
steipete merged commit 422ff06 into main Nov 18, 2026
227 of 231 checks passed
@steipete
steipete deleted the steipete/perf-micro-dead-export-cleanup-20260919 branch November 18, 2026 06:03
@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

app: web-ui App: web-ui docs Improvements or additions to documentation gateway Gateway runtime merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. scripts Repository scripts 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