Skip to content

fix: correct ibm bug - #138

Open
jrpool wants to merge 1 commit into
mainfrom
ibmBug
Open

jrpool wants to merge 1 commit into
mainfrom
ibmBug

Conversation

@jrpool

@jrpool jrpool commented Aug 25, 2026

Copy link
Copy Markdown
Member

Correct the bug in the module that runs the ibm rule engine. This correction resolves issue #124. After the correction, as documented in README.md, a report from the ibm rule engine when the withItems option is turned off includes totals for violations (ordinal severity 2) and for recommendations (ordinal severity 0), but no information about the violated rules.

@jrpool jrpool added the bug Something isn't working label Aug 25, 2026
@jrpool
jrpool requested a lite review from Copilot August 25, 2026 00:30

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes the ibm tool adapter’s standard-result generation so withItems: false no longer causes an internal TypeError and act failure, aligning IBM reporting behavior with the documented “totals-only” output when itemization is disabled.

Changes:

  • Ensure trimmed IBM native results always return an items array (empty when withItems is off) to avoid undefined item lists.
  • Guard standard-instance population behind withItems so totals are produced without rule/instance details when itemization is disabled.
  • Keep the emitted tests/ibm.js synchronized with the TypeScript source.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
tests/ibm.ts Fixes withItems: false standard-results path by returning items: [] when not itemizing and only iterating items when withItems is enabled.
tests/ibm.js Mirrors the TypeScript fix in the committed emitted JavaScript so runtime behavior matches the source.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@jrpool
jrpool requested a review from wittjeff August 25, 2026 00:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants