Skip to content

chore(deadcode): remove stale Knip config scaffolding - #122069

Merged
steipete merged 1 commit into
mainfrom
steipete/cleanup-sweep-aug11
Aug 11, 2026
Merged

steipete merged 1 commit into
mainfrom
steipete/cleanup-sweep-aug11

Conversation

@steipete

Copy link
Copy Markdown
Contributor

What Problem This Solves

Removes stale Knip configuration scaffolding that duplicated three already-registered audit entrypoints and left two comments describing an export suppression that no longer exists.

Why This Change Was Made

The audit entrypoints were first registered by #108648 (906c7332d20) and then accidentally repeated by #108717 (7e1d93d36d7). The collection-review suppression was added in db879e73fa9; #121751 (9175530fc1a) localized that helper and removed the suppression key but left its comments behind. This change removes only those redundant lines and leaves the canonical entries and current suppressions unchanged.

AI-assisted cleanup. No agent transcript is included.

User Impact

No runtime or user-visible behavior changes. The dead-code scanner configuration is smaller and has one canonical declaration for each affected entrypoint.

Production LOC: +0/-0 (net 0) | Tests: +0/-0 | Configuration: +0/-6

Evidence

  • pnpm deadcode:exports — production, full-tree, and script unused-export scans all passed with 0 findings.
  • pnpm deadcode:full — passed with 0 findings.
  • node scripts/check-changed.mjs — passed the tooling lane; remote providers were unavailable, so the repository wrapper used its documented local fallback.
  • git diff --check — passed.
  • Structured autoreview — clean; no accepted/actionable findings.

@clawsweeper

clawsweeper Bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

@steipete
steipete marked this pull request as ready for review August 11, 2026 14:23
@openclaw-barnacle openclaw-barnacle Bot added size: XS maintainer Maintainer-authored PR labels Aug 11, 2026
@steipete steipete self-assigned this Aug 11, 2026
@clawsweeper

clawsweeper Bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 11, 2026, 10:52 AM ET / 14:52 UTC.

ClawSweeper review

What this changes

This PR removes three duplicated Knip scan-root entries and three obsolete comments from the internal dead-code audit configuration.

Merge readiness

⚠️ Ready for maintainer review - 2 items remain

Keep this maintainer PR open: current main still contains the duplicate roots and stale comment, while the branch preserves one canonical declaration for every audit configuration. No source-level correctness finding; exact-head CI needs to be green before merge.

Priority: P3
Reviewed head: 0f50ba6792c933ec9c1b048bb5b80f646a97cba1

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) The patch is a focused source-proven cleanup, with exact-head CI refresh remaining the only merge gate.
Proof confidence 🌊 off-meta tidepool Not applicable: This maintainer-authored, tooling-only cleanup is outside the external contributor real-behavior-proof gate; the PR body also records after-change dead-code command results.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This maintainer-authored, tooling-only cleanup is outside the external contributor real-behavior-proof gate; the PR body also records after-change dead-code command results.
Evidence reviewed 7 items Current duplicate declarations: Current main declares the three command-line Knip configuration roots at lines 123-126 and repeats the same three entries at lines 193-196; the PR removes only the second group.
Audit command contract: The production, full-tree, and script export scans pass these configuration files through explicit --config arguments, so retaining the first group preserves all three command-line roots.
Existing regression coverage: The focused dead-code test imports the configuration and asserts that all three roots remain present; it intentionally tests presence rather than duplicate cardinality, so this deletion needs no implementation-coupled test.
Findings None None.
Security None None.

How this fits together

Knip configuration declares executable roots and intentional unused-export exceptions for repository dead-code audits. Package scripts and audit wrappers load these configurations and report findings to maintainers.

flowchart LR
  A[Dead-code commands] --> B[Knip configurations]
  B --> C[Declared scan roots]
  B --> D[Export exceptions]
  C --> E[Knip analysis]
  D --> E
  E --> F[Maintainer audit result]
Loading

Before merge

  • Resolve merge risk (P1) - The PR changes automation-owned Knip configuration and its exact head has failed checks-node-compact-small-1 and openclaw/ci-gate in the supplied check state; merge only after that failure is attributed or a refreshed exact-head run is green.
  • Complete next step (P2) - No mechanical repair is identified; ordinary maintainer handling should resolve or refresh the failed exact-head CI before merge.
Agent review details

Security

None.

PR surface

Other -6. Total -6 across 1 file.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 0 0 0 0
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 1 0 6 -6
Total 1 0 6 -6

Review metrics

Metric Value Why it matters
Production versus test LOC production/tooling -6, tests 0 The branch reduces only internal audit configuration and comments, with no runtime or test-surface growth.

Merge-risk options

Maintainer options:

  1. Refresh the dead-code CI result (recommended)
    Diagnose or rerun the failed exact-head CI after updating from current main, then merge only if the audit configuration still produces clean scans.

Technical review

Best possible solution:

Land the deletion once an exact-head dead-code CI run confirms the three configuration roots remain declared once each and all audit scans stay clean.

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

Not applicable: this is a static tooling cleanup, and source inspection directly shows the duplicate declarations on current main.

Is this the best way to solve the issue?

Yes: deleting only the second repeated declarations and obsolete comments is the narrowest maintainable fix; a cardinality-only test would duplicate the scanner’s configuration behavior without protecting a separate contract.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 6472d22a77f4.

Labels

Label changes:

  • add P3: This is a small internal dead-code-audit cleanup with no intended user-visible behavior change.
  • add merge-risk: 🚨 automation: The changed file is consumed by dead-code CI, and the supplied exact-head check state includes a failed CI gate.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.

Label justifications:

  • P3: This is a small internal dead-code-audit cleanup with no intended user-visible behavior change.
  • merge-risk: 🚨 automation: The changed file is consumed by dead-code CI, and the supplied exact-head check state includes a failed CI gate.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.

Evidence

What I checked:

  • Current duplicate declarations: Current main declares the three command-line Knip configuration roots at lines 123-126 and repeats the same three entries at lines 193-196; the PR removes only the second group. (config/knip.config.ts:123, 6472d22a77f4)
  • Audit command contract: The production, full-tree, and script export scans pass these configuration files through explicit --config arguments, so retaining the first group preserves all three command-line roots. (scripts/check-deadcode-exports.mts:10, 6472d22a77f4)
  • Existing regression coverage: The focused dead-code test imports the configuration and asserts that all three roots remain present; it intentionally tests presence rather than duplicate cardinality, so this deletion needs no implementation-coupled test. (test/scripts/check-deadcode-exports.test.ts:80, 6472d22a77f4)
  • Companion configuration inheritance: The full-tree and script-specific configurations import the production configuration, making the root list the shared owner of this declaration. (config/knip.all-exports.config.ts:12, 6472d22a77f4)
  • Current-line provenance: Blame assigns both duplicate blocks on current main to the current configuration introduction commit; earlier related commits could not be inspected locally because the partial clone required an unavailable network fetch. (config/knip.config.ts:193, 79016b415ad9)
  • Dependency inspection boundary: The changed configuration is consumed by Knip 6.8.0 via pnpm dlx; no local Knip source was installed and GitHub access was unavailable, so only exact-head CI can independently validate the analyzer result. (package.json:1584, 6472d22a77f4)

Likely related people:

  • Ayaan Zaidi: Current-main blame attributes both duplicate blocks to the commit that introduced the present configuration file. (role: recent area contributor; confidence: high; commits: 79016b415ad9; files: config/knip.config.ts)
  • steipete: The supplied related merged PR metadata identifies prior work that established and expanded these audit roots. (role: related dead-code configuration contributor; confidence: medium; commits: 906c7332d209, 7e1d93d36d76, 9175530fc1a6; files: config/knip.config.ts, test/scripts/check-deadcode-exports.test.ts)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Resolve or rerun the failed exact-head CI before merge.

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

@steipete
steipete merged commit 1ccd701 into main Aug 11, 2026
254 of 265 checks passed
@steipete
steipete deleted the steipete/cleanup-sweep-aug11 branch August 11, 2026 15:15
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintainer Maintainer-authored PR size: XS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant