Skip to content

feat(introspection): return structured failure details - #576

Open
shreemaan-abhishek wants to merge 2 commits into
zmartzone:masterfrom
shreemaan-abhishek:feat/structured-introspection-failures
Open

shreemaan-abhishek wants to merge 2 commits into
zmartzone:masterfrom
shreemaan-abhishek:feat/structured-introspection-failures

Conversation

@shreemaan-abhishek

Copy link
Copy Markdown
Contributor

Summary

  • extend introspect with an additive raw endpoint status and structured failure result while preserving its existing first two return values
  • distinguish invalid requests and tokens from unavailable endpoints, invalid responses, and configuration errors
  • preserve structured failure details when concurrent requests share a non-cacheable introspection result, while retaining direct introspection fallback when coordination fails

Fixes #574

Checklist

  • Tests pass with docker build -f tests/Dockerfile . -t lua-resty-openidc/test
  • Tests pass with docker run -t --rm lua-resty-openidc/test:latest
  • ChangeLog is updated for behavior changes, bug fixes, features, or user-visible documentation changes

@shreemaan-abhishek

Copy link
Copy Markdown
Contributor Author

@kevinlzw could you please review this PR?

@kevinlzw

Copy link
Copy Markdown
Collaborator

Thanks for the PR. I reviewed the diff and have two non-blocking suggestions:

  1. Could we add coverage for the new return values on cache hits and coalesced requests? In particular, a negative-cache hit should retain invalid_token/401, and waiters sharing an endpoint failure should receive the same endpoint_status and failure details as the initiating request. The current concurrent test checks the response status and failure kind, but not the third return value.

  2. Could we also mention the stricter boolean validation of active in the ChangeLog? Previously, truthy non-boolean values such as "true" or 1 could be accepted; they now produce invalid_response. This is a useful validation change, but it is an observable behavior change beyond adding return values.

I haven't rerun the tests locally; this review is based on the code and test changes, with CI passing.

Also, I'll be on vacation for about two weeks, so my replies may be slower during that time. Thanks for your patience!

@shreemaan-abhishek

shreemaan-abhishek commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor Author

Thanks, both suggestions are addressed in eca4a7f.

@shreemaan-abhishek

Copy link
Copy Markdown
Contributor Author

Enjoy your vacation, thanks a lot!

@kevinlzw kevinlzw left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks for addressing both suggestions. The negative-cache and coalesced-failure tests now cover the additional return values, and the ChangeLog documents the stricter boolean active validation. Reviewed eca4a7f; CI is passing. I have not rerun the tests locally. Looks good to me.

@shreemaan-abhishek

Copy link
Copy Markdown
Contributor Author

thank you, if you can, please let us know when will the next release be conducted?

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.

Expose structured introspection failure details to callers

2 participants