eda: playbook action-reference classifier residual debt (t2db.25) #453
Notifications
Due Date
No due date set.
Depends on
Reference: sam/archie#453
Reference in new issue
Block a user
Residual debt from archie-core-t2db.25 (action ids / J1), found by post-rewrite adversarial review. None blocks the shipped behaviour; all are recorded, not fixed in that lane.
FALSE-POSITIVE REJECTION UNDER COMPREHENSION SHADOWING. internal/domain/eda/expr's reference classifier counts any AST IdentKind named 'actions' as a read of the context root. A comprehension loop variable literally named 'actions' shadows the root, so 'event.list.exists(actions, actions.a == 1)' compiles, reports ids=["a"], resolvable=true, and playbook.Load rejects a valid playbook naming unknown id "a" (fails closed, but wrong). Correct fix needs scope-aware classification (track IterVar/AccuVar bindings) or cel-go checked-reference resolution instead of name matching. Evidence: expr.go classifier; review run ids-recheck3-invariant (3e352bc7).
STABLE-IDENTIFIER GRAMMAR DUPLICATED 3x WITH NO TIE TEST. internal/domain/eda/playbook/playbook.go actionIDPattern, internal/plugin/host.go stableIdentifier, internal/domain/workflow/vocabulary.go stepTypeIdentifier all hold the same regex. Nothing ties them; drift is silent. Extract one shared definition respecting the layering rule, or add an external tie test.
TWO LOADER-BOUNDARY TEST CASES PASS FOR THE WRONG REASON. playbook_test.go 'non-literal index key' uses 'actions[key]' where key is an undeclared root, so it fails at CEL compile; 'in operator on actions' embeds '"notify" in actions' raw into YAML, so it fails at YAML parse. Neither exercises the guard it names. Use 'actions[event.kind]...' and a quoted 'when: '"'"'notify" in actions'"'"''.
DOC/PRD OVERSTATEMENT. expr.go's 'exhaustive by construction' comment is falsified by (1); the PRD's claim that the lint tool and daemon share one EDA checker is false (cmd/archie-playbooks lints workflow.LoadPlaybookDirs only; eda_playbook_dir has no lint path).
Close reason
Shipped. All four residual items are fixed on main: (1) expr.actionReferences now classifies by the checked AST type (actionsTypeName) rather than by identifier name, so a comprehension variable named actions no longer shadows the root; (2) the stable-identifier grammar is one shared definition, internal/domain/stableid, imported by eda/playbook, plugin/host.go and workflow/vocabulary.go; (3) the two loader-boundary cases were corrected to actions[event.kind] and a quoted "notify" in actions; (4) the doc overstatement is closed - the eda lint path now exists via -eda-dir (see .33). Verified: go test ./internal/domain/eda/... passes.
Imported from beads
archie-core-t2db.29· GitHub #1117 · type task · priority P2 · created 2026-09-21 · closed 2026-09-29