Skip to content

fix(ci): remove unused agent runtime exports - #206165

Merged
vincentkoc merged 1 commit into
mainfrom
fix-ci-unused-btw-kill-exports-20261127
Nov 27, 2026
Merged

vincentkoc merged 1 commit into
mainfrom
fix-ci-unused-btw-kill-exports-20261127

Conversation

@vincentkoc

@vincentkoc vincentkoc commented Nov 26, 2026 •

Copy link
Copy Markdown
Member

What Problem This Solves

Main's dependency check fails because two declarations remain exported after their callers moved into the same modules.

User Impact

Restores the dependency check without changing runtime behavior.

Why This Change Was Made

Keep toSimpleContextMessages and SubagentCancellationControl private to their existing owners. Their internal callers remain unchanged.

Evidence

  • Failing main CI job reports exactly these two unused exports in both production and full-tree Knip reports.
  • Repository-wide reference inspection confirms both declarations are used only inside their defining modules.
  • Formatting, the line-cap commit hook, and git diff --check passed.
  • Local ClawSweeper review of the exact committed range found no actionable correctness or security findings.
  • Exact-head CI tested commit 8b3cd00f3f05f79f08dda2d12c50e61ae164f398: the original dependency check and production/test typechecks passed.
  • That run has two unrelated test failures in unchanged code: cloud-profile retry confirmation timed out waiting for Profile saved; Gateway compaction hot reload refused shutdown because native worker owners had not joined. Neither execution path is changed by these two export modifiers. Their root causes remain unresolved.
  • The draft CI build job was skipped. The subsequent native hosted proof completed pnpm build successfully on this exact head. Its later full check failed on pre-existing line-length violations outside both changed files, before tests ran.
  • Normal ready-PR CI tested merge c0cd628ee749fb8e6405cb1dd4031b5a24968657, whose ordered parents are main baseline bf298a53334aa01379f52e6fb4f87106f2743a4b and this exact PR head. The dependency and production/test typechecks passed.
  • Its sole non-aggregate failure is baseline ratchets: GitHub reports that the hosted runner lost communication with the server. The workflow, ratchet implementation, and check collector are unchanged by the tested merge. This remains a failed CI result; native exception evidence records its infrastructure attribution separately from the passing scoped checks.

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

@openclaw-barnacle openclaw-barnacle Bot added agents Agent runtime and tooling size: XS labels Nov 26, 2026
@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. 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: 🐚 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 26, 2026
@clawsweeper

clawsweeper Bot commented Nov 26, 2026

Copy link
Copy Markdown
Contributor

Codex review: passed.

What this changes

This PR makes two unused agent-runtime exports private while preserving their internal callers.

Example: CI checks the exports toSimpleContextMessages and SubagentCancellationControl.

  • Before: The base revision's check-dependencies job fails, with the PR reporting these two unused exports.
  • After: The PR head's check-dependencies job passes.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A minimal, source-verified maintenance repair supported by the relevant passing CI gate; the broader CI failure remains unclassified.
Proof confidence 🐚 platinum hermit (4/6) There is no user-visible behavior change requiring shipped-entry-point proof; the exact-head dependency gate passes.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Maintenance · Worth it: Yes · Fix scope: Complete
User problem: Unused internal exports make the repository dependency gate fail.
Reason: The maintainer-authored change repairs a concrete CI failure with no runtime or public API change.

Merge readiness

✅ Ready for maintainer review

Keep this PR open: it is a minimal, useful CI repair with no actionable correctness findings, and its exact-head dependency check passes; draft status and another failing CI check still prevent landing.

Reviewed head: 8b3cd00f3f05f79f08dda2d12c50e61ae164f398

Before merge

None.

Findings

None.

Agent review details

How this fits together

The agent runtime prepares conversation context for side questions and defines subagent cancellation contracts; this change narrows module visibility without changing their inputs or results.

flowchart LR
  A[Side question request] --> B[BTW runtime]
  B --> C[Local context conversion]
  D[Subagent cancellation] --> E[Exported control contracts]
  E --> F[Local cancellation type]
Loading

Technical review

Best possible solution:

Keep both declarations private in their existing modules and land the minimal change once the draft and CI gates are resolved.

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

Source inspection confirms both unused exports on current main, and GitHub records a failing base dependency job followed by a passing dependency job on this PR's exact head.

Is this the best way to solve the issue?

Removing the unused export keywords is the smallest complete repair: local references and structural type contracts remain intact without adding exceptions or changing runtime behavior.

AGENTS.md: found and applied where relevant.

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

Provenance checked

  • Side-question context conversion export keeps the original intent (164bd67: The session-fork feature shared conversation context with background side questions; a later refactor moved context loading and its calls into this module.)
  • Subagent cancellation control type export keeps the original intent (6652f7e: The Tasks/TaskFlow removal retained cancellation under session and native owners; later refactors colocated the remaining named references in this types module.)

Testing

Proof path: none.

Security

None.

Evidence

What I checked:

  • Minimal introduced change: The pinned introduced diff removes only the export keyword from one function and one type; implementations and callers remain unchanged. (src/agents/btw-runtime.ts:303, 8b3cd00f3f05)
  • Current-main consumers: Both symbols remain exported on fetched main, but all named references are inside their defining modules; no SDK export or external caller was found. (src/agents/subagents/registry/subagent-control.types.ts:31, c818ae7ea000)
  • Dependency gate repaired: The base revision's check-dependencies job 140104551197 failed; job 140159382109 succeeded on the exact PR head, including Run independent checks. (8b3cd00f3f05)
  • Remaining CI failure: checks-node-changed reports PluginRuntimeCloseRetainedError during the Gateway compaction hot-reload test, caused by native worker owners not joining. The annotations establish the failure but no base-equivalent failure was verified, so attribution remains unresolved; full logs redirect to a blocked storage host. (src/plugins/plugin-metadata-lifecycle.ts:202, 8b3cd00f3f05)
  • History and policy: Root and agent-scoped guidance were read and applied; no deeper ancestor guidance or maintainer-notes directory was present. History identifies the side-question and cancellation owners; older history inspection encountered unavailable blobs. (src/agents/AGENTS.md:1, c818ae7ea000)

Likely related people:

  • Vincent Koc: Raw commit b13c10d adds src/agents/btw-runtime.ts:230 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: b13c10deed76; files: src/agents/btw-runtime.ts)

PR surface

Source 0. Total 0 across 2 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 2 2 2 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 2 2 2 0

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

  • 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 26, 2026, 3:52 PM ET / 20:52 UTC.

@vincentkoc
vincentkoc marked this pull request as ready for review November 26, 2026 23:12
@vincentkoc
vincentkoc merged commit eb8e41d into main Nov 27, 2026
310 of 317 checks passed
@vincentkoc
vincentkoc deleted the fix-ci-unused-btw-kill-exports-20261127 branch November 27, 2026 00:08
@vincentkoc

Copy link
Copy Markdown
Member Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling 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