Repository navigation
docs(hostmon): the reader's own doc still denied #1967's fix - #1981
Merged
Merged
Conversation
`field_from_env`'s rustdoc told readers that `hostlock.sh run` does not export `--owner` and that passing the flag alone leaves a child unable to recognise its own lock. #1967 made that false three commits ago. It is the doc comment attached to the function that decides `mine:` versus `held:`, so the reader it misleads is exactly the one deciding whether a benchmark row can be trusted -- and it advises against the invocation that now works. Repo-wide grep finds no other copy; #1967 updated `scripts/ort_ab/README.md` and this was the only sentence it missed. Replaced with what the script does, including the asymmetry, since that is the part a reader will otherwise re-derive: a declared owner is exported, an owner defaulted from `$USER` is not, and a run that declared nothing still reports `Held` -- unattributed, unprotected, and honest. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This was referenced Aug 24, 2026
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1981 +/- ##
==========================================
+ Coverage 80.25% 81.01% +0.76%
==========================================
Files 407 424 +17
Lines 188524 207552 +19028
Branches 188524 207552 +19028
==========================================
+ Hits 151293 168152 +16859
- Misses 31822 33760 +1938
- Partials 5409 5640 +231
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
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.
One doc comment.
crates/onnx-runtime-hostmon/src/hostlock.rs, onfield_from_env:#1967 (
8d6377f00) made that false. It is the doc comment on the function that decidesmine:versusheld:, so the reader it misleads is precisely the one deciding whether a benchmark row can be trusted — and it steers them away fromrun --owner X, which is now the invocation that works.Repo-wide grep finds no other copy: #1967 updated
scripts/ort_ab/README.md, and this was the only sentence it missed.The replacement states the asymmetry too, since a reader will otherwise re-derive it: a declared owner (
--owner, orHOSTLOCK_OWNERalready in the environment) is exported; an owner defaulted from$USERis not, because every agent here is the same unix user and a falsemine:reads as protected. A run that declared nothing still reportsHeld.How I found it, and what I checked
I had been fixing #1929 in parallel and did not notice #1967 until my branch stopped getting CI (see below). Reviewing that PR against mine, this was the one thing its diff did not cover. I also checked the two adjacent claims in mine that #1967 might have missed, and it had not missed them:
OWNER_DECLAREDis initialised in the defaults block, so an inherited environment variable of that name cannot stand in for the flag. My first attempt read${OWNER_DECLARED:-0}and initialised it nowhere, which letOWNER_DECLARED=1 hostlock.sh run -- childexport the$USERdefault — the exact falsemine:the change exists to prevent. fix(hostlock): letrun --ownercertify the rows it wraps (#1929) #1967 does not have that hole.OWNER_DECLARED=0line onmainand running the full suite twice: 4 red in a clean environment (set -ucatches the unguarded read), and 1 red withOWNER_DECLARED=1inherited (an owner defaulted from the unix user is NOT exported). Covered in both directions, so there is nothing for me to add there.Validation
RUSTDOCFLAGS="-D warnings" cargo doc -p onnx-runtime-hostmon --no-deps— clean, and the intra-doc link still resolves.cargo test -p onnx-runtime-hostmon— green including doctests;cargo fmt --all --checkclean.Unrelated, but worth recording for whoever hits it next
My #1968 sat for forty minutes with no Actions runs at all — not queued, not failed: no GitHub Actions check suite was ever created for the head SHA, while other branches dispatched normally. Close/reopen did not help, and neither did a force-push to a fresh SHA. The cause was that the branch conflicted with
main(because #1967 had landed in the same files): GitHub cannot compute the merge ref, so it creates nopull_requestruns. A conflicted PR and a backlogged CI queue look identical fromgh pr checks, which says "no checks reported" for both. The tell isgh api repos/{o}/{r}/commits/{sha}/check-suites— third-party app suites appear, thegithub-actionsone does not.