Repository navigation
chore: remove unused exports that keep check-dependencies red on main - #207586
Conversation
- Remove getCommandOptionsWithRootOptions and its options-return parser mode; #207200 removed its only caller. - Un-export module-local shouldDisableCodexToolSearchForModel, AgentHarnessSideQuestionRequest, CORE_TOOL_CATALOG_FAMILIES. - Inline PendingInputHistoryRunState into its one field.
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: passed. What this changesThis PR removes unused exports and an unused CLI parser mode while preserving existing runtime behavior. Example: Running pnpm deadcode:report on the reported base and PR head.
Review scores
ProductKind: Maintenance · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep open: this PR provides a focused cleanup of unused exports still present on main, with no definite introduced defect found. Reviewed head: Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherKnip reads source exports and their consumers, applies the repository's zero-findings policy, and reports the result to dependency CI. flowchart LR
A[Source modules] --> C[Knip scans]
B[Production and test consumers] --> C
C --> D[Zero findings policy]
D --> E[Dependency CI result]
Technical reviewBest possible solution: Retain this minimal cleanup and resolve the CI gate using evidence about the failing Codex policy assertion. Do we have a high-confidence way to reproduce the issue? Source searches confirm the unused export relationships and the hard-zero scan policy; the reported failing and passing commands were not rerun during this read-only review. Is this the best way to solve the issue? Removing unused surface at its existing owners is the smallest complete repair, and the surviving parser modes remain equivalent. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against f12c0cf5c8d3. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource -2, Tests -2, Other -19. Total -23 across 7 files. Added test files: 0. View PR surface stats
Preflight sourceSource unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. LabelsLabel changes:
Label justifications:
Rating scale6/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. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed November 28, 2026, 10:39 AM ET / 15:39 UTC. |
|
Maintainer override: ci-triage output: Failing case: |
…openclaw#207586) ## What Problem This Solves The scheduled `check-dependencies` job (`pnpm deadcode:report`, hard-zero unused exports) has failed on main in each of the last 10 hourly runs with `Unused exports are not allowed`. The job does not run on pull requests, so changes that left an export without a reader merged green and turned main red. Reproduced on main 75a0808: `pnpm deadcode:report` exits 1 with five findings. ## Fix Each finding is removed or narrowed at its module: | Export | Readers on main | Change | |---|---|---| | `cli-root-options.mjs` `getCommandOptionsWithRootOptions` | none; openclaw#207200 removed its only caller, the entrypoint Doctor child | remove the function, its `.d.mts` declaration and the options-return mode of the shared parser that only it used | | `extensions/codex/src/app-server/dynamic-tool-profile.ts` `shouldDisableCodexToolSearchForModel` | own module only | un-export | | `src/agents/harness/types.ts` `AgentHarnessSideQuestionRequest` | own module only (reached through `AgentHarnessSideQuestionParamsV2`) | un-export | | `src/agents/tool-search-catalog-visibility.ts` `CORE_TOOL_CATALOG_FAMILIES` | one test only | un-export; the test lists the family from its own real tool factories | | `src/config/sessions/session-pending-input-history.types.ts` `PendingInputHistoryRunState` | one field | inline the type | No behavior change: the remaining parser modes return the same values. No knip config change. ## User Impact None at runtime. Main's `check-dependencies` job goes green again. ## Evidence - Before (main 75a0808): `pnpm deadcode:report` exit 1, 5 unused exports. - After (this head): `pnpm deadcode:report` exit 0, wall 102.4 s locally (script, production and full-tree scans all pass). - `pnpm check:changed`: typecheck all, dead export scan, format and the other guards pass. Lint's single error is `ui/config/control-ui-chunking.ts:178` no-duplicate-case, which is already on main from openclaw#207505 and not in this diff. - Tests: `src/agents/tool-search.repeatable.test.ts`, `src/infra/cli-root-options.test.ts`, `extensions/codex/src/app-server/dynamic-tool-profile.test.ts`, `test/scripts/compose-installed-runtime.test.ts` pass. - Diff: +8 / -31. Co-authored-by: Ayaan Zaidi <[email protected]>
What Problem This Solves
The scheduled
check-dependenciesjob (pnpm deadcode:report, hard-zero unused exports) has failed on main in each of the last 10 hourly runs withUnused exports are not allowed. The job does not run on pull requests, so changes that left an export without a reader merged green and turned main red.Reproduced on main 239a05e:
pnpm deadcode:reportexits 1 with five findings.Fix
Each finding is removed or narrowed at its module:
cli-root-options.mjsgetCommandOptionsWithRootOptions.d.mtsdeclaration and the options-return mode of the shared parser that only it usedextensions/codex/src/app-server/dynamic-tool-profile.tsshouldDisableCodexToolSearchForModelsrc/agents/harness/types.tsAgentHarnessSideQuestionRequestAgentHarnessSideQuestionParamsV2)src/agents/tool-search-catalog-visibility.tsCORE_TOOL_CATALOG_FAMILIESsrc/config/sessions/session-pending-input-history.types.tsPendingInputHistoryRunStateNo behavior change: the remaining parser modes return the same values. No knip config change.
User Impact
None at runtime. Main's
check-dependenciesjob goes green again.Evidence
pnpm deadcode:reportexit 1, 5 unused exports.pnpm deadcode:reportexit 0, wall 102.4 s locally (script, production and full-tree scans all pass).pnpm check:changed: typecheck all, dead export scan, format and the other guards pass. Lint's single error isui/config/control-ui-chunking.ts:178no-duplicate-case, which is already on main from fix(control-ui): keep Chat startup within its asset budget #207505 and not in this diff.src/agents/tool-search.repeatable.test.ts,src/infra/cli-root-options.test.ts,extensions/codex/src/app-server/dynamic-tool-profile.test.ts,test/scripts/compose-installed-runtime.test.tspass.