fix(seed): wait for L2/L3 before closing v2 pipeline - #647
Conversation
Port the finite seed completion barrier to the v2 MemoryCore line. Wait for L1, then L2, then the L3 work enqueued by L2, and cancel recurring L2 timers after the batch is complete. Use the barrier before seed storage teardown and add a regression test proving it does not resolve while either downstream layer is still running. Refs TencentCloud#115 Signed-off-by: RerankerGuo <121015044+RerankerGuo@users.noreply.github.com>
|
Closing this parallel v2 port to keep the current contribution batch within the two-PR limit and avoid asking maintainers to review the same fix twice. PR #645 is the canonical, CI-covered implementation on the branch currently used by all recent community PRs. The MemoryCore port is preserved on and can be reopened/rebased when the protected line has an active PR CI path and its current missing build baseline is resolved. |
|
Correction to the branch references stripped by shell quoting above: the preserved port is on RerankerGuo:fix/issue-115-seed-drain-l2-l3-v2. It targets feat/server_team. Its full build currently reaches the pre-existing missing MemoryCore/scripts/seed-v2/tsconfig.json path; the focused pipeline-manager regression test passes. |
|
Reopening this v2-line port now that the local Auto-Pilot workflow no longer has a fixed PR-count cap. This remains an independent implementation for the unrelated |
|
Thank you for your interest and contributions! We will review your code and get back to you as soon as possible! |
Description | 描述
Port the seed completion fix from the legacy
mainline (#645) to the repository's current defaultfeat/server_team/MemoryCoreline. These branches have unrelated histories, and both contain the same L1-only seed FIXME, so the v2 package needs its own equivalent change.Before this PR,
MemoryCore/src/core/seed/seed-runtime.tswaited only for L1 idle and then called the gateway-orienteddestroy()path. That path has an intentional 2-second shutdown budget and marks the scheduler destroyed before flushing, so scheduled/running L2 scene extraction or the L3 persona task triggered by L2 could be skipped or interrupted before artifacts reached disk.Changes:
MemoryPipelineManager.flushAll()to drain pending L1 work, flush scheduled L2 work, then wait for L3.destroy()does not execute an unnecessary second L2 pass.flushAll()before storage teardown.Scope boundary: no Gateway request behavior, store schema, stateful worker scheduling, or LLM extraction logic changes.
Related Issue | 关联 Issue
Refs #115
Related implementation for the legacy
mainline: #645Change Type | 修改类型
Self-test Checklist | 自测清单
Additional Notes | 其他说明
Validation in
MemoryCore(Node v26.5.0, npm v11.17.0):Full
npm run buildreaches and passes the plugin plus the three existing script builds, then fails at the upstream baseline commandbuild:seed-v2becauseMemoryCore/scripts/seed-v2/tsconfig.jsonis absent onfeat/server_team. This PR does not add that unrelated missing build file.