Skip to content

Comments

Fix js_repl view_image test runtime panic#11796

Merged
fjord-oai merged 1 commit intomainfrom
fjord/js_repl_seq---4hqupa7505_e7j
Feb 14, 2026
Merged

Fix js_repl view_image test runtime panic#11796
fjord-oai merged 1 commit intomainfrom
fjord/js_repl_seq---4hqupa7505_e7j

Conversation

@fjord-oai
Copy link
Contributor

@fjord-oai fjord-oai commented Feb 13, 2026

Summary

Fixes a flaky/panicking js_repl image-path test by running it on a multi-thread Tokio runtime and tightening assertions to focus on real behavior.

Problem

js_repl_can_attach_image_via_view_image_tool in
/Users/fjord/code/codex-jsrepl-seq/codex-rs/core/src/tools/js_repl/mod.rs
can panic under single-thread test runtime with:

can call blocking only when running on the multi-threaded runtime

It also asserted a brittle user-facing text string.

Changes

  1. Updated the test runtime to:
    #[tokio::test(flavor = "multi_thread", worker_threads = 2)]
  2. Removed the brittle "attached local image path" string assertion.
  3. Kept the concrete side-effect assertions:
    • tool call succeeds
    • image is actually injected into pending input (InputImage with data:image/png;base64,...)

Why this is safe

This is test-only behavior. No production runtime code paths are changed.

Validation

  • Ran:
    cargo test -p codex-core tools::js_repl::tests::js_repl_can_attach_image_via_view_image_tool -- --nocapture
  • Result: pass

git stack

git-stack-id: fjord/js_repl_seq---4hqupa7505_e7j
git-stack-title: Fix js_repl view_image test runtime panic
@fjord-oai fjord-oai force-pushed the fjord/js_repl_seq---4hqupa7505_e7j branch from d46df1e to f396742 Compare February 14, 2026 00:55
@fjord-oai fjord-oai enabled auto-merge (squash) February 14, 2026 00:56
@fjord-oai fjord-oai merged commit 6cbb489 into main Feb 14, 2026
33 checks passed
@fjord-oai fjord-oai deleted the fjord/js_repl_seq---4hqupa7505_e7j branch February 14, 2026 01:11
@github-actions github-actions bot locked and limited conversation to collaborators Feb 14, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants