Skip to content

Implement stdin input_request test#4

Merged
rgbkrk merged 1 commit into
mainfrom
stdin-testing
Feb 25, 2026
Merged

Implement stdin input_request test#4
rgbkrk merged 1 commit into
mainfrom
stdin-testing

Conversation

@rgbkrk

@rgbkrk rgbkrk commented Feb 25, 2026

Copy link
Copy Markdown
Member

Summary

Implements the previously-stubbed stdin test to validate that kernels properly handle input requests during execution.

Changes:

  • Add execute_with_stdin() helper to harness that:
    • Sets allow_stdin=true in execute request
    • Polls both IOPub and stdin channels concurrently
    • Responds to input_request with mock input_reply
  • Implement test_stdin_input_request to verify:
    • Kernel sends input_request when code needs input
    • Execution completes successfully after receiving input

Results:

  • ipykernel: 4/5 Tier 4 tests passing (was 3/5)
  • Only comms_lifecycle remains as a stub

Test plan

  • Verify ipykernel stdin test passes
  • Check deno/evcxr behavior (may not support stdin)
  • Confirm no regressions in other tests

- Add execute_with_stdin() helper to harness that handles input requests
- Polls both IOPub and stdin channels during execution
- Sends mock input_reply when input_request is received
- Sets allow_stdin=true in execute request to enable stdin handling
- Test verifies kernel sends input_request and completes execution

ipykernel now passes 4/5 Tier 4 tests (only comms_lifecycle still skipped).
@github-actions

Copy link
Copy Markdown

Kernel Conformance Matrix

Kernel Tier 1 Tier 2 Tier 3 Tier 4 Total
deno 8/9 6/7 1/2 2/5 17/23
evcxr 9/9 3/7 1/2 2/5 15/23
ipykernel 9/9 7/7 2/2 4/5 22/23

deno (Deno kernel) - 3 failures, 3 skipped

Language: typescript | Protocol: 5.3

Failures

Test Message Type Likely Source Reason
interrupt_request interrupt_request unknown Timeout waiting for control reply
shutdown_reply shutdown_request unknown Timeout waiting for control reply

Skipped (Not Implemented)

  • display_data: Kernel can produce display_data messages for rich output
  • stdin_input_request: Kernel can request input from frontend via stdin channel
  • comms_lifecycle: Kernel supports comm open/msg/close lifecycle
evcxr (evcxr_jupyter) - 5 failures, 3 skipped

Language: Rust | Protocol: 5.3

Failures

Test Message Type Likely Source Reason
inspect_request inspect_request unknown Timeout waiting for shell reply
history_request history_request unknown Timeout waiting for shell reply
comm_info_request comm_info_request unknown Timeout waiting for shell reply
interrupt_request interrupt_request unknown Protocol error: Error deserializing content for msg_type interrupt_reply: missing field status

Skipped (Not Implemented)

  • display_data: Kernel can produce display_data messages for rich output
  • stdin_input_request: Kernel can request input from frontend via stdin channel
  • comms_lifecycle: Kernel supports comm open/msg/close lifecycle
ipykernel (ipython) - 0 failures, 1 skipped

Language: python | Protocol: 5.3

Skipped (Not Implemented)

  • comms_lifecycle: Kernel supports comm open/msg/close lifecycle

Test Results by Message Type

Test Message Type deno evcxr ipykernel
comm_info_request comm_info_request
comms_lifecycle comm_open ⏭️ ⏭️ ⏭️
complete_request complete_request
display_data display_data ⏭️ ⏭️
error_handling execute_request
execute_input_broadcast execute_input
execute_reply_ok execute_request
execute_result execute_result
execute_stdout execute_request
execution_count_increments execute_request
heartbeat_responds heartbeat
history_request history_request
inspect_request inspect_request
interrupt_request interrupt_request
is_complete_complete is_complete_request
is_complete_incomplete is_complete_request ⚠️ ⚠️
kernel_info_has_language_info kernel_info_request
kernel_info_has_protocol_version kernel_info_request
kernel_info_reply_valid kernel_info_request
parent_header_correlation parent_header
shutdown_reply shutdown_request
status_busy_idle_lifecycle status
stdin_input_request input_request ⏭️ ⏭️

@rgbkrk
rgbkrk merged commit b60bf1a into main Feb 25, 2026
4 checks passed
@rgbkrk
rgbkrk deleted the stdin-testing branch February 25, 2026 22:27
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