Skip to content

Preserve Jobflow settings swaps during serialization - #3413

Draft
Andrew-S-Rosen wants to merge 1 commit into
mainfrom
agent/preserve-jobflow-settings-swap
Draft

Preserve Jobflow settings swaps during serialization#3413
Andrew-S-Rosen wants to merge 1 commit into
mainfrom
agent/preserve-jobflow-settings-swap

Conversation

@Andrew-S-Rosen

Copy link
Copy Markdown
Member

Summary

  • store Jobflow settings_swap values in the serialized job document instead of only in a function closure
  • execute the original stripped function under the requested temporary settings on the worker
  • add a regression test covering a tuple-valued ESPRESSO_PARALLEL_CMD through a Monty/Jobflow serialization round-trip

Root cause

Jobflow serializes a job callable by its module and name. The existing settings wrapper captured settings_swap in a local closure, so deserializing the job remotely resolved the original module-level function and discarded the captured settings. This caused values such as the "-npool 2" suffix to be lost.

Impact

Redecorated Jobflow jobs now retain temporary quacc settings when submitted to a remote worker, including tuple-valued Espresso parallel commands.

Validation

  • python -m pytest tests/jobflow -q (24 passed)
  • python -m ruff check src/quacc/wflow_tools/decorators.py tests/jobflow/test_customizers.py
  • python -m ruff format --check src/quacc/wflow_tools/decorators.py tests/jobflow/test_customizers.py

Closes #2501

@codecov

codecov Bot commented Aug 11, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.48%. Comparing base (5c64e12) to head (3195088).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3413   +/-   ##
=======================================
  Coverage   99.48%   99.48%           
=======================================
  Files         104      104           
  Lines        4277     4290   +13     
=======================================
+ Hits         4255     4268   +13     
  Misses         22       22           

☔ 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Failed in redecorating ESPRESSO_PARALLEL_CMD with jobflow

1 participant