4.5 KiB
4.5 KiB
Hotel create selects an empty native row
Scope and gate
- User authorizes fixing hotel create blocked by occupied slot 0 when later native rows are empty. Latest screenshot has an existing 09-04 → 09-05 hotel stay and asks to add 09-05 → 09-06; no ERP write occurred in the blocked execution.
- Feature mode, main, /Users/andy/IdeaProjects/LWLT-AIBOT, base 4194a200c17ed51b3991aa5f86a8eff862b080c0; one worktree. Prior logging edits in control-plane/src/server.ts, control-plane/test/diagnostics.test.ts and their task record are known preceding work, preserved. Existing .idea and version 0.5.178 ZIP preserved until the latter is archived with release synchronization. Overlap: Clear.
- Entry/gate and current canonical/business documentation loaded; canonical memory stays read-only. Main-thread implementation under the user's no-subagent constraint.
- No ERP access/write, deployment, restart, external messages, or .env access.
Plan
- Select the first structurally complete, genuinely empty hotel row after normal preflight readiness; keep row binding inside the plugin, with the public create contract still forbidding user-supplied targets.
- Bind resource proof, native SelectBox linkage, dates, rooms, status, remarks and validation to that row. Preserve all other indexed controls, reject unsaved drafts, and recheck immediately at the network boundary.
- Persist before-write row evidence in the result. Fresh requery must find exactly one new persisted row with matching business values and preserve existing records, including when ERP sorts rows. Pass the same evidence to read-only reconciliation.
- Add behavioral regressions, increment/synchronize 0.5.179, package and verify source bytes, archive prior release, run required checks.
Result / validation
- Completed: hotel create selects the first complete empty native row after structural readiness, proves the resolved hotel on that row, and internally binds SelectBox, dates, rooms, status, remarks and snapshots to it. Public create input remains unchanged and caller-supplied target is still rejected.
- Rejects missing/duplicate row structure, no empty slot, and unsaved draft/payment/audit data in unpersisted rows, since the native save serializes the whole form. Before POST, rechecks other indexed values and control identities, selected empty id, financial state, exact ERP identity, structure and final business values, including changes caused by native validation callbacks.
- Result preflight contains same-operation before evidence (existing record ids and business hashes). Fresh requery requires exactly one new persisted id with matching requested values and all prior records preserved; ERP row sorting is supported. Background read-only reconciliation passes the original stored evidence and performs no second save; missing evidence remains unverified.
- 25/25 targeted hotel tests PASS; includes create slot 0/1/10, prior row preservation, sorting, no slot, drafts, missing row fields, stale preflight, forbidden user target, native callback and validation mutations, wrong/new/duplicate record evidence, and existing hotel update/readiness regressions.
node --run check,node --run test:control-plane(227/227),node --run build, andgit diff --check: PASS. Originalcheck:reporemains 8/10 due to prior.idea/.DS_Store; sandboxed legacy HTTP tests hit loopback EPERM. A 2622-file byte-verified copy excluding only secrets/local metadata/generated directories passescheck:repo10/10 andtest:legacy325/325 with permitted loopback listeners. Existing unrelated files preserved.- Extension/runtime/platform minimum/mapping/tests synchronized to 0.5.179. ZIP is flat and matches all 20 source files byte-for-byte; every release-manifest artifact hash verified. Previous 0.5.178 ZIP and manifest archived unchanged; instruction DOCX and Skills unchanged. No service business logic, parser contract or database migration added by this task.
- Main-thread final read-only review: PASS. No ERP access/write, production deployment, restart, reload or external sending. Production acceptance remains for the user; the hotel fix requires replacing the plugin only, with no service deployment prerequisite.
- Evidence: verification record.
Promotion candidates
- Hotel create now selects a proved empty row instead of always using slot 0, and reconciles against before-write row identities; extension baseline 0.5.179. No canonical promotion in Feature mode; real ERP acceptance pending deployment.