iter-04 plan
This commit is contained in:
parent
b99fdb7a17
commit
d78330685b
|
|
@ -0,0 +1,38 @@
|
|||
# Checkpoint 023 — Stage 10 Iteration Planning Complete for Iteration 04
|
||||
|
||||
- **Checkpoint ID:** `CKPT-023`
|
||||
- **Date:** 2026-10-12
|
||||
- **Active Stage:** Stage 10 (Iteration Planning) Complete; Stage 11 (Wireframes) & Stage 12 (Test Models) Ready
|
||||
- **Active Track:** Greenfield, India-first, multi-tenant Agriculture Trading Backoffice (ATB)
|
||||
- **Active Skills:** `up-iteration-plan`
|
||||
- **Governed Standard:** UP-AI v1.5 Standard
|
||||
|
||||
## Completed
|
||||
- **Iteration 03 Retrospective:**
|
||||
- Authored [`retrospective.md`](file:///home/ps-ch/w/prj/mandi/04_generated_documentation/05_iteration_planning/iterations/iteration-03/retrospective.md) formalizing full delivery of Iteration 03 (16 FRs, 52 pts, 95.4% test coverage, live container migrations 005–008, 13/13 live E2E tests, 0 carried-over scope, 0 open CRs).
|
||||
- **Iteration 04 Scope Selection:**
|
||||
- Selected the foundational Warehouse Stock, Customer Sales & Outbound Dispatch vertical slice:
|
||||
- [`UC-007`](file:///home/ps-ch/w/prj/mandi/04_generated_documentation/03_requirements/use_cases/uc-007-warehouse-inventory/use-case.md): Warehouse Stock, Audit, Capacity and Transfer (`FR-WAREHOUSEINVENTORY-001`–`003`, `BRD-FR-018`–`020`)
|
||||
- [`UC-008`](file:///home/ps-ch/w/prj/mandi/04_generated_documentation/03_requirements/use_cases/uc-008-sales-contracts/use-case.md): Customer Sales Contract, Credit Check and Allocation (`FR-SALESCONTRACTS-001`–`003`, `BRD-FR-021`–`023`)
|
||||
- [`UC-009`](file:///home/ps-ch/w/prj/mandi/04_generated_documentation/03_requirements/use_cases/uc-009-dispatch-delivery/use-case.md): Outbound Dispatch and Delivery (`FR-DISPATCHDELIVERY-001`–`003`, `BRD-FR-024`–`026`)
|
||||
- [`UC-010`](file:///home/ps-ch/w/prj/mandi/04_generated_documentation/03_requirements/use_cases/uc-010-fleet-registry/use-case.md): Transport Fleet Registry (`FR-FLEETREGISTRY-001`, `BRD-FR-027`)
|
||||
- **Stage 10 Iteration Planning Deliverables Authored:**
|
||||
- [`iteration_plan.md`](file:///home/ps-ch/w/prj/mandi/04_generated_documentation/05_iteration_planning/iterations/iteration-04/iteration_plan.md): Defines 40-point capacity across 10 stories, demo criteria, and regression test continuity.
|
||||
- [`iteration_backlog.md`](file:///home/ps-ch/w/prj/mandi/04_generated_documentation/05_iteration_planning/iterations/iteration-04/iteration_backlog.md): Establishes `STORY-WH-001`–`003`, `STORY-SALES-001`–`003`, `STORY-DISP-001`–`003`, and `STORY-FLEET-001` with detailed acceptance criteria, tolerance thresholds, and invariant checks.
|
||||
- [`iteration_surface_matrix.md`](file:///home/ps-ch/w/prj/mandi/04_generated_documentation/05_iteration_planning/iterations/iteration-04/iteration_surface_matrix.md): Maps all 11 delivery surfaces across React screens, FastAPI endpoints, Alembic migrations 009–011, Wave 0 sandboxes, and test scopes.
|
||||
- [`parallel_work_plan.md`](file:///home/ps-ch/w/prj/mandi/04_generated_documentation/05_iteration_planning/iterations/iteration-04/parallel_work_plan.md): Establishes Wave 0 mocks and 3 isolated parallel lanes (Lane 1: Warehouse Inventory, Lane 2: Sales & Allocation, Lane 3: Dispatch & Fleet).
|
||||
- **Traceability Updates:**
|
||||
- Transitioned `UC-007`, `UC-008`, `UC-009`, `UC-010` and their 10 child FRs (`FR-WAREHOUSEINVENTORY-001`–`003`, `FR-SALESCONTRACTS-001`–`003`, `FR-DISPATCHDELIVERY-001`–`003`, `FR-FLEETREGISTRY-001`) to `In Construction` in [`traceability_graph.md`](file:///home/ps-ch/w/prj/mandi/04_generated_documentation/00_process_control/traceability_graph.md).
|
||||
- **Quality Gates:**
|
||||
- Gate 5.1 passed with 0 Critical issues.
|
||||
- Gate 9.1 passed with 0 Critical, 0 Major, 0 Minor issues across all 54 FRs.
|
||||
- Gate 14.1 for `iteration-01`, `iteration-02`, and `iteration-03` verified and passing cleanly with automated regression tests.
|
||||
|
||||
## Open Items
|
||||
- Authoring Stage 11 screen specifications (`SCREEN-WH-001`..`003`, `SCREEN-SALES-001`..`003`, `SCREEN-DISP-001`..`003`, `SCREEN-FLEET-001`).
|
||||
- Authoring Stage 12 multi-path functional test models (`TC-007`, `TC-008`, `TC-009`, `TC-010`), 21-sheet QA workbook, Bruno collections, and `MANUAL_TESTING_GUIDE.md` for `iteration-04`.
|
||||
- Ambiguities `AMB-001`, `AMB-006`, `AMB-008`–`AMB-011` remain tracked.
|
||||
|
||||
## Exact Next Action
|
||||
Proceed to **Stage 11 Wireframe Specifications (`/up-wireframe-spec`)** and **Stage 12 Test Model Generation (`/up-test-model-generate`)** in parallel for `iteration-04`.
|
||||
|
||||
|
|
@ -45,5 +45,6 @@
|
|||
| `CKPT-020` | 2026-10-12 | Stage 13 (Code Generation) & Stage 14 (Gate 14.1 Pass) | Implemented Iteration 02 code across all 11 surfaces: Wave 0 multi-tenant fixtures, Wave 1 tenancy models/Alembic migrations/RLS session engine/context resolver/API endpoints, Wave 2 React views (`PlatformTenantsView`, `TenantMembersView`, `HeaderTenantSwitcher`, `AuditLogView`), Wave 3 automated multi-path tests. 64 tests passing with 99.4% AST statement coverage. Gate 14.1 PASSED. FR-TENANTLIFECYCLE-001, FR-TENANTMEMBERSHIPCONTEXT-001/002, FR-TENANTSECURITYAUDIT-001/003 transitioned to Implemented (Domain/Schema). | Iteration-03 planning pending; containerized live PostgreSQL RLS test execution via Docker Compose; AMB-001/006/008–011 open. | Present completion summary to stakeholder and proceed to `/up-iteration-plan` for iteration-03. | `checkpoint-020-stage-13-code-generation-iteration-02.md` |
|
||||
| `CKPT-021` | 2026-10-12 | Stage 14 (Construction E2E Verification & Gate 14.1 Pass) | Live container infrastructure verified: PostgreSQL 17 Alembic migrations 001–004 applied, live PostgreSQL RLS integration tests pass (4/4), live containerized FastAPI endpoints pass (8/8) covering all 7 Bruno collections. Total 64 unit tests passing with 98.1% coverage. Quality Gates 5.1, 9.1, and 14.1 all PASSED. Requirements for Iteration 01 and 02 advanced to Delivered (E2E Verified). | None for Iterations 01 & 02; ready for Iteration 03 planning. | Proceed to Stage 10 Iteration 03 Planning (`/up-iteration-plan`) for Mandi Market Desk & Procurement. | `checkpoint-021-live-container-verification-iteration-01-02.md` |
|
||||
| `CKPT-022` | 2026-10-12 | Stage 14 (Construction E2E Verification & Gate 14.1 Exit) | Iteration 03 Delivered (E2E Verified): UC-002, UC-004, UC-005, UC-006 (16 FRs, 52 pts) across all 11 delivery surfaces. Alembic migrations 005–008 applied with live PostgreSQL 17 RLS. 92 multi-path automated tests passing with 95.4% coverage. Live E2E lifecycle suite verified (13/13). Quality Gates 5.1, 9.1, and 14.1 (all iterations) PASSED. | None for Iteration 03; ready for Iteration 04 planning. | Proceed to Stage 10 Iteration 04 Planning (`/up-iteration-plan`) for Warehouse Inventory, Stock Ledger & Sales Dispatch. | `checkpoint-022-iteration-03-mandi-pipeline-delivery.md` |
|
||||
| `CKPT-023` | 2026-10-12 | Stage 10 (Iteration 04 Planning Complete) | Selected and scoped Iteration 04 for Warehouse Inventory, Stock Ledger, Customer Sales Contracts, Credit Controls, Lot Allocation, Outbound Dispatch, and Transport Fleet Registry (`UC-007`, `UC-008`, `UC-009`, `UC-010`). Authored `iteration_plan.md`, `iteration_backlog.md` (10 stories, 40 pts), `iteration_surface_matrix.md`, and `parallel_work_plan.md`. Authored Iteration 03 retrospective. | Iteration-04 in construction; Stage 11 screen specs and Stage 12 test models pending; AMB-001/006/008–011 open. | Proceed to Stage 11 (`/up-wireframe-spec`) and Stage 12 (`/up-test-model-generate`) in parallel for iteration-04. | `checkpoint-023-iteration-04-planning.md` |
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
| **Active Process** | AI-Native Unified Process (UP-AI v1.5) |
|
||||
| **Governance Tier** | `tier_2_standard_enterprise` |
|
||||
| **Last Updated** | 2026-10-12 |
|
||||
| **Last Checkpoint** | CKPT-022 |
|
||||
| **Last Checkpoint** | CKPT-023 |
|
||||
| **Last CR** | CR-001 (Closed) |
|
||||
|
||||
|
||||
|
|
@ -87,11 +87,14 @@ stack:
|
|||
|
||||
## 4. Active Stage & Next Actions
|
||||
|
||||
- **Current Stage:** Stage 14 Live Container Infrastructure & E2E Verification complete for `iteration-01`, `iteration-02`, and `iteration-03` (`CKPT-022`).
|
||||
- **Current Stage:** Stage 10 (Iteration Planning) complete for `iteration-04` ([`CKPT-023`](checkpoints/checkpoint-023-iteration-04-planning.md)).
|
||||
- **Delivered Iterations:**
|
||||
- `iteration-01` (AuthN/AuthZ, OIDC PKCE, RBAC 11 roles, Session Revocation): **`Delivered (E2E Verified)`** — Verified over live containerized HTTP endpoints against Keycloak mock and Bruno API collections.
|
||||
- `iteration-02` (Multi-Tenant Control Plane, Tenant Lifecycle FSM, PostgreSQL 17 RLS Policies, Context Resolver, Append-Only Audit Trail): **`Delivered (E2E Verified)`** — Verified with live PostgreSQL 17 Alembic migrations (001–004), live RLS integration tests (4/4 PASS), and live containerized FastAPI endpoints (8/8 PASS).
|
||||
- `iteration-03` (Mandi Market Desk, Sauda Procurement, Gate Inward Weighbridge/Tare, Lab Assay & Lot Control: `UC-002`, `UC-004`, `UC-005`, `UC-006`): **`Delivered (E2E Verified)`** — Verified with live PostgreSQL 17 Alembic migrations (005–008), 92 multi-path automated tests passing (95.4% AST statement coverage), and 13 live container E2E integration tests (13/13 PASS).
|
||||
- **Test & Coverage Status:** 92 unit tests passing (95.4% statement coverage across all domain packages) + 4 live PostgreSQL RLS tests + 13 live container E2E lifecycle tests. Quality Gates 5.1, 9.1, and 14.1 (for all 3 iterations) all PASSED cleanly.
|
||||
- **Next:** Proceed to Stage 10 Iteration Planning (`/up-iteration-plan`) for `iteration-04` (Warehouse Inventory, Stock Ledger & Sales Dispatch: `UC-007`, `UC-008`, `UC-009`). Carry `AMB-001`, `AMB-006`, `AMB-008`–`AMB-011` and `ASM-001`–`ASM-003` forward.
|
||||
- **Active Iteration in Construction:**
|
||||
- `iteration-04` (Warehouse Inventory, Stock Ledger & Sales Dispatch: `UC-007`, `UC-008`, `UC-009`, `UC-010` — 10 stories, 40 SP across 11 delivery surfaces).
|
||||
- **Test & Coverage Status:** 92 unit tests passing (95.4% statement coverage across all domain packages) + 4 live PostgreSQL RLS tests + 13 live container E2E lifecycle tests. Quality Gates 5.1, 9.1, and 14.1 (for all 3 delivered iterations) all PASSED cleanly.
|
||||
- **Next:** Proceed to **Stage 11 Wireframe Specifications (`/up-wireframe-spec`)** and **Stage 12 Test Model Generation (`/up-test-model-generate`)** in parallel for `iteration-04`. Carry `AMB-001`, `AMB-006`, `AMB-008`–`AMB-011` and `ASM-001`–`ASM-003` forward.
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -122,20 +122,20 @@ These artifacts are candidate Stage 7 spike outputs. They do not replace Stage 8
|
|||
| `FR-QUALITYANDLOTCONTROL-002` | Quality Deduction / Rebate Calculation | `UC-006` | `BRD-FR-015` | Delivered (E2E Verified) |
|
||||
| `FR-QUALITYANDLOTCONTROL-003` | Finite State Machine Enforcement for `QC Hold` vs. `Released` | `UC-006` | `BRD-FR-016` | Delivered (E2E Verified) |
|
||||
| `FR-QUALITYANDLOTCONTROL-004` | Lot Splitting & Blending Traceability | `UC-006` | `BRD-FR-017` | Delivered (E2E Verified) |
|
||||
| `UC-007` | Warehouse Stock, Audit, Capacity and Transfer | — | `BRD-FR-018`, `BRD-FR-019`, `BRD-FR-020` | Draft |
|
||||
| `FR-WAREHOUSEINVENTORY-001` | Multi-Godown Dual-Unit Stock Ledger | `UC-007` | `BRD-FR-018` | Draft |
|
||||
| `FR-WAREHOUSEINVENTORY-002` | Godown Capacity & Volume Utilization Tracking | `UC-007` | `BRD-FR-019` | Draft |
|
||||
| `FR-WAREHOUSEINVENTORY-003` | Godown-to-Godown Internal Stock Transfer | `UC-007` | `BRD-FR-020` | Draft |
|
||||
| `UC-008` | Customer Sales Contract, Credit Check and Allocation | — | `BRD-FR-021`, `BRD-FR-022`, `BRD-FR-023` | Draft |
|
||||
| `FR-SALESCONTRACTS-001` | Customer Sales Contract Booking | `UC-008` | `BRD-FR-021` | Draft |
|
||||
| `FR-SALESCONTRACTS-002` | Customer Credit Limit & Pre-Order Exposure Verification | `UC-008` | `BRD-FR-022` | Draft |
|
||||
| `FR-SALESCONTRACTS-003` | Sales Order Inventory Allocation | `UC-008` | `BRD-FR-023` | Draft |
|
||||
| `UC-009` | Outbound Dispatch and Delivery | — | `BRD-FR-024`, `BRD-FR-025`, `BRD-FR-026` | Draft |
|
||||
| `FR-DISPATCHDELIVERY-001` | Outbound Dispatch Board Console | `UC-009` | `BRD-FR-024` | Draft |
|
||||
| `FR-DISPATCHDELIVERY-002` | Outbound Weighbridge & Dispatch Bilty/Manifest | `UC-009` | `BRD-FR-025` | Draft |
|
||||
| `FR-DISPATCHDELIVERY-003` | In-Transit Tracking & Proof of Delivery (POD) | `UC-009` | `BRD-FR-026` | Draft |
|
||||
| `UC-010` | Transport Fleet Registry | — | `BRD-FR-027` | Draft |
|
||||
| `FR-FLEETREGISTRY-001` | Transport Fleet Registry | `UC-010` | `BRD-FR-027` | Draft |
|
||||
| `UC-007` | Warehouse Stock, Audit, Capacity and Transfer | — | `BRD-FR-018`, `BRD-FR-019`, `BRD-FR-020` | In Construction |
|
||||
| `FR-WAREHOUSEINVENTORY-001` | Multi-Godown Dual-Unit Stock Ledger | `UC-007` | `BRD-FR-018` | In Construction |
|
||||
| `FR-WAREHOUSEINVENTORY-002` | Godown Capacity & Volume Utilization Tracking | `UC-007` | `BRD-FR-019` | In Construction |
|
||||
| `FR-WAREHOUSEINVENTORY-003` | Godown-to-Godown Internal Stock Transfer | `UC-007` | `BRD-FR-020` | In Construction |
|
||||
| `UC-008` | Customer Sales Contract, Credit Check and Allocation | — | `BRD-FR-021`, `BRD-FR-022`, `BRD-FR-023` | In Construction |
|
||||
| `FR-SALESCONTRACTS-001` | Customer Sales Contract Booking | `UC-008` | `BRD-FR-021` | In Construction |
|
||||
| `FR-SALESCONTRACTS-002` | Customer Credit Limit & Pre-Order Exposure Verification | `UC-008` | `BRD-FR-022` | In Construction |
|
||||
| `FR-SALESCONTRACTS-003` | Sales Order Inventory Allocation | `UC-008` | `BRD-FR-023` | In Construction |
|
||||
| `UC-009` | Outbound Dispatch and Delivery | — | `BRD-FR-024`, `BRD-FR-025`, `BRD-FR-026` | In Construction |
|
||||
| `FR-DISPATCHDELIVERY-001` | Outbound Dispatch Board Console | `UC-009` | `BRD-FR-024` | In Construction |
|
||||
| `FR-DISPATCHDELIVERY-002` | Outbound Weighbridge & Dispatch Bilty/Manifest | `UC-009` | `BRD-FR-025` | In Construction |
|
||||
| `FR-DISPATCHDELIVERY-003` | In-Transit Tracking & Proof of Delivery (POD) | `UC-009` | `BRD-FR-026` | In Construction |
|
||||
| `UC-010` | Transport Fleet Registry | — | `BRD-FR-027` | In Construction |
|
||||
| `FR-FLEETREGISTRY-001` | Transport Fleet Registry | `UC-010` | `BRD-FR-027` | In Construction |
|
||||
| `UC-011` | Customer Receivables and Credit Controls | — | `BRD-FR-028`, `BRD-FR-029`, `BRD-FR-030`, `BRD-FR-031` | Draft |
|
||||
| `FR-CUSTOMERRECEIVABLES-001` | Customer Ledger & Aging Statement | `UC-011` | `BRD-FR-028` | Draft |
|
||||
| `FR-CUSTOMERRECEIVABLES-002` | Automated Customer Credit Exposure Watch & Threshold Alert | `UC-011` | `BRD-FR-029` | Draft |
|
||||
|
|
|
|||
|
|
@ -0,0 +1,74 @@
|
|||
# Iteration Retrospective — Iteration 03 (Mandi Market Desk, Sauda Procurement, Gate Inward & Quality Lot Control)
|
||||
|
||||
| Field | Value |
|
||||
|---|---|
|
||||
| **Iteration** | `iteration-03` |
|
||||
| **Governing Standard** | SEI-CMMI Level 3 (UP-AI v1.5 Generic Framework) |
|
||||
| **Document Path** | `04_generated_documentation/05_iteration_planning/iterations/iteration-03/retrospective.md` |
|
||||
| **Completed Date** | 2026-10-12 |
|
||||
| **Lifecycle State** | Delivered (E2E Verified) |
|
||||
| **Exit Gate** | Gate 14.1 PASSED (0 Critical, 0 Major, 0 Minor) |
|
||||
| **Associated Checkpoint** | [`CKPT-022`](file:///home/ps-ch/w/prj/mandi/04_generated_documentation/00_process_control/checkpoints/checkpoint-022-iteration-03-mandi-pipeline-delivery.md) |
|
||||
|
||||
---
|
||||
|
||||
## 1. Executive Summary & Delivery Scope
|
||||
|
||||
Iteration 03 delivered the end-to-end Mandi procurement, vehicle gate receiving, gross/tare weighment, atomic GRN posting, and lab quality inspection FSM across four core use cases:
|
||||
- `UC-002`: Daily Mandi Arrivals & Modal Prices (`FR-MKT-001`, `FR-MKT-002`)
|
||||
- `UC-004`: Purchase Sauda Booking & Statutory Levies (`FR-PROCUREMENTCONTRACTS-001`–`004`)
|
||||
- `UC-005`: Inward Yard Gate Entry, Weighbridge Gross/Tare, Bag Tare (*Bardana Katai*), GRN Posting & Lot Identity (`FR-INWARDRECEIVING-001`–`006`)
|
||||
- `UC-006`: Lab Quality Assays, Rebate Deductions, QC Hold/Released FSM, and Traceable Genealogy (`FR-QUALITYANDLOTCONTROL-001`–`004`)
|
||||
|
||||
**Total Delivery:** 16 Functional Requirements (52 Story Points) across all 11 delivery surfaces.
|
||||
|
||||
---
|
||||
|
||||
## 2. Key Achievements & Verification Evidence
|
||||
|
||||
1. **Multi-Path Automated Test Coverage:**
|
||||
- Authored test suites covering Happy Path, Boundary Value, Negative/Security, and FSM Invariant dimensions.
|
||||
- Executed 92 unit tests in 0.063s with **95.4% AST statement coverage** across all domain packages (exceeding the 95.0% enterprise threshold).
|
||||
2. **PostgreSQL 17 Live Migrations & RLS:**
|
||||
- Applied Alembic revisions 005–008 inside live PostgreSQL container (`atb-local-postgres-1`).
|
||||
- Verified row-level security policies across `market_observations`, `procurement_sauda`, `inward_gate_entries`, `weighbridge_slips`, `goods_receipt_notes`, `inventory_lots`, and `quality_inspections`.
|
||||
3. **Containerized E2E Verification:**
|
||||
- 13 live E2E integration tests passing inside the Docker Compose network in 0.121s against the live FastAPI application (`atb-backend-test`).
|
||||
- Verified the complete chronological mandi lifecycle from observation through lot QC release.
|
||||
4. **Governance & QA Artifact Density:**
|
||||
- Compiled dense 21-sheet QA workbook with 32 comprehensive test cases.
|
||||
- Maintained git-versioned Bruno collections covering all 16 endpoints.
|
||||
- Validated Quality Gates 5.1, 9.1, and 14.1 with 0 critical findings.
|
||||
|
||||
---
|
||||
|
||||
## 3. Challenges & Engineering Lessons Learned
|
||||
|
||||
1. **Multi-Membership Role Aggregation:**
|
||||
- *Challenge:* Users belonging to a tenant under multiple memberships (or different operational duties) need composite permissions.
|
||||
- *Resolution:* Enhanced `TenantContextResolver.resolve_context()` to aggregate distinct roles across all active memberships (`dict.fromkeys(...)`).
|
||||
2. **Container Network Execution vs. Host Sandbox:**
|
||||
- *Challenge:* Sandboxed host processes cannot establish localhost TCP connections to Docker container ports due to network isolation.
|
||||
- *Resolution:* Executed E2E test commands directly inside container network via `docker exec atb-backend-test`, maintaining strict sandboxing without requiring unsandboxed escalation.
|
||||
3. **Test Data Idempotency in Persistent DB:**
|
||||
- *Challenge:* Re-running E2E tests against persistent PostgreSQL databases caused unique constraint collisions (`409 DUPLICATE_TENANT`).
|
||||
- *Resolution:* Switched E2E setup to dynamically generated tenant IDs (`tenant-mandi-{uuid.hex[:8]}`).
|
||||
|
||||
---
|
||||
|
||||
## 4. Scope Adjustments & Carried-Over Items
|
||||
|
||||
- **Carried-Over Stories:** **0** (All 16 stories delivered and E2E verified).
|
||||
- **Raised Change Requests (CRs):** **0** (No requirements gaps surfaced).
|
||||
- **Regression Debt:** **0** (All 92 automated tests passing, no flaky or deprecated suites).
|
||||
|
||||
---
|
||||
|
||||
## 5. Next Iteration Scope Recommendation
|
||||
|
||||
Proceed immediately to **Iteration 04**: **Warehouse Inventory, Stock Ledger & Sales Dispatch**:
|
||||
- `UC-007`: Multi-Warehouse Stock Ledger, Godown Capacity, and Internal Stock Transfers (`FR-WAREHOUSEINVENTORY-001`–`003`)
|
||||
- `UC-008`: Customer Sales Contracts, Credit Exposure Check, and Released Lot Allocation (`FR-SALESCONTRACTS-001`–`003`)
|
||||
- `UC-009`: Outbound Dispatch Console, Outward Weighbridge, Bilty Manifest & Proof of Delivery (`FR-DISPATCHDELIVERY-001`–`003`)
|
||||
- `UC-010`: Transport Fleet Registry & Maintenance Gating (`FR-FLEETREGISTRY-001`)
|
||||
|
||||
|
|
@ -0,0 +1,178 @@
|
|||
# Iteration Backlog — Iteration 04
|
||||
|
||||
| Field | Value |
|
||||
|---|---|
|
||||
| **Iteration** | `iteration-04` |
|
||||
| **Parent Use Cases** | [`UC-007`](file:///home/ps-ch/w/prj/mandi/04_generated_documentation/03_requirements/use_cases/uc-007-warehouse-inventory/use-case.md), [`UC-008`](file:///home/ps-ch/w/prj/mandi/04_generated_documentation/03_requirements/use_cases/uc-008-sales-contracts/use-case.md), [`UC-009`](file:///home/ps-ch/w/prj/mandi/04_generated_documentation/03_requirements/use_cases/uc-009-dispatch-delivery/use-case.md), [`UC-010`](file:///home/ps-ch/w/prj/mandi/04_generated_documentation/03_requirements/use_cases/uc-010-fleet-registry/use-case.md) |
|
||||
| **Governed Standard** | UP-AI v1.5 Stage 10 Standard |
|
||||
| **Status** | Aligned with Stage 9 Architecture (Gate 9.1 Passed); Ready for Stage 11/12 |
|
||||
| **Version** | 1.0.0 |
|
||||
| **Last CR** | none |
|
||||
|
||||
---
|
||||
|
||||
## Story Backlog Summary
|
||||
|
||||
| Story ID | Parent FR | Story Title | Points | Priority | Primary Delivery Surface | Assigned Roles | Status |
|
||||
|---|---|---|---|---|---|---|---|
|
||||
| `STORY-WH-001` | `FR-WAREHOUSEINVENTORY-001` | Multi-Godown Dual-Unit Stock Ledger & Physical Audit Adjustment | 5 | P0 | Backend API (`/api/v1/inventory/ledger`), Web Screen `/inventory/ledger` | `@backend-dev-alpha`, `@ui-dev-alpha` | Ready for Construction |
|
||||
| `STORY-WH-002` | `FR-WAREHOUSEINVENTORY-002` | Godown Storage Capacity & Volume Utilization Tracking | 3 | P0 | Backend API (`/api/v1/inventory/capacity`), Web Screen `/inventory/capacity` | `@backend-dev-alpha`, `@ui-dev-alpha` | Ready for Construction |
|
||||
| `STORY-WH-003` | `FR-WAREHOUSEINVENTORY-003` | Godown-to-Godown Internal Stock Transfer & Transit Reconciliation | 5 | P0 | Backend API (`/api/v1/inventory/transfers`), Web Screen `/inventory/transfers` | `@backend-dev-alpha`, `@ui-dev-alpha` | Ready for Construction |
|
||||
| `STORY-SALES-001` | `FR-SALESCONTRACTS-001` | Customer Sales Contract Booking & Commercial Terms | 3 | P0 | Backend API (`/api/v1/sales/orders`), Web Screen `/sales/orders` | `@backend-dev-beta`, `@ui-dev-beta` | Ready for Construction |
|
||||
| `STORY-SALES-002` | `FR-SALESCONTRACTS-002` | Customer Credit Limit & Pre-Order Exposure Verification Gate | 3 | P0 | Backend Credit Guard, Web Warning Banner / Modal | `@backend-dev-beta`, `@ui-dev-beta` | Ready for Construction |
|
||||
| `STORY-SALES-003` | `FR-SALESCONTRACTS-003` | Sales Order Released-Lot Inventory Allocation FSM | 5 | P0 | Backend Allocation API (`/api/v1/sales/orders/{id}/allocations`), Web Modal `/sales/allocations` | `@backend-dev-beta`, `@adversarial-tester` | Ready for Construction |
|
||||
| `STORY-DISP-001` | `FR-DISPATCHDELIVERY-001` | Outbound Dispatch Board Console & Consignment Scheduling | 3 | P0 | Backend API (`/api/v1/logistics/dispatches`), Web Screen `/logistics/dispatch-board` | `@backend-dev-gamma`, `@ui-dev-gamma` | Ready for Construction |
|
||||
| `STORY-DISP-002` | `FR-DISPATCHDELIVERY-002` | Outbound Weighbridge & Transport Manifest / Bilty Generation | 5 | P0 | Backend API (`/api/v1/logistics/dispatches/{id}/weighments`), Web Screen `/logistics/weighbridge` | `@backend-dev-gamma`, `@ui-dev-gamma` | Ready for Construction |
|
||||
| `STORY-DISP-003` | `FR-DISPATCHDELIVERY-003` | In-Transit Tracking & Proof of Delivery (POD) / Shortage Credit Note | 5 | P0 | Backend API (`/api/v1/logistics/dispatches/{id}/pod`), Web Screen `/logistics/pod` | `@backend-dev-gamma`, `@ui-dev-gamma` | Ready for Construction |
|
||||
| `STORY-FLEET-001` | `FR-FLEETREGISTRY-001` | Transport Fleet & Carrier Registry with Maintenance Gating | 3 | P1 | Backend API (`/api/v1/logistics/fleet`), Web Screen `/logistics/fleet` | `@backend-dev-gamma`, `@ui-dev-gamma` | Ready for Construction |
|
||||
|
||||
---
|
||||
|
||||
## Detailed Story Specifications
|
||||
|
||||
### STORY-WH-001: Multi-Godown Dual-Unit Stock Ledger & Physical Audit Adjustment
|
||||
- **Parent Requirement:** [`FR-WAREHOUSEINVENTORY-001`](file:///home/ps-ch/w/prj/mandi/04_generated_documentation/03_requirements/use_cases/uc-007-warehouse-inventory/functional-reqs.md#fr-warehouseinventory-001-multi-godown-dual-unit-stock-ledger)
|
||||
- **SRS Linkage:** `SRS-WAREHOUSEINVENTORY-001`
|
||||
- **Architecture Contract:** `HLD-INVENTORY-SERVICE`, [`LLD-003`](file:///home/ps-ch/w/prj/mandi/04_generated_documentation/04_architecture_design/lld/LLD-003_receiving_quality_inventory.md)
|
||||
- **Story Points:** 5 (P0)
|
||||
- **Assigned Roles:** Yard Supervisor, Warehouse Manager, Partner / MD
|
||||
- **Description:** Implement the double-entry multi-godown stock ledger tracking commodity positions across warehouses in Metric Tonnes and physical Bags. Provide periodic physical stock audit reconciliation with reason-coded adjustment vouchers (*Ghat / Nami*, Spillage, Bag Burst).
|
||||
- **Acceptance Criteria:**
|
||||
1. Record and query stock balance entries per warehouse (`WH-01`, `WH-02`, `WH-03`, `WH-04`), commodity, variety, and grade: Opening MT/Bags, Inward MT/Bags, Outward MT/Bags, Closing MT/Bags.
|
||||
2. Enforce absolute non-negative stock invariant: Closing MT $\ge 0$ and Closing Bags $\ge 0$ at all times.
|
||||
3. Create supervisor-authorized Stock Adjustment Vouchers capturing physical count variance with mandatory reason codes: `Moisture Loss / Ghat`, `Handling Spillage`, `Bag Burst`, `Seasonal Humidity Gain`.
|
||||
4. Enforce business rule: Adjustments exceeding $\pm 1.0\%$ of godown balance require mandatory Partner electronic sign-off before balance commit.
|
||||
|
||||
---
|
||||
|
||||
### STORY-WH-002: Godown Storage Capacity & Volume Utilization Tracking
|
||||
- **Parent Requirement:** [`FR-WAREHOUSEINVENTORY-002`](file:///home/ps-ch/w/prj/mandi/04_generated_documentation/03_requirements/use_cases/uc-007-warehouse-inventory/functional-reqs.md#fr-warehouseinventory-002-godown-capacity--volume-utilization-tracking)
|
||||
- **SRS Linkage:** `SRS-WAREHOUSEINVENTORY-002`
|
||||
- **Architecture Contract:** `HLD-INVENTORY-SERVICE`, [`LLD-003`](file:///home/ps-ch/w/prj/mandi/04_generated_documentation/04_architecture_design/lld/LLD-003_receiving_quality_inventory.md)
|
||||
- **Story Points:** 3 (P0)
|
||||
- **Assigned Roles:** Yard Supervisor, Warehouse Manager, Operations Head
|
||||
- **Description:** Real-time computation and monitoring of physical storage capacity and percentage utilization per warehouse.
|
||||
- **Acceptance Criteria:**
|
||||
1. Maintain warehouse capacity in MT: calculate real-time percentage utilization:
|
||||
$$\text{Utilisation \%} = \frac{\text{Current Closing Stock (MT)}}{\text{Storage Capacity (MT)}} \times 100$$
|
||||
2. Return capacity metrics via `GET /api/v1/inventory/capacity` with breakdown by warehouse, city, total capacity, and allocated stock.
|
||||
3. Trigger automated warning status flag when Utilisation exceeds 85%.
|
||||
|
||||
---
|
||||
|
||||
### STORY-WH-003: Godown-to-Godown Internal Stock Transfer & Transit Reconciliation
|
||||
- **Parent Requirement:** [`FR-WAREHOUSEINVENTORY-003`](file:///home/ps-ch/w/prj/mandi/04_generated_documentation/03_requirements/use_cases/uc-007-warehouse-inventory/functional-reqs.md#fr-warehouseinventory-003-godown-to-godown-internal-stock-transfer)
|
||||
- **SRS Linkage:** `SRS-WAREHOUSEINVENTORY-003`
|
||||
- **Architecture Contract:** `HLD-INVENTORY-SERVICE`, [`LLD-003`](file:///home/ps-ch/w/prj/mandi/04_generated_documentation/04_architecture_design/lld/LLD-003_receiving_quality_inventory.md)
|
||||
- **Story Points:** 5 (P0)
|
||||
- **Assigned Roles:** Logistics Coordinator, Warehouse Manager
|
||||
- **Description:** Manage inter-godown stock movements through a controlled transfer lifecycle: origin outward deduction, in-transit state, destination weighment, and destination inward credit.
|
||||
- **Acceptance Criteria:**
|
||||
1. Initiate transfer from origin warehouse to destination warehouse via `POST /api/v1/inventory/transfers`.
|
||||
2. Origin stock is immediately deducted and marked as `In Transit`.
|
||||
3. Destination records received weight and bag count upon arrival.
|
||||
4. Inward credit is posted at destination; system verifies transfer variance between dispatched MT and received MT against the $\pm 0.2\%$ transfer tolerance limit. Variances beyond tolerance trigger a transfer shortage alert.
|
||||
|
||||
---
|
||||
|
||||
### STORY-SALES-001: Customer Sales Contract Booking & Commercial Terms
|
||||
- **Parent Requirement:** [`FR-SALESCONTRACTS-001`](file:///home/ps-ch/w/prj/mandi/04_generated_documentation/03_requirements/use_cases/uc-008-sales-contracts/functional-reqs.md#fr-salescontracts-001-customer-sales-contract-booking)
|
||||
- **SRS Linkage:** `SRS-SALESCONTRACTS-001`
|
||||
- **Architecture Contract:** `HLD-SALES-SERVICE`, [`LLD-004`](file:///home/ps-ch/w/prj/mandi/04_generated_documentation/04_architecture_design/lld/LLD-004_financial_controls.md)
|
||||
- **Story Points:** 3 (P0)
|
||||
- **Assigned Roles:** Sales Manager, Commercial Head, Partner
|
||||
- **Description:** Record and manage customer sales contracts specifying customer code, segment, commodity, variety, grade, contracted MT, rate in ₹/Qtl, and payment terms.
|
||||
- **Acceptance Criteria:**
|
||||
1. Create sales order via `POST /api/v1/sales/orders` capturing: Sales Order ID (`SAL-YYYYMM-xxx`), Order Date, Customer ID, Destination City, Customer Segment (`Wholesale`, `Processor`, `Institutional`, `Distributor`), Commodity, Variety, Grade, Contract Qty MT, Contract Rate ₹/Qtl, Payment Terms, Status.
|
||||
2. Enforce commercial arithmetic: Total Sales Value must equal $\text{Contract Qty MT} \times 10 \times \text{Rate ₹/Qtl}$.
|
||||
3. Validate valid payment terms (`Advance`, `CAD`, `15 Days`, `30 Days`) and positive contract quantity and rate.
|
||||
|
||||
---
|
||||
|
||||
### STORY-SALES-002: Customer Credit Limit & Pre-Order Exposure Verification Gate
|
||||
- **Parent Requirement:** [`FR-SALESCONTRACTS-002`](file:///home/ps-ch/w/prj/mandi/04_generated_documentation/03_requirements/use_cases/uc-008-sales-contracts/functional-reqs.md#fr-salescontracts-002-customer-credit-limit--pre-order-exposure-verification)
|
||||
- **SRS Linkage:** `SRS-SALESCONTRACTS-002`
|
||||
- **Architecture Contract:** `HLD-SALES-SERVICE`, [`LLD-004`](file:///home/ps-ch/w/prj/mandi/04_generated_documentation/04_architecture_design/lld/LLD-004_financial_controls.md)
|
||||
- **Story Points:** 3 (P0)
|
||||
- **Assigned Roles:** Sales Manager, Credit Controller, Partner / MD
|
||||
- **Description:** Implement pre-order credit check validating customer outstanding receivables plus new order value against sanctioned credit limit before order confirmation.
|
||||
- **Acceptance Criteria:**
|
||||
1. Calculate projected credit exposure:
|
||||
$$\text{Projected Exposure} = \text{Current Outstanding INR} + \text{New Order Value INR}$$
|
||||
$$\text{Projected Exposure Ratio \%} = \frac{\text{Projected Exposure}}{\text{Sanctioned Credit Limit}} \times 100$$
|
||||
2. If Projected Exposure Ratio $> 80\%$, display an inline warning.
|
||||
3. If Projected Exposure Ratio $> 100\%$, hard-block order confirmation unless authorized by Partner electronic approval (`credit_override=True` with Partner signature).
|
||||
|
||||
---
|
||||
|
||||
### STORY-SALES-003: Sales Order Released-Lot Inventory Allocation FSM
|
||||
- **Parent Requirement:** [`FR-SALESCONTRACTS-003`](file:///home/ps-ch/w/prj/mandi/04_generated_documentation/03_requirements/use_cases/uc-008-sales-contracts/functional-reqs.md#fr-salescontracts-003-sales-order-inventory-allocation)
|
||||
- **SRS Linkage:** `SRS-SALESCONTRACTS-003`
|
||||
- **Architecture Contract:** `HLD-SALES-SERVICE`, [`LLD-004`](file:///home/ps-ch/w/prj/mandi/04_generated_documentation/04_architecture_design/lld/LLD-004_financial_controls.md), [`LLD-003`](file:///home/ps-ch/w/prj/mandi/04_generated_documentation/04_architecture_design/lld/LLD-003_receiving_quality_inventory.md)
|
||||
- **Story Points:** 5 (P0)
|
||||
- **Assigned Roles:** Sales Manager, Yard Supervisor
|
||||
- **Description:** Allocate specific available inventory lots from warehouse stacks to confirmed sales orders, enforcing quality release invariants and unreserved quantity constraints.
|
||||
- **Acceptance Criteria:**
|
||||
1. Allocate lots via `POST /api/v1/sales/orders/{id}/allocations` specifying `lot_id`, `allocated_qty_mt`, `allocated_bags`, `warehouse_id`.
|
||||
2. Enforce invariant: Allocation fails immediately if Lot status is `QC Hold` or `Under QC`. Only `Released` lots are eligible.
|
||||
3. Enforce invariant: Allocation fails if available unreserved MT on the lot $<$ requested allocation MT.
|
||||
4. Successfully allocated lots increment reserved quantity and update sales order fulfillment status (`Unallocated`, `Partially Allocated`, `Fully Allocated`).
|
||||
|
||||
---
|
||||
|
||||
### STORY-DISP-001: Outbound Dispatch Board Console & Consignment Scheduling
|
||||
- **Parent Requirement:** [`FR-DISPATCHDELIVERY-001`](file:///home/ps-ch/w/prj/mandi/04_generated_documentation/03_requirements/use_cases/uc-009-dispatch-delivery/functional-reqs.md#fr-dispatchdelivery-001-outbound-dispatch-board-console)
|
||||
- **SRS Linkage:** `SRS-DISPATCHDELIVERY-001`
|
||||
- **Architecture Contract:** `HLD-LOGISTICS-SERVICE`, [`LLD-004`](file:///home/ps-ch/w/prj/mandi/04_generated_documentation/04_architecture_design/lld/LLD-004_financial_controls.md)
|
||||
- **Story Points:** 3 (P0)
|
||||
- **Assigned Roles:** Logistics Coordinator, Yard Supervisor
|
||||
- **Description:** Provide a visual dispatch console matching confirmed sales orders to allocated lots and transport vehicles, scheduling dispatches through an explicit FSM (`Scheduled`, `Loading`, `In Transit`, `Delivered`).
|
||||
- **Acceptance Criteria:**
|
||||
1. Create and list dispatches via `POST /api/v1/logistics/dispatches` and `GET /api/v1/logistics/dispatches`.
|
||||
2. Enforce business rule: Dispatch cannot be created without an approved sales order, allocated lot, and assigned vehicle.
|
||||
3. Validate assigned vehicle is registered in the fleet registry and not in `Maintenance` status.
|
||||
|
||||
---
|
||||
|
||||
### STORY-DISP-002: Outbound Weighbridge & Transport Manifest / Bilty Generation
|
||||
- **Parent Requirement:** [`FR-DISPATCHDELIVERY-002`](file:///home/ps-ch/w/prj/mandi/04_generated_documentation/03_requirements/use_cases/uc-009-dispatch-delivery/functional-reqs.md#fr-dispatchdelivery-002-outbound-weighbridge--dispatch-bilty/manifest)
|
||||
- **SRS Linkage:** `SRS-DISPATCHDELIVERY-002`
|
||||
- **Architecture Contract:** `HLD-LOGISTICS-SERVICE`, [`LLD-004`](file:///home/ps-ch/w/prj/mandi/04_generated_documentation/04_architecture_design/lld/LLD-004_financial_controls.md)
|
||||
- **Story Points:** 5 (P0)
|
||||
- **Assigned Roles:** Yard Supervisor, Logistics Coordinator, Transporter
|
||||
- **Description:** Log outward weighbridge readings (Tare before loading, Gross after loading), verify loaded weight against allocated order weight, and generate transport manifest / Bilty.
|
||||
- **Acceptance Criteria:**
|
||||
1. Record outward weighments via `POST /api/v1/logistics/dispatches/{id}/weighments` capturing: Outward Tare kg, Outward Gross kg, Net Loaded MT, Loaded Bag Count, Transporter Bilty No, e-Way Bill No.
|
||||
2. Enforce invariant: Gross weight must exceed Tare weight (`gross > tare`).
|
||||
3. Enforce tolerance: Net loaded MT must match allocated order MT within $\pm 1.0\%$ loading tolerance.
|
||||
4. Generate immutable Bilty / transport manifest record upon successful weighment verification.
|
||||
|
||||
---
|
||||
|
||||
### STORY-DISP-003: In-Transit Tracking & Proof of Delivery (POD) / Shortage Credit Note
|
||||
- **Parent Requirement:** [`FR-DISPATCHDELIVERY-003`](file:///home/ps-ch/w/prj/mandi/04_generated_documentation/03_requirements/use_cases/uc-009-dispatch-delivery/functional-reqs.md#fr-dispatchdelivery-003-in-transit-tracking--proof-of-delivery-pod)
|
||||
- **SRS Linkage:** `SRS-DISPATCHDELIVERY-003`
|
||||
- **Architecture Contract:** `HLD-LOGISTICS-SERVICE`, [`LLD-004`](file:///home/ps-ch/w/prj/mandi/04_generated_documentation/04_architecture_design/lld/LLD-004_financial_controls.md)
|
||||
- **Story Points:** 5 (P0)
|
||||
- **Assigned Roles:** Logistics Coordinator, Sales Manager, Accountant
|
||||
- **Description:** Track in-transit state to final delivery, log consignee destination weighbridge & POD document reference, trigger automated sales invoice, and generate compensating shortage credit notes.
|
||||
- **Acceptance Criteria:**
|
||||
1. Update dispatch status to `Delivered` via `POST /api/v1/logistics/dispatches/{id}/pod` capturing: Actual Delivery Date, Destination Weighbridge Net MT, Transit Loss MT, Consignee Acknowledgement Note, POD Ref.
|
||||
2. Transitioning to `Delivered` automatically generates finalized Sales Invoice in the billing register.
|
||||
3. If transit loss/shortage is recorded, generate a compensating Sales Credit Note against customer ledger without modifying the immutable dispatch bilty.
|
||||
4. Enforce rule: Consignee shortage deductions exceeding 2.0% require mandatory Sales Manager approval before issuing Credit Note.
|
||||
|
||||
---
|
||||
|
||||
### STORY-FLEET-001: Transport Fleet & Carrier Registry with Maintenance Gating
|
||||
- **Parent Requirement:** [`FR-FLEETREGISTRY-001`](file:///home/ps-ch/w/prj/mandi/04_generated_documentation/03_requirements/use_cases/uc-010-fleet-registry/functional-reqs.md#fr-fleetregistry-001-transport-fleet-registry)
|
||||
- **SRS Linkage:** `SRS-FLEETREGISTRY-001`
|
||||
- **Architecture Contract:** `HLD-LOGISTICS-SERVICE`, [`LLD-009`](file:///home/ps-ch/w/prj/mandi/04_generated_documentation/04_architecture_design/lld/LLD-009_fleet_and_expense.md)
|
||||
- **Story Points:** 3 (P1)
|
||||
- **Assigned Roles:** Fleet Manager, Logistics Coordinator
|
||||
- **Description:** Maintain registry of transport trucks (owned and contract carriers) and enforce that vehicles in maintenance cannot be assigned to dispatches.
|
||||
- **Acceptance Criteria:**
|
||||
1. Manage fleet records via `POST /api/v1/logistics/fleet` and `GET /api/v1/logistics/fleet` capturing: Vehicle Reg No, Make/Model, Payload Capacity MT, Ownership Type (`Own` vs `Contract`), Transporter Name, Status (`Available`, `On Route`, `Maintenance`), Fitness Expiry Date.
|
||||
2. Validate vehicle registration format and positive payload capacity.
|
||||
3. Enforce invariant: Vehicles with status `Maintenance` or expired fitness certificates cannot be assigned to dispatches.
|
||||
|
||||
|
|
@ -0,0 +1,66 @@
|
|||
# Iteration Plan — Iteration 04 (Warehouse Inventory, Stock Ledger & Sales Dispatch)
|
||||
|
||||
| Field | Value |
|
||||
|---|---|
|
||||
| **Iteration** | `iteration-04` |
|
||||
| **Slice Goal** | Deliver the end-to-end multi-warehouse stock ledger, capacity tracking, internal stock transfers, customer sales contract booking with credit exposure verification, released-lot allocation, outbound dispatch console with outward weighbridge bilty/manifest, proof of delivery (POD), and transport fleet registry across `UC-007`, `UC-008`, `UC-009`, and `UC-010`. |
|
||||
| **Governed Standard** | UP-AI v1.5 Stage 10 Standard |
|
||||
| **Parent Use Cases** | [`UC-007`](file:///home/ps-ch/w/prj/mandi/04_generated_documentation/03_requirements/use_cases/uc-007-warehouse-inventory/use-case.md), [`UC-008`](file:///home/ps-ch/w/prj/mandi/04_generated_documentation/03_requirements/use_cases/uc-008-sales-contracts/use-case.md), [`UC-009`](file:///home/ps-ch/w/prj/mandi/04_generated_documentation/03_requirements/use_cases/uc-009-dispatch-delivery/use-case.md), [`UC-010`](file:///home/ps-ch/w/prj/mandi/04_generated_documentation/03_requirements/use_cases/uc-010-fleet-registry/use-case.md) |
|
||||
| **Capacity** | 10 Stories (40 Story Points) |
|
||||
| **Status** | In Planning (Stage 10 Planned) |
|
||||
| **Version** | 1.0.0 |
|
||||
| **Last CR** | none |
|
||||
|
||||
---
|
||||
|
||||
## 1. Iteration Goal & Scope Summary
|
||||
|
||||
Deliver the core **Warehouse Inventory Management, Customer Sales & Outbound Dispatch Pipeline (Stock-to-Dispatch)** for the Agriculture Trading Backoffice (ATB). Building upon the multi-tenant control plane, PostgreSQL RLS, RBAC, and Inward Mandi pipeline established in Iterations 01, 02, and 03, this slice operationalizes:
|
||||
|
||||
1. **Warehouse Stock, Audit, Capacity & Transfer (`UC-007`):**
|
||||
- **Multi-Godown Dual-Unit Stock Ledger (`FR-WAREHOUSEINVENTORY-001`):** Double-entry stock ledger tracking commodity positions across warehouses (WH-01 Neemuch Main Yard, WH-02 Neemuch North Godown, WH-03 Mandsaur Transit Godown, WH-04 Indore Buffer Depot) in MT and Bags. Periodic physical stock audits with reason-coded adjustment vouchers (*Ghat / Nami*, Spillage, Bag Burst). Enforces non-negative stock invariant and Partner electronic sign-off for adjustments exceeding $\pm 1.0\%$.
|
||||
- **Godown Capacity & Utilization Tracking (`FR-WAREHOUSEINVENTORY-002`):** Physical storage capacity tracking in MT with real-time percentage utilization calculation. Automated warning alert when utilization exceeds 85%.
|
||||
- **Godown-to-Godown Internal Stock Transfer (`FR-WAREHOUSEINVENTORY-003`):** Origin outward deduction, in-transit status tracking, destination weighment, and inward credit with $\pm 0.2\%$ transfer tolerance reconciliation.
|
||||
|
||||
2. **Customer Sales Contracts, Credit Controls & Allocation (`UC-008`):**
|
||||
- **Customer Sales Contract Booking (`FR-SALESCONTRACTS-001`):** Booking customer contracts with counterparty metadata, segment (`Wholesale`, `Processor`, `Institutional`, `Distributor`), commodity, variety, grade, MT, rate ₹/Qtl, payment terms, and arithmetic verification ($\text{Total Value} = \text{MT} \times 10 \times \text{Rate}$).
|
||||
- **Pre-Order Customer Credit Exposure Verification (`FR-SALESCONTRACTS-002`):** Real-time evaluation of current outstanding receivables plus new order value against sanctioned credit limit. Inline warning if projected exposure ratio $> 80\%$; hard block preventing order confirmation if $> 100\%$ without Partner authorization.
|
||||
- **Sales Order Inventory Allocation (`FR-SALESCONTRACTS-003`):** Dynamic allocation of specific available inventory lots from warehouse stacks to confirmed orders. Enforces that lots must be in `Released` state (blocking `QC Hold` and `Under QC` lots) and possess sufficient unreserved MT balance.
|
||||
|
||||
3. **Outbound Dispatch & Delivery (`UC-009`):**
|
||||
- **Outbound Dispatch Board Console (`FR-DISPATCHDELIVERY-001`):** Visual management board displaying scheduled, loading, in-transit, and delivered consignments, matching confirmed sales orders to allocated lots and assigned transport vehicles.
|
||||
- **Outbound Weighbridge & Dispatch Bilty/Manifest (`FR-DISPATCHDELIVERY-002`):** Dual-weighment logging (outward Tare before loading, Gross after loading), verification that net loaded MT matches allocated order MT within $\pm 1.0\%$ tolerance, and printable transport Bilty / manifest generation with e-Way bill linkage.
|
||||
- **In-Transit Tracking & Proof of Delivery (POD) (`FR-DISPATCHDELIVERY-003`):** State progression from `In Transit` to `Delivered`. Consignee receipt logging with destination weighment and POD document reference. Automated Sales Invoice generation upon delivery. Consignee Shortage Note logging and compensating Sales Credit Note generation (requiring Sales Manager approval if shortage $> 2.0\%$).
|
||||
|
||||
4. **Transport Fleet Registry (`UC-010`):**
|
||||
- **Transport Fleet & Carrier Registry (`FR-FLEETREGISTRY-001`):** Centralized registry of transport trucks (owned and contract carriers) tracking registration number, make/model, payload capacity MT, ownership type, transporter name, fitness expiry date, and operational status (`Available`, `On Route`, `Maintenance`). Invariant enforcement: vehicles in `Maintenance` status cannot be assigned to dispatches.
|
||||
|
||||
---
|
||||
|
||||
## 2. Demo & Acceptance Criteria
|
||||
|
||||
Planned demo evidence for Iteration 04 review:
|
||||
1. **Multi-Godown Stock Ledger:** Yard Supervisor views real-time stock positions across WH-01 Neemuch and WH-02 Neemuch North. Records a physical audit with 0.150 MT moisture loss (*Ghat*); system verifies variance is within 1.0% and posts adjustment voucher. A secondary test demonstrates a 1.5% adjustment requiring and obtaining Partner electronic sign-off.
|
||||
2. **Godown Capacity Alert:** System computes utilization for WH-01 (e.g. 88% of 2,000 MT capacity) and triggers an inline high-capacity warning banner ($> 85\%$).
|
||||
3. **Internal Stock Transfer:** Logistics Coordinator initiates transfer of 20.000 MT Chana from Mandsaur (WH-03) to Neemuch (WH-01). Origin stock deducted; destination receives 19.980 MT; system reconciles transfer within 0.2% tolerance.
|
||||
4. **Sales Contract & Credit Limit Gate:** Sales Manager books a contract for 50 MT Soybean at ₹4,800/Qtl (Total: ₹24,00,000). For a customer with ₹50,00,000 credit limit and ₹38,00,000 current receivables, projected exposure is ₹62,00,000 (124%). System blocks confirmation. Partner electronic authorization unlocks the contract.
|
||||
5. **Inventory Lot Allocation:** Sales Manager allocates 50 MT from `LOT-UNJ-SOY-20261012-001` (`Released`). System verifies unreserved quantity. Attempting to allocate from a lot in `QC Hold` fails with an explicit validation error.
|
||||
6. **Fleet Registry & Maintenance Lock:** Fleet Manager registers Truck `RJ-09-GA-5678` with status `Maintenance`. Attempting to assign this truck to a dispatch is blocked. Updating status to `Available` enables assignment.
|
||||
7. **Outbound Weighbridge & Bilty:** Yard Supervisor captures Tare (9,800 kg) and Gross (24,850 kg), yielding 15.050 Net MT (within 1.0% of order). Generates Bilty `BILTY-2026-0001` with e-Way bill `EWB-998877665544`.
|
||||
8. **POD & Shortage Credit Note:** Logistics Coordinator updates consignment to `Delivered`, triggers automated invoice, and logs destination weighment showing 0.400 MT shortage (acknowledged by buyer). System generates compensating Credit Note after Sales Manager approval.
|
||||
9. **Quality & Coverage Compliance:**
|
||||
- Backend domain/FSM coverage: $\ge 95.0\%$
|
||||
- Integration adapter coverage: $\ge 90.0\%$
|
||||
- Frontend components coverage: $\ge 80.0\%$
|
||||
10. **Gate 14.1 Density:**
|
||||
- 21-sheet Excel QA Workbook with $\ge 20$ dense test cases across inventory, sales, dispatch, and fleet.
|
||||
- Git-versioned Bruno API collections (`.bru`) under `docs/api/bruno/inventory/`, `docs/api/bruno/sales/`, `docs/api/bruno/dispatch/`, `docs/api/bruno/fleet/`.
|
||||
- Multi-path 4-dimension functional test models in `07_test_design/functional_test_cases/` for `UC-007`, `UC-008`, `UC-009`, `UC-010`.
|
||||
|
||||
---
|
||||
|
||||
## 3. Carried-Over Scope & Regression Debt
|
||||
|
||||
- **Carried-over stories from previous iterations:** None. Iterations 01, 02, and 03 are 100% delivered and E2E verified in live container infrastructure ([`CKPT-022`](file:///home/ps-ch/w/prj/mandi/04_generated_documentation/00_process_control/checkpoints/checkpoint-022-iteration-03-mandi-pipeline-delivery.md)).
|
||||
- **Regression debt from `regression_test_cases.md`:** All 92 automated tests from Iterations 01, 02, and 03 (OIDC Auth, RBAC 11 roles, Tenant Lifecycle FSM, PostgreSQL RLS, Mandi Market Desk, Sauda Procurement, Gate Inward Weighbridge, GRN Lot minting, and Lab QC FSM) are continuously executed and regression-tested.
|
||||
|
||||
|
|
@ -0,0 +1,51 @@
|
|||
# Iteration Delivery Surface Matrix — Iteration 04
|
||||
|
||||
| Field | Value |
|
||||
|---|---|
|
||||
| **Iteration** | `iteration-04` |
|
||||
| **Governed Standard** | UP-AI v1.5 Stage 10 Standard |
|
||||
| **Status** | In Planning (Stage 10 Planned) |
|
||||
| **Version** | 1.0.0 |
|
||||
| **Last CR** | none |
|
||||
|
||||
---
|
||||
|
||||
## 11-Dimension Delivery Surface Coverage
|
||||
|
||||
| Story ID | Parent FR | Portal / Screen | Route | API Endpoint | DB Migration | Sandbox / Mock | Config / Secret | Test Scopes | Dev Owner | QA Owner | Surface Status |
|
||||
|---|---|---|---|---|---|---|---|---|---|---|---|
|
||||
| `STORY-WH-001` | `FR-WAREHOUSEINVENTORY-001` | Stock Ledger & Adjustment View | `/inventory/ledger` | `GET /api/v1/inventory/ledger`, `POST /api/v1/inventory/adjustments` | Table `stock_ledger_entries`, `stock_adjustments` (Alembic `009_warehouse_inventory.py`) | `sandbox/warehouse_mock.py` | none | Unit, Boundary ($\ge 0$, $\pm 1.0\%$), API (Bruno) | `@backend-dev-alpha`, `@ui-dev-alpha` | `@adversarial-tester` | In Planning |
|
||||
| `STORY-WH-002` | `FR-WAREHOUSEINVENTORY-002` | Godown Capacity Dashboard | `/inventory/capacity` | `GET /api/v1/inventory/capacity` | Table `warehouse_capacities` (Alembic `009_warehouse_inventory.py`) | `sandbox/warehouse_mock.py` | Capacity threshold (`CAPACITY_WARNING_PCT=85.0`) | Unit, Boundary ($>85\%$), Alert Banner | `@backend-dev-alpha`, `@ui-dev-alpha` | `@adversarial-tester` | In Planning |
|
||||
| `STORY-WH-003` | `FR-WAREHOUSEINVENTORY-003` | Inter-Godown Stock Transfer Screen | `/inventory/transfers` | `POST /api/v1/inventory/transfers`, `PATCH /api/v1/inventory/transfers/{id}/receive` | Table `stock_transfers` (Alembic `009_warehouse_inventory.py`) | Transit duration generator | Tolerance limit (`TRANSFER_TOLERANCE_PCT=0.2`) | Unit, FSM Invariant, Boundary, API (Bruno) | `@backend-dev-alpha`, `@ui-dev-alpha` | `@adversarial-tester` | In Planning |
|
||||
| `STORY-SALES-001` | `FR-SALESCONTRACTS-001` | Sales Order Booking Register | `/sales/orders`, `/sales/orders/new` | `POST /api/v1/sales/orders`, `GET /api/v1/sales/orders` | Table `customer_sales_orders` (Alembic `010_sales_contracts.py`) | `sandbox/customer_credit_mock.py` | none | Unit, Decimal arithmetic, API (Bruno), Browser E2E | `@backend-dev-beta`, `@ui-dev-beta` | `@adversarial-tester` | In Planning |
|
||||
| `STORY-SALES-002` | `FR-SALESCONTRACTS-002` | Pre-Order Credit Exposure Guard | Order Form Modal `/sales/orders/new` | Integrated in `POST /api/v1/sales/orders` | Schema: credit fields on `customer_sales_orders` | Credit Bureau simulator | Credit warning (`80%`) and block (`100%`) limits | Unit, Boundary ($80\%$, $100\%$), Security Override | `@backend-dev-beta`, `@ui-dev-beta` | `@adversarial-tester` | In Planning |
|
||||
| `STORY-SALES-003` | `FR-SALESCONTRACTS-003` | Sales Inventory Allocation Modal | Order Details `/sales/orders/{id}` | `POST /api/v1/sales/orders/{id}/allocations` | Table `sales_order_allocations` (Alembic `010_sales_contracts.py`) | Lot inventory fixtures | none | Unit, FSM Invariant (QC Hold block), Boundary | `@backend-dev-beta`, `@adversarial-tester` | `@adversarial-tester` | In Planning |
|
||||
| `STORY-DISP-001` | `FR-DISPATCHDELIVERY-001` | Outbound Dispatch Board | `/logistics/dispatch-board` | `POST /api/v1/logistics/dispatches`, `GET /api/v1/logistics/dispatches` | Table `outbound_dispatches` (Alembic `011_dispatch_and_fleet.py`) | Consignment schedule generator | none | Unit, API (Bruno), Browser E2E, FSM Invariants | `@backend-dev-gamma`, `@ui-dev-gamma` | `@adversarial-tester` | In Planning |
|
||||
| `STORY-DISP-002` | `FR-DISPATCHDELIVERY-002` | Outbound Weighbridge & Bilty View | `/logistics/weighbridge`, `/logistics/bilty/{id}` | `POST /api/v1/logistics/dispatches/{id}/weighments` | Table `outbound_weighments`, `dispatch_bilty` (Alembic `011_dispatch_and_fleet.py`) | Weighbridge ticket mock | Tolerance limit (`DISPATCH_TOLERANCE_PCT=1.0`) | Unit, Invariant (`gross > tare`), Boundary, Bilty print | `@backend-dev-gamma`, `@ui-dev-gamma` | `@adversarial-tester` | In Planning |
|
||||
| `STORY-DISP-003` | `FR-DISPATCHDELIVERY-003` | Proof of Delivery & Shortage Credit Note | `/logistics/pod` | `POST /api/v1/logistics/dispatches/{id}/pod` | Table `consignee_shortages`, `sales_credit_notes` (Alembic `011_dispatch_and_fleet.py`) | POD document store mock | Shortage threshold (`SHORTAGE_APPROVAL_PCT=2.0`) | Unit, Invoice trigger, Credit Note FSM | `@backend-dev-gamma`, `@ui-dev-gamma` | `@adversarial-tester` | In Planning |
|
||||
| `STORY-FLEET-001` | `FR-FLEETREGISTRY-001` | Transport Fleet Registry Screen | `/logistics/fleet` | `POST /api/v1/logistics/fleet`, `GET /api/v1/logistics/fleet` | Table `transport_fleet` (Alembic `011_dispatch_and_fleet.py`) | `sandbox/fleet_mock.py` | none | Unit, Invariant (Maintenance block), API (Bruno) | `@backend-dev-gamma`, `@ui-dev-gamma` | `@adversarial-tester` | In Planning |
|
||||
|
||||
---
|
||||
|
||||
## Surface Breakdown & Responsibilities
|
||||
|
||||
1. **Frontend Portal / Screen Surfaces:**
|
||||
- **Warehouse Stock & Transfer (`STORY-WH-001`, `002`, `003`):** React dashboard for Yard Supervisors and Logistics Coordinators to view real-time dual-unit stock positions, monitor godown capacity alerts, record physical count audit adjustments, and initiate inter-godown transfers.
|
||||
- **Customer Sales & Credit Controls (`STORY-SALES-001`, `002`, `003`):** React console for Sales Managers to book sales orders, evaluate real-time customer credit exposure, request Partner electronic override on credit breaches, and allocate released lots.
|
||||
- **Logistics Dispatch Board & Weighbridge (`STORY-DISP-001`, `002`, `003`):** Visual dispatch console displaying scheduled consignments, logging outward gross/tare weighments, issuing transport Bilties with e-Way bills, and recording destination PODs with shortage credit notes.
|
||||
- **Transport Fleet Registry (`STORY-FLEET-001`):** Fleet management UI tracking vehicle payloads, ownership categories, and operational statuses (`Available`, `On Route`, `Maintenance`).
|
||||
2. **Backend API Endpoints:**
|
||||
- Inventory APIs: `/api/v1/inventory/ledger`, `/api/v1/inventory/adjustments`, `/api/v1/inventory/capacity`, `/api/v1/inventory/transfers`.
|
||||
- Sales APIs: `/api/v1/sales/orders`, `/api/v1/sales/orders/{id}/allocations`.
|
||||
- Logistics APIs: `/api/v1/logistics/dispatches`, `/api/v1/logistics/dispatches/{id}/weighments`, `/api/v1/logistics/dispatches/{id}/pod`, `/api/v1/logistics/fleet`.
|
||||
3. **Database & Migrations:**
|
||||
- Alembic migration `009_warehouse_inventory.py`: `stock_ledger_entries`, `stock_adjustments`, `warehouse_capacities`, `stock_transfers` with PostgreSQL RLS.
|
||||
- Alembic migration `010_sales_contracts.py`: `customer_sales_orders`, `sales_order_allocations` with PostgreSQL RLS.
|
||||
- Alembic migration `011_dispatch_and_fleet.py`: `outbound_dispatches`, `outbound_weighments`, `dispatch_bilty`, `consignee_shortages`, `sales_credit_notes`, `transport_fleet` with PostgreSQL RLS.
|
||||
4. **Integration Sandboxes (Wave 0):**
|
||||
- Deterministic fixtures in `sandbox/warehouse_mock.py`, `sandbox/customer_credit_mock.py`, and `sandbox/fleet_mock.py`.
|
||||
5. **Quality Assurance Deliverables:**
|
||||
- Bruno API Collections under `docs/api/bruno/inventory/`, `docs/api/bruno/sales/`, `docs/api/bruno/dispatch/`, `docs/api/bruno/fleet/`.
|
||||
- 21-sheet Excel QA Workbook with $\ge 20$ dense test cases across categories.
|
||||
- Multi-Path Automated Tests in `tests/backend/` and `tests/e2e/`.
|
||||
|
||||
|
|
@ -0,0 +1,88 @@
|
|||
# Parallel Work & Lane Isolation Plan — Iteration 04
|
||||
|
||||
| Field | Value |
|
||||
|---|---|
|
||||
| **Iteration** | `iteration-04` |
|
||||
| **Governed Standard** | UP-AI v1.5 Standard |
|
||||
| **Integration Skill** | `up-parallel-work-integrate` |
|
||||
| **Status** | Approved for Construction |
|
||||
| **Version** | 1.0.0 |
|
||||
| **Last CR** | none |
|
||||
|
||||
---
|
||||
|
||||
## 1. Wave 0 — Sandbox & Integration Scaffolding
|
||||
|
||||
Before parallel application lanes commence development, Wave 0 establishes deterministic offline fixtures, mock master data, and simulated external services:
|
||||
|
||||
| Adapter Component | Physical Path | Target Dependency | Mode | Owner |
|
||||
|---|---|---|---|---|
|
||||
| **Warehouse Master & Capacity Seeder** | `sandbox/warehouse_mock.py` | Multi-Godown Locations & Capacities | Deterministic In-Memory Godown Seeder | `@backend-dev-alpha` |
|
||||
| **Customer Credit Limit Mock** | `sandbox/customer_credit_mock.py` | Counterparty Receivables & Credit Bureau | Deterministic Credit Exposure Engine | `@backend-dev-beta` |
|
||||
| **Fleet & Transporter Registry Mock** | `sandbox/fleet_mock.py` | Carrier Registry & Telematics Status | Deterministic Carrier Fleet Seeder | `@backend-dev-gamma` |
|
||||
|
||||
- **Wave 0 Completion Criteria:**
|
||||
1. `sandbox/warehouse_mock.py` pre-seeds standard warehouses (`WH-01` Neemuch Main Yard - 2,000 MT, `WH-02` Neemuch North - 1,500 MT, `WH-03` Mandsaur - 1,000 MT, `WH-04` Indore - 3,000 MT), stack chambers, and initial stock ledgers.
|
||||
2. `sandbox/customer_credit_mock.py` pre-seeds customer profiles across segments (`Wholesale`, `Processor`, `Institutional`, `Distributor`) with sanctioned credit limits and outstanding balances.
|
||||
3. `sandbox/fleet_mock.py` pre-seeds transport vehicles (owned and contract carriers) with payloads and maintenance statuses.
|
||||
|
||||
---
|
||||
|
||||
## 2. Lane Allocations & Isolation
|
||||
|
||||
### Lane 1: Warehouse Inventory & Stock Ledger (`lane/warehouse-inventory`)
|
||||
- **Assigned Stories:** `STORY-WH-001`, `STORY-WH-002`, `STORY-WH-003`
|
||||
- **Owners:** `@backend-dev-alpha`, `@ui-dev-alpha`
|
||||
- **Allowed Scope / Paths:**
|
||||
- `backend/app/inventory/` (Stock ledger manager, capacity evaluator, internal transfer controller)
|
||||
- `backend/app/models/inventory.py` (Stock ledger, stock adjustment, capacity, transfer entities)
|
||||
- `backend/alembic/versions/009_warehouse_inventory.py`
|
||||
- `frontend/src/features/inventory/` (Ledger view, capacity dashboard, stock transfer screen)
|
||||
- `tests/backend/test_warehouse_*.py`, `tests/backend/test_stock_ledger_*.py`
|
||||
- **Shared Artifacts & Ownership:** `stock_ledger_entries` table schema and `GET /api/v1/inventory/balance` contract (Single Owner: `@backend-dev-alpha`).
|
||||
- **Required Contracts:** [`LLD-003`](file:///home/ps-ch/w/prj/mandi/04_generated_documentation/04_architecture_design/lld/LLD-003_receiving_quality_inventory.md).
|
||||
- **Dependencies:** Iteration 03 `inventory_lots` schema; Iteration 02 `TenantContext` & RLS engine.
|
||||
- **Completion Evidence:** Unit tests pass with $\ge 95\%$ coverage; double-entry balance verified; non-negative invariant tested; $\pm 1.0\%$ adjustment approval rule verified; transfer tolerance ($\pm 0.2\%$) tested.
|
||||
|
||||
---
|
||||
|
||||
### Lane 2: Customer Sales Contracts & Inventory Allocation (`lane/sales-contracts`)
|
||||
- **Assigned Stories:** `STORY-SALES-001`, `STORY-SALES-002`, `STORY-SALES-003`
|
||||
- **Owners:** `@backend-dev-beta`, `@ui-dev-beta`
|
||||
- **Allowed Scope / Paths:**
|
||||
- `backend/app/sales/` (Sales contract controller, credit exposure checker, lot allocation manager)
|
||||
- `backend/app/models/sales.py` (Sales order, sales allocation, credit check entities)
|
||||
- `backend/alembic/versions/010_sales_contracts.py`
|
||||
- `frontend/src/features/sales/` (Sales order register, booking form, credit warning banner, allocation modal)
|
||||
- `tests/backend/test_sales_*.py`, `tests/backend/test_credit_exposure_*.py`
|
||||
- **Shared Artifacts & Ownership:** `customer_sales_orders` table schema and `GET /api/v1/sales/orders/{id}` contract (Single Owner: `@backend-dev-beta`).
|
||||
- **Required Contracts:** [`LLD-004`](file:///home/ps-ch/w/prj/mandi/04_generated_documentation/04_architecture_design/lld/LLD-004_financial_controls.md), [`LLD-003`](file:///home/ps-ch/w/prj/mandi/04_generated_documentation/04_architecture_design/lld/LLD-003_receiving_quality_inventory.md).
|
||||
- **Dependencies:** Iteration 03 `inventory_lots` table (released status check); Wave 0 Credit mock.
|
||||
- **Completion Evidence:** Unit tests pass with $\ge 95\%$ coverage; credit limit $> 80\%$ warning and $> 100\%$ blocking tested; lot allocation invariant (only `Released` lots allowed) verified.
|
||||
|
||||
---
|
||||
|
||||
### Lane 3: Outbound Dispatch, Weighbridge & Fleet Registry (`lane/dispatch-fleet`)
|
||||
- **Assigned Stories:** `STORY-DISP-001`, `STORY-DISP-002`, `STORY-DISP-003`, `STORY-FLEET-001`
|
||||
- **Owners:** `@backend-dev-gamma`, `@ui-dev-gamma`
|
||||
- **Allowed Scope / Paths:**
|
||||
- `backend/app/logistics/` (Dispatch board console, outward weighbridge, Bilty generator, POD tracker, fleet manager)
|
||||
- `backend/app/models/logistics.py` (Outbound dispatch, outward weighment, bilty, fleet registry entities)
|
||||
- `backend/alembic/versions/011_dispatch_and_fleet.py`
|
||||
- `frontend/src/features/logistics/` (Dispatch board, weighbridge console, bilty view, fleet registry)
|
||||
- `tests/backend/test_dispatch_*.py`, `tests/backend/test_fleet_*.py`
|
||||
- **Shared Artifacts & Ownership:** `outbound_dispatches` and `transport_fleet` tables (Single Owner: `@backend-dev-gamma`).
|
||||
- **Required Contracts:** [`LLD-004`](file:///home/ps-ch/w/prj/mandi/04_generated_documentation/04_architecture_design/lld/LLD-004_financial_controls.md), [`LLD-009`](file:///home/ps-ch/w/prj/mandi/04_generated_documentation/04_architecture_design/lld/LLD-009_fleet_and_expense.md).
|
||||
- **Dependencies:** Lane 2 `customer_sales_orders` contract model; Lane 1 warehouse stock balance.
|
||||
- **Completion Evidence:** Unit tests pass with $\ge 95\%$ coverage; vehicle maintenance assignment block tested; outward weighbridge gross > tare and $\pm 1.0\%$ order tolerance verified; POD shortage credit note generation tested.
|
||||
|
||||
---
|
||||
|
||||
## 3. Merge & Integration Sequence
|
||||
|
||||
1. **Integration Step 1 (Wave 0):** Land mocks (`sandbox/warehouse_mock.py`, `sandbox/customer_credit_mock.py`, `sandbox/fleet_mock.py`).
|
||||
2. **Integration Step 2 (Lane 1):** Land Warehouse Inventory models and Alembic revision 009.
|
||||
3. **Integration Step 3 (Lane 2):** Land Sales Contracts, Credit Check & Allocation models and Alembic revision 010.
|
||||
4. **Integration Step 4 (Lane 3):** Land Outbound Dispatch, Outward Weighbridge, Bilty, and Fleet Registry models and Alembic revision 011.
|
||||
5. **Integration Step 5 (E2E Verification):** Run live container migrations 009–011, execute multi-path unit suites ($\ge 95\%$ coverage), and verify live container E2E stock-to-dispatch lifecycle.
|
||||
|
||||
|
|
@ -185,3 +185,25 @@ Executed Stage 13 code generation, refactoring, automated testing, containerized
|
|||
- Executed `scripts/verify_traceability_gates.py --all --run-tests`: Gate 5.1 (PASS), Gate 9.1 (PASS), Gate 14.1 (PASS for iteration-01, iteration-02, and iteration-03).
|
||||
- Authored Checkpoint `CKPT-022` (`04_generated_documentation/00_process_control/checkpoints/checkpoint-022-iteration-03-mandi-pipeline-delivery.md`).
|
||||
- Updated `checkpoint_index.md` and `master_context.md`.
|
||||
|
||||
## 2026-10-12T08:16:00Z — User
|
||||
|
||||
proceed
|
||||
|
||||
## 2026-10-12T08:22:00Z — Assistant — Action summary
|
||||
|
||||
Executed Stage 10 Iteration Planning (`/up-iteration-plan`) for Iteration 04 (Warehouse Inventory, Stock Ledger & Sales Dispatch):
|
||||
1. Iteration 03 Retrospective:
|
||||
- Authored `04_generated_documentation/05_iteration_planning/iterations/iteration-03/retrospective.md` formalizing full delivery of Iteration 03 (16 FRs, 52 pts, 95.4% test coverage, live container migrations 005–008, 13/13 live E2E tests, 0 carried-over scope, 0 open CRs).
|
||||
2. Iteration 04 Scope & Backlog:
|
||||
- Selected vertical slice spanning `UC-007` (Warehouse Stock, Audit, Capacity and Transfer), `UC-008` (Customer Sales Contract, Credit Check and Allocation), `UC-009` (Outbound Dispatch and Delivery), and `UC-010` (Transport Fleet Registry).
|
||||
- Authored `iteration_plan.md` defining 40-point capacity across 10 stories, demo criteria, and regression test continuity.
|
||||
- Authored `iteration_backlog.md` detailing `STORY-WH-001`–`003`, `STORY-SALES-001`–`003`, `STORY-DISP-001`–`003`, and `STORY-FLEET-001` with explicit acceptance criteria, tolerance thresholds, and invariant checks.
|
||||
3. Delivery Surface Matrix & Parallel Work Plan:
|
||||
- Authored `iteration_surface_matrix.md` covering all 11 dimensions across React screens, FastAPI endpoints, Alembic migrations 009–011, Wave 0 sandboxes, and test scopes.
|
||||
- Authored `parallel_work_plan.md` establishing Wave 0 mocks (`warehouse_mock.py`, `customer_credit_mock.py`, `fleet_mock.py`) and 3 isolated parallel lanes (Lane 1: Warehouse Inventory, Lane 2: Sales Contracts & Allocation, Lane 3: Outbound Dispatch & Fleet).
|
||||
4. Traceability & Governance:
|
||||
- Advanced `UC-007`, `UC-008`, `UC-009`, `UC-010` and their 10 child FRs (`FR-WAREHOUSEINVENTORY-001`–`003`, `FR-SALESCONTRACTS-001`–`003`, `FR-DISPATCHDELIVERY-001`–`003`, `FR-FLEETREGISTRY-001`) to `In Construction` in `traceability_graph.md`.
|
||||
- Verified Quality Gates 5.1 and 9.1 with zero blocking issues; Gate 14.1 verified for iterations 01, 02, and 03.
|
||||
- Authored Checkpoint `CKPT-023` (`checkpoint-023-iteration-04-planning.md`), updated `checkpoint_index.md` and `master_context.md`.
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue