Skip to content

hrx_build_scope: the compile costs 2.0 min, not eight, and here is how to re-measure (engine#3245) - #3246

Closed
bong-water-water-bong wants to merge 1 commit into
mainfrom
fix/3245-scope-cost
Closed

bong-water-water-bong wants to merge 1 commit into
mainfrom
fix/3245-scope-cost

Conversation

@bong-water-water-bong

Copy link
Copy Markdown
Collaborator

Closes #3245.

hrx_build_scope.py argued for the configure-only path with "an eight-minute compile on the bench runner", and repeated it in a self-test comment. Nobody had measured it; I quoted it in #3228 and then had to correct it publicly. Measured over the last 30 hrx_build runs:

success durations: min 0.2 min · median 2.0 · max 5.4        (n=26)
configure-only runs:                              0.2 min
full runs on the same branch:            2.0 / 1.9 / 2.7 min

So a registration-only PR saves ≈1.8 min of the single build runner, not eight. Both occurrences now carry that figure with its unit and the command that reproduces it, so the next reader re-derives instead of repeating:

gh run list --workflow hrx-build.yml --limit 30 --json createdAt,updatedAt,conclusion

No behaviour change, and checked rather than asserted:

hrx_build_scope.py --self-test     0 failure(s)  (14 arms, unchanged)
replay 6f124c74                    configure-only   (unchanged)
replay 10fdd3de                    full             (unchanged)
copyright.py --check               rc 0
git grep "eight-minute"            no other occurrence in the tree

Why the figure matters more than the wording: it is the argument for the whole configure-only path and the number a lane quotes when deciding whether to spend a slot — a comment nobody measured will be repeated by the next reader, and this one was, by me, in public. One file, +14/−2, one push.

…w to re-measure (engine#3245)

The docstring justified the configure-only path with "an eight-minute compile on the bench runner", and the self-test
comment repeated it. Nobody had measured it; I quoted it in engine#3228's issue body and then had to correct it in
public. The runner disagrees: of the last 30 `hrx_build` runs, the successes are median **2.0 min** (min 0.2, max 5.4)
and a configure-only run is **0.2 min**, so the saving a registration-only PR gets is ~1.8 min of the single build
runner. Same branch, both shapes: 2.0 / 1.9 / 2.7 min full, 0.2 min configure-only.

The fix is the figure, its unit and the command that produces it, so the next reader re-derives instead of repeating:

    gh run list --workflow hrx-build.yml --limit 30 --json createdAt,updatedAt,conclusion

No behaviour change: `--self-test` 0 failures, and the replayed verdicts are unchanged (6f124c7 configure-only,
10fdd3d full). `git grep "eight-minute"` finds no other occurrence in the tree.
@bong-water-water-bong

Copy link
Copy Markdown
Collaborator Author

Closing on the cap, my own error, not a defect in the change.

I read the counter at 21:1x as 1 non-draft open, then pushed at 21:20:47Z without re-reading it. In between, #3243 (21:10:47) and #3244 (21:11:33) were opened, so the count was already 3 when mine became the 4th. That is the "no reservation" hazard the board named today, with my name on it: one number, several decision-makers, and the window between reading it and acting on it.

Of the four, mine is the least valuable — a docstring figure and the command that re-measures it — so it is the one that waits. The work is finished and the branch is kept: fix/3245-scope-cost @ 7f80571, hrx_build_scope.py --self-test 0 failures, replays unchanged (6f124c74 configure-only, 10fdd3de full), pre-pr-checks --tree-only 16 green / 0 cannot-tell. I reopen when the non-draft count is at or under 2; #3245 stays open as the record.

The measurement in #3245 does not change: over 26 successful hrx_build runs, median 2.0 min (min 0.2, max 5.4), configure-only 0.2 min, so ≈1.8 min of the single runner saved per registration-only PR.

@github-actions

Copy link
Copy Markdown

PR Reviewer Guide 🔍

Here are some key observations to aid the review process:

🎫 Ticket compliance analysis 🔶

3245 - Partially compliant

Compliant requirements:

  • Corrected the compile time estimate from "eight minutes" to "median 2.0 min"
  • Updated the docstring with the measured value and re-measurement command
  • Updated the self-test comment with the measured value
  • No behavioral change in the tool's logic

Non-compliant requirements:

  • None

Requires further human verification:

  • None

3228 - Partially compliant

Compliant requirements:

  • The PR description indicates that the add_python_test recognition was already implemented in a previous commit (6f124c7)
  • The self-test now includes a test case for add_python_test being treated as a registration
  • The exclusion for $<TARGET_FILE:...> is implied by the description but not directly visible in the diff

Non-compliant requirements:

  • The exclusion for $<TARGET_FILE:...> is not explicitly shown in the diff, though mentioned in the description

Requires further human verification:

  • None
⏱️ Estimated effort to review: 2 🔵🔵⚪⚪⚪
🧪 PR contains tests
🔒 No security concerns identified
⚡ Recommended focus areas for review

Outdated Compile Time Estimate

The docstring previously stated that the compile costs eight minutes, which was not measured. This has been updated to reflect the measured median of 2.0 minutes, along with the command to re-measure. This change ensures that future readers can reproduce the measurement instead of relying on an unverified figure.

inside `if(ONEBIT_HRX)` blocks that `ci.yml` never enters). Such a PR should pay a configure, not a compile on the bench
runner.

What the compile costs, measured rather than quoted (engine#3243): over the last 30 `hrx_build` runs the successes are
**median 2.0 min, max 5.4**, and a `configure-only` run is **0.2 min** -- so the saving is ~1.8 min of the single build
runner per registration-only PR. This docstring said "an eight-minute compile" until 2026-11-21, a figure nobody had
measured; a lane quoted it in a public issue body before checking, which is the reason the number lives here with its
unit and its method now. Re-measure with:

    gh run list --workflow hrx-build.yml --limit 30 --json createdAt,updatedAt,conclusion

@bong-water-water-bong
bong-water-water-bong deleted the fix/3245-scope-cost branch November 21, 2026 21:40
bong-water-water-bong added a commit that referenced this pull request Nov 21, 2026
…th the method (#3249)

engine#3245. `hrx_build_scope.py` argued for the `configure-only` path with "an eight-minute compile on the bench
runner" (docstring) and repeated it in a self-test comment. Nobody had measured it. Measured now, over the last 30
`hrx_build` runs (26 successes):

    min 0.17 min   median 1.92 min   max 5.4 min
    configure-only            0.17 min
    same branch, full runs   2.0 / 1.9 / 2.7 min        (cl-infra/3223)

So the saving a registration-only PR gets is **≈1.8 min**, not eight, and the ratio is ~11x rather than ~47x. The
`configure-only` decision is unaffected -- this is the recorded cost, not the rule -- and both replayed verdicts are
unchanged (`6f124c74` configure-only, `10fdd3de` full), `--self-test` 0 failures.

The figure is load-bearing: it is the argument for the whole path and the number a lane quotes when deciding whether
to spend a build slot, which is why it now carries its own method in the file:

    gh run list --workflow hrx-build.yml --limit 30 --json createdAt,updatedAt,conclusion

A number in a comment that nobody measured will be repeated by whoever reads it next; this one was (I quoted it in
engine#3228 and had to correct it publicly). The fix PR for this issue, #3246, was closed unmerged, so the figure
was still on main at `:21` and `:253` when I took it.

Co-authored-by: bong-water-water-bong <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

hrx_build_scope quotes an eight-minute compile that was never measured; the runner's median is 2.0 min (and I published the eight)

1 participant