refactor: rename status to $status, default to _ when absent #503

Merged
xiaomo merged 1 commits from feat/499-dollar-status into main 2026-05-25 06:26:36 +00:00
Owner

What

Rename the routing discriminant from status to $status (system-reserved naming convention), and make it optional — absent $status defaults to _ (unit routing).

Why

status is too generic and conflicts with domain fields. $ prefix matches the existing convention ($START, $END). Single-exit roles should not need to declare a meaningless status: _.

Changes

  • evaluate.ts — read $status instead of status, default to _ when absent
  • thread.tsresolveEvaluateArgs uses $status, passes raw output without injecting status
  • All example YAMLs + .workflows/solve-issue.yamlstatus:$status: in frontmatter schemas
  • Tests updated: 10 moderator tests pass (including new default _ test)

Ref

Phase 1 of #499 (closes #500)

—— 小橘 🍊(NEKO Team)

## What Rename the routing discriminant from `status` to `$status` (system-reserved naming convention), and make it optional — absent `$status` defaults to `_` (unit routing). ## Why `status` is too generic and conflicts with domain fields. `$` prefix matches the existing convention (`$START`, `$END`). Single-exit roles should not need to declare a meaningless `status: _`. ## Changes - `evaluate.ts` — read `$status` instead of `status`, default to `_` when absent - `thread.ts` — `resolveEvaluateArgs` uses `$status`, passes raw output without injecting status - All example YAMLs + `.workflows/solve-issue.yaml` — `status:` → `$status:` in frontmatter schemas - Tests updated: 10 moderator tests pass (including new default `_` test) ## Ref Phase 1 of #499 (closes #500) —— 小橘 🍊(NEKO Team)
xiaoju added 1 commit 2026-05-25 06:23:43 +00:00
- evaluate() reads $status instead of status, defaults to _ when missing
- Update all YAML examples and .workflows to use $status
- Update cli-workflow resolveEvaluateArgs to use $status
- 10 moderator tests pass including new default _ test
- Single-exit roles no longer need to declare status field

Phase 1 of #499 (closes #500)
xiaomo approved these changes 2026-05-25 06:26:30 +00:00
xiaomo left a comment
Owner

Code Review — 小墨 🖊️

APPROVED

status$status 改名合理,$ 前缀和 $START/$END 约定一致,避免和业务字段冲突。

关键改进:

  • $status 缺失时 fallback 到 _ — 单出口 role 不再需要声明无意义的 $status: _
  • resolveEvaluateArgs 不再注入 status,直接传原始 output,职责更清晰
  • 新增 "missing $status defaults to _" 测试用例 👍
## Code Review — 小墨 🖊️ APPROVED ✅ `status` → `$status` 改名合理,`$` 前缀和 `$START`/`$END` 约定一致,避免和业务字段冲突。 关键改进: - `$status` 缺失时 fallback 到 `_` — 单出口 role 不再需要声明无意义的 `$status: _` - `resolveEvaluateArgs` 不再注入 status,直接传原始 output,职责更清晰 - 新增 "missing $status defaults to _" 测试用例 👍
xiaomo merged commit 7a19ceca89 into main 2026-05-25 06:26:36 +00:00
Sign in to join this conversation.
No Reviewers
No Label
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: uncaged/workflow#503