Skip to content

fix(ci): preserve offline build consumers in deadcode checks - #174358

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

steipete merged 1 commit into
mainfrom
ci/fix9-hygiene-20261016c

Conversation

@steipete

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes the hourly dependency check reporting live offline route inventories as unused after #174043, alongside four stale export declarations left by logging and fixture cleanup.

User Impact

Offline navigation keeps using the build-owned route inventory. Runtime behavior is unchanged.

Why This Change Was Made

Vite loads the route module through runnerImport, which Knip cannot infer. Model those actual property reads through the existing MJS compiler without disabling Vite discovery, changing TypeScript source resolution, or adding ignores. The model derives export names from the build source instead of maintaining an allowlist.

The Discord formatter and Teams threshold remain internally used after #174279 and #174260 removed their external logging consumers. Two fixture constants no longer need exports after #174255. This change only makes those four declarations private. I18nController was already removed by #174263; the offline-route audit found no other dead path from #174043.

Evidence

pnpm deadcode:exports changed from six findings to zero across all three scans (111.88s). Removing only the actual offline-prefix consumer made the production scan report exactly that export (59.41s); the original source was restored byte for byte.

pnpm test test/scripts/check-deadcode-exports.test.ts --maxWorkers=1 passed (11 cases, 5.67s). Existing route, emitted-build-inventory, and service-worker tests passed (64 UI cases); all 148 Discord, Teams, worker-session, and image cases passed (199.76s), including every importer of the changed test helpers. UI, tooling, Discord, Teams, Gateway, and media typecheck lanes passed. Targeted typed lint, boundary lint, and formatting passed.

No runtime build source, ignores, baselines, retries, or timeouts changed. PR CI supplies the broad proof.

P2 autoreview completed with no actionable findings.

Hourly 38916811035 reported the route inventories as unused, but Vite
loads them through runnerImport and embeds them in the offline shell.
Keep that runtime contract and model the actual named property reads in
Knip through its existing MJS compiler. Preserve Vite discovery and
TypeScript declaration-to-source mapping; add no ignores.

Make four remaining declarations private after #174279 and #174260
removed external logging consumers and #174255 consolidated fixtures.
Their internal callers and behavior remain intact. I18nController was
already removed by #174263.

Proof: all three deadcode export scans have zero findings; the original
baseline had six. The guard passes with pnpm test
test/scripts/check-deadcode-exports.test.ts --maxWorkers=1 (5.67s).
Existing route/build/cache tests and 148 owner/importer cases pass
(199.76s for the owner batch). Owning typechecks, typed lint, boundary
lint, and formatting pass. Negative control and P2 review recorded in
PR evidence.

P2 autoreview is scoped-clean with no actionable findings.
@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 15:15
@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-16T15:18:11.340286Z ab34723 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.

@openclaw-barnacle openclaw-barnacle Bot added channel: discord Channel integration: discord channel: msteams Channel integration: msteams gateway Gateway runtime size: S labels Oct 16, 2026
@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. labels Oct 16, 2026
@steipete
steipete merged commit 9151847 into main Oct 16, 2026
213 of 217 checks passed
@steipete
steipete deleted the ci/fix9-hygiene-20261016c branch October 16, 2026 15:29
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 17, 2026
…w#174358)

Hourly 38916811035 reported the route inventories as unused, but Vite
loads them through runnerImport and embeds them in the offline shell.
Keep that runtime contract and model the actual named property reads in
Knip through its existing MJS compiler. Preserve Vite discovery and
TypeScript declaration-to-source mapping; add no ignores.

Make four remaining declarations private after openclaw#174279 and openclaw#174260
removed external logging consumers and openclaw#174255 consolidated fixtures.
Their internal callers and behavior remain intact. I18nController was
already removed by openclaw#174263.

Proof: all three deadcode export scans have zero findings; the original
baseline had six. The guard passes with pnpm test
test/scripts/check-deadcode-exports.test.ts --maxWorkers=1 (5.67s).
Existing route/build/cache tests and 148 owner/importer cases pass
(199.76s for the owner batch). Owning typechecks, typed lint, boundary
lint, and formatting pass. Negative control and P2 review recorded in
PR evidence.

P2 autoreview is scoped-clean with no actionable findings.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

channel: discord Channel integration: discord channel: msteams Channel integration: msteams 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. gateway Gateway runtime size: S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant