Skip to content

fix: restore the main dead-export gate - #195158

Merged
steipete merged 1 commit into
mainfrom
steipete/perf-micro-main-dead-export-regressions-20260919
Nov 8, 2026
Merged

steipete merged 1 commit into
mainfrom
steipete/perf-micro-main-dead-export-regressions-20260919

Conversation

@steipete

@steipete steipete commented Nov 8, 2026

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes pnpm check:changed failing on main because six unused exports reached the hard-zero Knip gate in #195099, #195061, and #195064.

User Impact

The dead-export portion of local validation passes again. Runtime behavior is unchanged; no configuration, schema, dependency, or public SDK changes.

Why This Change Was Made

Keep the npm evidence filename, containment reason type, sync canonicalizer, and GC helper private. Exercise synchronous containment through the existing realpathViaExistingPrefixSync API and delete two uncalled retention assertion wrappers.

Production Knip already excludes src/test-utils/**; the full-tree pass includes test entries and correctly finds the retention wrappers unused on main. Tests with matching names use different helpers. Open #195091 introduces future consumers and will need to bring the helpers with that change if it lands after this PR. No Knip configuration, ignores, baselines, or allowlists are changed.

The gate is deferred in ordinary PR CI, not exclusively local: scripts/ci-build-manifest.mjs omits the dependencies row for ordinary PRs, while hourly main and full release validation run it. That allows a green PR to introduce these main regressions.

Evidence

  • Exact main 3a25991e37c4bad581b34ebf19f0b9b3e036b5cf: two scans reproduce the same six symbols. The existing gate is the red-before/green-after regression proof.
  • Repaired production, full-tree, and script scans: all pass with zero entries.
  • 52 focused tests pass: containment (6), npm evidence reuse (41), queue/timer retention (5). Wrapper wall time 40.87s, including first-use worker compilation; containment file 1.12s / 63ms test body time. CI seconds pending.
  • Codex autoreview through P2: scoped-clean, no findings. Simplification pass retained only four files: production LOC delta 0, test/support delta -10.
  • A/A scan wall times 125.77s / 168.90s; CPU 301.79s / 328.90s; maximum RSS 3,295,117,312 / 3,245,457,408 bytes. Repaired scan 124.26s wall, 299.21s CPU, 3,277,225,984 bytes maximum RSS. These are scanner measurements on a shared host, not a runtime speed or allocation claim.
  • pnpm check:changed --timed retains an unrelated changelog-attribution failure: 20 identical violations reproduced in an untouched worktree at the exact main parent above. 266a7aa0fe69 (fix(release): align attribution gate with human credit policy #194364) added steipete-oai / roboclaw-bot to the forbidden handles without reconciling existing archived entries. This is an unresolved main regression, not a passing aggregate check; no changelog files were changed here.
  • Final check:changed result: every other selected check passed, including formatting, core/script lint, production/test typechecks, and a second zero-finding dead-export scan (132.43s). The changelog-attribution guard is the sole failure.
  • Final main refresh still points to 3a25991e37c4bad581b34ebf19f0b9b3e036b5cf; no newer dead exports appeared.

Keep module-local evidence, containment, and GC symbols private. Test synchronous containment through its public path API and remove uncalled retention assertions. Runtime behavior is unchanged.
@clawsweeper

clawsweeper Bot commented Nov 8, 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.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 8, 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-08T09:53:34.846999Z 50342d4 PR opened
ℹ️ 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 scripts Repository scripts size: XS labels Nov 8, 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. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. 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 8, 2026
@clawsweeper

clawsweeper Bot commented Nov 8, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR makes unused internal symbols private, removes two uncalled retention helpers, and tests synchronous containment through its existing consumer API.

Example: A developer runs pnpm check:changed on main.

  • Before: The dead-export gate reports six unused symbols.
  • After: The PR reports zero dead-export findings; the unrelated changelog-attribution failure remains.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The narrow patch has no identified defect; execution confidence rests on reported CLI results rather than inspectable raw captures.
Proof confidence 🦐 gold shrimp (3/6) This maintainer-authored tooling repair is outside the ordinary contributor proof gate; its body reports actual before-and-after Knip and check:changed execution, without attached raw captures.
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 failing dead-export check on main despite having made no export-related changes.
Reason: The maintainer-authored repair restores an existing validation contract 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 narrowly repairs unused exports still present on current main, with no actionable correctness finding.

Priority: P3
Reviewed head: 50342d4a74822dd2ce5df79f59659873446d0426

Before merge

None.

Findings

None.

Agent review details

How this fits together

Repository validation scans production, test-support, and script imports with Knip and rejects unused exports; this change narrows those modules without changing runtime operations.

flowchart LR
  A[Changed-file validation] --> B[Dead-export gate]
  B --> C[Production scan]
  B --> D[Full-tree scan]
  B --> E[Script scan]
  C --> F[Unused-symbol verdict]
  D --> F
  E --> F
Loading

Technical review

Best possible solution:

Keep the existing hard-zero gate and remove only unused internal exports while preserving current consumer APIs.

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

The unused exports and unchanged hard-zero gate establish the source-level failure path, supported by the author's parent-versus-head scan results; this read-only review executed no target code.

Is this the best way to solve the issue?

The patch is the smallest complete repair: it removes unused visibility and wrappers at their existing owners without adding ignores, duplicate implementations, or replacement machinery.

AGENTS.md: found and applied where relevant.

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

Provenance checked

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

  • Pinned introduced patch: The patch changes export visibility, deletes uncalled assertion wrappers, and redirects the existing containment assertions through realpathViaExistingPrefixSync; executable production logic remains intact. (src/infra/path-containment.ts:132, 50342d4a7482)
  • Existing gate contract: The unchanged gate requires zero findings across production, full-tree, and script scans; its diagnostic explicitly recommends deleting unused exports or modeling real consumers. (scripts/check-deadcode-exports.mts:94, 50342d4a7482)
  • Current-main implementation: Fetched main retains the same affected module contents as the PR parent, including the six unused exports. (cf376b0d000a)
  • Consumer search: Repository-wide references confirm that the removed retention assertions have no current consumers; identically named helpers belong to other modules. (src/test-utils/retention.ts:19, 50342d4a7482)
  • Related caller migration: fix(test): make retention checks portable across runtimes #195091 introduces future retention consumers, including SDK test-env re-exports; this PR explicitly documents that the migration must restore its needed helpers if it lands afterward. (src/test-utils/retention.ts:19, 50342d4a7482)
  • Reported validation: The complete PR body reports failing parent scans, passing repaired scans, and 52 passing focused tests; it separately identifies the aggregate changelog-attribution failure rather than claiming check:changed passed. (50342d4a7482)

Likely related people:

  • Peter Steinberger: Raw commit 754b41c adds src/test-utils/retention.ts:9 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 754b41c65df0; files: src/test-utils/retention.ts)
  • Ayaan Zaidi: Raw commit ce840d8 adds src/infra/path-containment.ts:28 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: ce840d8a8290; files: src/infra/path-containment.ts)
  • Dallin Romney: Raw commit c9e6370 adds scripts/plugin-npm-evidence-reuse.mjs:8 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: c9e6370bb191; files: scripts/plugin-npm-evidence-reuse.mjs)

PR surface

Source 0, Tests -10, Other 0. Total -10 across 4 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 1 2 2 0
Tests 2 5 15 -10
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 1 1 1 0
Total 4 8 18 -10

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 development validation without changing shipped runtime behavior.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp 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 development validation without changing shipped runtime behavior.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp 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 8, 2026, 5:07 AM ET / 10:07 UTC.

@steipete
steipete merged commit 7250eb4 into main Nov 8, 2026
278 of 307 checks passed
@steipete
steipete deleted the steipete/perf-micro-main-dead-export-regressions-20260919 branch November 8, 2026 11:04
steipete added a commit that referenced this pull request Nov 8, 2026
#195158 un-exported forceFullGc and removed expectCollected as dead while #195091 concurrently added consumers (plugin-sdk/test-env, gateway session-collection test support, prepared-model-catalog inspection worker), breaking prod/test typecheck on main. Restore both exports; keep expectLiveObjects module-local so the dead-export scan stays clean.
vincentkoc added a commit that referenced this pull request Nov 8, 2026
…tooling-lint-selection-20261108

* commit 'b0e90e6a4b359fff7756698067fdce4758b1907b': (38 commits)
  fix(android): Talk button demands a realtime provider on a native Talk setup (#191194)
  chore: trace first-run Gateway work and verify later replies (#195185)
  fix(knowledge): keep deleted messages out of reply previews (#195126)
  fix(agents): preserve streamed replies across Gateway restarts (#195164)
  perf(ci): reuse SDK transport path boundaries (#195180)
  fix(sandbox): avoid pauses for unchanged command checkpoints (#195120)
  fix(test): make retention checks portable across runtimes (#195091)
  fix(knowledge): clarify temporal kind filters (#194995)
  improve: reduce Gateway allocation while draining SQLite receipts (#195129)
  fix: reduce streaming CPU after reply and voice directives (#195145)
  fix: reduce Markdown reparsing during streamed tool-call checks (#195161)
  fix: restore the main dead-export gate (#195158)
  improve(ci): pack small UI selections into fewer jobs (#195107)
  fix(muse): quota and sign-in failures end with no reply (#195148)
  fix: allow first release push with shipped patch bytes (#195174)
  fix(ci): narrow single-config tooling selections (#195147)
  fix(packaging): reject incompatible prepublish plugin cohorts (#195152)
  fix(ci): prepare verified Bun before parity checks (#195155)
  fix: Incognito agent turns stall before execution (#195005)
  fix: credentialed search and speech providers work without picking a provider (#195169)
  ...
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 9, 2026
Keep module-local evidence, containment, and GC symbols private. Test synchronous containment through its public path API and remove uncalled retention assertions. Runtime behavior is unchanged.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 9, 2026
openclaw#195158 un-exported forceFullGc and removed expectCollected as dead while openclaw#195091 concurrently added consumers (plugin-sdk/test-env, gateway session-collection test support, prepared-model-catalog inspection worker), breaking prod/test typecheck on main. Restore both exports; keep expectLiveObjects module-local so the dead-export scan stays clean.
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: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. scripts Repository scripts 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