docs: record product search integration

This commit is contained in:
inman
2026-09-02 19:45:58 +08:00
parent e4fd91677c
commit a045701dfc
5 changed files with 66 additions and 5 deletions

View File

@@ -24,10 +24,12 @@ This file is the integrated default-branch snapshot. Feature tasks record progre
- Merge commit `cc09506` integrating source commit `b1fe533` from task `20260902-dashboard-metrics-static-a91c` for display-only dashboard metric cards and explicit status filtering.
- Integration task `20260902-integrate-all-push-c93a7f21` for all-worktree reconciliation, semantic merge resolution, canonical promotion, full verification, and synchronization of `main` to `origin/main`.
- Merge commit `336ca6e` integrating source commit `b26001e` from task `20260902-account-permission-ui-6c9e21ad` for a scroll-safe account task-permission editor layout and focused regression coverage.
- Merge commit `e4fd916` integrating source commit `b5c727b` from task `20260902-diagnose-parse-error-7f3a9c2d` for native non-empty ERP product search in scatter-plan creation and independent batch-order creation, synchronized as extension `0.5.165`.
- Integration task `20260902-integrate-product-search-3b7f6a20` for canonical product-search promotion, full release verification, and normal non-force synchronization to `origin/main`.
## Current Focus
Operate the repository's current `0.5.164` extension baseline and fixed-scope account model safely, bind each enabled AgentBus channel to one employee/ERP identity, provision narrow route grants, use explicit leadership-dashboard filters, and preserve Program/AI plus organization-wide ERP execution boundaries. Migration 018, extension reload, and service rollout remain separately authorized runtime work.
Operate the repository's current `0.5.165` extension baseline and fixed-scope account model safely, bind each enabled AgentBus channel to one employee/ERP identity, provision narrow route grants, use explicit leadership-dashboard filters, and preserve Program/AI plus organization-wide ERP execution boundaries. Migration 018, extension reload, guarded product-search retry, and service rollout remain separately authorized runtime work.
## Recently Completed
@@ -48,15 +50,16 @@ Operate the repository's current `0.5.164` extension baseline and fixed-scope ac
- 2026-09-02: Integrated migration 018 and extension `0.5.164` so each enabled AgentBus channel binds one non-admin employee, each task keeps an immutable execution assignee, administrators cannot execute another assignee's work, and only one fresh browser with the matching ERP account is execution-ready.
- 2026-09-02: Reworked leadership-dashboard reads into a bounded one-connection transaction with business SQL prefiltering, selective message hydration, page-only detail hydration, request/database deadlines, and 20-row pages; metric cards are now display-only and explicit filters default to all results.
- 2026-09-02: Corrected the account-management task-permission editor so opening it expands a dedicated five-row layout, keeps the account list below the editor, and allows vertical page scrolling on desktop and narrow screens without changing authorization semantics.
- 2026-09-02: Integrated extension `0.5.165`: scatter-plan creation and independent batch-order creation now try loaded product candidates, then the form's native non-empty `S_chanpinming` search, and finally one bounded empty-query compatibility reload. A user-authorized search-only ERP check returned exactly one target row in both forms without selecting or saving it; zero or multiple local matches continue to fail closed.
## In Progress
- The standard database currently contains one administrator account and no non-administrator task grants. Multi-account operational smoke testing remains for an administrator-led staging window.
- Migration `018_agentbus_account_workers`, employee ERP identities/channel bindings, extension `0.5.164`, and the merged dashboard runtime have not been applied to or restarted on the standard service in this integration task.
- Migration `018_agentbus_account_workers`, employee ERP identities/channel bindings, extension `0.5.165`, and the merged dashboard/runtime changes have not been applied to or restarted on the standard service in this integration task.
## Next Recommended Steps
1. In an explicitly authorized staging/rollout window, back up PostgreSQL, apply migration 018, restart the control plane, load extension `0.5.164`, configure employee ERP identities and channel bindings, and run the multi-cloud-PC/identity/failover matrix before production assurance.
1. In an explicitly authorized staging/rollout window, back up PostgreSQL, apply migration 018, restart the control plane, load extension `0.5.165`, verify its runtime handshake, configure employee ERP identities and channel bindings, and run the multi-cloud-PC/identity/failover matrix before production assurance.
2. Through the administrator UI, create representative team-lead and ordinary accounts, assign narrow task grants, and verify owner isolation, leadership dashboard reads, grant/revoke behavior, and denial prompts without ERP writes.
3. With explicit authorization, run a live read-only ERP verification of the shared-mother-plan `tid-only` whole-visitor export path.
4. With explicit authorization, perform ERP write verification for independent-order SGL/TWN and adult/child/leader headcount mappings.
@@ -65,7 +68,7 @@ Operate the repository's current `0.5.164` extension baseline and fixed-scope ac
- Shared-mother-plan whole-visitor export has historical read evidence and static coverage but lacks a fresh authorized runtime ERP read verification.
- Independent-order SGL/TWN and four headcount categories lack authorized current-version ERP write evidence.
- The standard service was last restarted before commits `3062ed5`, `b5f5847`, and `cc09506`; its runtime schema/extension/dashboard behavior must not be represented as the newly integrated repository state until an authorized rollout.
- The standard service was last restarted before commits `3062ed5`, `b5f5847`, `cc09506`, `336ca6e`, and `e4fd916`; its runtime schema, extension, account UI, and dashboard behavior must not be represented as the newly integrated repository state until an authorized rollout.
- AgentBus account-worker routing still lacks a live two-employee/two-cloud-PC staging matrix covering mismatched ERP login, same-account device conflict, 90-second stale failover, and both manual and automatic channel work.
- A live internal AgentBus attachment verification remains separately unperformed.

View File

@@ -0,0 +1,55 @@
# Task: Integrate ERP product search fix
## Identity
- Task ID: 20260902-integrate-product-search-3b7f6a20
- Mode: Integration
- Branch: codex/20260902-integrate-product-search-3b7f6a20
- Worktree: /Users/inmanx/Documents/lwltAPI-integrate-product-search-3b7f6a20
- Base commit: fff9171ba2f08c4638a0753c60a079ec9eccd774
- Owner: codex
- Status: In progress
## Scope
- Integrate source commit `b5c727b6f9716243a436a5a0546f3e4db9a95d1d` from task `20260902-diagnose-parse-error-7f3a9c2d` onto remote `main` baseline `fff9171ba2f08c4638a0753c60a079ec9eccd774`.
- Keep the source task record on its source branch while merging the product-search implementation, contracts, tests, extension `0.5.165`, archive, ZIP, and release manifest.
- Promote the verified `S_chanpinming` search order into canonical current state, business rules, evidence, and rollout memory.
- Run the project-document, repository, control-plane, legacy, build, and extension-package checks, then advance `origin/main` with a normal non-force push and synchronize the local `main` checkout.
## Intent And Constraints
- The user explicitly requested that the current product-search changes be merged into `main`.
- Preserve the account-permission UI work already integrated on `origin/main`; do not merge unrelated feature branches or the superseded recovery checkpoint.
- Keep the extension source, platform minimum version, mappings, tests, versioned ZIP, archive, and release manifest synchronized at `0.5.165`.
- Preserve deterministic unique matching and all existing pre-write failure-closed gates. The live evidence is search-only and must not be represented as an automated selection or ERP write result.
- Do not read `.env`, reload or deploy the extension, restart services, mutate tasks, select products, save ERP forms, or perform any ERP write.
- Push only after a fresh fetch proves the remote branch is an ancestor of the fully verified integration tip; never force push.
## Outcome
- Integrated source commit `b5c727b` without conflict through merge commit `e4fd916`; Git automatically combined its platform minimum-version edit with the account-permission UI baseline.
- Kept the source feature task record on its source branch, so this integration changes no other task-owned project document.
- Promoted the durable `S_chanpinming` lookup order and its search-only evidence into canonical current state, business rules, evidence, and rollout commitments while preserving the distinction between read-only search proof and write proof.
- The combined integration tree passed all repository, contract, regression, build, and release checks and is ready for a guarded normal push.
- No runtime, browser-extension, service, task, or ERP state was changed.
## Verification
- Source ancestry and the source range passed `git diff --check` before merge.
- `node --test tools/product-lookup.test.mjs`: 11 passed, 0 failed.
- `node --run check:repo`: 10 passed, 0 failed, including exact packaged-extension/source comparison and synchronized release baselines.
- `node --run check`: passed.
- `node --run test:control-plane`: 159 passed, 0 failed.
- `node --run test:legacy`: 268 passed, 0 failed.
- `node --run build`: passed.
- `dist/ltjt-order-assistant-0.5.165.zip` SHA-256 is `14f3150ab26d99131e32321ddc805a85550438bc2810a1e20921f7922b25aaac`, exactly matching `dist/release-manifest.json`.
- The temporary `node_modules` symlink used for isolated-worktree verification was removed.
## Follow-ups
- Extension reload/deployment and a guarded runtime preflight or retry remain separate, explicitly authorized work.
## Promotion Candidates
- None. The accepted product-search rule and evidence were promoted by this Integration task.

View File

@@ -20,6 +20,7 @@
- Passenger overwrite requires confirmation when target ERP rows are occupied; after `full_replace + confirmed=true`, every attachment-specified sequence is written even when values are unchanged.
- A single strict `领队` row supplies leader contact; ambiguous, incomplete, duplicate, or structurally inconsistent leader data fails closed.
- Shared-mother-plan `整团游客信息` export is only `shared_plan + visitor-list + tid-only`; independent and concrete shared-child visitor lists remain `did+tid`.
- Scatter-plan creation and independent batch-order creation resolve products from the currently loaded candidates first. If that is not uniquely resolvable, the adapter must dispatch the form's native non-empty `S_chanpinming` lookup using the complete product name or a name with only a trailing numeric duration shorthand such as `10D`, `8天`, or `8D7N` removed, wait for Ajax settlement, and run the same deterministic local unique matcher. Only one bounded empty-query compatibility reload may follow; zero or multiple matches still stop before product selection or any write.
- Real writes require unique resolution, exact page identity, ownership, write projection, explicit server response, and action-specific completion evidence.
- Current business capability and verification status come from active source/contracts and the lifecycle release gate, never from archive wording.

View File

@@ -18,6 +18,7 @@ Use this index for searchable, traceable evidence records.
| 2026-09-02 | Passenger workbook header rejection and ERP-semantic compatibility | Root cause and repository fix verified; live attachment retry not performed | [Integration record](../30-worklog/tasks/20260902-merge-all-restart-b7e3c91f.md) | Source task `20260901-roster-header-error-a4f7` established that the approved workbook used the `身份证` alias and a safe reverse issue-date formula; normalizer `v1.3.0` accepts the exact mapped semantics without weakening workbook safety gates. |
| 2026-09-02 | AgentBus employee/account/browser/ERP routing | Repository, release, and regression verified; migration/restart/extension rollout not performed | [Integration record](../30-worklog/tasks/20260902-integrate-all-push-c93a7f21.md) | Migration 018, immutable task assignees, channel-owner/route gates, one fresh matching worker, administrator non-execution, extension `0.5.164`, and release hashes were integrated and verified. |
| 2026-09-02 | Leadership-dashboard filtering and summary interaction | Repository and focused regression verified; merged runtime not restarted | [Integration record](../30-worklog/tasks/20260902-integrate-all-push-c93a7f21.md) | Single-connection bounded reads, SQL prefiltering, selective hydration, 20-row paging, cancellation/timeout feedback, and display-only metric cards with explicit filters passed combined regression. |
| 2026-09-02 | Native ERP product search for ordering forms | Root cause and live search-only behavior verified; repository/release verified; extension not reloaded | [Integration task](../30-worklog/tasks/20260902-integrate-product-search-3b7f6a20.md) | Both `plan_add.asp` and `orders_adds.asp` returned exactly one target product for the full keyword with radios left unchecked and no save; extension `0.5.165` now uses native non-empty search before its bounded empty-query fallback while retaining deterministic unique matching. |
## When To Add Evidence

View File

@@ -7,7 +7,8 @@ Track future-facing memory: promised follow-ups, unfinished loops, timed checks,
| 2026-08-28 | Verify shared-mother-plan `tid-only` whole-visitor export against the current runtime ERP path. | Explicit user authorization for ERP read access | Future authorized task | Pending authorization | Run read-only source and artifact checks without external delivery. |
| 2026-08-28 | Verify independent-order SGL/TWN and adult/child/leader headcount mappings with real ERP writes. | Explicit user authorization for controlled ERP writes | Future authorized task | Pending authorization | Use reversible values and action-specific requery evidence. |
| 2026-08-28 | Resolve AgentBus OSS attachment rejection caused by private/reserved local DNS answers. | User scheduled integration and confirmed the environment is trusted internal networking | Integration task `20260831-integrate-server-diagnostics-8b42c6d1` | Completed in repository | Deploy/restart and run one live internal attachment verification only under separate authorization. |
| 2026-09-02 | Roll out and stage-test AgentBus account workers. | Explicit authorization for database backup/migration, service restart, extension reload, account/channel configuration, and staging traffic | Future authorized rollout task | Pending authorization | Apply migration 018 and extension `0.5.164`, then verify two employee accounts/cloud PCs, ERP identity mismatch, same-account worker conflict, 90-second failover, and manual/AgentBus execution routing. |
| 2026-09-02 | Roll out and stage-test AgentBus account workers. | Explicit authorization for database backup/migration, service restart, extension reload, account/channel configuration, and staging traffic | Future authorized rollout task | Pending authorization | Apply migration 018 and extension `0.5.165`, then verify two employee accounts/cloud PCs, ERP identity mismatch, same-account worker conflict, 90-second failover, and manual/AgentBus execution routing. |
| 2026-09-02 | Verify the integrated native product-search execution path. | Explicit authorization for extension reload and a guarded ERP preflight/retry | Future authorized rollout task | Pending authorization | Load extension `0.5.165`, confirm the runtime handshake, then verify deterministic product selection and normal write gates without automatically retrying the earlier failed task. |
## Use