Repository navigation
Commit cd70b2f
authored
## Summary
The `semantic diff (advisory)` check never scored a pull request from a
fork. Each fork pull request measured so far (#2178, #2188, #2222) got
"NOT MEASURED: no open pull request of this repository holds this
commit" on its measured head while it was open: GitHub's
commit-to-pull-request listing returned nothing for those commits then
(it lists all three now that they are merged), and the check does not
take a fork's pull request by its commit anyway, since anyone can open
one holding any commit.
- `Semantic check` takes an optional `pr` input when dispatched.
`tools/ci/jev_check.py --pr` takes the named pull request when it is
into this repository and holds the measured commit, in any state
(`pull_named`), and the check's summary says it was named, which fork it
comes from, its state, and who last edited its description and when
(GraphQL `editor` and `lastEditedAt`: REST's `updated_at` moves on any
activity, and a maintainer may have edited the description). Only a
maintainer can dispatch the workflow, so a contributor cannot steer
which description is scored; the description is still untrusted text
from a fork's pull request, sent to Jev as data for an advisory check.
`arm.sh` refuses only on a fail, so a pass scored this way stands in for
nothing more than a same-repository one.
- Without `pr`, when the listing names no pull request of this
repository, the reason now says a fork's pull request that holds the
commit is scored by dispatching with `pr`; and if exactly one open pull
request from a fork has the measured commit as its head, it names that
one (`fork_pull_at_head`). It still never takes it.
- The docs said a context without the key is NOT MEASURED, never a pass;
an empty diff has always passed with no call, since there is nothing to
ask. The header, the module docstring and `docs/maintaining.md` now say
so.
- The input is checked as 1 to 7 digits in the workflow and in Python.
The Trust header of `semantic-check.yml` and `docs/maintaining.md` say
what is scored and whose text it is.
Closes #2225.
## Testing
- `python3 tools/ci/test_jev_check.py`: 60 tests pass, the existing "a
fork's pull request is never taken" ones unchanged. The new ones cover
the three pure helpers' failure modes, written first: a closed,
moved-on, other-repository or same-repository pull request, or two forks
at one head, name none; a pull request that could not be read, has
another number, is into another repository or does not hold the commit
(also among 250 listed) is refused; a merged fork pull request whose
head moved on is taken when it holds the commit; a number that is not 1
to 7 ASCII digits above zero is refused.
- End to end on the real `semantic-diff` artifacts of the three fork
pull requests' Measure runs, `--dry-run` (no Jev call, nothing posted):
[46492757357](https://github.com/DrunkOnJava/rvt-rs/actions/runs/46492757357)
(#2222's `690c4cc0`),
[46192799262](https://github.com/DrunkOnJava/rvt-rs/actions/runs/46192799262)
(#2178) and
[46220190100](https://github.com/DrunkOnJava/rvt-rs/actions/runs/46220190100)
(#2188). Named with `--pr`, each is a pass (no semantic difference in 42
models) and the summary names the pull request, `shifatrHtH/rvt-rs`,
merged, and who last edited the description (on #2222, "last edited by
`DrunkOnJava` at 2026-11-30T21:17:26Z", the maintainer's edit; on #2188,
"has not been edited since `shifatrHtH` opened it"). Without `--pr`,
#2222's stays NOT MEASURED; with `--pr 2226` it is NOT MEASURED, "pull
request #2226 does not hold the measured commit".
- None of the fork runs has a semantic difference, so none of them reads
a description. The new step is where the body comes from:
`lookup_pull_request` with `--pr 2178` returns #2178's real Summary (231
characters) and Testing through `describe_change`, and that Summary is
inside a request `request_body` builds from it, the same functions the
same-repository path uses after that.
- The fallback's fetch, traced on `4f8cdf6f` (a commit GitHub ties to no
pull request): the commit listing returned an empty list, the open pull
requests were read, and with no fork's at that head the reason says how
to name one. The case where it names a fork's pull request itself waits
for the next open one.
- `actionlint` and `zizmor --offline` on `semantic-check.yml`: no
findings.
- The workflow itself, dispatched from this branch with `-f
run_id=46492757357 -f pr=2222` (run
[46519603865](https://github.com/DrunkOnJava/rvt-rs/actions/runs/46519603865),
from `7f05ad58`; a branch run has no key, and an empty diff needs none):
it wrote a pass on `690c4cc0` naming #2222, `shifatrHtH/rvt-rs` and
merged. Once this lands, both of #2222's runs (46477382592 and
46492757357) are scored again from main with `-f pr=2222`, so the
verdicts on its commits come from main's code.
- The run this pull request triggers on itself (it changes the workflow)
ended at "no Measure run to score", so the step runs with an empty `pr`.
## Source provenance
No format finding.
1 parent 507e1dc commit cd70b2f
4 files changed
Lines changed: 261 additions & 24 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
27 | 35 | | |
28 | 36 | | |
29 | 37 | | |
30 | | - | |
| 38 | + | |
| 39 | + | |
31 | 40 | | |
32 | 41 | | |
33 | 42 | | |
| |||
51 | 60 | | |
52 | 61 | | |
53 | 62 | | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
54 | 66 | | |
55 | 67 | | |
56 | 68 | | |
| |||
95 | 107 | | |
96 | 108 | | |
97 | 109 | | |
| 110 | + | |
98 | 111 | | |
99 | 112 | | |
100 | 113 | | |
101 | 114 | | |
102 | 115 | | |
103 | 116 | | |
| 117 | + | |
104 | 118 | | |
105 | 119 | | |
106 | | - | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
107 | 130 | | |
108 | 131 | | |
109 | 132 | | |
| |||
144 | 167 | | |
145 | 168 | | |
146 | 169 | | |
| 170 | + | |
147 | 171 | | |
148 | 172 | | |
149 | 173 | | |
| |||
163 | 187 | | |
164 | 188 | | |
165 | 189 | | |
| 190 | + | |
166 | 191 | | |
167 | 192 | | |
168 | 193 | | |
169 | 194 | | |
170 | 195 | | |
| 196 | + | |
171 | 197 | | |
172 | 198 | | |
173 | 199 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
512 | 512 | | |
513 | 513 | | |
514 | 514 | | |
515 | | - | |
| 515 | + | |
| 516 | + | |
516 | 517 | | |
517 | 518 | | |
518 | 519 | | |
| |||
632 | 633 | | |
633 | 634 | | |
634 | 635 | | |
635 | | - | |
636 | | - | |
| 636 | + | |
| 637 | + | |
| 638 | + | |
| 639 | + | |
637 | 640 | | |
638 | 641 | | |
639 | 642 | | |
| |||
657 | 660 | | |
658 | 661 | | |
659 | 662 | | |
660 | | - | |
| 663 | + | |
| 664 | + | |
| 665 | + | |
| 666 | + | |
| 667 | + | |
| 668 | + | |
| 669 | + | |
661 | 670 | | |
662 | 671 | | |
663 | 672 | | |
| |||
0 commit comments