Skip to content

fix(ssh): handle empty recovery roots - #640

Merged
njzjz merged 2 commits into
deepmodeling:masterfrom
njzjz-bot:fix/issue-262-remote-root-race
Aug 29, 2026
Merged

fix(ssh): handle empty recovery roots#640
njzjz merged 2 commits into
deepmodeling:masterfrom
njzjz-bot:fix/issue-262-remote-root-race

Conversation

@njzjz-bot

Copy link
Copy Markdown
Contributor

Summary

  • remove an empty previous submission-hash directory as a disposable placeholder instead of moving it into the new hash;
  • preserve non-empty recovery data with the standard non-overwriting SFTP rename operation;
  • tolerate only a missing source during concurrent recovery while surfacing unrelated SFTP failures and leaving an existing destination untouched;
  • add mocked recovery tests that run without an SSH server.

Validation

  • python -m coverage run -p --source=./dpdispatcher -m unittest -v — 168 passed, 42 skipped
  • uvx pre-commit run --all-files
  • uvx --from ty==0.0.17 --with '.[cloudserver,gui]' --with tomli ty check dpdispatcher/contexts/ssh_context.py tests/test_ssh_context.py
  • python -m dpdispatcher -h, dpdisp --help, and dpdisp run examples/dpdisp_run.py
  • make SPHINXOPTS='-D intersphinx_timeout=2' html — succeeds with existing documentation warnings

The repository-wide ty check also reports four existing allow_ref signature diagnostics in dpdispatcher/run.py and dpdispatcher/entrypoints/submit.py; neither file is changed here.

Closes #262

Coding agent: Codex
Codex version: codex-cli 0.149.0
Model: gpt-5.6-sol
Reasoning effort: xhigh

Avoid moving empty submission-hash placeholders while preserving non-empty recovery data. Use SFTP rename semantics to tolerate a concurrently consumed source without hiding other failures or replacing an existing destination.

Coding-Agent: Codex
Codex-Version: codex-cli 0.149.0
Model: gpt-5.6-sol
Reasoning-Effort: xhigh
@dosubot dosubot Bot added size:M This PR changes 30-99 lines, ignoring generated files. bug Something isn't working labels Aug 23, 2026
@coderabbitai

coderabbitai Bot commented Aug 23, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

Next included review available in 7 minutes.

View limit details

Limit details: You’ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 2ba5702c-e3ee-4405-b026-a944c081106d

📥 Commits

Reviewing files that changed from the base of the PR and between 5d1536c and 08980fa.

📒 Files selected for processing (2)
  • dpdispatcher/contexts/ssh_context.py
  • tests/test_ssh_context.py

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@codecov

codecov Bot commented Aug 23, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 75.75758% with 8 lines in your changes missing coverage. Please review.
✅ Project coverage is 57.87%. Comparing base (5d1536c) to head (08980fa).

Files with missing lines Patch % Lines
dpdispatcher/contexts/ssh_context.py 75.75% 8 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #640      +/-   ##
==========================================
+ Coverage   57.51%   57.87%   +0.35%     
==========================================
  Files          40       40              
  Lines        4256     4285      +29     
==========================================
+ Hits         2448     2480      +32     
+ Misses       1808     1805       -3     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@njzjz-bot njzjz-bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

No blocking findings after reviewing the full diff, related code, and CI checks. Intended decision: APPROVE. GitHub does not permit njzjz-bot to approve a pull request authored by the same account, so this formal review is submitted as COMMENT.

Coding agent: Codex
Codex version: codex-cli 0.151.0
Model: gpt-5.6-sol
Reasoning effort: xhigh

@njzjz-bot njzjz-bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Reviewed the complete diff and relevant surrounding code. No blocking findings. GitHub does not permit the njzjz-bot account to approve a pull request authored by njzjz-bot, so this review is submitted with the COMMENT event only.

Coding agent: Codex
Codex version: codex-cli 0.151.0
Model: gpt-5.6-sol
Reasoning effort: xhigh

@njzjz-bot njzjz-bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Independent review result: no blocking issues found. GitHub prevents njzjz-bot from approving a pull request authored by the same account, so this formal review is submitted as COMMENT rather than APPROVE.

Coding agent: Codex
Codex version: codex-cli 0.151.0
Model: gpt-5.6-sol
Reasoning effort: xhigh

@njzjz
njzjz enabled auto-merge (squash) August 29, 2026 15:46
Resolve the SSH context conflict while preserving empty-root recovery and recursive remote-root creation.

Coding-Agent: Codex

Codex-Version: codex-cli 0.151.0

Model: gpt-5.6-sol

Reasoning-Effort: xhigh
auto-merge was automatically disabled August 29, 2026 17:21

Head branch was pushed to by a user without write access

@njzjz
njzjz merged commit 7b3c2e1 into deepmodeling:master Aug 29, 2026
27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working size:M This PR changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

RuntimeError in make_model_devi step

2 participants