Skip to content

gut(config): remove dead config schemas for gutted systems (#2302)#2329

Merged
alexey-pelykh merged 1 commit intomainfrom
gut/2302-dead-config-schemas
Apr 12, 2026
Merged

gut(config): remove dead config schemas for gutted systems (#2302)#2329
alexey-pelykh merged 1 commit intomainfrom
gut/2302-dead-config-schemas

Conversation

@alexey-pelykh
Copy link
Copy Markdown

Summary

Removes dead Zod schemas, TypeScript types, help text, labels, and legacy migration rules for three gutted subsystems:

  • Memory system: MemorySchema, MemoryQmd* helpers, MemorySearchSchema, MemorySearchConfig type
  • Web search/fetch: ToolsWebSearchSchema, ToolsWebFetchSchema, ToolsWebSchema
  • Pi orchestrator: embeddedPi schema

Zod compat stubs (z.unknown().optional()) are kept at every config field
location so existing user configs with memory.*, memorySearch.*,
tools.web.*, or embeddedPi.* sections still parse after upgrade. Same
pattern used by #2291 before upstream sync #2298 re-introduced the schemas.

Scope note — follow-up required

ToolsConfig.web? TypeScript shape is intentionally preserved because
upstream-synced runtime consumers still read tools.web.search/fetch fields:

  • src/commands/onboard-search.ts (325 LOC)
  • src/commands/onboard-search.test.ts (291 LOC)
  • src/commands/configure.wizard.ts (web search wizard UI)
  • src/security/audit-extra.sync.ts (web secrets audit)
  • src/wizard/onboarding.finalize.ts (web onboarding finalize)

The Zod schema is gutted (parsed as unknown), and the full removal of
those consumers is out of scope for this gut item — it's a runtime
consumer removal, not a config schema cleanup. Marked with @deprecated
JSDoc. Follow-up gut item for removing these consumers will be tracked.

Diff

  • 12 files changed, 29 insertions, 827 deletions (net -798)
  • All changes scoped to src/config/
  • No changes to runtime code, CLI, or plugin system

Test plan

  • pnpm check (format + typecheck + lint) passes
  • Full test suite: 746 files, 6503 tests, 2 skipped — all green
  • Updated tests: schema.help.quality.test, schema.hints.test, config.legacy-config-detection.accepts-imessage-dmpolicy.test
  • Existing configs with memory, memorySearch, tools.web, embeddedPi still parse (stubs)

Closes #2302

🤖 Generated with Claude Code

Remove dead Zod schemas, TypeScript types, help text, labels, and legacy
migration rules for three gutted subsystems: memory (MemorySchema /
MemoryQmd* / MemorySearchSchema), web search/fetch (ToolsWebSearchSchema /
ToolsWebFetchSchema / ToolsWebSchema), and Pi orchestrator (embeddedPi).

Zod compat stubs (`z.unknown().optional()`) are kept at every config field
location so existing user configs with memory/web/embeddedPi sections still
parse after upgrade — same pattern used by #2291 before upstream sync #2298
re-introduced the schemas.

Scope note: `ToolsConfig.web?` TypeScript shape is intentionally preserved
because upstream-synced runtime consumers (`onboard-search.ts`,
`configure.wizard.ts`, `audit-extra.sync.ts`, `wizard/onboarding.finalize.ts`)
still read `tools.web.search/fetch` fields. The Zod schema is gutted (parsed
as `unknown`), and the full removal of those consumers is tracked as
follow-up work. Marked with `@deprecated` JSDoc.

Tests updated: drop memorySearch assertions from `schema.help.quality.test`,
`schema.hints.test`, and the legacy config detection test.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@alexey-pelykh alexey-pelykh merged commit 74026fe into main Apr 12, 2026
10 checks passed
@alexey-pelykh alexey-pelykh deleted the gut/2302-dead-config-schemas branch April 12, 2026 23:17
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.

gut: remove dead config schemas for gutted systems (MBP audit)

1 participant