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
Aggregate ceiling rules were unreliable:
- turn_count_gte rules never fired — the agent emitted `turn` but every
evaluator reads `turn_count` (NaN → no match). Agent now also emits the
cumulative aliases `turn_count` / `cumulative_cost_usd` that the rules read.
- cost/turn aggregates were reconstructed from the current event only, so the
per-session SDK reset (PR-fix retries, container restart) undercounted them.
evaluateAsyncEventRules now persists a monotonic high-water mark on the
TaskRecord (climb-only conditional UpdateItem) and evaluates against it, so
ceilings survive restarts. Fanout's ad-hoc reconstruction is removed.
Resolves the §10 rule-language open question: declarative field matchers are
permanent; Cedar-on-events is rejected (Cedar is authorization, has no
aggregation, and would add a third Cedar runtime for no gain).
ponytail: high-water is max(session totals), not a cross-session SUM — upgrade
path noted on the TaskRecord fields if PR-fix retries must accrue.
Copy file name to clipboardExpand all lines: docs/design/EVENT_GOVERNANCE.md
+2-1Lines changed: 2 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -152,6 +152,7 @@ Async `require_approval` after `pr_created` must state that the PR already exist
152
152
## 9. Out of scope
153
153
154
154
- Replacing tool Cedar with event rules
155
+
- Cedar-on-events (rejected — see §10; declarative matchers are permanent)
155
156
- Stream-only HITL (race with fast agents)
156
157
- EventBridge as primary internal bus
157
158
- Separate approve commands for event vs tool gates
@@ -162,6 +163,6 @@ Async `require_approval` after `pr_created` must state that the PR already exist
162
163
163
164
| Question | Resolution |
164
165
|----------|------------|
165
-
| Rule language |Declarative field matchers (Phase 0–1); Cedar-on-events deferred to ADR|
166
+
| Rule language |**Resolved: declarative field matchers are the permanent language; Cedar-on-events is rejected.** Cedar is an *authorization* language (`principal-action-resource-context` → permit/forbid) with no aggregation — it cannot express `cost_usd_gte` / `turn_count_gte`, and event actions (`notify`/`escalate`/`cancel_task`/`inject_nudge`) are ECA automation, not authorization decisions. A Cedar port would still need a bespoke action layer, and it would add a third Cedar runtime alongside the two we already must bump in lockstep (`cedar-wasm`, `cedarpy`) for zero gain. The two-plane split stands: Cedar governs tool execution (fail-closed); the declarative matcher governs events. The matcher already has cross-language parity, schema validation, and fixture parity tests.|
Copy file name to clipboardExpand all lines: docs/src/content/docs/architecture/Event-governance.md
+2-1Lines changed: 2 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -156,6 +156,7 @@ Async `require_approval` after `pr_created` must state that the PR already exist
156
156
## 9. Out of scope
157
157
158
158
- Replacing tool Cedar with event rules
159
+
- Cedar-on-events (rejected — see §10; declarative matchers are permanent)
159
160
- Stream-only HITL (race with fast agents)
160
161
- EventBridge as primary internal bus
161
162
- Separate approve commands for event vs tool gates
@@ -166,6 +167,6 @@ Async `require_approval` after `pr_created` must state that the PR already exist
166
167
167
168
| Question | Resolution |
168
169
|----------|------------|
169
-
| Rule language |Declarative field matchers (Phase 0–1); Cedar-on-events deferred to ADR|
170
+
| Rule language |**Resolved: declarative field matchers are the permanent language; Cedar-on-events is rejected.** Cedar is an *authorization* language (`principal-action-resource-context` → permit/forbid) with no aggregation — it cannot express `cost_usd_gte` / `turn_count_gte`, and event actions (`notify`/`escalate`/`cancel_task`/`inject_nudge`) are ECA automation, not authorization decisions. A Cedar port would still need a bespoke action layer, and it would add a third Cedar runtime alongside the two we already must bump in lockstep (`cedar-wasm`, `cedarpy`) for zero gain. The two-plane split stands: Cedar governs tool execution (fail-closed); the declarative matcher governs events. The matcher already has cross-language parity, schema validation, and fixture parity tests.|
0 commit comments