Skip to content

fix(cron): preserve outputs from same-second runs - #1001

Open
lewismosciski wants to merge 1 commit into
modelscope:mainfrom
lewismosciski:fix/cron-preserve-run-outputs
Open

lewismosciski wants to merge 1 commit into
modelscope:mainfrom
lewismosciski:fix/cron-preserve-run-outputs

Conversation

@lewismosciski

Copy link
Copy Markdown

Change Summary

Cron runs for the same job overwrite each other's saved output when they finish within one second. Allocate a unique Markdown file for each result, retaining a timestamp prefix and nanosecond ordering so get_output() can still read results chronologically.

Validation: three regressions failed before the fix; all 101 cron tests passed afterward. Tests cover sequential and concurrent execution, multiple executors with identical timestamps, existing files, UTF-8 content, and indexed/latest output reads. Applicable changed-file pre-commit hooks passed. Full-repository pre-commit reports existing main lint/format failures, including skills_manager.py:61 and shell_validator.py:91.

Related issue number

Found while inspecting cron output persistence; no existing issue.

Checklist

  • The pull request title is a good summary of the changes - it will be used in the changelog
  • Unit tests for the changes exist
  • Run pre-commit install and pre-commit run --all-files before git commit, and passed lint check. (Both run; existing repository failures noted above.)
  • Documentation reflects the changes where applicable (internal persistence fix; no API change)

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.

1 participant