docs: finalize account routing integration

This commit is contained in:
inman
2026-09-03 09:58:33 +08:00
parent b7bb1d6b52
commit 397f515037
4 changed files with 63 additions and 5 deletions

View File

@@ -49,7 +49,7 @@ All other AUTH-001 account, role, route-grant, ownership, dashboard, session, Ag
- `.project-docs/10-decisions/AUTH-001-fixed-scope-account-authorization.md`
- `.project-docs/30-worklog/tasks/20260902-per-account-queue-hard-delete-a6d9f2c1.md`
- `.project-docs/30-worklog/tasks/20260903-integrate-account-routing-9f2c7a61.md`
- `.project-docs/30-worklog/tasks/20260903-finalize-account-routing-7c4e2a91.md`
- `control-plane/src/task-service.ts`
- `control-plane/src/server.ts`
- `LianSyn-platform/app.js`

View File

@@ -26,8 +26,8 @@ This file is the integrated default-branch snapshot. Feature tasks record progre
- 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`.
- Merge commit `bbbb44d` integrating source commit `d09b303` from task `20260902-per-account-queue-hard-delete-a6d9f2c1` for account-scoped ERP FIFO, strict assignee-only executable routing, and explicit lifecycle-independent physical force deletion.
- Integration task `20260903-integrate-account-routing-9f2c7a61` for AUTH-002 acceptance, canonical queue/removal reconciliation, full repository verification, and normal non-force synchronization to `origin/main`.
- Commit `d09b303` from task `20260902-per-account-queue-hard-delete-a6d9f2c1` for account-scoped ERP FIFO, strict assignee-only executable routing, and explicit lifecycle-independent physical force deletion.
- Integration task `20260903-finalize-account-routing-7c4e2a91` for AUTH-002 acceptance, canonical queue/removal reconciliation, full repository verification, and normal non-force synchronization to `origin/main`.
## Current Focus
@@ -73,7 +73,7 @@ Operate the repository's current `0.5.165` 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`, `cc09506`, `336ca6e`, `e4fd916`, and merge `bbbb44d`; its runtime schema, extension, account UI, queue/routing, force-delete, and 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`, `e4fd916`, and `d09b303`; its runtime schema, extension, account UI, queue/routing, force-delete, 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, same-account FIFO, cross-account independence, administrator executable-feed isolation, and both manual and automatic channel work.
- Lifecycle-independent force deletion has repository regression evidence but lacks an authorized runtime smoke test for waiting/active deletion, database absence, OSS cleanup, and owner-plugin-only cleanup.
- A live internal AgentBus attachment verification remains separately unperformed.

View File

@@ -0,0 +1,58 @@
# Task: Finalize account-scoped ERP routing and force delete
## Identity
- Task ID: 20260903-finalize-account-routing-7c4e2a91
- Mode: Integration
- Branch: codex/20260903-finalize-account-routing-7c4e2a91-finalize-account-routing
- Worktree: /Users/inmanx/Documents/lwltAPI-finalize-account-routing-7c4e2a91
- Base commit: d09b3032c0d7b997e6974ff16b9210e9c04bacd3
- Owner: codex
- Status: Ready for integration
## Scope
- Use completed feature commit `d09b3032c0d7b997e6974ff16b9210e9c04bacd3` as the Integration baseline for account-scoped ERP queues, explicit force deletion, and assignee-only executable routing.
- Reconcile the user-confirmed product decision into accepted ADRs, canonical architecture, domain rules, current state, evidence, commitments, and the cross-business registry.
- Run the complete repository, control-plane, legacy, build, project-document, and task-drift verification gates.
- Push the verified integration tip to remote `main` with a normal non-force update while preserving the separately occupied local `main` worktree.
## Intent And Constraints
- The user explicitly authorized merging and pushing, and explicitly superseded AUTH-001's organization-wide ERP FIFO and archive-only removal clauses.
- Same-account tasks remain serialized in deterministic FIFO order; different assigned accounts must not block one another.
- Administrator-wide read visibility does not authorize receiving or processing another account's executable SSE, plugin result, browser claim, or cleanup command.
- Archive/restore remains available as a reversible workflow; force delete is an irreversible platform-record deletion regardless of task state and cannot roll back ERP effects already written.
- Do not touch the occupied local `main` worktree, adopt its untracked task record, deploy, restart services, mutate runtime tasks, operate ERP, or inspect secrets.
- Before pushing, verify the remote branch has not advanced unexpectedly; never force-push.
## Outcome
- Used completed source commit `d09b3032c0d7b997e6974ff16b9210e9c04bacd3` as the integration baseline, preserving its task record and the local-main-only diagnosis commit `69ea6d2` in ancestry.
- Accepted AUTH-002, partially superseding AUTH-001's organization-wide FIFO and archive-only clauses. Canonical state now records per-assignee FIFO/single-active execution, cross-account independence, and strict separation of administrator reads from executable SSE, claims, plugin results, and browser cleanup commands.
- Promoted reversible archive/restore and explicit permanent force delete as separate behaviors. Force delete is lifecycle-independent platform-record removal with minimal audit evidence, post-commit best-effort cleanup, and no claim of ERP rollback.
- Updated architecture, data flow, business rules, success criteria, current state, evidence, rollout commitments, and the cross-business registry without changing extension source/version or release artifacts.
- The integrated tree passed the complete repository suite and is ready for a fresh remote-ancestry check and normal non-force push to `origin/main`.
- No deployment, service restart, extension reload, live task mutation, ERP operation, or secret access occurred.
## Verification
- `node --run check:repo` — passed, 10/10.
- `node --run check` — passed.
- `node --run test:control-plane` — passed, 162/162.
- `node --run test:legacy` — passed, 268/268.
- `node --run build` — passed.
- `git diff --check` — passed.
- `check_project_docs.py` — passed.
- `check_doc_drift.py --task-id 20260903-finalize-account-routing-7c4e2a91` — passed with the source task record correctly inside the recorded base.
- The isolated worktree reused the source worktree's byte-identical locked dependencies through a temporary `node_modules` symlink; the symlink was removed after verification.
## Follow-ups
- Before pushing, fetch and prove that the latest remote `main` remains an ancestor of this verified integration tip; never force-push.
- Deployment, service restart, migration 018 application, extension reload, and the administrator-plus-two-employees runtime matrix remain separate work requiring explicit authorization.
- The future runtime matrix should cover same-account FIFO, cross-account independence, administrator executable-feed isolation, mismatched ERP identity, same-account worker conflict, stale failover, and waiting/active force-delete cleanup.
## Promotion Candidates
- None. The user-confirmed queue, routing, and deletion decisions were promoted by this Integration task.

View File

@@ -19,7 +19,7 @@ Use this index for searchable, traceable evidence records.
| 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. |
| 2026-09-03 | Account-scoped ERP queues, assignee-only executable routing, and force delete | Repository and full regression verified; runtime not deployed or mutated | [Integration task](../30-worklog/tasks/20260903-integrate-account-routing-9f2c7a61.md) | Source task `20260902-per-account-queue-hard-delete-a6d9f2c1` replaced global head-of-line blocking with per-assignee FIFO/advisory locks, isolated SSE/plugin-result/browser-command routing from administrator read visibility, and separated reversible archive from lifecycle-independent physical deletion. |
| 2026-09-03 | Account-scoped ERP queues, assignee-only executable routing, and force delete | Repository and full regression verified; runtime not deployed or mutated | [Integration task](../30-worklog/tasks/20260903-finalize-account-routing-7c4e2a91.md) | Source task `20260902-per-account-queue-hard-delete-a6d9f2c1` replaced global head-of-line blocking with per-assignee FIFO/advisory locks, isolated SSE/plugin-result/browser-command routing from administrator read visibility, and separated reversible archive from lifecycle-independent physical deletion. |
## When To Add Evidence