Skip to content

fix(cli): render safe flow diagnostics - #218

Merged
ThePlenkov merged 1 commit into
abapify:mainfrom
theplenkov-forks:fix/flow-ownership-diagnostics
Sep 28, 2026
Merged

ThePlenkov merged 1 commit into
abapify:mainfrom
theplenkov-forks:fix/flow-ownership-diagnostics

Conversation

@ThePlenkov

@ThePlenkov ThePlenkov commented Sep 23, 2026 •

Copy link
Copy Markdown
Member

User description

Summary

  • render allow-listed structured diagnostics from typed plugin errors
  • preserve single-line, bounded, control-sequence-free CI output
  • ignore arbitrary detail fields to avoid accidental secret disclosure

Validation

  • bun vitest run packages/adt-cli/src/lib/utils/plugin-execution-error.test.ts
  • NX_DAEMON=false bunx nx run adt-cli:typecheck
  • git diff --check

CodeAnt-AI Description

Add safe diagnostic details to CLI failure messages

What Changed

  • Typed plugin failures now include selected diagnostic details such as object, path, diagnostic, component, and change type
  • Arbitrary fields, stack traces, secrets, and unsafe control characters remain excluded from CI output
  • Failure messages stay single-line and length-limited, including when diagnostic details are present

Impact

✅ Clearer flow ownership failures
✅ Safer CI logs
✅ Actionable file and object diagnostics

💡 Usage Guide

Checking Your Pull Request

Every time you make a pull request, our system automatically looks through it. We check for security issues, mistakes in how you're setting up your infrastructure, and common code problems. We do this to make sure your changes are solid and won't cause any trouble later.

Talking to CodeAnt AI

Got a question or need a hand with something in your pull request? You can easily get in touch with CodeAnt AI right here. Just type the following in a comment on your pull request, and replace "Your question here" with whatever you want to ask:

@codeant-ai ask: Your question here

This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.

Example

@codeant-ai ask: Can you suggest a safer alternative to storing this secret?

Preserve Org Learnings with CodeAnt

You can record team preferences so CodeAnt AI applies them in future reviews. Reply directly to the specific CodeAnt AI suggestion (in the same thread) and replace "Your feedback here" with your input:

@codeant-ai: Your feedback here

This helps CodeAnt AI learn and adapt to your team's coding style and standards.

Example

@codeant-ai: Do not flag unused imports.

Retrigger review

Ask CodeAnt AI to review the PR again, by typing:

@codeant-ai: review

Check Your Repository Health

To analyze the health of your code repository, visit our dashboard at https://app.codeant.ai. This tool helps you identify potential issues and areas for improvement in your codebase, ensuring your repository maintains high standards of code health.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@codeant-ai

codeant-ai Bot commented Sep 23, 2026 •

Copy link
Copy Markdown

🤖 CodeAnt AI — Review Status

Status Commit Started (UTC) Finished (UTC)
✅ Reviewed your PR a60e715 Sep 23, 2026 · 21:01 21:03

@netlify

netlify Bot commented Sep 23, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for adt-cli canceled.

Name Link
🔨 Latest commit a60e715
🔍 Latest deploy log https://app.netlify.com/projects/adt-cli/deploys/6ab43e0c95dfc50008b1f26a

@codeant-ai

codeant-ai Bot commented Sep 23, 2026

Copy link
Copy Markdown

Thanks for using CodeAnt! 🎉

We're free for open-source projects. if you're enjoying it, help us grow by sharing.

Share on X ·
Reddit ·
LinkedIn

@coderabbitai

coderabbitai Bot commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

Next included review available in 7 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: 932dcdd3-3f09-41f9-88ca-61032da426c8

📥 Commits

Reviewing files that changed from the base of the PR and between 3ac2a2e and a60e715.

📒 Files selected for processing (2)
  • packages/adt-cli/src/lib/utils/plugin-execution-error.test.ts
  • packages/adt-cli/src/lib/utils/plugin-execution-error.ts

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.

@baz-reviewer

baz-reviewer Bot commented Sep 23, 2026

Copy link
Copy Markdown

Review this PR on Baz

Merger

Waiting for CI and review to complete.

@codeant-ai codeant-ai Bot added the size:M This PR changes 30-99 lines, ignoring generated files label Sep 23, 2026
@ThePlenkov
ThePlenkov marked this pull request as draft September 23, 2026 21:01

@amazon-q-developer amazon-q-developer Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The implementation correctly addresses the security goal of preventing accidental secret disclosure while rendering structured diagnostics. The allow-list approach using DIAGNOSTIC_DETAIL_KEYS, combined with sanitizeLogText() sanitization on each value, provides defense-in-depth against both secret leakage and injection attacks. Test coverage validates that non-allow-listed fields are properly excluded while permitted diagnostic details are rendered safely.


You can now have the agent implement changes and create commits directly on your pull request's source branch. Simply comment with /q followed by your request in natural language to ask the agent to make changes.

@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 20 complexity · 0 duplication

Metric Results
Complexity 20
Duplication 0

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@gitar-bot

gitar-bot Bot commented Sep 23, 2026

Copy link
Copy Markdown

Important

You are using the Gitar free plan. Upgrade to unlock code review, CI analysis, auto-apply, custom automations, and more.

Gitar

@sonarqubecloud

Copy link
Copy Markdown

@codeant-ai

codeant-ai Bot commented Sep 23, 2026

Copy link
Copy Markdown

CodeAnt Nitpicks

1 code suggestion

1. A plugin can provide a proxy or getter-backed details object that throws during property access, causing error formatting to throw and bypass the failure exit path.

Error handling · packages/adt-cli/src/lib/utils/plugin-execution-error.ts:33-38

@ThePlenkov
ThePlenkov marked this pull request as ready for review September 23, 2026 21:04
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@ThePlenkov
ThePlenkov merged commit 38af16d into abapify:main Sep 28, 2026
24 checks passed
@ThePlenkov
ThePlenkov deleted the fix/flow-ownership-diagnostics branch September 28, 2026 16:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M This PR changes 30-99 lines, ignoring generated files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant