Skip to content

fix(ci): remove unused exec helper exports - #199511

Merged
steipete merged 1 commit into
mainfrom
steipete/fix-exec-unused-exports-20261115
Nov 15, 2026
Merged

steipete merged 1 commit into
mainfrom
steipete/fix-exec-unused-exports-20261115

Conversation

@steipete

@steipete steipete commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes main's unused-export gate after #199079 (237111eabf619a78bb1180aa49d4164b1b2e0c81) left exec service-cap and timeout helpers exported without production consumers.

Why

Keep MAX_SERVICES_PER_GATEWAY, MAX_SERVICES_PER_SESSION, serviceCapacityError, and resolveExecDefaultTimeoutSec private to their owning modules. All four still have internal callers. #199079 added the three service symbols and moved the timeout helper's last external caller to resolveExecTimeoutDefaults.

The real-process integration suite already exercises the public exec/process tools. Replace its import of the production session cap with the independently documented expectation of 16 services. This preserves every assertion and makes the expected limit independent of the implementation. No checks, ignores, counts, or skip conditions are weakened.

User Impact

The unused-export gate is green again. Process lifetime, capacity limits, timeouts, and cleanup behavior are unchanged. Production and test LOC deltas are both zero; production source shrinks by 28 bytes. No configuration, schema, cache, or public SDK contract changes.

Evidence

Fresh branch from 7a60c1a148c63e77715065914d7e88725672908e. Open-PR searches and relevant file lists found no overlapping peer changes in these three files.

  • Before editing, the exact fix(ci): unblock Activity unused-export checks #199312 command fails with three unused symbols across two files. The fourth, MAX_SERVICES_PER_SESSION, is consumed only by the integration test and therefore is not flagged by the test-aware full-tree scan.
  • Red/green command: pnpm dlx --package [email protected] knip --config config/knip.all-exports.config.ts --no-progress --reporter compact --include exports,nsExports,types,nsTypes,enumMembers,namespaceMembers --no-config-hints. After the fix: exit 0, zero unused exports.
  • pnpm test src/agents/bash-tools.exec-group-cleanup.real.test.ts src/agents/bash-tools.exec-host-node.test.ts src/agents/bash-tools.exec-host-node.integration.test.ts src/agents/bash-tools.exec-background-followup.test.ts: 128 passed across four files; three existing Linux-only cases skipped on macOS. No skip conditions changed.
  • Codex autoreview, P0–P2, on the complete three-file diff and complete owners/test/documented contract: scoped-clean, no actionable findings. Simplification retained only private exports and the independent integration-test expectation.
  • pnpm check:changed: passed, including production/test typechecking, format/lint, all three zero-export scans and the remaining guards. git diff --check passed.
  • Exact-head CI: run 43688359188 passed on d8f6761540f03ffe10895c697156969cb9e3e1e1; no reruns or inherited-infrastructure exception were needed.
  • ClawSweeper final-head review: no findings, no before-merge items, zero open checkboxes. Hosted Codex review also completed without findings.

Keep service limits, capacity errors and default-timeout resolution private to
their owners after #199079 removed their external production consumers.

Use the documented 16-service contract as the real-process integration suite's
independent expectation instead of importing a test-only production export.
Preserve existing behavior, assertions and platform conditions.
@clawsweeper

clawsweeper Bot commented Nov 15, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

@openclaw-barnacle openclaw-barnacle Bot added agents Agent runtime and tooling size: XS labels Nov 15, 2026
@steipete
steipete marked this pull request as ready for review November 15, 2026 07:05
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 15, 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-15T07:07:26.588875Z d8f6761 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 review

Please review final head d8f6761540f03ffe10895c697156969cb9e3e1e1. This restores the unused-export gate after #199079 by making four internally used helpers/constants private and testing the documented 16-service contract through the existing public exec/process integration suite. All assertions and platform conditions remain intact. Local Knip, 128 focused tests, pnpm check:changed, and Codex autoreview are green; exact-head CI is running.

@clawsweeper

clawsweeper Bot commented Nov 15, 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 15, 2026
@clawsweeper

clawsweeper Bot commented Nov 15, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

Makes four exec helpers and constants module-private and gives the existing integration tests an independent 16-service expectation.

Example: The unused-export audit inspects exec helper modules.

  • Before: Three exported symbols have no external consumers, and the session-limit export is consumed only by a test.
  • After: All four symbols remain available internally, and the integration suite checks the documented limit of 16 independently.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A minimal maintenance repair supported by consumer tracing, documented expectations, preserved integration coverage, and successful exact-head CI.
Proof confidence 🐚 platinum hermit (4/6) This visibility-only maintenance change has no changed user-visible behavior requiring shipped-entry-point proof; the existing real-process suite is preserved and exact-head CI passed, although individual job logs redirected to a blocked artifact host.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Maintenance · Worth it: Yes · Fix scope: Complete
User problem: The repository's unused-export gate fails on internal exec symbols after their external consumers were removed.
Reason: This maintainer-directed cleanup restores the existing gate with a minimal change and preserves runtime behavior and meaningful integration assertions.

Merge readiness

✅ Ready for maintainer review

This PR is a focused, behavior-preserving repair with no actionable findings; exact-head CI passed, while the aggregate review gate remains pending.

Priority: P3
Reviewed head: d8f6761540f03ffe10895c697156969cb9e3e1e1

Before merge

None.

Findings

None.

Agent review details

How this fits together

Exec tools use the process-adoption owner to admit and track background services and the timeout owner to resolve command budgets; this PR changes their internal module surfaces without changing tool results.

flowchart TD
  A[Exec tool request] --> B[Exec tool owner]
  B --> C[Service admission and adoption]
  B --> D[Timeout resolution]
  C --> E[Process registry]
  F[Real process integration suite] --> B
Loading

Technical review

Best possible solution:

Retain the module-private helpers and independent service-limit expectation, preserving the existing production owners and integration coverage.

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

Source inspection confirms that main retains three exports without external consumers and a fourth used only by the integration test; the author reports a matching red/green Knip run, and no target code was executed during this read-only review.

Is this the best way to solve the issue?

The patch fixes the unused surface at its owners rather than weakening the audit, and the test expectation now derives from the documented contract instead of the implementation.

AGENTS.md: found and applied where relevant.

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

Provenance checked

  • Service-cap exports and integration expectations keeps the original intent (237111e: The process-lifetime repair introduced bounded adoption with 16 services per session and 64 per Gateway; its integration test imported the session cap.)
  • Default-timeout helper export keeps the original intent (6872be8: The helper unified foreground node command timeout calculation; subsequent service-timeout work moved its external consumer to resolveExecTimeoutDefaults.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

PR surface

Source 0, Tests 0. Total 0 across 3 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 2 4 4 0
Tests 1 7 7 0
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 3 11 11 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 P3: This repairs an internal unused-export gate without changing user-facing execution behavior.
  • 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 repairs an internal unused-export gate without changing user-facing execution behavior.
  • 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 15, 2026, 2:18 AM ET / 07:18 UTC.

@steipete
steipete merged commit d9a6928 into main Nov 15, 2026
222 of 224 checks passed
@steipete
steipete deleted the steipete/fix-exec-unused-exports-20261115 branch November 15, 2026 07:21
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 16, 2026
Keep service limits, capacity errors and default-timeout resolution private to
their owners after openclaw#199079 removed their external production consumers.

Use the documented 16-service contract as the real-process integration suite's
independent expectation instead of importing a test-only production export.
Preserve existing behavior, assertions and platform conditions.
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