Skip to content

refactor: make Talk consultation aliases private - #184732

Merged
shakkernerd merged 1 commit into
mainfrom
talk-consult-private-types-468
Oct 26, 2026
Merged

shakkernerd merged 1 commit into
mainfrom
talk-consult-private-types-468

Conversation

@shakkernerd

Copy link
Copy Markdown
Contributor

What Problem This Solves

OpenClaw's unused-export inventory reports three Talk consultation type aliases that are exported from their owner module even though no supported caller imports or names them. Keeping owner-local implementation types exportable leaves the static contract broader than its actual consumers and prevents the export inventory from converging on the supported surface.

User Impact

There is no user-visible behavior change. The existing GatewayControlOwner and TalkClientGatewayControlOptions contracts retain the same fields and nested function shapes, and Talk consultation authority, cancellation, steering, completion, recovery, and teardown behavior remain unchanged. No public API, Plugin SDK entrypoint, manifest, protocol, configuration, or persisted data shape changes.

Why This Change Was Made

The three aliases are used only to compose exported types in client-agent-consult.types.ts; repository-wide inspection found no imports or re-exports of their names. This change removes only their export modifiers while preserving every alias body and every other export. Because these are type-only declarations, the runtime output is unchanged.

Evidence

  • Selected-source inspection at d777ae1239625a8cadb3da17e7a057d0c4de71fa found the three names only in their declaring module and found no supported package, Plugin SDK, manifest, protocol, namespace, test, or documentation exposure.
  • The owner file is byte-identical to the earlier accepted native export inventory input where all three names appeared as unused in both production and full-tree scans.
  • macOS arm64 changed-file formatting and lint passed with zero warnings or errors. All 10 selected type groups and all 38 canonical graphs passed, including the Gateway, core, Plugin SDK, extension, UI, script, and root-test consumers.
  • The production, full-tree, and script export inventories completed. The three assigned Talk aliases were absent while unrelated pre-existing residuals remained visible; the aggregate therefore exited nonzero without representing a failure of this bounded change.
  • An automated P0-P3 review completed with no findings. A separate full-source independent review and hosted CI remain readiness obligations after publication.
  • No runtime test was added or run because the change affects only erased type visibility; the unchanged alias bodies and complete downstream type closure are the decisive proof.

@clawsweeper

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

@openclaw-barnacle openclaw-barnacle Bot added gateway Gateway runtime size: XS labels Oct 26, 2026
@shakkernerd shakkernerd self-assigned this Oct 26, 2026
@clawsweeper clawsweeper Bot added clawsweeper:intake:feature 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:feature Preliminary submission classification; full source review pending. labels Oct 26, 2026
@clawsweeper

clawsweeper Bot commented Oct 26, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR makes three unused Talk consultation type aliases private without changing their definitions or runtime behavior.

Example: A Talk consultation uses GatewayControlOwner.runAgentConsult.

  • Before: Its supporting aliases are separately exported despite having no external consumers.
  • After: The supporting aliases are private, while the consultation contract and behavior remain identical.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A minimal, source-verified cleanup with passing exact-head validation and no findings; runtime proof is inapplicable.
Proof confidence 🌊 off-meta tidepool Not applicable: This maintainer-authored PR changes only erased internal type visibility; source inspection and passing exact-head typechecks cover the changed surface.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Refactor · Worth it: Yes · Fix scope: Complete
Reason: The maintainer-authored direction matches the repository preference for narrow internal contracts, and all three edits directly remove unused export surface.

Merge readiness

✅ Ready for maintainer review

This PR is a correct, minimal internal cleanup with no actionable findings; the reviewed head passes the CI gate.

Priority: P3
Reviewed head: d60120e5d4959464935cd5a7795f6f80c59fd470

Before merge

None.

Findings

None.

Agent review details

How this fits together

Gateway Talk control connects voice-provider requests to agent consultations; this module defines the internal lifecycle and callback types used by those owners.

flowchart LR
  A[Talk provider request] --> B[Gateway control owner]
  C[Consultation types] -.-> B
  C -.-> D[Agent consultation]
  B --> D
  D --> E[Provider response]
Loading

Technical review

Best possible solution:

Keep these owner-local aliases private while preserving the exported consumer contracts.

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

There is no runtime bug to reproduce; source inspection confirms that the three exported names have no consumers outside their owner module.

Is this the best way to solve the issue?

Removing only the export modifiers is the smallest complete change: it narrows visibility without duplicating types, changing structural contracts, or adding test scaffolding.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 3fe7f1e2a43c.

Provenance checked

Security

None.

Evidence

What I checked:

Likely related people:

  • Vincent Koc: Raw commit 5aaf440 adds src/gateway/talk-client-agent-consult.types.ts:4 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 5aaf44006b30; files: src/gateway/talk-client-agent-consult.types.ts)
  • Peter Steinberger: Raw commit 4c9bde5 adds src/gateway/talk-client-agent-consult.types.ts:32 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 4c9bde5c58db; files: src/gateway/talk-client-agent-consult.types.ts)

PR surface

Source 0. Total 0 across 1 file. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 1 3 3 0
Tests 0 0 0 0
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 1 3 3 0

Labels

Label changes:

  • add P3: This is a low-risk internal type-surface cleanup with no user-visible behavior change.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool 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 a low-risk internal type-surface cleanup with no user-visible behavior change.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool 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 26, 2026, 11:07 AM ET / 15:07 UTC.

@shakkernerd
shakkernerd merged commit 5089aa7 into main Oct 26, 2026
126 checks passed
@shakkernerd
shakkernerd deleted the talk-consult-private-types-468 branch October 26, 2026 15:15
@shakkernerd

Copy link
Copy Markdown
Contributor Author

Simplified: Talk consultation helper aliases are now private while the existing Gateway owner and options contracts remain unchanged.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 27, 2026
Keep the three owner-local Talk consultation aliases private while preserving the existing Gateway owner and options contracts and runtime behavior.
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: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: XS 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