Ready

mirendev/agentic-eph#1

This is still ready. The only new commit (fdefa63) is another merge of main into drink-sizes, and the PR's own diff is the same as at 58f4cbb.

Nothing that came in with the merge affects sizing:

I also redid the arithmetic in the new test cases and the docs/api.md example under the 8.75% round-half-up rule, and every figure matches:

Case Expected Result
Small + large 1150 subtotal → 101 tax → 1251 matches
Explicit medium 900 → 79 → 979 matches
Docs: 2 large lattes with WELCOME10 1050 − 105 → 83 tax → 1028 matches

There are no new comments or threads.

I'd still skip a separate human code review, for the same reasons as before. The change is small and additive, and a request without size gets today's medium prices. The per-line pricing is checked field by field in TestQuoteOrderLineSizes.


Verdict: ready

Data

{
  "owner": "mirendev",
  "repo": "agentic-eph",
  "number": 1,
  "verdict": "ready",
  "approve": true,
  "event": "approve",
  "summary": "This is still ready. The only new commit (`fdefa63`) is another merge of `main` into `drink-sizes`, and the PR's own diff is the same as at `58f4cbb`.\n\nNothing that came in with the merge affects sizing:\n- The menu prices in `orders.go` are unchanged, and espresso at 300¢ is still the cheapest drink, so a small can't price below zero.\n- `main.go` still maps every error other than `ErrEmptyOrder` to a 422, so an unknown size is still rejected that way.\n- `quoteOrder` still has a single caller.\n- The only places that read `size`, `unit_cents` or `line_cents` from a quote are the page, the docs and the tests. `DEMO.md`, `README.md` and the preview workflow mention them only in prose.\n\nI also redid the arithmetic in the new test cases and the `docs/api.md` example under the 8.75% round-half-up rule, and every figure matches:\n\n| Case | Expected | Result |\n|---|---|---|\n| Small + large | 1150 subtotal → 101 tax → 1251 | matches |\n| Explicit medium | 900 → 79 → 979 | matches |\n| Docs: 2 large lattes with WELCOME10 | 1050 − 105 → 83 tax → 1028 | matches |\n\nThere are no new comments or threads.\n\nI'd still skip a separate human code review, for the same reasons as before. The change is small and additive, and a request without `size` gets today's medium prices. The per-line pricing is checked field by field in `TestQuoteOrderLineSizes`.",
  "posted_to_pr": true,
  "head_sha": "fdefa63fbfdd2833664533047a8449ea4e7f8330"
}
Previous revisions (2)
Revision 2 · 29d ago

mirendev/agentic-eph#1

I still think this is ready to merge. The only new commit is a merge of main into drink-sizes, and the PR's own diff is the same as at 58f4cbb.

Nothing that came in from main affects the sizing change:

  • The menu prices haven't changed, and espresso at 300¢ is still the cheapest drink, so a small can't go below zero.
  • main.go still turns any error other than ErrEmptyOrder into a 422, so an unknown size is still rejected that way.
  • quoteOrder is still only called from the orders handler.
  • No other code reads unit_cents or the shape of a quoted line.

There are no new comments or threads to answer.

My reason for skipping a separate human code review hasn't changed. The change is small and additive, and existing clients fall back to the medium default, so they get the same prices as before. The new pricing is tested line by line in TestQuoteOrderLineSizes.


Verdict: ready

Revision 1 · 29d ago

mirendev/agentic-eph#1

I think this is ready to merge. I found no defects. Leaving size out still gets the old prices, an unknown size is rejected with a 422, and the docs example matches what the code computes.

What I checked

  • Existing clients: In quoteOrder, an empty or null size becomes medium, which adds 0 cents. So every request that worked before gets the same unit_cents, line_cents and totals as on main. docs/api.md says the mobile app updates on its own schedule and that changing a field's meaning is a breaking change. unit_cents only differs from before when a client sends the new size field, so this is an addition under that rule, not a break. The TestQuoteOrderLineSizes case with no size, which expects Size: "medium" and UnitCents: 450, locks this in.
  • Unknown sizes: An unknown size returns an error before the line is added. main.go turns any error other than ErrEmptyOrder into a 422, which matches the updated error table. The message quotes the size the client actually sent, not the defaulted value.
  • Arithmetic: I worked the numbers by hand and they all check out.
    • Docs example: 2 × 525 = 1050, minus 105 = 945 taxable, 945 × 0.0875 = 82.69, rounded to 83, total 1028.
    • The new table cases (1150 → 101 tax → 1251, and 900 → 79 → 979) are correct too.
  • Small can't go negative: The cheapest drink is espresso at 300¢, so a small never drops below 250¢.
  • Page: data-id moved to the row div, and those rows are the only elements under #menu that carry it. So each row produces one item with its own quantity and size. Capitalising l.size on the quote is safe because the server always returns a non-empty size.

TestQuoteOrderLineSizes compares whole QuotedLine structs. That catches a wrong size or unit_cents on a line, which the existing table test can't because it only compares totals.

Why I'd skip a separate human code review: The change is small and contained: one pricing function, an additive request/response field, and the page picker. Defaulting to medium keeps existing behaviour unchanged, and the new logic is directly tested. I don't see anything a human reviewer would need to decide.


Verdict: ready