Files
LWLT-AIBOT/.project-docs/30-worklog/tasks/20260914-hotel-structural-readiness-01a0858b.md
T
2026-09-14 12:47:15 +08:00

4.9 KiB

Hotel create structural readiness

Scope and repository gate

  • User requests fixing the repeated hotel-create preflight rejection lifecycle_form_incomplete:76:150 and assessing the soundness of structural readiness. Screenshot shows the selected team's hotel editor with two empty rows and a save footer; screenshot alone does not prove hidden DOM completeness.
  • Feature work on main, /Users/andy/IdeaProjects/LWLT-AIBOT, base e06afc8c33b27bd9150dbe67e97772ab2420c8db; one worktree. Existing instruction-document/release and HTTP logging changes belong to preceding tasks in this conversation and will be preserved. Existing .idea is not task-owned. Overlap: Clear for adapter/tests; known release-metadata continuation only.
  • Main-thread work only under the user's no-subagent constraint. No ERP access/write, deployment, restart, extension reload or external sending. No .env access.
  • Scope: hotel create readiness, its regression tests, versioned plugin delivery and release metadata. Existing hotel update/clear and other action gates remain unchanged. Parser/business fields and database schema do not change.

Plan

  1. Replace the hotel-create absolute serialized-field threshold with structural checks of the native row marker, indexed required controls, connected form, loading and a full observed stable interval.
  2. Reproduce the 76-field failure and cover short/large forms plus malformed/incomplete/changing forms. Verify later identity, resource, empty-slot, financial/audit and ownership gates still stop writes.
  3. Increment extension version, synchronize platform minimum/mapping/tests, package from source, archive the prior package and manifest, and run required repository checks.

Findings and limitations

  • Current waitForFormReadiness requires 150 serialized entries for hotel create, independent of actual page size. Both 76 and prior 154 are counts, not business quantities.
  • Existing history records native arrangement MaxI shrinking with slot count. Native row fields are zero-indexed. Current create contract targets slot 0; existing slot/identity/resource/ownership gates remain authoritative after readiness.
  • Local fixtures are synthetic and contain no customer data. Deployed ERP acceptance remains for the user; no local test will be represented as a production success.

Validation / result

  • Implemented hotel-create structural readiness: positive safe-integer MaxI, contiguous zero-based rows matching that count, required controls on every row plus original global controls, unique native names, enabled controls (including inherited fieldset disabling), current connected form and complete document. Read-only linked fields remain allowed.
  • Readiness waits for no loading/native jQuery Ajax and an actually observed stable 1000ms. MaxI, control names/ids/types/states/options, node identity and diagnostic serialized count participate in stability; the final timeout sample is checked. No business values are added to diagnostics.
  • Baseline reproduction against committed adapter: the same complete two-row 76-field fixture fails with lifecycle_form_incomplete:76:150. Fixed targeted regression suite: 15/15 PASS, covering variable sizes, missing later-row fields, malformed markers, gaps, disabled/duplicate/id-only controls, detached/replaced forms, loading, same-count changes and timeout boundaries. Later identity/resource/slot/financial/audit/ownership rejection still demonstrated.
  • node --run check, node --run test:control-plane (226/226) and node --run build: PASS. Original check:repo 8/10 has only prior .idea / .DS_Store failures, preserved. Sandboxed legacy HTTP tests initially hit loopback EPERM; rerun with local-listener permission on a 2612-file byte-verified source copy excludes only local metadata/secrets/generated residue: check:repo 10/10 and test:legacy 319/319 PASS.
  • Plugin 0.5.178, platform minimum, runtime versions, mapping and tests synchronized. ZIP has manifest.json at root and matches all 20 source files, including README; all release-manifest hashes validated. Prior 0.5.177 ZIP and prior 0.5.132 manifest archived; instruction DOCX and Skills unchanged.
  • Main-thread final read-only review: PASS. Existing unrelated changes preserved; no native submission, parser, DB migration, deployment, restart or external sending changed/executed. Actual ERP acceptance remains for user deployment; this runtime fix can be tested by replacing the plugin on the existing service (new platform minimum metadata rolls out with a later service release).
  • Evidence: validation record.

Promotion candidates

  • Candidate: hotel create now uses structural readiness instead of the historical 150-field heuristic; plugin baseline 0.5.178. Canonical memory remains unchanged during this feature task. User deployment must still verify the actual native hotel row marker/DOM and final ERP business outcome before claiming production success.