Files
LWLT-AIBOT/.project-docs/30-worklog/tasks/20260914-arrangements-create-empty-slot-01a0858b.md
2026-09-14 14:26:32 +08:00

4.7 KiB

Extend empty-row create to remaining arrangements

Scope and repository gate

  • User requests extending the hotel fix to remaining arrangements. User's guide screenshot shows one guide editor and no add-row entry; preserve the established single-guide contract and give an actionable change-command message when occupied. Vehicle, transport and other/filing create should choose an empty native cost row.
  • Feature mode on main, /Users/andy/IdeaProjects/LWLT-AIBOT, base 4194a200c1, one worktree. Existing changes are known hotel 0.5.179 and polling-log fixes from this conversation; preserve them, including .idea metadata. Overlap: Clear, authorized continuation of the owned adapter/release files. No new concurrent worktree/task observed.
  • Read repository entry/gate, memory, business registry, arrangement contracts and current source. No .env reads, ERP access/write, deployment, restart or external sending. Main-thread only under user no-subagent constraint.

Plan

  1. Share indexed-create row selection, structural readiness, internal binding, snapshot preservation and new-record requery across hotel/vehicle/transport/other, while keeping per-action native fields and linkage.
  2. Preserve other/filing shared fields and optional quantity defaults. Protect guide singleton; retain change/clear behavior. Retain stored hotel 0.5.179 requery evidence compatibility.
  3. Exercise real adapter logic with synthetic native form/POST boundaries, covering all actions, multiple and sorted rows, invalid/paid/draft rows, optional fields, global preservation, blocked callbacks and reconciliation.
  4. Release 0.5.180 with matching runtime/platform/mapping/tests/ZIP/manifest, archive prior artifact, run required checks and record final read-only review.

Results and verification

  • User explicitly confirmed only one guide can be assigned. Guide create keeps its singleton guard and emits an actionable change-command business message when preflight sees an existing guide; guide update/clear remains unchanged.
  • Vehicle, transport and other/filing now share hotel indexed-create selection and native MaxI/complete-row structural readiness. Public create still forbids target; only the validated internal operation binds the first complete unused row.
  • Native SelectBox callback, dates, quantities, status and remark use the selected row. Full-form POST protects existing rows by control identity/value signature, selected row ID and financial/audit state, including a second guard after native validation immediately before POST.
  • Other/filing preserves omitted native quantity and global filing values, blocks conflicting existing filing or realized flags, and verifies the preserved values by digest after save. Callback-induced changes stop before POST.
  • Fresh requery matches exactly one new persisted ID and all existing rows by ID/digest, including ERP sorting. Background forwards arrangement_create evidence during read-only reconciliation; hotel_create shape and hotel digest order remain compatible with 0.5.179.
  • Packaged 0.5.180; synchronized manifest/runtime/platform minimum/mapping/tests/README/release gate. ZIP 20/20 files byte-identical with source; all seven release hashes valid. Archived 0.5.179 ZIP and manifest with its unchanged original hash.
  • Targeted tests: 121/121; control-plane: 227/227; legacy: 346/346; typecheck/build/diff check: PASS. Original repo check: 8/10, with two known .idea/.DS_Store metadata failures preserved. Byte-verified clean source copy: repo 10/10; legacy tests used loopback permission in this secret-free copy.
  • Final main-thread read-only review: PASS. No subagents were used under the user's no-subagent constraint. No true ERP write/deployment/restart/database/external-send operations performed.
  • Evidence: validation summary (repository path: archive/evidence/2026-09-14/20260914-arrangements-create-empty-slot-01a0858b).
  • Deployment handoff: replace the Chrome extension with dist/ltjt-order-assistant-0.5.180.zip and refresh ERP tabs. This runtime fix requires no service logic deployment or migration. Real ERP acceptance remains for the operator.

Promotion candidates

  • Guide is a single-person ERP arrangement, explicitly confirmed by the operator; do not model guide create as append.
  • Native cost-row completeness and MaxI replace absolute create field-count thresholds for hotel/vehicle/transport/other.
  • Indexed create needs stored before-ID/digest evidence for safe read-only reconciliation. Other/filing carries team-global values outside the indexed rows.
  • Canonical memory remains read-only in Feature mode; these facts are candidates for later Integration promotion.