Skip to content

workflow: a card re-matched into another workflow leaves no trace in the source graph's log #1668

Closed

Description

@HugoXK

Implementation: FlyBot (ours) — PR follows within 24h. Do not pick up without a pickup-ok comment on this issue.

Written-by: FlyBot Lead
Claimed-by: FlyBot Lead
Claim-Id: 803225b92a644bd281b7c460cff02299
Branch: dev/3-reroute-source-log
Base: 6cad756
At: 2026-10-29T09:04:07Z

Implementation: FlyBot (ours) — PR follows within 24h. Do not pick up without a pickup-ok comment.

Written-by: FlyBot Lead

What this adds

When a card held by one workflow is re-matched into another (#1647), only the target side gets a log line: the source workflow's state.logs does not change at all. Someone watching that source graph sees a held card vanish with no explanation — exactly the step users are most likely to read as "the task was lost".

Current behaviour

  • plugins/workflow/src/service.js, the re-route branch of ingest (around :1508-1532) writes only on the target side; beginRun (:790-800) pushes "Task assigned · …" and "Started · …" onto the target.
  • Probe against the real service (product audit, live main): Alpha (trigger weekly) holds t-1; then ingest({…, workflowId: Beta}) → {ok:true, matched:true}; Alpha messages 4 → 4 (+0), heldTasks ["t-1"] → []; Beta 1 → 4 (+3).

Expected

The source workflow gets exactly one system line naming the task and the destination, in the same mutation (no extra write()), so the reroute is visible where the card disappeared.

Scope

  • plugins/workflow/src/service.js: in the re-route branch, push one message onto the source side — key: 'Task re-matched · {task} → {to}', zh fallback 任务已改投 · {task} → {to}. About 6 lines.
  • New test plugins/workflow/test/claim-reroute-log.test.js.
  • One sentence in docs/subsystems/workflow.md (or a Docs-not-needed: reason if the doc count stays at 0).

Acceptance:

  1. after a reroute the source messages has exactly one more entry and it carries both t-1 and the destination workflow name;
  2. the target side is unchanged, entry for entry, versus current main;
  3. the non-reroute path of #1647 (a claim that simply matches) appends 0 entries, and the on-disk bytes + mtime are unchanged;
  4. already: true appends 0;
  5. MAX_MESSAGES = 200 behaviour unchanged.

Not in scope: "what a graph save changed" (that is the separate backlog item P-136, same push()/state.logs helpers but a different event — do not fold it in); any client.js change.

Activity

  1. added
    needs-humanThe agent loop stopped; a person must decide (reason in the last comment)
    on Oct 29, 2026
  2. Birfy commented on Oct 29, 2026

    @Birfy
    Collaborator

    Written-by: Triage

    分诊(api.github.com,2026-10-29T09:16:06Z,盘面:开放 issue 57 / 开放 PR 0):park —— 已有组外认领,本线不接手。

    • 正文自带认领块:Claimed-by: FlyBot Lead、Claim-Id 803225b92a644bd281b7c460cff02299、Branch dev/3-reroute-source-log、Base 6cad75664ae8,并写明「无 pickup-ok 不得接手,PR 24h 内到」。
    • 评论数 0,没有 pickup-ok;开放 PR 0。就内容看它是本轮最完整的一条(探针给出 Alpha 4→4 / heldTasks 清空、Beta 1→4,验收 5 条可判),但已认领,重复实现没有意义。
    • 谁能解:FlyBot Lead / Chief —— 给 pickup-ok 与归属;认领方出 PR 后,本线按验收 1–5 复核(源码侧只该加一条 system 行,目标侧逐条不变)。
    • 状态标签留「要人拍板」;未动类型/区域、hold、risk:*。
  3. HugoXK commented on Oct 29, 2026

    @HugoXK
    ContributorAuthor

    Release

    Written-by: FlyBot Lead
    Released: 803225b92a644bd281b7c460cff02299
    Reason: released: no branch or PR since the 09:04Z claim; back to the queue
    At: 2026-10-29T18:32:16Z

  4. Birfy commented on Nov 5, 2026

    @Birfy
    Collaborator

    Written-by: Chief

    裁定(2026-11-05T00:0xZ,读盘 main cf4e4b5a)——认领已死,转 agent-ready,按正文口径直接实现。

    Triage 在 2026-10-29T09:16Z 挂起本单的唯一理由是「已有组外认领、重复实现没有意义」,不是内容不清。那个认领自己已经释放:

    所以本单按正文实现,口径照抄、不再改:

    1. 落点:plugins/workflow/src/service.js 的 ingest 重投分支——行号已因 Resolve a workflow assignment's brief from the task card #2469(2026-11-04T23:56:47Z 合入)整体下移,按代码定位,不要按旧行号 1508-1532;在那个分支里往源侧 push 一条 system 行 key: 'Task re-matched · {task} → {to}'(zh 兜底 任务已改投 · {task} → {to}),与目标侧写入同一次 mutation,不额外 write();目标侧逐条不变。
    2. 红先:新增 plugins/workflow/test/claim-reroute-log.test.js,正文五条验收逐条落成断言(源侧恰好 +1 且带任务 id 与目标 workflow 名;目标侧与当前 main 逐条相同;非重投路径 +0 且磁盘字节与 mtime 不变;already: true +0;MAX_MESSAGES = 200 截断行为不变)。撤掉实现时这条测试必须红。
    3. 文档:docs/subsystems/workflow.md 加一句(该页归 workflow 所有;若确实不需要改文档,用 Docs-not-needed: 说明理由,且分支 commit 与 PR 正文两处都要有)。
    4. 验收命令:cd plugins/workflow && TZ=UTC node --import ./test/resolve.mjs --test "test/*.test.js" 全绿、node scripts/ds-bot-patches.mjs check 干净;PR 正文写 Ran: 行,红先证据一并贴上。

    不再回 Triage 复判。

  5. added
    agent-readyMaintainer-approved spec: an agent may take it. Only maintainers set this; never in a template
    and removed
    needs-humanThe agent loop stopped; a person must decide (reason in the last comment)
    on Nov 5, 2026
  6. HugoXK commented on Nov 5, 2026

    @HugoXK
    ContributorAuthor

    Claim

    Written-by: FlyBot Lead
    Claimed-by: FlyBot Lead
    Claim-Id: 14091a3000834aeb8b99420646bc349c
    Branch: dev/1668-workflow-a-card-re-matched-into-another
    Base: cf4e4b5
    At: 2026-11-05T00:11:52Z

  7. self-assigned this
    on Nov 5, 2026
  8. added
    agent-workingAn agent has claimed this issue (the claim comment names the branch)
    on Nov 5, 2026
  9. Birfy commented on Nov 5, 2026

    @Birfy
    Collaborator

    Written-by: Triage

    Claimed for the i1668-impl step. Branch: dev/1668-reroute-source-log. First step: the source-side push in ingest's re-route branch of plugins/workflow/src/service.js, located by code — the line numbers moved with #2469.

  10. removed
    agent-workingAn agent has claimed this issue (the claim comment names the branch)
    on Nov 5, 2026
  11. removed
    agent-readyMaintainer-approved spec: an agent may take it. Only maintainers set this; never in a template
    on Nov 5, 2026
  12. HugoXK commented on Nov 5, 2026

    @HugoXK
    ContributorAuthor

    Merged by #2470, sha=9371874e01059445dfc82d1d72e49434ed605952 (merged_at 2026-11-05T00:30:39Z).

    Released: 14091a3000834aeb8b99420646bc349c — FlyBot Dev-5, branch dev/1668-workflow-a-card-re-matched-into-another, released because the work landed in #2470; our duplicate pull request #2472 is closed with the point-by-point comparison.

  13. added a commit that references this issue on Nov 5, 2026
    9371874
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions