Skip to content

Instantly share code, notes, and snippets.

@arockwell
Created February 10, 2026 20:01
Show Gist options
  • Select an option

  • Save arockwell/b3ce9c4a3d5feac60dd9555da729ea9d to your computer and use it in GitHub Desktop.

Select an option

Save arockwell/b3ce9c4a3d5feac60dd9555da729ea9d to your computer and use it in GitHub Desktop.
KEEP-2030 PR Review — MOR Parata Max Indicator (#2139)

#454: KEEP-2030 PR Review - MOR Parata Max Indicator

Project: apiary Created: 2026-02-10 20:01 Views: 1 Tags: code-review keep-2030 review

KEEP-2030 — Add indicator to MOR for Parata max items

PR: https://github.com/Honeybee-Health/apiary/pull/2139 | Author: Efrem Roberson Stacked on: KEEP-1977-mor-after-parata

What it does

Adds parata_dispense_type enum to cph_csom, persists it during Guardian order sync, and renders a "" pill on the Mail Order Receipt. Enum design: :unknown, :parata_max, :parata_minis, :non_parata with _prefix: :dispensed_from.

Requirements

Partially met (order-level indicator, not item-level — ticket explicitly permits this).

Blockers

1. parata_dispense_type unconditionally overwritten on every Guardian sync

@csom.parata_dispense_type = @order_data[:parata_dispense_type].presence || :unknown. If any Guardian sync event omits this field (e.g., status-only updates), previously-saved :parata_max silently resets to :unknown, removing the "" label from reprinted MORs. Author said "we want to update" but this only works if every sync payload consistently includes the field. Needs confirmation with Guardian team, or guard with if @order_data.key?(:parata_dispense_type).

2. No view/template spec for the "" pill

Primary user-facing behavior of the ticket with zero test coverage. Existing specs cover job-level persistence and printing gate logic only.

Non-blocking

  • Empty <p> tag when neither safety caps nor parata max apply (minor HTML)
  • sandbox_schema.rb column ordering inconsistency (cosmetic)
  • Good refactor: finished_dispensing_from_parata? moved from raw boolean to persisted enum
  • CI fully green

Verdict

Needs changes — confirm Guardian payload consistency and add a view spec.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment