From 85249a3d23fa594b2c1d9658ea60e1da673f4810 Mon Sep 17 00:00:00 2001 From: inman Date: Wed, 9 Sep 2026 18:56:41 +0800 Subject: [PATCH] docs: reconcile dashboard query integration --- .project-docs/20-architecture/data-flow.md | 2 +- .project-docs/30-worklog/current-state.md | 4 +- .project-docs/30-worklog/task-history.md | 1 + ...-integrate-all-current-changes-8e4c2a71.md | 52 +++++++++++++++++++ .project-docs/50-evidence/evidence-index.md | 1 + 5 files changed, 58 insertions(+), 2 deletions(-) create mode 100644 .project-docs/30-worklog/tasks/20260909-integrate-all-current-changes-8e4c2a71.md diff --git a/.project-docs/20-architecture/data-flow.md b/.project-docs/20-architecture/data-flow.md index 063f4ee..e18a938 100644 --- a/.project-docs/20-architecture/data-flow.md +++ b/.project-docs/20-architecture/data-flow.md @@ -15,7 +15,7 @@ | WeChat roster attachment | Strict transport envelope plus one structured `payload.attachments[]` entry | Existing `awaiting_attachment` task | Explicit conversation ID wins; otherwise strict `Conversation:` supplies the fallback. Placeholder text alone never creates a task. | | Internal attachment download | Credential-free HTTPS URL | Bounded in-memory workbook bytes | Internal/private DNS answers are allowed; the selected address is pinned, every redirect is revalidated, and URL/host/IP/bytes are omitted from logs. | | Operational diagnostics | Service, request, task, parser, AgentBus, attachment, database, and cleanup stages | Structured stdout/stderr and bounded Docker logs | Correlation identifiers, codes, outcomes, and durations only; no secrets or business payloads. | -| Platform operations oversight | Durably assigned manual/AgentBus task, encrypted instruction history, and readable outcome | Team-lead-only leadership projection | Immutable assignee is the employee dimension; unassigned historical AgentBus rows are excluded. Display-only summaries plus explicit filters drive an aggregate-first task/person/input/output/time/type/completion view, with bounded list reads and page-only detail hydration. | +| Platform operations oversight | Durably assigned manual/AgentBus task, encrypted instruction history, and readable outcome | Team-lead-only leadership projection | Immutable assignee is the employee dimension; unassigned historical AgentBus rows are excluded. Display-only summaries plus explicit filters drive an aggregate-first task/person/input/output/time/type/completion view. Range-wide candidate reads exclude complete operation JSON; only unresolved legacy classification receives compact action/kind/mode fields, while complete payload hydration stays limited to keyword search and the current 20-row page. | | Leader task summary | Future stable manual/AgentBus task outcome for a durably assigned non-admin employee | Privacy projection → encrypted organization/revision outbox → fixed external Webhook → leader group | Independent from AgentBus task replies and ERP execution; strict success means accepted, not delivered, and rejected/uncertain attempts terminate without automatic retry. | | Shared-child batch creation | Inclusive departure range plus exact product/customer/counts | Complete read-only parent enumeration → validated date/tid target list → sequential single-child adapter reuse | All targets are known before the first write; execution is deterministic and stops at the first blocked, failed, or uncertain result with remaining targets not started. | | Browser worker selection | Immutable task assignee | One fresh account-bound browser connection | The heartbeat must prove the expected ERP identity from one unique login node by normalized exact equality; missing, duplicate, blank, substring-only, or mismatched identity is non-executable, with failover only after staleness. | diff --git a/.project-docs/30-worklog/current-state.md b/.project-docs/30-worklog/current-state.md index 96941ed..d5af362 100644 --- a/.project-docs/30-worklog/current-state.md +++ b/.project-docs/30-worklog/current-state.md @@ -4,6 +4,7 @@ This file is the integrated default-branch snapshot. Feature tasks record progre ## Integrated Through +- Source commit `5cbd8f1` from feature task `20260903-dashboard-refresh-no-data-b4e82f1a`, integrated as merge commit `b11dc7b`, for lightweight leadership-dashboard candidate reads that exclude full `operation` JSON, hydrate only the compact `action`/`kind`/`mode` shape needed by unresolved legacy classification, and retain complete payloads only for keyword search and current-page detail. - Integration task `20260909-business-instruction-batch-child-7e3c1a94` synchronized operator input catalog/DOCX `0.5.127` with all 19 system routes, adding the copyable `散拼团多个新增子单` entry while keeping that route Program-only and leaving the five Skills at `0.5.126`. - Source commit `be17f6c` from feature task `20260908-leader-webhook-api-7c4e9a12`, integrated as merge commit `295409b`, for organization-level external Webhook delivery of privacy-bounded leader summaries, migration `023_leader_summary_webhook_delivery`, and AUTH-005's one-attempt accepted-versus-delivered boundary. - Source commit `6ac90f8` from feature task `20260908-shared-child-batch-create-4e7c2a91`, integrated as merge commit `0d20544`, for Program-only `shared_child_order_batch_create`, parser `v1.0.7`, migration `022_shared_child_order_batch_create`, complete pre-write target enumeration, deterministic stop-on-first-non-success execution, and extension `0.5.170`. @@ -43,7 +44,7 @@ This file is the integrated default-branch snapshot. Feature tasks record progre ## Current Focus -Operate the repository's current extension `0.5.170`, Program parser `v1.0.7`, Skills `0.5.126`, business-instruction `0.5.127`, roster normalizer `v1.4.0`, and migrations through `023_leader_summary_webhook_delivery` safely. The machine registry and operator input catalog contain 19 routes; the external Agent remains limited to its original 18 and the two passenger-list routes plus shared-child batch creation are Program-only. Administrators manage accounts, channels, employee grants, parser routing, automation settings, and audit but never enter the task data plane. Team leads/users own normal task operations through immutable assignment; same-account work remains FIFO and single-active while distinct accounts are independent. Team leads alone receive the read-only assignee-based dashboard. Future privacy-bounded organization summaries use one protected external Webhook and a separate encrypted one-attempt outbox, not a leader AgentBus route. Database migration, extension reload, route grants, service rollout, live ERP validation, and any external Webhook canary remain separately authorized runtime work. Server-side automatic extension updating is not part of the active main line. +Operate the repository's current extension `0.5.170`, Program parser `v1.0.7`, Skills `0.5.126`, business-instruction `0.5.127`, roster normalizer `v1.4.0`, and migrations through `023_leader_summary_webhook_delivery` safely. The machine registry and operator input catalog contain 19 routes; the external Agent remains limited to its original 18 and the two passenger-list routes plus shared-child batch creation are Program-only. Administrators manage accounts, channels, employee grants, parser routing, automation settings, and audit but never enter the task data plane. Team leads/users own normal task operations through immutable assignment; same-account work remains FIFO and single-active while distinct accounts are independent. Team leads alone receive the read-only assignee-based dashboard, whose range-wide candidate pass stays lightweight and reserves full operation/result hydration for search and the current page. Future privacy-bounded organization summaries use one protected external Webhook and a separate encrypted one-attempt outbox, not a leader AgentBus route. Database migration, extension reload, route grants, service rollout, live ERP validation, and any external Webhook canary remain separately authorized runtime work. Server-side automatic extension updating is not part of the active main line. ## Recently Completed @@ -79,6 +80,7 @@ Operate the repository's current extension `0.5.170`, Program parser `v1.0.7`, S - 2026-09-08: Replaced only the leader-summary AgentBus transport with an organization-level external Webhook. AUTH-005 and migration 023 retain future-only encrypted/privacy-bounded projection, mark only strict gateway success as accepted rather than delivered, and terminate rejected or uncertain attempts without automatic retry. - 2026-09-08: Removed the deleted external project-document Skill and task-registry requirement; repository-local Git worktree checks and `.project-docs/` remain the active collaboration and memory boundary. - 2026-09-09: Advanced the operator input catalog and generated DOCX to `0.5.127`, covering all 19 routes with a new copyable Program-only `散拼团多个新增子单` section while leaving Agent Prompt and Skill packages unchanged. +- 2026-09-09: Integrated the missed dashboard candidate-query correction so normal date-range reads no longer load complete operation JSON before pagination; unresolved legacy classification receives only its compact required fields, while keyword search and current-page detail keep their existing fidelity. ## In Progress diff --git a/.project-docs/30-worklog/task-history.md b/.project-docs/30-worklog/task-history.md index 3a57749..ac6eb7b 100644 --- a/.project-docs/30-worklog/task-history.md +++ b/.project-docs/30-worklog/task-history.md @@ -17,3 +17,4 @@ This is integrated history. Feature tasks write only their task-scoped records; | 2026-09-08 | Shared-child batch creation | Added the nineteenth machine route as Program-only, complete pre-write parent enumeration, ordered stop-on-first-non-success execution, parser `v1.0.7`, migration 022, and extension `0.5.170`. | [Feature task](tasks/20260908-shared-child-batch-create-4e7c2a91.md) | | 2026-09-08 | Leader-summary external Webhook | Replaced only the AgentBus summary transport with an organization-level encrypted one-attempt Webhook outbox, migration 023, strict accepted-versus-delivered semantics, and AUTH-005. | [Feature task](tasks/20260908-leader-webhook-api-7c4e9a12.md) | | 2026-09-08 | Repository-local project-document governance | Removed the deleted external Skill/task-registry dependency while preserving Git worktree safety checks and `.project-docs/` as canonical memory. | [Integration task](tasks/20260908-remove-maintain-project-docs-requirement-6d8a31f2.md) | +| 2026-09-09 | Leadership dashboard candidate payload correction | Integrated the previously missed lightweight candidate projection: full operation JSON is excluded before pagination, unresolved legacy classification loads only compact fields, and complete payloads remain search/page scoped. | [Integration task](tasks/20260909-integrate-all-current-changes-8e4c2a71.md) | diff --git a/.project-docs/30-worklog/tasks/20260909-integrate-all-current-changes-8e4c2a71.md b/.project-docs/30-worklog/tasks/20260909-integrate-all-current-changes-8e4c2a71.md new file mode 100644 index 0000000..e41f8d8 --- /dev/null +++ b/.project-docs/30-worklog/tasks/20260909-integrate-all-current-changes-8e4c2a71.md @@ -0,0 +1,52 @@ +# Task: Integrate all current changes and push main + +## Identity + +- Task ID: 20260909-integrate-all-current-changes-8e4c2a71 +- Mode: Integration +- Branch: main +- Worktree: /Users/inmanx/Documents/lwltAPI +- Base commit: f0682eea38a87d07b212486a3223c3e2b0a81958 +- Owner: codex +- Status: Ready to Push + +## Scope + +- Audit all linked worktrees and local branches against current `main` and `origin/main`. +- Preserve unknown or unrelated dirty work without stashing, resetting, cleaning, moving, deleting, or silently adopting it. +- Integrate every distinct, completed, ready-for-integration change into `main`, resolve shared-file conflicts semantically, run repository verification, and push `main` to `origin/main` without force. + +## Constraints + +- Treat historical diagnosis, rollback, superseded, and patch-equivalent branches as audit context rather than automatic merge candidates. +- Do not read `.env`, run production migrations, deploy/restart services, reload extensions, access ERP, mutate runtime data, or send external messages. +- Ask the user before resolving any conflict that changes product behavior, architecture direction, or an accepted decision without a clear existing source of truth. + +## Outcome + +- Audited 43 linked worktrees and 50 local branches against `main`. Historical diagnosis, rollout, recovery, reverted architecture, superseded integration, patch-equivalent feature branches, and unrelated dirty worktrees were preserved without stashing, resetting, cleaning, moving, deleting, or adopting their changes. +- Identified one distinct completed product change that remained absent from `main`: source commit `5cbd8f1` from task `20260903-dashboard-refresh-no-data-b4e82f1a`. +- Integrated that source as merge commit `b11dc7b`. The sole conflict was the dashboard actor join: resolution keeps the active immutable-assignee model from AUTH-004 while removing full `operation` JSON from normal range-wide candidates. +- Normal candidate reads now omit the full operation payload. Only unresolved legacy rows receive the compact `action`/`kind`/`mode` operation shape required for classification; keyword search and current-page detail retain complete payload fidelity. +- Added the source task record and immutable timeout evidence to the mainline, then reconciled current state, data flow, task history, and the evidence index. +- No other ready, distinct product change remained after the branch/worktree audit. + +## Verification + +- Refreshed `origin` successfully before integration and confirmed local `main` and `origin/main` were both `f0682eea38a87d07b212486a3223c3e2b0a81958`. +- `git diff --check` and the active-tree merge-marker scan passed. +- Focused leadership-dashboard regression passed, 5/5. +- `node --run check:repo` passed, 10/10. +- `node --run check` passed. +- `node --run test:control-plane` passed, 183/183. +- `node --run test:legacy` passed, 278/278. +- `node --run build` passed. +- Final remote synchronization and post-push hash verification are pending. + +## Follow-ups + +- After a separately authorized service rollout/restart, repeat the authenticated 30-day leadership-dashboard request and compare it with the previously successful seven-day baseline. This repository integration does not restart the service or access live task data. + +## Promotion Candidates + +- None; accepted source facts are promoted directly by this Integration task. diff --git a/.project-docs/50-evidence/evidence-index.md b/.project-docs/50-evidence/evidence-index.md index 09e7cf1..709c804 100644 --- a/.project-docs/50-evidence/evidence-index.md +++ b/.project-docs/50-evidence/evidence-index.md @@ -20,6 +20,7 @@ Use this index for searchable, traceable evidence records. | 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-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. | +| 2026-09-03 | Leadership dashboard candidate-query timeout | Root cause and repository correction verified; post-change runtime not restarted | [Evidence record](topics/20260903-dashboard-refresh-no-data-b4e82f1a__dashboard-query-timeout.md) | A healthy authenticated 30-day read timed out in PostgreSQL candidate selection while seven days succeeded; the integrated correction removes full operation JSON from normal pre-pagination candidates and uses a compact legacy-classification projection. | | 2026-09-03 | Adaptive ERP readiness and central extension host updates | Mixed disposition: plugin/release retained at rollback; server architecture reverted before production rollout | [Original integration task](../30-worklog/tasks/20260903-finalize-extension-update-a6c4e192.md) | Exact extension `0.5.167` and adaptive readiness were retained when migration 019 and central private-OSS/ECS orchestration moved to backup commit `b2e33e2`; the active plugin later advanced independently. | | 2026-09-03 | Extension-update iteration scoped rollback | Backup ref verified; server/migration rollback and regression rechecked | [Rollback task](../30-worklog/tasks/20260903-backup-revert-extension-update-c71a4e92.md) | The full stack was backed up before normal non-force commits removed server-side automatic updating and migration 019; the rollback retained extension `0.5.167` and migration 018 without rewriting Git history. | | 2026-09-07 | Team-lead task-summary projection and proactive AgentBus delivery | Repository and disposable-PostgreSQL verified; not deployed or externally sent | [Feature task](../30-worklog/tasks/20260907-implement-leader-agentbus-copy-b7e31a94.md) | Migration 020, future-only encrypted projection, privacy allowlist, stale-uncertainty supersession, employee-first outbound priority, stable proactive frame IDs, no `reply_to`, echo rejection, and administrator controls passed full regression; exact AgentBus/WeChat routing still needs an authorized canary. |