Skip to content

fix(ci): resolve production export consumers - #206238

Merged
vincentkoc merged 1 commit into
mainfrom
fix-ci-production-export-consumers-20261127
Nov 27, 2026
Merged

vincentkoc merged 1 commit into
mainfrom
fix-ci-production-export-consumers-20261127

Conversation

@vincentkoc

@vincentkoc vincentkoc commented Nov 26, 2026 •

Copy link
Copy Markdown
Member

What Problem This Solves

The production unused-export check fails on the Knowledge settings dialog, Doctor legacy-directory check, and broker command loader in main CI.

User Impact

No intended user-visible change. This removes unused internal exports and makes the broker's existing lazy consumer visible to the analyzer.

Why This Change Was Made

Keep the settings dialog private and exercise it through the existing settings button. Remove Doctor's forwarding helper and use its existing path owner directly. Destructure the broker function from the same parallel lazy imports instead of adding analyzer exceptions.

Evidence

  • Knip 6.40.0 production fixture: the original namespace access reports startBrokerExeca unused; the new destructuring passes. An independent unused export still fails the positive control.
  • Formatting, syntax checks for all five changed TypeScript files, and git diff --check passed.
  • Independent source review and full local ClawSweeper review found no actionable correctness or security issues. ClawSweeper reviewed base eb0faf79a5be15593fc89ab577a4e4a5be47ea17 through head 71b2bc1f68ece292a4062cb9cc9206d6f28a6f0e.
  • Exact-head CI run 45912869107 executes 71b2bc1f68ece292a4062cb9cc9206d6f28a6f0e. All four Slack field tests and all eight Doctor maintenance-pending tests passed, including the real settings button, read-only path checks, and unreadable-path trace.
  • The production and full-tree unused-export scans no longer report any of the three targeted findings. This run predates the merge of #206165, so its dependency job still reports those two unchanged agent exports.
  • Production/test typechecking, lint, all ten scheduled Node jobs, both ordinary UI jobs, and both real-Gateway UI jobs passed.
  • The completed draft CI also has an unrelated Windows failure in the unchanged test/helpers/openclaw-test-instance.test.ts: “reserves its idle port through refusal, CLI work, and stopped restarts” failed with EADDRINUSE. The port-handoff root cause is unresolved; no passing workflow or repair of that failure is claimed.
  • Hosted build proof ran on exact head 71b2bc1f68ece292a4062cb9cc9206d6f28a6f0e: pnpm build completed successfully at 00:05:26 UTC. The subsequent full check failed on existing line-limit violations outside all five changed files, before its test stage. This is build proof, not a green full-check result.
  • The publisher accepted lease release but could not confirm remote cleanup; that operational gap is tracked separately. No duplicate build was dispatched. Local dependency-backed execution remains unavailable in this code-only checkout.
  • Normal ready-PR CI completed successfully on the unchanged head. It executed merge b895301b66ee4299729fb024a1e36992b6759c7a (baseline d1ac091955e689e38d9a35675bf5d5613651284b plus this PR). All scheduled jobs passed or were intentionally skipped, including production/test typechecking, selected Node tests, lint, and both UI jobs. CodeQL and the independent Security Review also passed.

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

clawsweeper Bot commented Nov 26, 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.

@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. 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. 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 26, 2026
@clawsweeper

clawsweeper Bot commented Nov 27, 2026

Copy link
Copy Markdown
Contributor

Codex review: passed.

What this changes

This PR removes test-only internal exports and makes an existing lazy broker consumer visible to static analysis.

Example: Knip analyzes the broker's startBrokerExeca consumer.

  • Before: The function is accessed through a dynamically imported namespace and is reported as unused in the supplied fixture.
  • After: The same function is destructured from the same parallel imports so the analyzer recognizes its consumer.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The patch is minimal and source-consistent; successful checks support it, but the targeted dependency gate remains red without an attributable diagnostic.
Proof confidence 🦐 gold shrimp (3/6) This maintainer-authored maintenance change has no user-visible behavior change; source inspection verifies the same path predicate and handler capture, with no persisted format or migration-operation changes.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Maintenance · Worth it: Yes · Fix scope: Complete
User problem: Production export checks report internal exports or miss an existing runtime consumer, preventing useful dependency CI from passing.
Reason: This maintainer-authored direction improves dependency analysis while preserving product behavior and reducing production code.

Merge readiness

✅ Ready for maintainer review

Keep open: this maintainer-authored PR makes a focused correction to production export analysis, with no actionable correctness or security defects found.

Reviewed head: 71b2bc1f68ece292a4062cb9cc9206d6f28a6f0e

Before merge

None.

Findings

None.

Agent review details

How this fits together

Production export analysis reads the source graph used by Knowledge settings, Doctor maintenance checks, and broker startup, then reports unused exports to dependency CI.

flowchart TD
  A[Source graph] --> B[Production export analysis]
  B --> C[Dependency CI result]
  A --> D[Knowledge settings button]
  A --> E[Doctor pending trace]
  A --> F[Broker command handlers]
Loading

Technical review

Best possible solution:

Retain this minimal use of existing owners and establish the dependency-check outcome before landing.

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

Source confirms the test-only exports and existing broker consumer; the reported Knip fixture was not rerun, so the exact analyzer diagnostic is not independently reproduced.

Is this the best way to solve the issue?

The change is appropriately small: it removes a forwarding seam, tests through an existing settings entry point, and preserves lazy loading without analyzer exceptions.

AGENTS.md: found and applied where relevant.

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

Provenance checked

  • Knowledge settings dialog keeps the original intent (96e53f4: Editable settings reuse the existing field builders and preserve a scribe's automation; the revised test retains saved-token opt-out coverage through the settings button.)
  • Doctor legacy-directory pending check keeps the original intent (d0f7698: Trace read-only work detection without changing which repair steps run; inlining the same resolver preserves that contract.)
  • Broker command capture keeps the original intent (0971864: Capture permitted handlers before readiness so brokers retain them after package replacement while avoiding unnecessary file-reader loading.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

Likely related people:

  • Vincent Koc: Raw commit 0971864 adds src/process/spawn-broker/command-handlers.ts:5 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 0971864e9351; files: src/process/spawn-broker/command-handlers.ts)
  • Josh Lehman: Raw commit 96e53f4 adds extensions/knowledge/src/scribe-settings-dialog.ts:53 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 96e53f456c8e; files: extensions/knowledge/src/scribe-settings-dialog.ts)
  • Jason (Json): Raw commit d0f7698 adds src/commands/doctor-maintenance-state.ts:298 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: d0f769895093; files: src/commands/doctor-maintenance-state.ts)

PR surface

Source -12, Tests +25. Total +13 across 5 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 3 6 18 -12
Tests 2 38 13 +25
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 5 44 31 +13

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 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:

  • 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.

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Establish whether the failed dependency check still reports the targeted exports or an inherited failure.

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 26, 2026, 7:02 PM ET / November 27, 2026, 00:02 UTC.

@vincentkoc
vincentkoc marked this pull request as ready for review November 27, 2026 00:24
@vincentkoc
vincentkoc merged commit 33ba1b1 into main Nov 27, 2026
325 of 328 checks passed
@vincentkoc
vincentkoc deleted the fix-ci-production-export-consumers-20261127 branch November 27, 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

commands Command implementations P2 Normal backlog priority with limited blast radius. plugin: knowledge rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. 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