Skip to content

Add deterministic process graph liveness validation - #33

Merged
dkharlanau merged 6 commits into
mainfrom
agent/process-liveness-validation
Aug 27, 2026
Merged

Add deterministic process graph liveness validation#33
dkharlanau merged 6 commits into
mainfrom
agent/process-liveness-validation

Conversation

@dkharlanau

@dkharlanau dkharlanau commented Aug 27, 2026

Copy link
Copy Markdown
Owner

Fixes #32.

Adds graph-liveness analysis on top of existing reachability validation:

  • reachable terminal detection instead of accepting an unrelated unreachable terminal;
  • reverse reachability to identify every reachable step that cannot terminate;
  • deterministic strongly-connected-component detection for trapped cycles while allowing retry/rework loops that have an exit;
  • structural error for type: end with outgoing transitions;
  • backward-compatible warning for reachable non-end implicit terminals;
  • decision warning for fewer than two outgoing branches;
  • parallel split/join semantic warning when the node has neither multiple inputs nor multiple outputs.

Regression tests cover terminating loops, trapped cycles with an unreachable terminal, end-with-outgoing, implicit terminals, decision branch cardinality and parallel split/join behavior. The specification and architecture docs now define the liveness boundary explicitly.

The first PR CI pass exposed one existing fixture problem rather than a validator defect: examples/adapters/process-manifest.csv described a linear manager approval with one outgoing edge as a decision gateway. Because that CSV shape does not model branches and the step is operationally a human approval task, the fixture is corrected to user_task instead of weakening the new gateway rule.

The validator remains static: liveness means the declared graph has terminating paths, not that external runtime work is guaranteed to finish.

@github-actions

Copy link
Copy Markdown

Process as Code — PR impact

No changed process contracts detected.

@dkharlanau
dkharlanau merged commit 8985464 into main Aug 27, 2026
7 checks passed
@dkharlanau
dkharlanau deleted the agent/process-liveness-validation branch August 31, 2026 18:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Correctness] Add process graph liveness and terminal-path validation

1 participant