feat(dv2): generator + seeds rebuild for the kitchen-appliance legend (B1) - #138
Merged
Merged
Conversation
… (B1) Replaces the grocery/X5 reference generator and DV2 demo seeds with the own-brand kitchen-appliance importer legend pinned in docs/domain.md and docs/generator-spec.md: 30 suppliers (22 CN/5 RU/2 AE/1 KZ), 160 SKUs across 10 categories with a FOB<landed<wholesale<mp-net<RRC pricing ladder, and DV2 seeds recalibrated to 2,500 customers (2,000 retail + 500 dealers), 10,000 orders split by channel/branch, and dealer-only retro-bonus loyalty in msk/spb/ekb. New reference/legend.py is the single numeric source of truth; tests/unit/test_generator_spec_invariants.py encodes generator-spec.md §12's 12 consistency invariants as machine-checkable tests. Live ClickHouse/Postgres re-verify of the rewritten seed SQL is B4's job (no Docker available in this environment); this pass is scoped to the generator, seeds, and everything testable without a live warehouse. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
DORA Metrics
|
CI's float summation of SEASONAL_B2B lands at 12.000000000000002 instead of 12.0 (non-associative float addition, platform-dependent rounding) — exact equality on a float sum was never safe to begin with. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
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.
Summary
reference/generator.py+reference/tnved.py: own-brand kitchen-appliance reference (30 suppliers — 22 CN/5 RU/2 AE/1 KZ; 160 SKUs across 10 categories; FOB<landed<wholesale<mp-net<RRC pricing ladder; no brand token; CN USCC-18 clearly labelled as a structural placeholder, not GB 32100-2015 verified).reference/legend.py: single numeric source of truth (master matrix, seasonal curves, dealer/retail populations, pricing bands) shared by the generator and the invariant tests.synthetic_seed.sql,satellite_seed.sql,satellite_seed_all_branches.sql,postgres_oltp/seed.sql,cold_offload_seed.sqlto the new legend: 2,500 customers (2,000 retail + 500 dealers banded by branch), 160 products, 10,000 orders split mp/site/B2B by branch, dealer-only retro-bonus loyalty in msk/spb/ekb, faux-PII locale rules per jurisdiction, ~12,000 per-unit Chestny Znak marking-code sample.tests/unit/test_generator_spec_invariants.pyencodes generator-spec.md §12's 12 consistency invariants as machine-checkable tests (arithmetic overlegend.py+ generated-catalog checks + structural checks over the seed SQL text).Notes
x5__*→mp__*rename elsewhere in the codebase (B2), demo-store repin (B3), demo_evidence/live-verify regeneration (B4), docs sweep (C1).Test plan
pytest tests/unit/test_dv2_supplier_reference.py tests/unit/test_generator_spec_invariants.py tests/unit/test_dv2_postgres_ingestion.py— 91 passedpytest tests/unit(full suite) — 1589 passedruff check/ruff format --check/mypyon all changed Python files — cleanverify_liverecount (B4, needs a live stand)🤖 Generated with Claude Code