Repository navigation
Conversation
This was referenced Nov 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PI can display a saved timetable but has no local engine for finding ranked alternatives under section locks, time bounds, protected intervals, and free weekdays. This adds a freestanding C++17 solver compiled to WebAssembly, a validated TypeScript interface, and a Junction payload adapter.
The solver precomputes conflict bitsets, searches the most constrained remaining group, and uses admissible branch-and-bound bounds to return up to three ranked schedules. Results distinguish proved optimality, proved infeasibility, and an unfinished search. Conflict analysis retains unknown subproblems and returns a proposed relaxation only after finding a complete schedule under it.
The Wasm module uses fixed 512 KiB memory and has no imports or allocator. This layer adds the engine and its checks. Follow-up PRs add the interactive planner and offline demo.
Validation executed locally on Apple M5 Pro with Node 26.
npm run build:solverpassed.npm run test:solver-nativepassed under ASan and UBSan, including 20,000 ABI mutations.npm testpassed all 60 tests. The new solver suite includes 300 seeded comparisons against an independent exhaustive oracle, exact top-three rankings, an impossible three-groups/two-slots case, bounded search status, and input validation.npx wrangler types,npm run typecheck,npm run build, andgit diff --checkpassed.npm run bench:solverprovides a reproducible warm-call measurement with hashes, input sizes, sample counts, and variability. The synthetic eight-group fixture measured 0.153 ms median, or 0.055 ms with Friday protected, over 1,000 samples each. Timing includes JS validation, encoding, Wasm, and decoding. It excludes compilation, worker startup, diagnosis, and rendering. This is not a production latency or speedup claim.Live Junction account integration, linked-section restrictions, prerequisites, travel time, and registration eligibility are unverified or unsupported. The adapter fails explicitly on missing records. No course registration or Junction writes occur.
Implemented with Codex assistance.