Skip to content

fix(execution): preserve ResultAggregator falsy defaults (#611) - #669

Merged
rafaelscosta merged 1 commit into
mainfrom
fix/pr-611-result-aggregator-falsy-20260507
May 7, 2026
Merged

fix(execution): preserve ResultAggregator falsy defaults (#611)#669
rafaelscosta merged 1 commit into
mainfrom
fix/pr-611-result-aggregator-falsy-20260507

Conversation

@rafaelscosta

@rafaelscosta rafaelscosta commented May 7, 2026

Copy link
Copy Markdown
Collaborator

Summary

Clean replacement for stale PR #611.

  • Preserves valid falsy values in ResultAggregator defaults (waveIndex: 0, duration: 0, empty string output/agent IDs, maxHistory: 0).
  • Keeps filesModified safe by accepting arrays only and falling back to output parsing for invalid non-array values.
  • Fixes report/markdown fallbacks so wave zero generates wave-results-0.json and zero metrics render as 0, not alternate values or N/A.
  • Bumps @aiox-squads/core to 5.1.9 and regenerates the install manifest/entity registry.

Validation

  • node -c .aiox-core/core/execution/result-aggregator.js
  • npm test -- tests/core/result-aggregator.test.js --runInBand
  • npm test -- tests/core/result-aggregator.test.js tests/core/wave-executor.test.js tests/core/build-state-manager.test.js --runInBand --forceExit
  • npm run validate:manifest
  • npm run validate:publish
  • npm run lint -- --quiet
  • npm run typecheck
  • git diff --check
  • npm run test:ci -> 315 suites passed / 7,846 tests passed / 149 skipped

Notes

The old PR branch had stale CI/manifest failures and CodeRabbit feedback about mechanically preserving non-array task lists. This replacement keeps the fix scoped to ResultAggregator and adds explicit array normalization where needed.

Summary by CodeRabbit

  • Bug Fixes

    • Result aggregator now correctly preserves valid falsy values (zero wave indices, zero durations, empty strings) in aggregation and report generation instead of treating them as missing.
  • Tests

    • Added comprehensive test coverage for falsy-but-valid configuration and result values.

@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 3:12pm

Request Review

@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
@coderabbitai

coderabbitai Bot commented May 7, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 86df1387-ad8d-48a7-929e-7132df43be61

📥 Commits

Reviewing files that changed from the base of the PR and between 524c12c and 053730b.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (6)
  • .aiox-core/core/execution/result-aggregator.js
  • .aiox-core/data/entity-registry.yaml
  • .aiox-core/install-manifest.yaml
  • docs/stories/epic-123/STORY-123.13-result-aggregator-falsy-defaults.md
  • package.json
  • tests/core/result-aggregator.test.js

Walkthrough

This PR updates ResultAggregator to use nullish-coalescing (??) instead of logical OR (||) for preserving intentional falsy values like 0, empty strings, and maxHistory: 0 throughout configuration defaults, task aggregation, and report generation, with corresponding test coverage and version bump to 5.1.9.

Changes

Falsy Value Handling in ResultAggregator

Layer / File(s) Summary
Story and Requirements
docs/stories/epic-123/STORY-123.13-result-aggregator-falsy-defaults.md
Documents acceptance criteria for preserving falsy but valid metrics (waveIndex: 0, duration: 0, empty strings) during aggregation and reporting instead of replacing them with defaults.
Core Logic Refactor
.aiox-core/core/execution/result-aggregator.js
Constructor switches from || to ?? for rootPath, reportDir, and maxHistory; aggregation preserves falsy wave/task values; report filename and markdown rendering use ?? for zero metrics; duration rendering checks != null instead of truthiness.
Test Coverage
tests/core/result-aggregator.test.js
Constructor test verifies falsy config preservation; aggregate tests cover waveIndex: 0, zero duration/output, non-array filesModified fallback, and maxHistory: 0 history trimming; report and formatMarkdown tests validate zero metrics in filenames and markdown output.
Version and Manifests
package.json, .aiox-core/install-manifest.yaml, .aiox-core/data/entity-registry.yaml
Package version bumped to 5.1.9; install manifest and entity registry updated with new SHA256 hashes and timestamps for result-aggregator.js and capability-detection.js.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Suggested reviewers

  • Pedrovaleriolopez
  • oalanicolas
✨ 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/pr-611-result-aggregator-falsy-20260507

Warning

Tools execution failed with the following error:

Failed to run tools: 14 UNAVAILABLE: read ECONNRESET


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 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)

@rafaelscosta
rafaelscosta force-pushed the fix/pr-611-result-aggregator-falsy-20260507 branch from 78abc23 to 053730b Compare May 7, 2026 15:12
@rafaelscosta
rafaelscosta merged commit 29ff84e into main May 7, 2026
40 checks passed
@rafaelscosta
rafaelscosta deleted the fix/pr-611-result-aggregator-falsy-20260507 branch May 7, 2026 15:17
tuanmedeiros pushed a commit to tuanmedeiros/aios-core-synkraay that referenced this pull request Jun 2, 2026
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