Files
FT546MWS/docs/superpowers/plans/2026-09-16-ft546wms-layer1-inbound-pilot.md

2.4 KiB

FT546WMS Floor 1 Inbound Pilot Implementation Plan

Goal: Prepare, but do not activate, a warehouse 01 floor 1 inbound pilot with atomic mutation and automatic Legacy fallback.

Constraints: No field restart, process switch, SQL installation, or production business-data write. SQL Server 2016 syntax only. The independent pilot switch remains disabled in every prepared startup file.

Task 1: Routing contract

  • Add failing configuration tests for the disabled default and explicit pilot properties.
  • Add failing service tests for out-of-scope Legacy routing, successful pilot single-writer routing, conflict fallback, and exception fallback.
  • Add the pilot properties, result contract, and the minimal ToWmsServiceImpl routing seam.

Task 2: Floor-constrained bounded planning

  • Add a failing planning test proving targetFloor=1 is forwarded to the algorithm.
  • Add a synchronous pilot planner that accepts only a current published warehouse 01 snapshot.
  • Run planning in a dedicated single-thread daemon executor with a bounded wait; timeout/cancellation remains read-only.
  • Reject missing, stale, changing, non-ready, or non-assigned plans and route them to Legacy.

Task 3: Atomic production mutation

  • Add mapper contract tests and static SQL safety tests first.
  • Add dbo.proc_allot_layer1_inbound_pilot with one transaction, XACT_ABORT, update/range locks, live floor/lane/space checks, guarded row counts, and LED parity.
  • Add Java mutation result handling and post-exception assignment resolution so an uncertain commit never triggers a second writer.
  • Record best-effort INBOUND_PILOT evidence in existing alg.decision_log.

Task 4: Operations package

  • Add SQL Server 2016 install, read-only check, rollback, and CMD wrappers.
  • Add a disabled IDEA run configuration template and a concise field runbook.
  • Ensure every prepared configuration sets FORTUCKY_INBOUND_PILOT_ENABLED=false.

Task 5: Verification and delivery

  • Run focused red/green tests, all affected module tests, and offline packaging.
  • Inspect the JAR for the new classes/configuration and verify no secret is packaged by this change.
  • Request an independent code review and address critical or important findings.
  • Prepare and upload versioned artifacts only; do not install, restart, switch, or activate.