Ship the first non-workflow action position (multi-action playbook), prerequisite for typed action results #1478

Closed
opened 2026-10-27 13:40:33 +00:00 by sam · 0 comments
Owner

Found by the t2db.27 assessment. t2db.27 (declare generated Result schemas to CEL) is blocked in CODE, not merely by an unstarted bead, and no open bead owns the missing piece.

WHY .27 CANNOT START

  1. The declaration mechanism is unsettled. expr.NewEnv() (expr.go:53) takes no parameters and declares actions as map(string, dyn) (expr.go:56). It is built ONCE per Store (playbook.go:162 and :179), so there is a single global, homogeneous-map environment. But action ids are dynamic and per-playbook, and a result's type comes from the action's kind. Declaring per-kind Result schemas therefore needs a PER-PLAYBOOK environment that declares each prior action's result type - a NewEnv signature change plus a Store/env restructure. expr.go:41-42 already says this is "follow-up work once multi-action playbooks exist".
  2. The acceptance is unreachable through Load today, and a naive test would pass for the wrong reason. Under the t2db.15 boundary, .25's unknownActionReference(prior, 0, ids) (playbook.go:285) rejects ANY actions. reference, because idx=0 means nothing is a declared prior action. So no loadable playbook can contain actions..result. at all. A test asserting "a playbook referencing an undefined field fails to load" would trip the UNKNOWN-ID message rather than the unknown-FIELD one - the vacuous class that had to be de-vacuumed in .26.

WHAT THIS BEAD OWNS
Ship the position that makes a multi-action playbook loadable: a non-workflow action position with at least two actions, so a later action can reference an earlier action's result. That is the thing .27 needs and that t2db.31 also assumes.

NOTE ON .31: t2db.31 ("wire InvokeOnce into the first side-effecting position") assumes this position exists; it does not ship it. So this bead is a prerequisite for BOTH .27 and .31, and both should be marked blocked-by it.

FIRST DELIVERABLE, per this repo's scope discipline: this capability has no settled design, so the first artifact is a decisive 1-page design doc (not prose about options) covering the per-playbook typed environment, what a result type is per action kind, and how the t2db.15 boundary is relaxed without losing reject-at-load.

GROUPS WITH

  • archie-core-t2db.27 (typed Result schemas to CEL)
  • archie-core-t2db.31 (first side-effecting position)
  • archie-core-1h05 (args eval-failure semantics - ratifiable only once args has a real consumer)

Close reason

Shipped. The design doc landed as docs/prds/multi-action-playbooks.md (Approved, naming nx30 as the unblocker for t2db.27/.31), and the position it owns shipped: internal/domain/eda/playbook supports position: module with one or more actions, against a per-action CEL environment declaring each prior action id typed by its kind Result (compileModuleActions -> expr.NewEnv(declared...)). Verified: TestLoadModuleActionIsValidActionPlaybook, TestLoadActionPlaybookRejectsMixedPositions, expr TestCompileDeclaredResultRead/TestCompileUndeclaredActionIDRejected, module TestShippedExampleModuleLoads all pass.


Imported from beads archie-core-nx30 · GitHub #1109 · type feature · priority P2 · created 2026-09-21 · closed 2026-09-29

Found by the t2db.27 assessment. t2db.27 (declare generated Result schemas to CEL) is blocked in CODE, not merely by an unstarted bead, and no open bead owns the missing piece. WHY .27 CANNOT START 1. The declaration mechanism is unsettled. expr.NewEnv() (expr.go:53) takes no parameters and declares `actions` as map(string, dyn) (expr.go:56). It is built ONCE per Store (playbook.go:162 and :179), so there is a single global, homogeneous-map environment. But action ids are dynamic and per-playbook, and a result's type comes from the action's kind. Declaring per-kind Result schemas therefore needs a PER-PLAYBOOK environment that declares each prior action's result type - a NewEnv signature change plus a Store/env restructure. expr.go:41-42 already says this is "follow-up work once multi-action playbooks exist". 2. The acceptance is unreachable through Load today, and a naive test would pass for the wrong reason. Under the t2db.15 boundary, .25's unknownActionReference(prior, 0, ids) (playbook.go:285) rejects ANY actions.<id> reference, because idx=0 means nothing is a declared prior action. So no loadable playbook can contain actions.<id>.result.<field> at all. A test asserting "a playbook referencing an undefined field fails to load" would trip the UNKNOWN-ID message rather than the unknown-FIELD one - the vacuous class that had to be de-vacuumed in .26. WHAT THIS BEAD OWNS Ship the position that makes a multi-action playbook loadable: a non-workflow action position with at least two actions, so a later action can reference an earlier action's result. That is the thing .27 needs and that t2db.31 also assumes. NOTE ON .31: t2db.31 ("wire InvokeOnce into the first side-effecting position") assumes this position exists; it does not ship it. So this bead is a prerequisite for BOTH .27 and .31, and both should be marked blocked-by it. FIRST DELIVERABLE, per this repo's scope discipline: this capability has no settled design, so the first artifact is a decisive 1-page design doc (not prose about options) covering the per-playbook typed environment, what a result type is per action kind, and how the t2db.15 boundary is relaxed without losing reject-at-load. GROUPS WITH - archie-core-t2db.27 (typed Result schemas to CEL) - archie-core-t2db.31 (first side-effecting position) - archie-core-1h05 (args eval-failure semantics - ratifiable only once args has a real consumer) ### Close reason Shipped. The design doc landed as docs/prds/multi-action-playbooks.md (Approved, naming nx30 as the unblocker for t2db.27/.31), and the position it owns shipped: internal/domain/eda/playbook supports position: module with one or more actions, against a per-action CEL environment declaring each prior action id typed by its kind Result (compileModuleActions -> expr.NewEnv(declared...)). Verified: TestLoadModuleActionIsValidActionPlaybook, TestLoadActionPlaybookRejectsMixedPositions, expr TestCompileDeclaredResultRead/TestCompileUndeclaredActionIDRejected, module TestShippedExampleModuleLoads all pass. --- _Imported from beads `archie-core-nx30` · GitHub #1109 · type feature · priority P2 · created 2026-09-21 · closed 2026-09-29_
sam added the mediumfeature labels 2026-10-27 13:40:33 +00:00
sam self-assigned this 2026-10-27 13:40:33 +00:00
sam closed this issue 2026-10-27 13:40:33 +00:00
sam added a new dependency 2026-10-27 13:42:04 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Reference: sam/archie#1478