Repository navigation
fix: clear false unused-export failure for transcript workers - #174498
Conversation
The lazy registry cutover in 6f281b1 (#174420) retained all transcript read handlers, but moved their namespace access behind Promise.all. Dependency analysis then reported the live transcriptReadOperations table as unused. Select the named read and write tables inside their dynamic import continuations before joining them. Preserve lazy concurrent loading, all 18 read and six write handlers, and the read-then-write merge order. Do not delete the live export or add a Knip ignore. The real registry registers all 18 pre-cutover read operation names both before and after. Core types, lint, formatting, and P2 review pass. Production and script unused-export scans are clean; the full-tree scan retains only the pre-existing Discord findings covered by #174482.
|
🦞👀 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 SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex review: needs maintainer review before merge. What this changesThis PR selects transcript operation tables inside their dynamic-import continuations so dependency analysis recognizes their consumers. Example: A developer runs pnpm deadcode:exports.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Regression provenancePossible regression — suspected (reviewed change). No predecessor PR is attributed. Merge readiness✅ Ready for maintainer review Keep open: this maintainer-authored PR provides a focused dependency-analysis fix that current main still lacks; review found no actionable defects. Priority: P3 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherThe shared-state worker routes typed commands through a lazy domain registry to transcript database handlers and returns their results. flowchart TD
A[State worker commands] --> B[Lazy operation registry]
B --> C[Transcript domain loader]
C --> D[Read operation table]
C --> E[Write operation table]
D --> F[Existing database handlers]
E --> F
Technical reviewBest possible solution: Use the existing lazy registry with directly selected named tables, preserving every handler and the existing loading order. Do we have a high-confidence way to reproduce the issue? The maintainer reports the dependency-scan reproducer and its clearance; source confirms the affected import pattern, but this read-only review did not rerun the scanner. Is this the best way to solve the issue? The change follows the registry's existing named-export loading pattern and fixes analyzer visibility without suppressions, deleted handlers, or another dispatch path. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against f2478e569a15. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
PR surfaceSource 0. Total 0 across 1 file. Added test files: 0. View PR surface stats
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 October 16, 2026, 2:03 PM ET / 18:03 UTC. |
…aw#174498) The lazy registry cutover in 250fe51 (openclaw#174420) retained all transcript read handlers, but moved their namespace access behind Promise.all. Dependency analysis then reported the live transcriptReadOperations table as unused. Select the named read and write tables inside their dynamic import continuations before joining them. Preserve lazy concurrent loading, all 18 read and six write handlers, and the read-then-write merge order. Do not delete the live export or add a Knip ignore. The real registry registers all 18 pre-cutover read operation names both before and after. Core types, lint, formatting, and P2 review pass. Production and script unused-export scans are clean; the full-tree scan retains only the pre-existing Discord findings covered by openclaw#174482.
What Problem This Solves
Dependency checks incorrectly report the live transcript read-handler table as unused after the lazy worker-registry cutover in #174420.
User Impact
No user-visible runtime change. All 18 transcript read handlers and six write handlers remain registered, with the same lazy concurrent loading and merge order.
Why This Change Was Made
Select the named operation tables directly in each dynamic-import continuation before joining them. This makes the existing consumer visible to dependency analysis without deleting required handlers or adding an ignore.
Evidence
--maxWorkers=1: 55 completed on Bun and the remaining 28 on the CI-default Node runtime. The initial Bun invocation was stopped after diagnosing a separate large-input parser slowdown; it is not counted as a complete passing invocation.deadcode:exportsclears this finding; production and script scans have zero entries. The full-tree scan still reports only the pre-existing Discord namespace pair covered by fix: repair runtime hygiene checks after recent refactors #174482.