Skip to content

fix(cli): keep policy and provider diagnostics readable - #3444

Open
shiju-nv wants to merge 1 commit into
NVIDIA:mainfrom
shiju-nv:fix/policy-diagnostic-recovery
Open

shiju-nv wants to merge 1 commit into
NVIDIA:mainfrom
shiju-nv:fix/policy-diagnostic-recovery

Conversation

@shiju-nv

Copy link
Copy Markdown
Collaborator

Summary

Policy history tables can panic when truncation splits a UTF-8 character, and provider detail hides YAML serialization failures as though the profile were absent. Use character-safe truncation and a bounded recovery diagnostic while preserving valid YAML navigation and redacted object output.

Related Issue

No issue required: corrections to diagnostic rendering and error handling.

Changes

  • Reuse the existing Unicode-safe truncation helper for policy revision errors, preserving empty cells and normal ASCII output.
  • Distinguish absent, valid and unserializable provider-profile YAML. Explain serialization failure and how to recover; expose the profile YAML action only after successful serialization.
  • Preserve strict serialization and discard error text that may echo authored values. Cover the actual table renderer, provider display/navigation and long multibyte failures.

Testing

  • mise run pre-commit passes
  • Unit tests added/updated
  • E2E tests added/updated (if applicable)

Checklist

  • Follows Conventional Commits
  • Commits are signed off (DCO)
  • Architecture docs updated (if applicable)

Reuse character-safe truncation for policy history errors so a multibyte character cannot panic the table renderer.

Distinguish unavailable provider-profile YAML from an absent profile, display a bounded diagnostic, and preserve strict serialization and redacted object navigation.

Cover the actual CLI renderer and TUI display/navigation paths, including invalid and absent profiles, Unicode input, and redacted errors.

Signed-off-by: Shiju <shiju@nvidia.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant