Refuse a borrowed quarantine where record 0019 puts none - #207
Merged
Merged
Conversation
Record 0019 puts the quarantine at experiments/<slug>/borrowed and allows one per experiment, and nothing refused a directory of that name anywhere else inside an experiment. A tree holding a correct quarantine and a second one below it, carrying no licence file at all, passed with nothing refused. What that costs is the reason the quarantine exists. The boundary is meant to be readable off the layout by somebody promoting the work, so a second boundary below the first means the first one was not the boundary, and the reader who stopped at it learned something untrue. A declaration cannot cover it either: the header names one source and one licence, so a second quarantine is undeclared however carefully it was written. The walk stops at the allowed quarantine rather than descending into it. A directory named borrowed inside borrowed code is that code's own business, and refusing it would refuse honest work for the shape of a name this board does not own. It takes the allowed path from the caller rather than deriving it a second time, so the place it walks past and the place the licence arm judges cannot drift apart. Two cases rather than one, because the skip is as much of the rule as the refusal. One holds a second quarantine outside the first and declares exactly this property and no other, with an existing passing case as its near neighbour, differing by that one directory. The other holds a directory named borrowed inside the quarantine and expects nothing. Both were proved by breaking them. Deleting the skip reddens three cases, including the correct experiment itself, because the allowed quarantine is excluded by that same test. Turning the skip into a descent that still allows the quarantine reddens only the case built for it. The bounds are at the site. Below WalkDepthBound nothing is examined, which is the bound the stray-record walk already carries and refuses a tree for reaching; a second bound here would give one tree two answers about how far a walk goes. A symbolic link named borrowed is not a directory to fs.WalkDir, so it is neither followed nor refused, which is the position isDirectory already takes for the same reason. And nothing opens a licence file, so a quarantine in the right place with the wrong terms in it is no arm's subject. Closes #206 Signed-off-by: Nils Lehnen <30603423+iderex@users.noreply.github.com>
The refusal in the commit before this one falsified a sentence in the contributing guide, which said a second quarantine deeper inside an experiment passes and that the one-directory limit was the reader's to keep rather than the gate's. That was true when it was written and is not true now, and a guide that says a rule is unenforced while it is enforced is worse than one that says nothing: a reader plans around a gap that has closed. The paragraph is rewritten rather than patched, because the split it was built on has moved. It separated two refusals from two things that pass, and now three are refused and one passes, so the sentence that carried the count carried it into the wrong half. What it adds beside the correction is the boundary, which the reader needs in the same breath: a directory named borrowed inside the quarantine is not refused, because the code in there is laid out by whoever wrote it. Without that sentence the rule reads as a ban on the name anywhere under an experiment, and somebody with a vendored tree would take it for a reason not to borrow at all. The experiment template gains the same two sentences. It is where somebody filling in a record reads what the field costs, and it already lists what is refused, so leaving the third out would make it the accurate half of a document that reads as complete. Refs #206 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.
Closes #206.
Record
0019puts the quarantine atexperiments/<slug>/borrowedand allows oneper experiment. Nothing refused a directory of that name anywhere else inside an
experiment. This adds that refusal, and corrects the two documents whose
sentences it falsifies.
The means
Go, in the package that already walks
experiments/and already refuses thisfamily, adding no language, no runtime and no dependency. The alternative
considered was a document saying the limit is the reader's to keep, which is what
the tree carried until this branch and is what
0019calls a rule with no gate.The proof apparatus this needs already exists here: the case harness derives its
property list from the source, so the fixture obligation arrived with the
constant rather than being remembered.
What is refused, and what is deliberately not
Refused: a directory named
borrowedinside an experiment that is notexperiments/<slug>/borrowed.Not refused: a directory of that name inside the quarantine. What is in
there is somebody else's code laid out somebody else's way, and
experiments/<slug>/borrowed/vendor/borrowed/is that code's own business.Refusing it would refuse honest work for the shape of a name this board does not
own, and the point of the quarantine is that this repository's rules stop at its
edge.
The walk takes the allowed path from the caller rather than deriving it a second
time, so the place it walks past and the place the licence arm judges cannot
drift apart.
The proofs
Three, each run at the head of this branch with the change reverted afterwards.
Deleting the skip at the quarantine reddens three cases, including the correct
experiment itself, because that same test is what excludes the allowed directory:
That one proves the exclusion and the descent-stop together, so the second proof
separates them. Turning the skip into a descent that still allows the quarantine
(
return fs.SkipDirtoreturn nil) reddens only the case built for theboundary:
Removing the refusal site while leaving the walk running reddens only the case
that declares the property:
The refusing case declares exactly this property and no other and names
an-experiment-that-borrows-and-declares-itas its near neighbour, which differsby that one directory and refuses nothing.
The bounds, written at the site rather than only here
Below
WalkDepthBoundnothing is examined. That is the bound the stray-recordwalk already carries and already refuses a tree for reaching, so a tree deep
enough to hide a quarantine there is refused either way, and a second bound here
would give one tree two answers about how far a walk goes.
A symbolic link named
borrowedis not a directory tofs.WalkDir, so it isneither followed nor refused here. That is the position
isDirectoryalreadytakes at its own declaration, for the reason it gives there.
Nothing opens a licence file. A quarantine in the right place with the wrong
terms inside it is not this arm's subject and is not any other arm's either.
The documents
The second commit is a correction rather than an addition. #204 landed a
paragraph in
CONTRIBUTING.mdtwo hours ago saying a second quarantine passesand that the one-directory limit was the reader's to keep rather than the gate's.
That was true when it was written and this branch makes it false, so it is
rewritten in the same change that falsifies it. The template gains the same two
sentences, because it already says what is refused and would otherwise be the
accurate half of a document that reads as complete.
The gate, at this commit
gofmt -lprinted nothing, which is its passing result.No second reader
Nothing here has been read by anybody but me. There is no second reader on this
board tonight, so the proofs above stand in place of one rather than beside one.
This is a new refusal on a walk that reaches every experiment, so the reader who
merges it should read
refuseQuarantineElsewhereand decide for themselves thatthe skip is in the right place.
What this does not do
It does not touch the clause #188 is waiting on. A
borrowed/directory in anexperiment whose record declares no
Borrowed:still passes, record0013requires that, and whether it changes is a decision about that record rather than
anything here.