Skip to content

workflows: settled run details 缺少独立 retention bound #178

Open

Description

@tt-a1i

问题

Workflow 的 settled details 会同时驻留于运行时集合和持久化 artifacts,但缺少一个独立、明确、可配置/可证明的 retention bound。长 Session 连续运行大量 Workflow 时,已完成 run 的 details、agent 列表、logs 和 graph projection 可持续累积。

这与 active-run 并发限制无关:并发有界不代表终态历史有界。

期望

  • 明确 canonical persisted history 与 session-memory projection 的不同保留策略;
  • settled in-memory runs 有 count/byte/age 至少一种硬上限;
  • eviction 不影响 pending completion delivery、run suffix ambiguity、安全 resume 或当前请求 dashboard;
  • 磁盘 retention/清理另有可观察合同,不静默删除唯一 artifacts;
  • 压力测试连续完成大量包含 agents/logs 的 runs,证明内存集合有界;
  • operator 能看到 omitted/evicted 数量,而不是把缺失误报为“不存在”。

Activity

  1. smf-h commented on Aug 28, 2026

    @smf-h
    Contributor

    我来认领这个 issue。计划将 workflow 的持久化历史与会话内存投影分离,为 settled runs 增加可配置的数量和 UTF-8 字节上限,驱逐时保留磁盘 artifact,并确保通过 run id、唯一后缀、resume 和 dashboard 仍可恢复查询;同时补充 delivery、状态输出和边界测试

  2. 627150795 commented on Aug 28, 2026

    @627150795
    Contributor

    Hi! I am working on this issue. I will start with a bounded in-memory retention policy for settled workflow projections, keeping persisted artifacts and pending result delivery intact, and will expose any evicted count to the operator before opening a PR.

  3. 627150795 commented on Aug 28, 2026

    @627150795
    Contributor

    Update: PR #233 is now based on the latest upstream main. The bounded settled-run retention implementation and its focused tests remain unchanged; Node unit tests 2/2 and the isolated retention E2E test pass, with lint/typecheck/diff checks clean.

  4. 627150795 commented on Aug 29, 2026

    @627150795
    Contributor

    补充代码审计结果:PR #233 的 32 条 settled-run 数量上限、最旧终态驱逐、运行中记录保护和持久化查询均已验证;但该 PR 明确只完成 count-bound 子集,尚未覆盖可配置/字节/时间 retention 与完整压力证明,因此不宣称整个 Issue 已关闭。

  5. 627150795 commented on Aug 29, 2026

    @627150795
    Contributor

    代码有效性审计结论:PR #233 的 32 条 settled in-memory count bound、最旧终态驱逐、活动 run 保护、artifact 保留和按 ID 磁盘查询均有效;但它不是 Issue #178 的完整实现。当前 dashboard 的 loadRunEntries() 在打开历史时仍会遍历并 hydrate 所有符合条件的持久化 run,且 session_start 会清空 settled projection 与 evicted 计数。因此本 PR 应继续按“count-bound 子集”审查,不宣称已覆盖 dashboard 物化边界、byte/age 策略或重启可观测性。

  6. testikun commented on Aug 31, 2026

    @testikun
    Collaborator

    This was generated by AI during triage.

    我想认领 #178 中尚未覆盖的 dashboard 持久化 materialization 子范围,不重复 PR #233 已合入的 settled-run count bound。

    计划范围:

    • 让 loadRunEntries() 先读取轻量的 workflow.json metadata,再执行 session、时间和引用过滤;
    • 避免 dashboard 列表刷新时对所有历史 run 使用 hydrateArtifacts: true;
    • 只有用户打开某个 run 的详情时,才按需 hydrate result/transcript;
    • 保留 active run、referenced run、resume、malformed artifact 和现有 operator-visible 语义;
    • 增加大历史集、重复 refresh、lazy detail hydration 和旧 artifact 的回归测试;
    • 完成后运行 bun run check 与 bun run test。

    该贡献只处理 dashboard 的无界 materialization,不改变 PR #233 的 settled-run count retention 逻辑;如已有相同范围的安排,请维护者告知。

  7. testikun commented on Aug 31, 2026

    @testikun
    Collaborator

    This was generated by AI during triage.

    已提交 PR #319,处理 #178 中 Dashboard 持久化 materialization 子范围:列表只读取 workflow.json metadata,默认按 32 条 / 2 MiB 的独立 projection 上限保留非显式历史;result.json 与 transcripts.json 延迟到打开详情时读取;省略数量在 TUI 中可见,且省略项不会破坏完整 ID、后缀解析或歧义判断。

    该 PR 不修改 canonical artifacts、Workflow 执行、delivery、resume/replay 或已有 settled session-memory retention;因此 #178 的完整 issue 仍需维护者按整体 retention 范围审查。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    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