判断修改

This commit is contained in:
andy committed 2026-09-14 12:47:15 +08:00
1 parent e06afc8c33
commit 4194a200c1
65 files changed
+9617 -109

No files matched your search

@@ -0,0 +1,23 @@
# Clarify arrangement update instructions
## Scope and gate
- Feature continuation on `main`, worktree `/Users/andy/IdeaProjects/LWLT-AIBOT`, base `e06afc8c33b27bd9150dbe67e97772ab2420c8db`; one worktree. Source is clean; existing untracked .idea and extension 0.5.177 ZIP are preserved. No overlapping activity visible. Overlap: Clear.
- User accepted the preceding review and requests fixing the instruction document: five complete templates, explicit original-date selectors and optional replacement filters, legacy hotel syntax separated from current guidance.
- Main-thread work only per user constraints. No changes to ERP execution behavior, no production operations, no external sending. Feature writes stay in this task record; canonical memory remains unchanged.
## Plan
1. Rewrite section 16 and clarify the global date rule, retaining legacy hotel syntax only in a separate compatibility note.
2. Adapt the existing catalog tests to verify five template/example pairs against actual Program routes, required/optional fields and date semantics.
3. Rebuild/version the DOCX with Documents skill, inspect every page, synchronize release metadata and archive the prior DOCX with its manifest.
## Validation and result
- Completed: section 16 has five complete marked template/example pairs. Required and optional fields, original-date selectors, replacement filters and unique original-record selection are explicit. Legacy hotel syntax is isolated with its date-mutation and default-first-row limitations.
- Delivery DOCX/input-contract metadata: 0.5.132. Parser remains v1.0.11 and plugin remains 0.5.177; no execution behavior or migration changed. Prior DOCX 0.5.131 plus manifest archived with exact hashes.
- Existing catalog tests adapted and passed 16/16. Direct Program parser validation: 33 checks across five directives, including filled templates, concrete examples, optional omissions, required-field omissions and date-selector assertions.
- `node --run check`, `node --run test:control-plane` (223/223) and `node --run build`: PASS. Original `check:repo` is 8/10 and `test:legacy` is 311/313, with only the existing `.idea` and `.DS_Store` hygiene failures. A 2574-file SHA-256 verified source copy passes `check:repo` 10/10 and `test:legacy` 313/313. Existing user files preserved.
- Documents render gate: 16/16 pages opened and inspected; PASS for Chinese glyphs, complete code blocks, headings and layout. Only document.xml and core.xml differ from retained template; styles, margins and other package parts preserved.
- Main-thread final read-only review: PASS. Scope and release hashes verified; no subagents, real ERP writes, deployment, restart or external sending.
- Evidence: [validation record](../../../archive/evidence/2026-09-11/20260911-arrangement-instruction-docs-01a0858b/README.md).
## Promotion candidates
- Operator instructions use five explicit arrangement-update directives; legacy generic hotel update is documented separately because it can modify the departure date and defaults to the first hotel row.
@@ -0,0 +1,25 @@
# Silence successful heartbeat diagnostics
## Scope and gate
- Feature task on `main`, worktree `/Users/andy/IdeaProjects/LWLT-AIBOT`, base `e06afc8c33b27bd9150dbe67e97772ab2420c8db`; one local worktree. Overlap: Clear.
- Existing uncommitted instruction-document, route-description, release, test and evidence changes belong to the preceding completed task and are preserved. Existing `.idea/`, `.DS_Store` and extension ZIP are preserved.
- User requests silencing normal heartbeat logs while retaining failures so production errors remain visible. Main-thread work only. No deployment, restart, ERP access, external sending, attachment-flow changes, or canonical memory writes.
- Owned files: `control-plane/src/server.ts`, `control-plane/test/diagnostics.test.ts`, this task record.
## Plan
1. Silence request-start and successful request-completion logs only for the plugin heartbeat and liveness/readiness probes; remove the separate readiness-success log.
2. Preserve request IDs, timing, failure logs, authentication, heartbeat handling and all business diagnostics. Verify real HTTP handlers with local injected requests and stubbed dependencies.
3. Run repository-required checks and record any pre-existing hygiene failures separately.
## Verification and outcome
- Completed: exact `POST /api/connections/heartbeat` and `GET|HEAD /health/live|ready` requests skip start logs and skip completion logs only for HTTP 2xx. The separate `health.readiness.passed` log is removed. Other HTTP and business diagnostics retain their previous behavior.
- Failure completion logs still include severity, method, path, status, request ID and duration. Readiness failure details now use the request logger and include the same request ID. Heartbeat authorization, payload validation, handler execution, response bodies and frequency are unchanged.
- Focused diagnostics tests: PASS 8/8, including repeated successful heartbeats, GET/HEAD probes, unchanged handler execution, regular HTTP logging, and failures 400/401/403/500/503 with correlated error codes and redaction.
- `node --run check`, `node --run test:control-plane` (225/225), `node --run build`, and `git diff --check`: PASS.
- Original-worktree `check:repo`: 8/10; only pre-existing `.idea` and `.DS_Store` residue. Original sandboxed `test:legacy`: 309/313; the same two hygiene failures plus two local HTTP tests unable to listen on 127.0.0.1 (`EPERM`).
- A temporary copy of 2607 files was SHA-256 checked against the source, excluding secrets and IDE/OS residue. In that copy, `check:repo` passes 10/10 and `test:legacy` passes 313/313 after allowing the tests' temporary loopback listeners. Original user files were not removed or changed.
- Main-thread final read-only review: PASS. Only the three owned files were changed by this task. No deployment, restart, ERP access, external sending, plugin release or migration was performed. This change requires rebuilding and deploying the control-plane service image to take effect in production.
- Temporary verification outputs: `/private/tmp/ltjt-heartbeat-logs-20260914/`. No business data or credentials were included.
## Promotion candidates
- Target: canonical operational-diagnostics description. Proposal: successful plugin heartbeat and liveness/readiness probes are silent; failed probe responses retain correlated structured diagnostics. Evidence: `control-plane/test/diagnostics.test.ts` and passing tests above. Human confirmation: already requested by the user; canonical promotion deferred to Integration mode.
@@ -0,0 +1,29 @@
# 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](../../../archive/evidence/2026-09-14/20260914-hotel-structural-readiness-01a0858b/README.md).
## 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.
@@ -0,0 +1,22 @@
# Diagnose local XLS conversion failure
## Scope and gate
- Feature task on `main`, worktree `/Users/andy/IdeaProjects/LWLT-AIBOT`, base `e06afc8c33b27bd9150dbe67e97772ab2420c8db`; one worktree. Overlap: Clear.
- Existing document/release changes and the completed heartbeat logging changes belong to earlier work in this conversation and are preserved. Existing IDE/OS files are not changed.
- User confirms running `npm run dev` from IDEA. The observed local error is `roster_workbook_conversion_failed` with `converter_unavailable`. User subsequently clarifies the objective is identifying the reported error, not making the workbook import successfully.
- Final scope: diagnosis only and this task record. No `.env` reads/changes, production changes, ERP writes, plugin changes, or canonical memory updates. Main-thread work only.
## Findings
- `document-converter.ts` maps child-process `ENOENT` to `converter_unavailable`. The configured command could not be found/launched in the failing service's runtime; the IDEA environment's exact `DOCUMENT_CONVERTER_PATH` and PATH have not been inspected, so a bad explicit path versus missing PATH entry remains to be distinguished.
- Local LibreOffice exists in the bundled runtime. Supplying its absolute executable path successfully converts the supplied legacy XLS through the project's converter, proving this file can be converted and the reported error is converter availability, not a workbook validation failure.
- The converted original workbook then fails a separate data validation (`roster_workbook_non_contiguous_rows`). Inspect structure without copying customer data into the repository; do not silently discard populated records or change data rules.
## Verification and outcome
- Original XLS converted successfully using bundled LibreOfficeDev 26.8 and the project conversion function. No database, ERP or external service was used.
- Separate downstream validation: rows 3–20 contain 18 entries; row 21 is blank; row 22 contains a different person with repeated sequence 8. The user says row 22 is not needed, then explicitly redirects the work to diagnosis. No workbook edits, import copy, task submission or actual import was performed.
- An automatic local converter bootstrap was briefly prepared under the earlier interpretation, then all code, package-script and README changes from this task were withdrawn after the user's clarification. Earlier completed changes, including heartbeat logging, are preserved.
- Final code matches the previously verified source; no new runtime behavior is delivered. Only this diagnostic task record remains.
## Follow-up
- If exact local configuration diagnosis is requested, inspect only the effective converter path and command availability in IDEA's actual npm runtime; do not read or expose the complete `.env` or process environment.
- No canonical promotion proposed.
@@ -0,0 +1,22 @@
# Silence successful workbench polling access logs
## Scope and gate
- Feature continuation on `main`, worktree `/Users/andy/IdeaProjects/LWLT-AIBOT`, base `e06afc8c33b27bd9150dbe67e97772ab2420c8db`; one worktree. Overlap: Clear: changes in `server.ts` and `diagnostics.test.ts` are the completed same-thread heartbeat fix and are extended in place.
- User reports continued INFO access-log noise for successful GET `/api/status` and GET `/api/tasks`, continuing the request to silence normal polling so errors remain visible. Local Excel investigation is paused.
- Own `control-plane/src/server.ts`, `control-plane/test/diagnostics.test.ts`, this task record. Preserve all preceding document/release/heartbeat edits and IDE files. No frontend timing changes, database/ERP activity, deployment, restart, external sending or canonical memory updates. Main-thread work only.
## Findings and plan
- Earlier silence rule covers only plugin heartbeat and liveness/readiness probes. Workbench status and task-list reads therefore still emit request-start and request-completion INFO messages.
- `/api/tasks` serves multiple queries (display list, active tasks, confirmed tasks); privacy-safe access paths omit query parameters. Repeated same paths do not establish duplicate task execution. Background refresh runs every 30 seconds and also on focus/visibility changes; runtime/event handlers can trigger additional reads.
- Extend the exact GET/HEAD allowlist to the two reported paths. Keep HTTP failures and write requests visible; do not silence task-detail/subpaths or business diagnostics. Verify actual handlers, status/error correlation and write-method isolation.
## Verification and outcome
- Completed: GET/HEAD `/api/status` and `/api/tasks` join the quiet polling allowlist. Only successful 2xx completion access logs and their start logs are suppressed. Existing heartbeat/probe silence remains. Errors, task writes and task detail/subpath access logging remain visible.
- Focused diagnostics tests: 9/9 PASS. Tests inject actual GET/HEAD polling handlers, prove they still execute, check 400/401/500 failure correlation/severity and ensure successful POST `/api/tasks` and GET `/api/tasks/:taskId` still emit start/completion INFO logs. No task or database was changed; dependencies were stubbed.
- `node --run check`, `node --run test:control-plane` (226/226), `node --run build`, `git diff --check`: PASS.
- Original `check:repo`: 8/10; only existing `.idea`/`.DS_Store` residue, preserved. A 2609-file SHA-256 verified temporary source copy excluding secrets and that residue passes `check:repo` 10/10 and `test:legacy` 313/313. Loopback listener permission was used for the existing HTTP tests, as required by this sandbox.
- Main-thread final read-only review: PASS. This task changes only its three owned files. Temporary verification output: `/private/tmp/ltjt-polling-logs-20260914/`.
- The user's existing IDEA process must be restarted with `npm run dev` to load this source change; no local service restart or production action was performed.
## Promotion candidates
- Target: canonical operational-diagnostics description. Include successful workbench status/task-list reads in the quiet access-log policy; HTTP failures, task mutations and business events retain diagnostics. Evidence: focused handler tests and passing checks above. User intent continues the accepted logging-noise request; canonical promotion remains deferred to Integration mode.