Skip to content

fix(policy): name the field in policy type errors - #4174

Open
ericcurtin wants to merge 1 commit into
NVIDIA:mainfrom
ericcurtin:fix/4168-policy-type-error-path/ericcurtin
Open

ericcurtin wants to merge 1 commit into
NVIDIA:mainfrom
ericcurtin:fix/4168-policy-type-error-path/ericcurtin

Conversation

@ericcurtin

Copy link
Copy Markdown
Contributor

Summary

Policy type errors now name the bad field, like unknown-field errors do.

Related Issue

Closes #4168

Changes

  • Decode with serde_path_to_error (already in the lockfile) and prefix the error with the field path.
  • Share the path length cap with unknown-field errors.

Testing

  • Checks appropriate to the affected code and behavior pass
  • Unit tests added/updated (if applicable)
  • E2E tests added/updated (if applicable)

cargo fmt, cargo clippy -D warnings and cargo test for openshell-policy-schema and openshell-policy. Prover tests not run (no local Z3).

Checklist

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

Signed-off-by: Eric Curtin <eric.curtin@docker.com>
@copy-pr-bot

copy-pr-bot Bot commented Oct 4, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@ericcurtin

Copy link
Copy Markdown
Contributor Author

@mrunalp @johntmyers PTAL when you get a chance, and /ok to test f61db311e if it looks good. Thank you!

This branch has not been deployed

No deployments
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.

bug: policy type errors don't say which field is wrong

2 participants