feat(web): /calc expression evaluator -- pipeline-ab card 2 Arm A (BASELINE)#11
feat(web): /calc expression evaluator -- pipeline-ab card 2 Arm A (BASELINE)#11eksno wants to merge 2 commits into
Conversation
|
🚅 Deployed to the testing-pr-11 environment in testing
|
…d parser Pure, independently-testable calc core under src/lib/calc (tokenize, parse, evaluate, format, calculate). Precedence-climbing recursive descent: right-associative ^, unary minus binds looser than ^, unary-negated exponents, no implicit multiplication. 12-sig-digit float formatter (0.1+0.2 -> 0.3). Exact error taxonomy (empty / unexpected char / unexpected token / incomplete / mismatched parens / division by zero / non-finite). /calc route: live result, inline error, capped (10) most-recent-first history with per-entry copy-result button, auto-dismiss toast with full timer cleanup on unmount, theme-token-only styling, prerender-safe. Nav wiring + global Toaster mount. Tooling: vitest + jsdom (only new deps), vitest.config.ts, test/test:watch scripts, and the 7-file edge-case test floor (89 tests). check/build/format green. docs/fixes/0002 records a latent eslint .svelte.ts parser-config gap. Station-Trailer-Version: 1
|
Warning Review limit reached
More reviews will be available in 1 minute and 32 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more credits in the billing tab to continue. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (25)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Final review (advisory -- not a merge gate)calc Arm A (BASELINE) -- advisory red-team reviewWorktree: /shared/repos/startino/.worktrees/calc-arm-a (web/) Verdict: SHIP. The implementation is a faithful, high-fidelity realization of Lens 1 -- Spec conformance (grammar / semantics / error-taxonomy / formatting)PASS. Hand-traced every anti-ambiguity item in plan section 9 against the code:
SPEC GAP (informational, NOT a code defect): plan line 353 contains an aside -- Lens 2 -- Standards (Svelte 5 runes, cn(), prettier, ASCII, imports)PASS.
Lens 3 -- Quality (parser correctness, theme, leaks, SSR, dead code)PARSER CORRECTNESS: CLEAN. Hand-traced beyond the floor:
THEME: No hardcoded hex/rgb anywhere in new files. Toaster + page use only LEAKS: Toast auto-dismiss timers tracked in a Map keyed by id; schedule() SSR / PRERENDER: calculate('') is pure and SSR-safe; input starts empty -> DEAD CODE: none material. DOCS/FIXES/0002: see disposition. Diagnosis verified reproducible Act-worthy fixes appliedNONE. No cheap-clearly-correct behavior-preserving code defect was found. The Left (judgment calls)
|
calc Arm A -- review disposition (PR-ready)ADVISORY review. Does NOT block ship. tests/check/build verified green Outcome: SHIP. No code changes applied.The Arm A (baseline) implementation faithfully realizes calc-plan.md. Parser Findings -> disposition
docs/fixes/0002 decision (explicitly requested)KEPT, FLAGGED. Did NOT remove it. Rationale: the task offered removal as an PR body -- suggested known-issues / follow-ups block
Gate after fixn/a -- no fix applied; pre-existing green gate stands. |
Known issues from QA (George -- baseline arm exploratory pass)Triaged unblock-with-note (kept visible for the operator; not auto-fixed, so the two experiment arms stay comparable). Note: the parser/evaluator core is CORRECT on all edge cases -- these are UX/rendering issues a code review does not surface:
These are the baseline arm's QA yield -- intentionally left visible as part of the experiment artifact. |
EXPERIMENT PR (card 2: harder, separating) -- DO NOT MERGE. pipeline-ab Arm A (BASELINE).
Baseline feature layout: Opus hands + full mid-process review loop + George QA + review-reconcile.
Correctness-deep card (expression parser/evaluator) chosen to separate Composer-hands-vs-Opus-hands. Both arms build from ONE shared plan. Stays OPEN for eyeball evaluation against its live Railway preview.
Need help on this PR? Tag
/codesmithwith what you need. Autofix is disabled.