Repository navigation
Closed
Labels
Description
Goal
Allow a farm to sell Cracked and Dirty eggs as separate quality stock while preserving complete, auditable daily-entry accounting.
Product decisions
- Cracked and Dirty are saleable by default in fresh base reference data, but each farm can turn either grade non-saleable.
- They retain separate Daily Entry counters and are bound to explicit, rename-safe quality-grade identities rather than a name match.
- Manual grade lines reconcile exactly to
total - cracked - dirty - discardedwhen a Daily Entry is submitted or adjusted; drafts remain flexible. - Saleable quality counters create their own lots. Non-saleable conditions remain losses. Discarded always remains a loss.
- The official entry snapshots the selected quality-grade disposition. Later configuration changes never reinterpret historical production or create retrospective lots.
- Cracked and Dirty sell through ordinary mapped products with independently configured default prices; there is no hard-coded discount.
UI
- Daily Entry excludes the condition grades from manual grading and shows the complete reconciliation.
- The History adjustment dialog uses the same counts-and-grading structure and blocks an official save until reconciliation and reason are both present.
Operational acceptance criteria
- No second migration.
Persistence/Migrations/holds exactly one,InitialCreate(Squash the 30 EF migrations into a single InitialCreate before first production deploy #245).
The columns, the partial unique index and the seed defaults are hand-carried into it and
hand-edited, never regenerated — a regenerate silently drops the fourlower("Name")
expression indexes and the 21 guarded reference-data rows. This application has never been
deployed, so a virgin database is the only starting state and there is no existing farm whose
saleability could be reclassified; a follow-on migration would touch zero rows by construction,
which is the dead-backfill pattern the Squash the 30 EF migrations into a single InitialCreate before first production deploy #245 squash was performed to remove. - Demo/simulation seeders, k6 daily-entry writes, and Manager/Worker Playwright flows are updated with the changed contract and fixture manifest, per docs(agents): require write-contract changes to update the non-CI writers #395.
- Help and glossary explain the final behavior.
Design and implementation plan are prepared in the documentation PR.
Activity
fix(daily-entry): require exact grade reconciliation on submit and ad…
feat(daily-entry): refuse a condition grade named as a manual line (#396
feat(daily-entry): resolve condition grades at submit and mint their …
fix(daily-entry): reconcile the quality lots on adjust, not just the …
feat(reports): report eggs that became stock without being hand-graded (
feat(web): show condition stock on Reports and History (#396)
feat(web): keep counter-fed grades out of the grading panes (#396)
feat(eggs): bind Daily Entry condition counters to stable grade ident…
feat(eggs): persist condition-grade bindings and entry snapshots (#396)
feat(export): carry the condition snapshots and grade binding into ex…
feat(daily-entry): refuse a condition grade named as a manual line (#396
feat(daily-entry): resolve condition grades at submit and mint their …
fix(daily-entry): reconcile the quality lots on adjust, not just the …
feat(reports): report eggs that became stock without being hand-graded (
feat(web): show condition stock on Reports and History (#396)
feat(web): keep counter-fed grades out of the grading panes (#396)
feat(seed): mint and sell condition lots in the demo and simulation f…
fix(reports): include condition stock in the By-grade breakdown (#396)
docs(migrations): make #407 the cutover to one migration per change (#…
test(migrations): freeze InitialCreate's operations, not just its ide…
test(migrations): fingerprint every operation property, not a hand-pi…
test(migrations): reach annotations via GetAnnotations(), which a pro…
fix(test): stop the migration digest depending on the machine it runs…
docs(test): record why the Type leaf uses FullName, not AssemblyQuali…
feat(eggs): make cracked and dirty eggs sellable stock via condition …