chore(cleanup): apply codebase-design deep-module pass across the monorepo
Merged
WA
17d ago+1298+1298+0123456789012345678901234567890123456789-17546-17546-01234567890123456789012345678901234567890123456789
Summary
- Deep-module cleanup pass (deletion test, single-adapter seams, pass-throughs) applied repo-wide: delete modules that fail the deletion test, remove single-adapter seams and one-line pass-throughs, and concentrate logic that was copied across callers into one module
- Dead code removed (mostly orphaned by the mothership v1.0.0 cutover):
lib/platform-context, workflow VFS use cases, unreachable Copilot table/workflow handlers, credential-group invite use cases, table group/column/import use cases, workspace-file orchestration,scheduled-tasks/utils, ~150 unused exports and the mocks/tests that only covered them - Removed the dead
isInternalRequestadmission bypass in v2 routes — nothing in production marks requests internal, so every request already took the rate-limited path - Deepened shared modules:
resolvePrincipalWorkflowContextreplaces 16 copies of the workflow context resolvergetCredentialAccessTokenreplaces 13 copies of the credential→token lookup in webhook subscriptions;toRecordreplaces 26providerConfigcastsbuildJsonSchemaResponseFormatreplaces the response_format literal in 11 providersescapeLikePattern(@sim/utils/string) replaces 6 LIKE-escape copies; file sniffer reuses zip-guard EOCD parsing- Subflow node-id codec exports its functions directly; ~25 forwarders removed
- App now uses
@sim/workflow-persistencesubflow helpers,@sim/auth/principalanonymous user, and@sim/workflow-renderertile color instead of local copies - Shared
@sim/utilshelpers replace ~40 inlinetoRecord/isRecordLike/sleep/toErrorcopies
- Behavior change: a malformed (non-object) webhook
providerConfignow reads as{} - Follow-up: the
table-updatebackground task now has no producer; kept one release so in-flight runs drain
Type of Change
- Chore / refactor (no intended behavior change)
Testing
bunx turbo run type-check(26/26),bun run lint,bun run check:audits(54/54), block-registry check,docs-manifest:check- Full apps/sim vitest suite (3,255 files, 34,516 tests) and all package test suites (18/18)
- Six independent audits re-verified reachability of every deletion (string ids, dynamic imports, mocks, Chat tool catalog) and byte-identical behavior of every consolidation; their fixes are included
Checklist
- Code follows project style guidelines
- Self-reviewed my changes
- Tests added/updated and passing (new tests pass the
test-auditauthoring gate) - No new warnings introduced
- I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)
🤖 Generated with Claude Code