Skip to content

Refactor Boolean minimizer with verified TypeScript core - #1

Merged
Bigsticktw merged 2 commits into
mainfrom
agent/boolean-minimizer-v2
Jul 29, 2026
Merged

Refactor Boolean minimizer with verified TypeScript core#1
Bigsticktw merged 2 commits into
mainfrom
agent/boolean-minimizer-v2

Conversation

@Bigsticktw

Copy link
Copy Markdown
Owner

What changed

  • Replaced the ~5,000-line legacy implementation with typed, testable TypeScript modules.
  • Added Quine-McCluskey prime implicant generation and a bounded exact branch-and-bound cover search over the per-function prime candidate set.
  • Fixed input correctness, including range, duplicate, overlap, off-set coverage, and prime-implicant width checks.
  • Moved minimization into a Web Worker and rebuilt the responsive UI with copy, cancel, examples, and accessible result summaries.
  • Added installable/offline PWA behavior, a repository social preview, bilingual documentation, MIT license, security policy, Dependabot, CI, and Pages deployment workflow.
  • Removed the checked-in APK and redundant generated platform icons from the active branch; the complete original state is preserved by the v1-legacy tag.

Why

The legacy app had useful behavior but mixed algorithm, validation, rendering, and platform assets in one hard-to-verify codebase. This refactor makes correctness claims explicit, bounded, reproducible, and suitable for a portfolio or future product iteration.

Verification

  • npm run check - formatting, ESLint, TypeScript, 15 Vitest tests, production build
  • npm run test:e2e - 5 Playwright tests, including offline reload
  • npm run test:coverage - 88.85% statements, 78.12% branches, 94.87% functions, 88.23% lines
  • npm audit - 0 vulnerabilities
  • Manual desktop and 390 px mobile visual review

Scope and deployment note

The optimality guarantee is deliberately precise: the solver finds the exact minimum weighted cover within the union of each function's prime implicants. It does not claim global optimality over every possible non-prime shared implicant. Search is bounded to keep browser execution predictable.

The current GitHub Pages site remains on v1 while this PR is reviewed. Merge and Pages workflow activation are separate follow-up gates.

@Bigsticktw
Bigsticktw marked this pull request as ready for review July 29, 2026 06:32
@Bigsticktw
Bigsticktw merged commit 77cb93b into main Jul 29, 2026
2 checks passed
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