Refuse a question that is rewritten after the work started - #120
Merged
Conversation
An experiment states its question before it starts, and the whole value of that sentence is the ordering: a question written before the work is a question the result cannot have been chosen to fit. Nothing held the question to that ordering after the commit that wrote it. It was checked for being non-empty on the day it landed and for nothing at all afterwards. Closes #70. The failure needs no bad faith and it is the most likely dishonest edit here, because it is the one that makes a record read better rather than worse. An experiment asked whether one approach was faster than another. The measurement came back saying something adjacent and more interesting. Rewriting the question to name what was measured turns a result nobody predicted into a result the record claims was the point, and it arrives in the same pull request as the answer, which is the change a reader is reading for something else. A question section already on the branch this lands on may not lose or alter a line. A clarification is added underneath, so the words the work began from are still on the page next to whatever arrived later. Where the question turned out to be the wrong question, the lifecycle already names that: the answer says so, the question stays as it was asked, and the record is finished rather than tidied. The two rules over a record are now one function with a table of two entries rather than two copies of one comparison. They differ in the section they read, in what makes a record covered at the base, and in what the message says to do instead; everything else was going to drift, and the drift would have been a rule stricter about one section than the other for no reason anybody wrote down. Boundaries, at the check. A section that was not there at the base is not covered, so writing the question for the first time passes, and a section that was there and empty carries nothing to lose. Nothing judges whether an added clarification is a second question wearing a hat: what the rule buys is that the original words are still there to be read next to it. Nothing requires an addition to say that it arrived later. The issue describes a clarification as sitting under a line saying it was added after the work started, record 0008 fixes no such line, and inventing one here would be a format decision taken inside a checker. go test -count=1 ./... ok github.com/Flowfin/lab/cmd/lab ok github.com/Flowfin/lab/cmd/pullrequest ok github.com/Flowfin/lab/internal/check ok github.com/Flowfin/lab/internal/hardware ok github.com/Flowfin/lab/internal/invariants ok github.com/Flowfin/lab/internal/prose ok github.com/Flowfin/lab/internal/pullrequest 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 #70
What this changes
A question section already on the branch a change lands on may not lose or alter
a line. A clarification is added underneath, so the words the work began from
stay on the page next to whatever arrived later.
The rule sits beside the one over the answer, in the deterministic pull-request
check, and the two are now one function with a table of two entries rather than
two copies of one comparison. They differ in the section they read, in what
makes a record covered at the base of the range, and in what the message tells
an author to do instead. Everything else was going to drift, and the drift would
have been a rule stricter about one section than about the other for no reason
anybody wrote down.
What failure it prevents
The most likely dishonest edit on this board, and the one that needs no bad
faith, because it makes a record read better rather than worse. An experiment
asked whether one approach was faster than another. The measurement came back
saying something adjacent and more interesting. Rewriting the question to name
what was measured turns a result nobody predicted into a result the record
claims was the point, and the edit arrives in the same pull request as the
answer, which is the change a reader is reading for something else.
Where the question turned out to be the wrong question, the lifecycle already
names that. The answer says so, the question stays as it was asked, and the
record is finished rather than tidied.
What was run
At the commit being pushed,
cd979ab30abe1b1954a76c79ee0a0fe79a074d8f.Both guards deleted in turn, against the same fixtures. The second is the
boundary, and what reddens on it is the case where a question is written for the
first time.
The red and green pair, run with the built command against a real range in a
scratch repository. Both changes answer the same experiment in the same commit;
one rewrites the question to name what was measured and the other leaves it
alone and clarifies underneath:
What this does not do
Nothing requires an addition to say that it arrived after the work started. The
issue describes a clarification as sitting under a line that says so, record
0008 fixes no such line, and inventing one inside a checker would be a format
decision taken in the wrong place, which the record for the format would then
have to be written around. A clarification added with no marker passes this
check, and what stands behind that today is a reader.
Nothing judges whether an added clarification is a second question wearing a
hat. One that quietly replaces the original in a reader's mind passes. What the
rule buys is that the original words are still on the page next to it.
A record whose question section was not there at the base of the range is not
covered, and neither is one that was there and empty. That a record states no
question at all is a refusal the checker already makes when it walks the tree,
and repeating that judgement here would send whoever hit it to the wrong repair.
The red case above ran against a scratch repository rather than against a pull
request on this board, because there is no experiment record here yet for a real
pull request to edit. What runs live on this pull request is the half where the
rules find nothing.
No second reader tonight. The transcript above is in place of one, and every
number in it carries the command that produced it.