Skip to content

Commit b9b6ea7

Browse files
committed
chore(chaining): add ai context for chaining engine
1 parent 5ddf7fc commit b9b6ea7

2 files changed

Lines changed: 19 additions & 16 deletions

File tree

.github/agents/chaining-engine-reviewer.agent.md

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -44,20 +44,22 @@ instructions: |
4444
When reviewing chaining code, verify:
4545
4646
1. **Feature flag**: All new endpoints check `PreviewFeature.INJECT_CHAINING` is enabled.
47-
2. **Step lifecycle**: Status transitions follow TEMPLATE → READY → RUN → END (never skip).
48-
3. **Workflow guards**: Before executing/creating steps, check `workflowService.isWorkflowEnded()`.
49-
4. **Queue isolation**: All queue publishing goes through `QueueChainingService`, never direct RabbitMQ calls.
50-
5. **State sync order**: Global state is updated BEFORE propagating to local states of dependent steps.
51-
6. **Time delays**: Uses `StepDelayQueueService`, never `Thread.sleep()`.
52-
7. **Condition evaluation**: Conditions are always evaluated before step execution proceeds.
53-
8. **DTO boundary**: Controllers return DTOs (StepOutput, EventOutput, etc.), never JPA entities.
54-
9. **Mapper correctness**: Static mapper methods (ConditionMapper.toOutput, StepMapper.toOutput) — NOT MapStruct annotations.
55-
10. **@AccessControl**: Every endpoint has proper `Action` and `ResourceType`.
56-
11. **@Transactional**: Write operations use `@Transactional(rollbackFor = Exception.class)`.
57-
12. **Timeout safety**: New execution paths check for expired workflows and terminated steps.
58-
13. **External update bridge**: If adding new inject-mutating methods, annotate with `@WorkflowUpdateEvent`.
59-
14. **Scope correctness**: Allowlist/denylist logic in `ScopeService` applies exclusions after inclusions.
60-
15. **DEPEND_ON conditions**: Step dependencies use `ConditionFactory.dependOn()`.
47+
2. **EE validation**: EE-only chaining endpoints/operations are marked with `@AccessControl(..., isEnterpriseEdition = true)` so `AccessControlAspect` enforces Enterprise Edition license validation.
48+
3. **Frontend EE validation**: EE-only chaining UI/actions are gated in frontend with Enterprise Edition validation (typically `useEnterpriseEdition().isValidated`), in addition to chaining feature-flag checks.
49+
4. **Step lifecycle**: Status transitions follow TEMPLATE → READY → RUN → END (never skip).
50+
5. **Workflow guards**: Before executing/creating steps, check `workflowService.isWorkflowEnded()`.
51+
6. **Queue isolation**: All queue publishing goes through `QueueChainingService`, never direct RabbitMQ calls.
52+
7. **State sync order**: Global state is updated BEFORE propagating to local states of dependent steps.
53+
8. **Time delays**: Uses `StepDelayQueueService`, never `Thread.sleep()`.
54+
9. **Condition evaluation**: Conditions are always evaluated before step execution proceeds.
55+
10. **DTO boundary**: Controllers return DTOs (StepOutput, EventOutput, etc.), never JPA entities.
56+
11. **Mapper correctness**: Static mapper methods (ConditionMapper.toOutput, StepMapper.toOutput) — NOT MapStruct annotations.
57+
12. **@AccessControl**: Every endpoint has proper `Action` and `ResourceType`.
58+
13. **@Transactional**: Write operations use `@Transactional(rollbackFor = Exception.class)`.
59+
14. **Timeout safety**: New execution paths check for expired workflows and terminated steps.
60+
15. **External update bridge**: If adding new inject-mutating methods, annotate with `@WorkflowUpdateEvent`.
61+
16. **Scope correctness**: Allowlist/denylist logic in `ScopeService` applies exclusions after inclusions.
62+
17. **DEPEND_ON conditions**: Step dependencies use `ConditionFactory.dependOn()`.
6163
6264
## How to help
6365

.github/instructions/code-review.instructions.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Key checks: N+1 queries, `@Fetch(FetchMode.SUBSELECT)` on collections, `FetchTyp
2121

2222
> Full rules: [backend.instructions.md](backend.instructions.md)
2323
24-
Key checks: layering (Controller → Service → Repository, never skip), JPA entities never returned from controllers (use DTOs), `@Transactional` self-call (Spring proxy bypass), no new code in `openaev-framework` (deprecated), no new code in `io.openaev.rest` (legacy — use `io.openaev.api` instead).
24+
Key checks: layering (Controller → Service → Repository, never skip), JPA entities never returned from controllers (use DTOs), `@Transactional` self-call (Spring proxy bypass), no new code in `openaev-framework` (deprecated), no new code in `io.openaev.rest` (legacy — use `io.openaev.api` instead), backend EE-only behavior explicitly marked with `@AccessControl(..., isEnterpriseEdition = true)` so Enterprise Edition validation is enforced.
2525

2626
## Multi-Tenancy
2727

@@ -41,7 +41,7 @@ Key checks: `@Nested` + `@DisplayName` grouping, `given_X_should_Y` naming, AAA
4141
> Full rules: [frontend.instructions.md](frontend.instructions.md)
4242
> Agent: `frontend-reviewer`
4343
44-
Key checks: no MUI for layout (native HTML), `sx` prop only (no `makeStyles`), `t()` called early, auto-generated `api-types.d.ts` (no manual types).
44+
Key checks: no MUI for layout (native HTML), `sx` prop only (no `makeStyles`), `t()` called early, auto-generated `api-types.d.ts` (no manual types), feature-flagged behavior uses the correct frontend flag check, and EE-only UI/actions are gated by frontend Enterprise Edition validation (typically `useEnterpriseEdition().isValidated`).
4545

4646
## Chaining Engine
4747

@@ -50,6 +50,7 @@ Key checks: no MUI for layout (native HTML), `sx` prop only (no `makeStyles`), `
5050
> Agent: `chaining-engine-reviewer`
5151
5252
Key checks: `PreviewFeature.INJECT_CHAINING` gate on endpoints, step lifecycle (TEMPLATE → READY → RUN → END), `workflowService.isWorkflowEnded()` guard before execution, queue interactions only via `QueueChainingService`, global state updated before local propagation, time delays via `StepDelayQueueService` (never `Thread.sleep()`), `@WorkflowUpdateEvent` on inject-mutating methods.
53+
EE check: chaining EE-only endpoints/operations are explicitly marked with `@AccessControl(..., isEnterpriseEdition = true)` so AccessControlAspect enforces Enterprise Edition license validation.
5354

5455
## Review Style
5556

0 commit comments

Comments
 (0)