Skip to content

refactor: development baseline cleanup (shared contracts, dead code removal, 3 fixes) - #196

Open
anantham wants to merge 17 commits into
mainfrom
codex/development-baseline
Open

anantham wants to merge 17 commits into
mainfrom
codex/development-baseline

Conversation

@anantham

@anantham anantham commented Nov 9, 2026

Copy link
Copy Markdown
Owner

Code-quality cleanup from the eight-agent pass (Codex, local branch, now published). Net 112 files, +1800/−2683.

Behaviour fixes

  • fix(settings): template read failures now reach callers instead of being swallowed.
  • refactor(comparison): callers now report parsing failures, and an unreachable serialization fallback is gone.
  • refactor(image): provider and persistence types are enforced.

Structure

  • Shared contracts: application types, benchmark artifacts, sutta skeleton validation, scoring primitives, and diff paragraph normalisation.
  • Store access is passed into the import and cache services instead of being reached globally.
  • Removed verified-unused helpers and the legacy transformation adapter, and added a Knip audit.
  • Docs: stale implementation narration is replaced with the current contracts.

Review: an independent branch triage (5 Nov) found it merges cleanly onto main and typechecks. The first commit (5408637) is the local-main baseline it was built on.

🤖 Generated with Claude Code

Remove unreferenced blob batch, configuration, image-capability and OpenRouter catalog helpers, an unused Sutta barrel and obsolete mock utilities. Preserve manually invoked scripts and HTML/extension entry points in the Knip graph.

Tests: Node 24 typecheck; 13 focused provider/export tests; configured Knip reports no unused files or dependencies.
Reuse canonical persistence, glossary, image cache, provider, diff and diagnostics types. Move word alignment data contracts into a dependency-free type module. Preserve existing structural shapes and type exports.

Validated with Node 24 tsc, 41 focused tests, and identical emitted JavaScript for all 17 edited source files. Collective worklog is maintained by the integration owner.
Preserve loaded templates and avoid bootstrapping defaults after a failed database read. Remove duplicate service catch-and-rethrow wrappers while keeping caller-owned reporting and storage recovery.

Validation: four failure regressions fail before the fix; 58 focused tests pass afterward; Node 24 typecheck and focused lint pass.
Remove the redundant parse catch-and-rethrow and raw response dumps. The comparison portal already handles failures and clears its loading state; malformed-response tests preserve rejection without duplicate service logging.
Comparison field values come only from JSON.parse and therefore cannot contain cycles, functions, or BigInts. Serialize structured fields directly; keep the model-response JSON extraction boundary.
Route the chapter dropdown directly through the scoped summary operation. Remove the uncalled alternate importer and stable-session compatibility/rendering helpers, preserving real import and persisted-data migration paths.

Tests: Node 24 typecheck, 125 focused tests, and synthetic failure/cancellation checks pass. The cancellation test detects a removed scope guard. Root owns the collective worklog and review receipt.
Remove three uncalled token/model helpers and narrow sixteen internal implementation exports. Keep the public tokenizer, renderer, sanitizer, capability and navigation entry points unchanged.

Tests: Node 24 typecheck; 60 focused translation, EPUB, capability and section-grouping checks; Knip export findings 194 to 175.
@vercel

vercel Bot commented Nov 9, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
lexicon-forge Ready Ready Preview Nov 9, 2026 6:15am UTC

This branch was successfully deployed

1 active deployment
Preview — 62b5e301 Deployed Nov 9, 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.

1 participant