You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(cli): lint ADR-0044 approval revise-loop footguns at compile time
`objectstack compile` (lint-flow-patterns) now warns on two send-back-for-
revision shapes an AI authoring an approval flow gets wrong:
- Dead-end revise: an approval with a `revise` out-edge but no path looping
back to it — a valid DAG that `registerFlow` ACCEPTS, yet the submitter
reworks the record with nowhere to resubmit. The linter is the only place
that catches this.
- Un-declared revise loop: the loop returns to the approval but the closing
edge isn't `type: 'back'`, so `registerFlow` rejects it as an un-declared
cycle — the lint fires at compile time with the specific fix.
Also flags `maxRevisions: 0` alongside a `revise` edge (send-back disabled).
Advisory only; never fails the build. Mirrors the client-side rule shipped in
objectui (#1958).
Refs #2274, #1770 (ADR-0044).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
feat(cli): lint ADR-0044 approval revise-loop footguns at compile time
6
+
7
+
`objectstack compile` now warns on two send-back-for-revision shapes an AI (or human) authoring an approval flow commonly gets wrong:
8
+
9
+
-**Dead-end revise** — an approval node with a `revise` out-edge but no path looping back to it. This is a valid DAG, so `registerFlow` accepts it, yet the submitter reworks the record with nowhere to resubmit. The linter is the only place that catches the dead end.
10
+
-**Un-declared revise loop** — the loop returns to the approval but the closing edge isn't `type: 'back'`, so `registerFlow` rejects it as an un-declared cycle. The lint fires at compile time with the specific fix (mark the resubmit edge `type: 'back'`).
11
+
12
+
Also flags `maxRevisions: 0` alongside a `revise` edge (send-back disabled, so the branch always auto-rejects and never runs). Advisory only — never fails the build. Part of #2274 / ADR-0044.
0 commit comments