PR T: consolidate obligations/evaluator into rulesEngine #24

Merged
nsatoshi merged 1 commits from devin/1776890754-pr-t-evaluator-consolidation into main 2026-04-22 20:48:10 +00:00
Owner

Follow-up to PRs #20 (rules engine) and #23 (obligation layer), which shipped an equivalent Condition shape.

Before: src/services/rulesEngine.ts had the full DSL, src/services/obligations/evaluator.ts had a parallel 153-line subset with the same types.

After: obligations/evaluator.ts is now a 49-line compat wrapper that re-exports the shared Condition types and delegates evaluateCondition() / resolvePath() to services/rulesEngine. The historical resolvePath(path, context) argument order used by tests/unit/obligations.test.ts is preserved.

No runtime behaviour change; no migration; no env changes.

Verification: npx tsc --noEmit clean; npx jest 10 suites / 128 tests passing (same count as on main).

Follow-up to PRs #20 (rules engine) and #23 (obligation layer), which shipped an equivalent `Condition` shape. **Before:** `src/services/rulesEngine.ts` had the full DSL, `src/services/obligations/evaluator.ts` had a parallel 153-line subset with the same types. **After:** `obligations/evaluator.ts` is now a 49-line compat wrapper that re-exports the shared `Condition` types and delegates `evaluateCondition()` / `resolvePath()` to `services/rulesEngine`. The historical `resolvePath(path, context)` argument order used by `tests/unit/obligations.test.ts` is preserved. No runtime behaviour change; no migration; no env changes. **Verification:** `npx tsc --noEmit` clean; `npx jest` 10 suites / 128 tests passing (same count as on `main`).
nsatoshi added 1 commit 2026-04-22 20:47:51 +00:00
PR T: consolidate obligations/evaluator into rulesEngine
Some checks failed
CI / Frontend Lint (pull_request) Failing after 10s
CI / Frontend Type Check (pull_request) Failing after 6s
CI / Frontend Build (pull_request) Failing after 11s
CI / Frontend E2E Tests (pull_request) Failing after 9s
CI / Orchestrator Build (pull_request) Failing after 6s
CI / Orchestrator Unit Tests (pull_request) Failing after 5s
CI / Orchestrator E2E (Testcontainers) (pull_request) Has been skipped
CI / Contracts Compile (pull_request) Failing after 7s
CI / Contracts Test (pull_request) Failing after 6s
Code Quality / SonarQube Analysis (pull_request) Failing after 20s
Code Quality / Code Quality Checks (pull_request) Failing after 5s
Security Scan / Dependency Vulnerability Scan (pull_request) Failing after 4s
Security Scan / OWASP ZAP Scan (pull_request) Failing after 4s
17745b3aea
Follow-up to PRs #20 (rules engine) and #23 (obligation layer) which
shipped an equivalent Condition shape. obligations/evaluator.ts is now
a thin compat wrapper re-exporting the shared Condition types and
delegating evaluateCondition() / resolvePath() to services/rulesEngine.
Preserves the historical resolvePath(path, context) signature used by
tests and keeps existing imports under services/obligations/evaluator
working unchanged.

Verified: npx tsc --noEmit clean; 10 suites / 128 tests pass.
Co-Authored-By: Nakamoto, S <defi@defi-oracle.io>
nsatoshi merged commit 21d49595d0 into main 2026-04-22 20:48:10 +00:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: d-bis/CurrenciCombo#24