Repository navigation
fix(control): check native completion before restarting a parent - #240
Merged
Merged
Conversation
Co-Authored-By: GPT-6 Sol <noreply@pi.dev> Generated-By: pi 0.87.1 (https://pi.dev)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
A parent Job can restart after Harbor has finished if the control service reads an older Bucket listing. This change checks the native result directly just before starting a parent. It avoids an unnecessary restart without changing how Harbor runs or resumes trials.
Related issue: #239.
What Changed
The control service now checks
job/result.jsonwith a fresh read after it decides that no parent is live, and before it calls the HF Jobs start API. A nativefinished_atstops the launch. A missing or unfinished result keeps the existing resume path.dcd0a7ac74b7bd417780d9cb27cd819c7ec82e4e:src/harbor/job.py(Job.run()) andsrc/harbor/models/job/result.py(JobResult.finished_at). Harbor still writes and owns the result and trial resume. No new record, schema, API value, UI value, or trial scheduler was added.Testing
The stale-listing test failed before the fix and passed after it. The local unit and browser tests passed with
en_US.UTF-8for the existing USD formatting assertions.npm test -- --reporter=dot: 1,719 passed.npm run test:e2e: 77 passed on an isolated local port.npm run typecheck,npm run build,npm run format:check,npm run lint,npm run check:generated,npm audit --audit-level=low, andpython3 scripts/check_public_privacy.py .: passed.Risks
Each pending parent launch makes one extra fresh Bucket read. A missing result still allows launch; other read errors stop that reconciliation pass rather than starting a parent on uncertain evidence. This closes the observed stale-listing window, but a result that arrives after the final fresh read can still race with a launch. The hosted control service has not been changed by this PR.