fix: remove _ single-exit for user roles #88

Merged
xiaoju merged 1 commits from fix/86-remove-single-exit-underscore into main 2026-06-05 02:09:50 +00:00
Owner

What

Remove the _ (single-exit / UNIT_STATUS) pattern for user-defined roles.

Why

_ makes frontmatter type indeterminate — user roles should always have explicit $status enum values. Breaking change for clearer workflow semantics.

Design

  • $START keeps _ — special entry node, no agent output
  • All user roles require explicit $status enum in frontmatter schema
  • Graph keys must match $status values — no wildcard fallback
  • Moderator errors on missing $status instead of silently using _

Changes

  • moderator/evaluate.ts — remove UNIT_STATUS fallback, error on missing $status
  • validate.ts — isGraph() rejects _ for non-$START roles
  • validate-semantic.ts — remove checkSingleExitRole(), require $status enum
  • 10 test files updated to use explicit status values
  • examples/analyze-topic.yaml — analyst role _done

Test

804/804 passed

Fixes #86

## What Remove the `_` (single-exit / UNIT_STATUS) pattern for user-defined roles. ## Why `_` makes frontmatter type indeterminate — user roles should always have explicit `$status` enum values. Breaking change for clearer workflow semantics. ## Design - **$START keeps `_`** — special entry node, no agent output - **All user roles require explicit `$status` enum** in frontmatter schema - **Graph keys must match `$status` values** — no wildcard fallback - **Moderator errors on missing `$status`** instead of silently using `_` ## Changes - `moderator/evaluate.ts` — remove UNIT_STATUS fallback, error on missing $status - `validate.ts` — isGraph() rejects `_` for non-$START roles - `validate-semantic.ts` — remove checkSingleExitRole(), require $status enum - 10 test files updated to use explicit status values - `examples/analyze-topic.yaml` — analyst role `_` → `done` ## Test 804/804 passed ✅ Fixes #86
xiaoju added 1 commit 2026-06-05 02:04:27 +00:00
fix: remove _ single-exit for user roles
CI / check (pull_request) Successful in 3m7s
63cb4d3645
$START keeps _ (special entry node). All user-defined roles now require
explicit $status enum in frontmatter + matching graph keys.

- moderator: remove UNIT_STATUS fallback, error on missing $status
- validate: reject _ graph keys for non-$START roles
- validate-semantic: remove checkSingleExitRole(), require $status enum
- update all test fixtures to use explicit status values
- fix examples/analyze-topic.yaml

Fixes #86
xiaoju merged commit 3d8df5c8e2 into main 2026-06-05 02:09:50 +00:00
xiaoju deleted branch fix/86-remove-single-exit-underscore 2026-06-05 02:09:50 +00:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: shazhou/united-workforce#88