Skip to content

fix(serverless): preserve non-dict results with the debugger enabled - #689

Open
feiiiiii5 wants to merge 1 commit into
runpod:mainfrom
feiiiiii5:codex/debugger-result-shape
Open

feiiiiii5 wants to merge 1 commit into
runpod:mainfrom
feiiiiii5:codex/debugger-result-shape

Conversation

@feiiiiii5

Copy link
Copy Markdown

Fixes #59, reported by @justinmerrell.

With --rp_debugger enabled, valid scalar/list handler results and error-only results raise TypeError or KeyError before send_result. The existing condition checks the dictionary result envelope, then indexes its output as a dictionary.

Check the output instead. Dictionary outputs retain debugger metadata; other results keep their existing format and reach delivery. This also covers aggregated generator output.

pytest tests/test_serverless/test_modules/test_job_debugger.py -q -o addopts= fails 9 cases on main (with one dictionary control passing) and passes all 10 here. Tests execute real handle_job, run_job and generator processing; only result transport and debugger probes are mocked.

Full unit suite: 2743 passed, 6 subtests passed, 94.28% coverage with the 90% requirement retained. Independent review and changed-code/new-test Black checks pass.

Full-suite command and scope

python -m pytest --cov-config=pyproject.toml --cov=runpod --cov-report=term-missing --cov-report=xml -q on Python 3.12.8. The explicit config uses the checked-in coverage omissions; pytest.ini otherwise references an absent .coveragerc. No config was changed. Existing unrelated formatting in rp_job.py is untouched. Live cloud E2E was not run.

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.

More Debug Output to Higher Level

1 participant