ocas variable 替代 threads.yaml / registry.yaml #3

Closed
opened 2026-06-02 06:07:58 +00:00 by xingyue · 0 comments
Owner

Overview

用 ocas 的 variable 系统替代 uwf 当前基于 YAML 文件的状态管理。

现状

文件 用途
ThreadId → head hash + suspend metadata
workflow name → CAS hash
完成/取消的 thread 记录

目标 Variable 映射

Variable Name 用途
替代 registry.yaml
替代 threads.yaml 的 head 指针

Tags 编码状态

Variable 特性复用

  • var history — thread head 变更的审计轨迹(替代部分 history.jsonl)
  • tags — 编码 suspend metadata(替代 ThreadIndexEntry 结构)
  • var list --tag — 按状态过滤 threads(替代内存过滤)
  • GC — variable value 是 root,自动保护整条 CAS chain

分步

  1. registry.yaml → variables(最简单,先做)
  2. threads.yaml → variables + tags
  3. history.jsonl → 利用 var history + completed/cancelled tags

依赖

  • #CAS统一 必须先完成(共享 store)
  • ocas variable 的 tag 查询性能需验证(当 thread 数量大时)
## Overview 用 ocas 的 variable 系统替代 uwf 当前基于 YAML 文件的状态管理。 ## 现状 | 文件 | 用途 | |-----|------| | | ThreadId → head hash + suspend metadata | | | workflow name → CAS hash | | | 完成/取消的 thread 记录 | ## 目标 Variable 映射 | Variable Name | 用途 | |--------------|------| | | 替代 registry.yaml | | | 替代 threads.yaml 的 head 指针 | ### Tags 编码状态 ### Variable 特性复用 - **var history** — thread head 变更的审计轨迹(替代部分 history.jsonl) - **tags** — 编码 suspend metadata(替代 ThreadIndexEntry 结构) - **var list --tag** — 按状态过滤 threads(替代内存过滤) - **GC** — variable value 是 root,自动保护整条 CAS chain ## 分步 1. registry.yaml → variables(最简单,先做) 2. threads.yaml → variables + tags 3. history.jsonl → 利用 var history + completed/cancelled tags ## 依赖 - #CAS统一 必须先完成(共享 store) - ocas variable 的 tag 查询性能需验证(当 thread 数量大时)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: shazhou/united-workforce#3