Skip to content

chore: delete orphan lib modules - #6451

Merged
daggerstuff merged 4 commits into
stagingfrom
cursor/delete-orphan-lib-modules-2e7f
Nov 1, 2026
Merged

daggerstuff merged 4 commits into
stagingfrom
cursor/delete-orphan-lib-modules-2e7f

Conversation

@daggerstuff

Copy link
Copy Markdown
Owner

Summary

Pure subtraction: remove self-contained apps/web/src/lib/ trees that have no production importers outside their own directory (re-verified with ripgrep for path strings, @/lib/*, relative imports, configs, and test runners).

Deleted (importer check)

Tree Importer check
lib/metaaligner/** (~63 files) No imports outside the tree. Only scripts/testing/local-test-runner.mjs vitest bucket + large-file-baseline.json + .gitignore entry.
lib/deployment/multi-region/** (~18 files) No app imports; only eslint.config.js rule override, large-file-baseline.json, and backup script path excludes (unchanged).
lib/business-strategy/** (24 files) No imports; duplicate of apps/business-strategy-cms. Only .oxlintrc.json ignore entries.
lib/polyfills/** (19 files) No production imports; superseded by client-polyfills.js, Vite resolve.alias node shims, and public/polyfills/. Only naming-baseline.json pin.
lib/esm-compat/** (2 files) Zero references in repo (including astro.config.mjs aliases).
lib/auth-legacy.ts Zero import sites; only stale comments in auth modules (updated).
lib/logging.ts (root file) Duplicate of lib/logging/ directory. @/lib/logging is used in production; after deletion it resolves to lib/logging/index.ts (TS bundler resolution prefers the directory index once the sibling .ts file is gone).

Co-located tests under metaaligner/** were removed with their trees.

Kept (and why)

Path Reason
lib/arrays.ts, lib/async.ts Still re-exported from lib/utils.ts (export * from './async' / './arrays'). Production code imports @/lib/utils (e.g. cn). Audit note about “comments only” was incorrect.
lib/deployment/productionManager.ts Out of scope for this pass (not in candidate list); separate orphan.
types/deployment.ts Outside lib/; still re-exported from astro-components.d.ts.
lib/ai, lib/fhe, lib/ehr-native, lib/security, middleware Explicitly untouched per plan.

Config / hygiene

  • Removed metaaligner from local-test-runner.mjs lib-services bucket
  • Removed multi-region eslint override block
  • Removed business-strategy oxlint ignore patterns
  • Pruned large-file-baseline.json (135 → 123 entries) and naming-baseline.json polyfills pin
  • Removed .gitignore metaaligner explainability entry

Verification

  • pnpm lint — pass (Node 24.20.0)
  • pnpm build — pass
  • pnpm test:unit — same two pre-existing failures as staging (no new failures):
    • apps/web/src/lib/graphql/__tests__/graphql.test.ts (graphql-yoga / @graphql-tools/utils export)
    • apps/web/src/lib/api-versioning/__tests__/versioning.test.ts (6-month sunset month flake)

Stats

  • 127 source files deleted (+ 9 config/doc touch files)
  • ~46,056 net lines removed (per git diff --shortstat)
Open in Web Open in Cursor 

Remove self-contained trees with no production importers outside their
own directories: metaaligner, deployment/multi-region, business-strategy,
polyfills, esm-compat, auth-legacy shim, and duplicate root logging.ts.

Clean up vitest buckets, eslint/oxlint ignores, large-file and naming
baselines, and stale auth comments referencing removed paths.
@vercel

vercel Bot commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
pixelated Ready Ready Preview Nov 1, 2026 11:04pm UTC

Request Review

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, we are unable to review this pull request

The GitHub API does not allow us to fetch diffs exceeding 20000 lines

@github-actions

Copy link
Copy Markdown

px Advisor Review

Risk: unknown

No summary available

No findings.

@github-actions

Copy link
Copy Markdown

Lighthouse CI Results

Routes audited: /, /dashboard?perf=1, /training-session

Thresholds: Performance ≥90 | Accessibility ≥90 | Best Practices ≥85

Reports

  • lhr-1793434869783
  • lhr-1793434880927
  • lhr-1793434891695
  • lhr-1793434902050
  • lhr-1793434912335
  • lhr-1793434922593
  • lhr-1793434932917
  • lhr-1793434943239
  • lhr-1793434953562

Reports are also available as workflow artifacts

@github-actions

github-actions Bot commented Nov 1, 2026

Copy link
Copy Markdown

px Advisor Review

Risk: unknown

No summary available

No findings.

@github-actions

github-actions Bot commented Nov 1, 2026

Copy link
Copy Markdown

Lighthouse CI Results

Routes audited: /, /dashboard?perf=1, /training-session

Thresholds: Performance ≥90 | Accessibility ≥90 | Best Practices ≥85

Reports

  • lhr-1793573446225
  • lhr-1793573458824
  • lhr-1793573470840
  • lhr-1793573482129
  • lhr-1793573493404
  • lhr-1793573504657
  • lhr-1793573515931
  • lhr-1793573527190
  • lhr-1793573538417

Reports are also available as workflow artifacts

@github-actions

github-actions Bot commented Nov 1, 2026

Copy link
Copy Markdown

px Advisor Review

Risk: unknown

No summary available

No findings.

@github-actions

github-actions Bot commented Nov 1, 2026

Copy link
Copy Markdown

Lighthouse CI Results

Routes audited: /, /dashboard?perf=1, /training-session

Thresholds: Performance ≥90 | Accessibility ≥90 | Best Practices ≥85

Reports

  • lhr-1793574041545
  • lhr-1793574054287
  • lhr-1793574066560
  • lhr-1793574078067
  • lhr-1793574093173
  • lhr-1793574104564
  • lhr-1793574115945
  • lhr-1793574127280
  • lhr-1793574138585

Reports are also available as workflow artifacts

@github-actions

github-actions Bot commented Nov 1, 2026

Copy link
Copy Markdown

Lighthouse CI Results

Routes audited: /, /dashboard?perf=1, /training-session

Thresholds: Performance ≥90 | Accessibility ≥90 | Best Practices ≥85

Reports

  • lhr-1793574662618
  • lhr-1793574673710
  • lhr-1793574684504
  • lhr-1793574694886
  • lhr-1793574705308
  • lhr-1793574715719
  • lhr-1793574726105
  • lhr-1793574736454
  • lhr-1793574746828

Reports are also available as workflow artifacts

@github-actions

github-actions Bot commented Nov 1, 2026

Copy link
Copy Markdown

px Advisor Review

Risk: unknown

No summary available

No findings.

@daggerstuff
daggerstuff merged commit e097f4a into staging Nov 1, 2026
35 of 40 checks passed
@daggerstuff
daggerstuff deleted the cursor/delete-orphan-lib-modules-2e7f branch November 1, 2026 23:24
@linear-code

linear-code Bot commented Nov 1, 2026

Copy link
Copy Markdown
Contributor

PIX-4822

This branch was successfully deployed

1 active deployment
Preview — 983f83e5 Deployed Nov 1, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants