Skip to content

fix: close resilience runtime cluster - #673

Merged
rafaelscosta merged 1 commit into
mainfrom
fix/resilience-cluster-runtime-20260507
May 7, 2026
Merged

fix: close resilience runtime cluster#673
rafaelscosta merged 1 commit into
mainfrom
fix/resilience-cluster-runtime-20260507

Conversation

@rafaelscosta

@rafaelscosta rafaelscosta commented May 7, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • replace stale/dirty resilience PRs with a current minimal runtime patch
  • fix IdeationEngine gotchas filtering to use the existing listGotchas() API and log filter failures
  • make ConditionEvaluator fail safe for unknown conditions while preserving explicit runtime workflow overrides
  • apply GotchasMemory.errorWindowMs as a rolling count window and sort critical severity correctly
  • add regression coverage for circuit breaker timeout preservation, runtime conditions, gotchas memory, and ideation filtering
  • bump core to 5.1.13 and regenerate the install manifest

Validation

  • node -c .aiox-core/core/ideation/ideation-engine.js
  • node -c .aiox-core/core/orchestration/condition-evaluator.js
  • node -c .aiox-core/core/memory/gotchas-memory.js
  • node -c tests/core/resilience-regressions.test.js
  • git diff --check
  • npm run validate:manifest
  • npm run validate:semantic-lint
  • npm run validate:publish
  • npm run lint -- --quiet
  • npm run typecheck
  • npm test -- tests/core/resilience-regressions.test.js tests/core/gotchas-memory-imports.test.js --runInBand --forceExit (2 suites / 11 tests)
  • npm run test:ci (316 suites / 7,853 tests)

Context

Supersedes the remaining valid runtime residue from #584, #470, #474, and #477. The original linked issues are already closed, but main still had several behavioral residues after prior superseding merges. This PR keeps the fix current, scoped, and avoids the stale entity-registry churn from the older PRs.

Summary by CodeRabbit

Release Notes

  • New Features

    • Added support for runtime condition overrides in condition evaluation.
  • Bug Fixes

    • Unknown conditions now safely default to false instead of permissive true.
    • Improved error tracking with timestamp normalization and window-based counting.
    • Enhanced severity ordering in error categorization.
  • Tests

    • Added comprehensive resilience regression test suite.
  • Chores

    • Version bumped to 5.1.13.

@vercel

vercel Bot commented May 7, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
aiox-core Ready Ready Preview, Comment May 7, 2026 4:50pm

Request Review

@coderabbitai

coderabbitai Bot commented May 7, 2026

Copy link
Copy Markdown

Review Change Stack
No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: adbdf59c-2879-4ccc-8fa8-bb634b474e3f

📥 Commits

Reviewing files that changed from the base of the PR and between 72134f7 and b5674b3.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (7)
  • .aiox-core/core/ideation/ideation-engine.js
  • .aiox-core/core/memory/gotchas-memory.js
  • .aiox-core/core/orchestration/condition-evaluator.js
  • .aiox-core/install-manifest.yaml
  • docs/stories/epic-123/STORY-123.18-resilience-runtime-cluster.md
  • package.json
  • tests/core/resilience-regressions.test.js

Walkthrough

This PR implements a resilience runtime cluster refactor that strengthens error tracking, condition evaluation, and gotcha filtering across three core modules. The changes introduce runtime-resolved condition overrides, normalized error timestamp tracking with rolling-window counting, and integrate the gotcha memory system into ideation filtering. Comprehensive regression tests validate all behaviors.

Changes

Resilience Runtime Cluster

Layer / File(s) Summary
Condition Evaluation Runtime Infrastructure
core/orchestration/condition-evaluator.js
Adds RUNTIME_CONDITION_DEFAULTS constant and internal _runtimeOverrides Map to support dynamic runtime condition resolution.
Condition Evaluation Methods & Logic
core/orchestration/condition-evaluator.js
Introduces setRuntimeCondition() and setRuntimeConditions() public APIs. Updates evaluate() to check runtime overrides first, then defaults, then built-in logic, failing safe to false for unknown conditions. Extends getSkipExplanation() with additional condition mappings.
Error Timestamp Tracking & Normalization
core/memory/gotchas-memory.js
Refactors trackError() to store rolling timestamps array, derive errorPattern and category immediately, and apply normalized windowing. Adds private _normalizeErrorTimestamps() helper to parse persisted timestamps (numeric or date-like strings). Updates listGotchas() severity sorting to use nullish-coalescing (??) for robustness.
Ideation Engine Gotcha Integration
core/ideation/ideation-engine.js
Changes gotcha filtering from getAll() to listGotchas() (awaited), preserving suggestion filtering and error handling fallback.
Regression Test Suite
tests/core/resilience-regressions.test.js
Adds comprehensive Jest test helpers (createProfile(), withMockedNow()) and test cases covering: CircuitBreaker recovery window preservation, ConditionEvaluator fail-safe behavior and runtime overrides, GotchasMemory windowing and severity ordering, and IdeationEngine gotcha filtering.
Package & Manifest Versioning
package.json, .aiox-core/install-manifest.yaml
Bumps version from 5.1.12 to 5.1.13. Updates file hashes and timestamps in manifest for modified core modules.
Story Documentation
docs/stories/epic-123/STORY-123.18-resilience-runtime-cluster.md
Documents the resilience runtime cluster completion with acceptance criteria across all modified components, implementation tasks with prior PR references, and validation checklist including syntax, regression tests, manifest validation, linting, type-checking, and CI test runs.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

  • SynkraAI/aiox-core#668: Fixes GotchasMemory export/load integration that directly impacts the gotcha filtering refactored in this PR.

Suggested labels

area: core, type: test, area: docs, area: devops

Suggested reviewers

  • Pedrovaleriolopez
  • oalanicolas
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'fix: close resilience runtime cluster' accurately reflects the main objective of this PR, which consolidates and fixes resilience-related runtime issues across multiple core modules.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/resilience-cluster-runtime-20260507

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions Bot added area: agents Agent system related area: workflows Workflow system related squad mcp type: test Test coverage and quality area: core Core framework (.aios-core/core/) area: installer Installer and setup (packages/installer/) area: synapse SYNAPSE context engine area: cli CLI tools (bin/, packages/aios-pro-cli/) area: pro Pro features (pro/) area: health-check Health check system area: docs Documentation (docs/) area: devops CI/CD, GitHub Actions (.github/) labels May 7, 2026
@github-actions

github-actions Bot commented May 7, 2026

Copy link
Copy Markdown
Contributor

📊 Coverage Report

Coverage report not available

📈 Full coverage report available in Codecov


Generated by PR Automation (Story 6.1)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: agents Agent system related area: cli CLI tools (bin/, packages/aios-pro-cli/) area: core Core framework (.aios-core/core/) area: devops CI/CD, GitHub Actions (.github/) area: docs Documentation (docs/) area: health-check Health check system area: installer Installer and setup (packages/installer/) area: pro Pro features (pro/) area: synapse SYNAPSE context engine area: workflows Workflow system related mcp squad type: test Test coverage and quality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant