Skip to content

Refuse a record header that disagrees with itself #54

Description

@iderex

The record format fixes a header of a few fields, and the refusals planned so far
read one of them. The state is checked against the three the lifecycle names, and
the question and answer sections are checked for content. Nothing checks that the
header agrees with the tree it sits in or with itself, and two pieces of this plan
already rest on fields nothing validates.

The listing sorts oldest unanswered first, which is an ordering over the date the
question was written. A date nothing parses sorts wherever the comparison happens
to put it, and the order is the one thing a reader takes from that listing.

The slug is how a reader gets from a record back to its directory, and the
promotion section makes that walk matter to somebody on another board. A slug that
disagrees with the directory it sits in breaks the walk silently, because both
halves exist and only their agreement is missing.

Three refusals, each either present or absent in the text.

The slug in the header is the name of the directory the record sits in. A mismatch
is refused and the message names both strings, because which of the two is wrong
decides the repair.

Every date in the header is a date, written the one way the record format names. A
field carrying a month, a season or a sentence is refused. This is the field the
listing sorts on and the field a reader uses to tell a question asked last week
from one asked two years ago.

An answer date is not earlier than the question date, and there is no answer date
while the state is asking. The second half is the one worth spending the fixture
on. A record carrying an answer date while claiming to still be asking has been
edited towards a state it is not in, and it passes every other check planned here.

What this does not do is judge whether the dates are true. Nothing in a checkout
says when somebody started thinking about a question, so a date is a claim its
author made. The check holds the shape and the ordering, and it says so where it
is defined, because a green run is otherwise read as evidence that the timeline is
real.

Done when the runner refuses all three cases, each has a fixture in the suite that
trips exactly that refusal and no other, the message names the record and the
field, and the run passes on the current tree.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions