Skip to content

fix: clear false unused-export failure for transcript workers - #174498

Merged
steipete merged 1 commit into
mainfrom
ci/fix9-transcript-read-20261016
Oct 16, 2026
Merged

steipete merged 1 commit into
mainfrom
ci/fix9-transcript-read-20261016

Conversation

@steipete

Copy link
Copy Markdown
Contributor

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

  • The real registry exposes all 18 read operations from the pre-cutover dispatcher before and after this change; unknown operation names remain rejected.
  • 83 distinct cases across seven worker/transcript suite files passed with --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.
  • The unchanged JSON parser handles the 4 MiB synthetic input in about 15 ms on Node, but exceeds the bounded 5-second diagnostic window on Bun; the original Bun test process remained CPU-active for several minutes. No assertion, test timeout, runtime default, or parser source was changed.
  • Core tsgo, targeted lint, boundary lint, formatting, diff checks, and independent P2 review passed. The relevant worker bundle rebuilt successfully.
  • deadcode:exports clears 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.

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

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

@steipete
steipete marked this pull request as ready for review October 16, 2026 17:47
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-16T17:49:55.749751Z 4dac46b 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.

@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 Oct 16, 2026
@clawsweeper

clawsweeper Bot commented Oct 16, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR selects transcript operation tables inside their dynamic-import continuations so dependency analysis recognizes their consumers.

Example: A developer runs pnpm deadcode:exports.

  • Before: The reported scan incorrectly flags transcriptReadOperations as unused.
  • After: The reported scan clears that finding while retaining all 18 read and six write handlers.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, source-verified repair supported by reported analyzer and registry validation, with no identified defects.
Proof confidence 🐚 platinum hermit (4/6) This maintainer-authored, behavior-preserving analysis repair is outside the ordinary contributor proof gate; supplied evidence reports the actual dependency scan and real-registry checks.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: Developers encounter a false unused-export failure for a live transcript handler table.
Reason: The maintainer-authored direction addresses a concrete tooling failure with a small behavior-preserving change.

Regression provenance

Possible 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
Reviewed head: 4dac46b5b7baf8bb4269ac7d6f299b77c42b8f53

Before merge

None.

Findings

None.

Agent review details

How this fits together

The 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
Loading

Technical review

Best 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

  • Transcript domain loading keeps the original intent (6f281b1: Complete lazy domain routing and remove the eager fallback dispatcher while retaining transcript reads and writes.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

  • Pinned introduced change: The introduced hunks change only table selection: both dynamic imports remain concurrent, and the read-then-write spread order is preserved. (src/state/openclaw-state-worker-registry.ts:110, 4dac46b5b7ba)
  • Current main retains the affected form: Fetched main still selects transcriptReadOperations and transcriptWriteOperations after Promise.all resolves. (src/state/openclaw-state-worker-registry.ts:110, f2478e569a15)
  • Original lazy-loading intent preserved: perf(state): reduce shared SQLite worker heap retention #174420 introduced the combined transcript loader to remove eager fallback loading; this PR retains that design. (src/state/openclaw-state-worker-registry.ts:110, 6f281b1d0727)
  • Complete supplied validation: The full PR body reports clearance of the transcript export finding, real-registry operation checks, focused suite passes, and a rebuilt worker bundle; it distinguishes the interrupted Bun invocation from completed validation. (4dac46b5b7ba)
  • Exact-head CI remains pending: Type, lint, source-contract, architecture, and changed-test checks pass; PostgreSQL conformance remains in progress and openclaw/ci-gate remains pending. No diff-caused failing check was established. (4dac46b5b7ba)
  • Inspection limits: Older history traversal encountered unavailable objects, but the responsible change and current-main blame were readable; CI log downloads redirected to a blocked artifact host, so raw scan output was not inspected.

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 repairs a false static-analysis finding without changing user-visible runtime 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 a false static-analysis finding without changing user-visible runtime 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 October 16, 2026, 2:03 PM ET / 18:03 UTC.

@steipete
steipete merged commit 0708aa9 into main Oct 16, 2026
205 of 209 checks passed
@steipete
steipete deleted the ci/fix9-transcript-read-20261016 branch October 16, 2026 18:09
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 17, 2026
…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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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