Fixed inspect_request implementation#455
Merged
anutosh491 merged 2 commits intocompiler-research:mainfrom Mar 11, 2026
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR fixes the C++ kernel’s inspect handling by switching inspect_request_impl to return proper Jupyter inspect_reply JSON (with status: "ok" and found indicating success), and refactors inspection logic to return an inspect URL string that is then formatted into reply data.
Changes:
- Update
inspect_request_implto usexeus::create_inspect_reply(...)and build thedatabundle only when documentation is found. - Refactor
inspectfrom “mutate kernel_res JSON” intostd::string inspect(...)plusbuild_inspect_data(...)for formatting. - Align tests with the Jupyter inspect protocol expectations (
status == "ok"even whenfound == false) and remove now-obsolete helper tests.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
test/test_interpreter.cpp |
Updates inspect/execute tests to match the new inspect reply semantics. |
src/xinterpreter.cpp |
Reworks inspect_request_impl to build and return inspect_reply via xeus helpers. |
src/xinspect.hpp |
Updates internal inspect API to return a string result and expose build_inspect_data. |
src/xinspect.cpp |
Implements refactored inspect + build_inspect_data, and updates introspection preamble to use xeus helper replies. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #455 +/- ##
==========================================
- Coverage 81.06% 80.67% -0.39%
==========================================
Files 21 21
Lines 866 859 -7
Branches 78 78
==========================================
- Hits 702 693 -9
- Misses 164 166 +2
🚀 New features to boost your workflow:
|
anutosh491
reviewed
Mar 11, 2026
anutosh491
reviewed
Mar 11, 2026
anutosh491
approved these changes
Mar 11, 2026
Collaborator
anutosh491
left a comment
There was a problem hiding this comment.
Looks good to me. Thanks !
Collaborator
|
Merging ! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes the implementation of inspection.