Read a number qualified with another repository as that repository's - #156
Merged
Conversation
The hygiene check took anything after a hash as an issue on this board, looked it up, and failed closed when it did not resolve. A body quoting another repository's issue number was therefore refused whatever the sentence around it said, and so was a body pasting the output of a command that happened to contain one. It bit once, on the pull request whose evidence was a grep over .github/workflows while three of the references there named another repository. The qualifier in front of a number is now read and compared. Equal to the repository being judged, the number is ours. Different, it is not. Absent, the reference is bare and is read exactly as before, so a qualifier with no slash in it is not a repository and issue#12 in a sentence stays what it was. Failing closed on a bare number that does not resolve is unchanged, because that one is a claim about this board. Five fixtures, and each direction has one that reddens when its clause is deleted. Removing the qualifier condition entirely reddens the three that ask for a qualified reference and an address fragment to be passed over. Removing only the comparison against the repository being judged reddens the one that asks for this board's own qualified reference to be read. The qualifier is walked out character by character against a literal set rather than cut off with a regular expression. The obvious form, a sub over a negated class anchored at the start, matches nothing at all under one of the two awks this file already warns about, which was found by watching the fixture for a mixed line drop a reference it should have kept. Prevents the check refusing evidence for containing evidence. A claim here carries the command that produced it, and a body could not paste one whose output named an issue somewhere else. Closes #155 Signed-off-by: Nils Lehnen <30603423+iderex@users.noreply.github.com>
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.
The issue this belongs to
Closes #155
What changed
issue_refsin.github/pr-hygiene/hygiene.shtook anything after a hash as anissue on this board. It now reads the qualifier in front of the number and
compares it. Equal to the repository being judged, the number is ours. Different,
it is not. Absent, the reference is bare and is read exactly as before, so a
qualifier with no slash in it is not a repository and
issue#12in a sentencestays what it was.
Failing closed on a bare number that does not resolve is unchanged. That one is a
claim about this board and a lookup that could not be made is still an error.
What failure it prevents
The check refusing evidence for containing evidence. A claim here carries the
command that produced it, and a body could not paste a command whose output named
an issue on another repository, because every hash-then-digits in a body was a
question about this one.
This is a guard, so what it refuses and the proof it bites are below rather than
here.
What a guard here refuses, and the proof it bites
It refuses reading
owner/repo#123as an issue on this repository, while stillreading
#123andFlowfin/core#123as ones.Five fixtures were added, and each direction of the condition has one that reddens
when its clause is deleted.
Removing the qualifier condition entirely, so every number is read as before:
Removing only the comparison against the repository being judged, so every
qualified reference is passed over including this board's own:
And the file as it stands:
Run at the commit being pushed,
abab7d58d36b3ebcae742856f52aa8ededcfc844.Evidence
The body you are reading is the end-to-end proof, and it is deliberate. This
sentence names Flowfin/jellyfin-plugin-sso#263, which is the number that stopped
the run on the earlier pull request. The check on this pull request reads the
merge ref, so the code being judged is the code in this change; a green
names-an-issuehere is that reference being read as somebody else's rather thanlooked up as ours.
The failing run this is written against, with its numbers elided because the
sentence around them is a description of the problem rather than a reference:
What that run read out of the body, from the run on the body one edit before
this sentence was added to it:
Three numbers, and 263 is not among them. The two illustrative ones are read
because they are written bare in the paragraph above, and 155 is the issue this
belongs to.
The other check on this machine is untouched by this change and still green:
What this does not cover
The awk on this machine is gawk and the awk on the runner is mawk, so the fixtures
above were proven under one of the two here. The selftest runs on the runner
before the check judges anything, so the run on this pull request is where the
other one is proven, and I did not install a second awk to prove it locally.
body_prosesplits on a slash and therefore still reads a qualified reference asprose rather than as a reference-only line. That is a different rule with a
different purpose, a line that is only a reference is not the case this change is
about, and I have not touched it.
The rule still cannot tell a number quoted inside pasted output from one written
as a claim, where both are bare. Nothing here reaches that, and the elision above
is what a body carrying such a paste still has to do.
Who has read it
Nobody other than me. The evidence above stands in place of a second reader
rather than the question being left open.