docs: preserve pending extension reload status

This commit is contained in:
inman
2026-09-09 17:24:04 +08:00
parent bb115a3382
commit 301890ddf9

View File

@@ -0,0 +1,58 @@
# Task: Migrate and restart local confirmed task service
## Identity
- Task ID: 20260902-migrate-restart-confirmed-4f8c2a71
- Mode: Feature
- Branch: main
- Worktree: /Users/inmanx/Documents/lwltAPI
- Base commit: 69ea6d25178d75abf8d7fd728bd31c61764caa7d
- Owner: codex
- Status: In Progress
## Scope
- Recheck the exact local `127.0.0.1:8786` listener and the newest confirmed task `TASK-20260902094412-B859kgg` before changing runtime state.
- Gracefully restart only that verified control-plane process through the repository's standard `node --run dev` path so migration `018_agentbus_account_workers` runs before the new listener starts.
- Verify liveness, database/schema readiness, the new required migration level, listener identity, and the existing task's resulting lifecycle state.
- Allow the already-confirmed automatic task to proceed once through its normal assigned browser worker after migration, while avoiding any manual confirm, claim, dispatch, retry, reconciliation, or duplicate submission.
- After the user reported that the local Chrome extension remained behind the current release, fast-forward this checkout only to the verified current `origin/main`, verify the synchronized source/package baseline (first `0.5.167`, now `0.5.169`), and reload only the local unpacked Chrome extension after its own safety interface proves the ERP worker and persisted execution state are idle.
- Verify the browser-reported extension version and normal control-plane handshake after reload without manually dispatching, retrying, reconciling, or submitting any ERP task.
## Intent And Constraints
- The user explicitly authorized the migration and restart after being warned that the historical confirmed task may immediately enter ERP execution.
- On 2026-09-07 the user explicitly authorized fast-forwarding the local checkout and reloading the local Chrome extension from `0.5.165` to `0.5.167` after an idle-state check.
- Target only the listener whose command and working directory match this repository; preserve PostgreSQL data, existing task/event history, browser state, ERP state outside the normal automatic task flow, and unrelated local processes.
- Migration 018 is the accepted ownership migration: it backfills unassigned manual tasks from `created_by`; the server must not start unless the migration succeeds.
- Observe the target until it advances to a terminal or attention state. If write completion is uncertain, do not retry; report the reconciliation boundary instead.
- Do not read or output `.env`, credentials, cookies, browser storage, plaintext database business inputs, or customer data. Do not deploy remotely, change accounts/channels, send external messages, or trigger an ERP operation solely to test the reload.
- Do not author new product changes in this task. The authorized checkout fast-forward may materialize already-integrated `origin/main` changes; task-authored documentation remains limited to this task-owned record and canonical project memory remains unchanged in Feature mode.
## Outcome
- On 2026-09-08, Chrome's extension detail page confirmed that the enabled unpacked extension was still loaded from `~/文稿/lwltAPI/chrome-extension/ltjt-order-assistant` at `0.5.167`.
- Fast-forwarded the occupied, task-owned local `main` checkout from `6bdaa2a6e6b6006241ee324ad0e8736f79bae7fd` to the verified `origin/main` commit `515b545b32fcbb30311b56c5b90a36f3d3834d95` without overwriting this task record. The local source and release artifact are now `0.5.169`.
- Removed the Finder-generated root `.DS_Store` residue after repository hygiene identified it; no source, task data, or runtime state was removed.
- Queried the loaded extension only through its privacy-bounded `extension_update` safety result. It reported no in-memory task but returned `persisted_execution_active`, so the direct Chrome reload was not performed and no local execution/result state was cleared or reconciled.
- At the user's request, copied the verified current package to `/Users/inmanx/Desktop/ltjt-order-assistant-0.5.169.zip`; this export did not install or reload the extension.
## Verification
- Local `HEAD` and `origin/main` both resolve to `515b545b32fcbb30311b56c5b90a36f3d3834d95`.
- Local source manifest and `dist/release-manifest.json` both resolve the current extension as `0.5.169`.
- `dist/ltjt-order-assistant-0.5.169.zip` passed `unzip -t` and has SHA-256 `00ad06a1640d36cfe7df8c9e52d677131793c70d493392b551b7ecbd965c854b`.
- Chrome visibly reported extension ID `kafggjjlhebccdgkechmbgflkaifkccf`, source path `~/文稿/lwltAPI/chrome-extension/ltjt-order-assistant`, and loaded version `0.5.167` before reload.
- The extension's bounded safety projection reported `safe=false`, `reason=persisted_execution_active`, and `active_task_count=0`; this is a required reload blocker, not a version-file mismatch.
- `node --run check:repo` initially found only the generated `.DS_Store`; after cleanup its final rerun passed `10/10`.
- `check_project_docs.py` passed. The task-scoped drift check remains blocked because this long-running task's recorded 2026-09-02 base predates the explicitly authorized fast-forward that materialized already-integrated `main` changes; the task is not being marked complete while the runtime reload is blocked.
- The Desktop copy is byte-for-byte equal to `dist/ltjt-order-assistant-0.5.169.zip` and has the release-manifest SHA-256 `00ad06a1640d36cfe7df8c9e52d677131793c70d493392b551b7ecbd965c854b`.
## Follow-ups
- Obtain an explicit decision for the persisted execution before any cleanup, reconciliation, browser restart, or forced reload. Recheck `extension_update.safe`; only a true idle result permits the controlled reload to `0.5.169`.
- After an allowed reload, verify Chrome's displayed version and the normal privacy-bounded extension handshake without dispatching, retrying, or reconciling an ERP task.
## Promotion Candidates
- None recorded.