Skip to content

background hazards

Claude edited this page Sep 23, 2026 · 1 revision

Hazards and pitfalls

Each hazard below is grounded in the file that creates it.

  • ModelId and LLMProviderName are different namespaces. lib/transform/schemas.ts warns in its header that Transform model ids ('claude-sonnet') are not provider registry names ('CLAUDE'), and says not to mix them. Reconciliation is tracked under the P2 migration. lib/constants.ts carries a related note, // Re-exports for transform feature components, over its MODELS/MODES re-exports, so a value imported from there is Transform-shaped, not provider-shaped.
  • desktop/renderer/strings.ts must stay import-free. The file's header records that index.html resolves the id './strings' through a small require shim, so the module has no module graph of its own. Adding an import breaks that load path.
  • Do not widen the preload API. desktop/preload.ts exposes a fixed window.sentraDesktop surface through contextBridge. The narrow surface is the trust boundary; ordinary changes should not add channels or capabilities. See Security.
  • Standalone boundary scans reject hard-coded Monorepo or abyss paths. scripts/verify-structure.mjs scans desktop/, lib/, prisma/, scripts/, data/, and types/ for D:\DEV\Monorepo or D:\Devops\abyss-monorepo, and rejects workspace or parent dependencies. A top-level import from outside the capsule fails structural verification.
  • Keep the prompt-quality import edge one-way. lib/optimizer/coding-brief-format.ts is a pure lexical layer; it must not import lib/prompt-quality/contract.ts, which imports it. Reversing that edge creates an import cycle and costs the parser its unit-testability.
  • The NEXT-centric Supabase clients are partly unmounted. lib/supabase/server.ts, middleware.ts, and browser.ts have no importers in the desktop shell. Only lib/supabase/public.ts, admin.ts, and action.ts are wired in. Do not assume the server, middleware, or browser helpers are live code paths. See Dead ends.
  • lib/desktop/product-surface.ts has a stray compiled sibling. lib/desktop/product-surface.js is a compiled duplicate of the TypeScript file. Editing one without the other leaves them out of sync. See Dead ends.

Clone this wiki locally