Refuse a record slug that disagrees with its directory - #178
Merged
iderex merged 1 commit intoAug 24, 2026
Merged
Conversation
The slug is how a reader gets from a quoted result back to the experiment that produced it, and the promotion section makes that walk matter to somebody on another board. Until now nothing compared the Slug field with the directory the record sits in, so a disagreement broke that walk silently: both halves existed and only their agreement was missing. record-slug-disagrees-with-its-directory refuses it, and the message names both strings, because which of the two is wrong decides the repair and nothing in the tree can tell a mistyped field from a misnamed directory. WHAT WAS RETIRED AND WHY. two-experiments-share-a-slug is gone, deliberately and by name, together with the expectation its fixture carried. It refused two experiments declaring one slug once case was ignored, and the agreement rule subsumes it: two directories under experiments/ cannot share a name, so two experiments can only answer to one slug when at least one of their records declares a slug that is not its own directory's name. Keeping both would have made every tree that tripped the sharing rule trip the agreement rule as well, and a fixture tripping two rules proves neither cleanly. That collision is what stopped this refusal being written when the two date rules landed; the choice between retiring the sharing rule, giving it precedence and folding the two into one property was taken on issue #54 on 2026-08-24. WHERE THE SUBSUMPTION STOPS is written at the function rather than only here. The comparison is between two slugs, so it is made only where the directory name and the declared field are both legal slugs. Where either is not, the tree is already refused for that shape and this rule says nothing, so a pair answering to one slug out of a directory that is not a slug is refused for the directory's name and never for the sharing. The tree is red either way and the message points somewhere else, which is the whole of what the retirement cost. Case is no longer folded and the retired rule folded it. A legal slug carries no upper case, so two legal slugs cannot differ by case alone, and an exact comparison between two strings that have both passed refuseSlug is the same comparison a folded one would make. Two fixtures prove it. a-record-slug-that-names-another-directory trips exactly this refusal and no other, with a-record-slug-that-is-a-slug as the near neighbour that differs by the smallest legal change and refuses nothing. two-experiments-answering-to-one-slug is kept and re-pointed at this property, because it is the evidence for the subsumption the retirement rests on: the tree the old rule was written for is still refused. Three deletions were executed against the guard and each reddened the suite for the reason it names. Removing the refusal site left both fixtures reporting the expected refusal not produced. Widening the comparison to every declared slug reddened twenty-eight cases including both near neighbours. Removing the clause that compares only two legal slugs reddened a-record-slug-that-is-not-a-slug with a refusal no case expected, which is the collision the clause exists against. Refs #54 Signed-off-by: Nils Lehnen <30603423+iderex@users.noreply.github.com>
iderex
deleted the
check/a-record-slug-that-disagrees-with-its-directory
branch
August 24, 2026 18:55
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 #54.
What this does
The record format fixes a header, and until now nothing compared the
Slugfield with the directory the record sits in. The slug is how a reader gets
from a quoted result back to the experiment that produced it, and the
promotion section makes that walk matter to somebody on another board. A
disagreement broke that walk silently, because both halves existed and only
their agreement was missing.
record-slug-disagrees-with-its-directoryrefuses it. The message names bothstrings, because which of the two is wrong decides the repair and nothing in
the tree can tell a mistyped field from a misnamed directory:
That is the last of the three refusals #54 asks for. The two date refusals
are already on the default branch, and I read them at this head rather than
carrying the claim over:
What was retired, deliberately and by name
two-experiments-share-a-slugis gone, together with the expectation itsfixture carried. It refused two experiments declaring one slug once case was
ignored, and the agreement rule subsumes it: two directories under
experiments/cannot share a name, so two experiments can only answer to oneslug when at least one of their records declares a slug that is not its own
directory's name. Keeping both would have made every tree that tripped the
sharing rule trip the agreement rule as well, and a fixture tripping two
rules proves neither cleanly. That collision is what stopped this refusal
being written when the date rules landed, and the choice between retiring the
sharing rule, giving it precedence and folding the two into one property was
taken on #54 on 2026-08-24.
Where the subsumption stops, written at the function rather than only
here. The comparison is between two slugs, so it is made only where the
directory name and the declared field are both legal slugs. Where either is
not, the tree is already refused for that shape and this rule says nothing,
so a pair answering to one slug out of a directory that is not a slug is
refused for the directory's name and never for the sharing. The tree is red
either way and the message points somewhere else, which is the whole of what
the retirement cost.
Case is no longer folded and the retired rule folded it. A legal slug carries
no upper case, so two legal slugs cannot differ by case alone, and an exact
comparison between two strings that have both passed
refuseSlugis the samecomparison a folded one would make.
The fixtures
a-record-slug-that-names-another-directorytrips exactly this refusal andno other, with
a-record-slug-that-is-a-slugas the near neighbour thatdiffers by the smallest legal change and refuses nothing.
two-experiments-answering-to-one-slugis kept and re-pointed at thisproperty, because it is the evidence for the subsumption the retirement rests
on: the tree the old rule was written for is still refused, twice, once per
record.
The proof that it bites
Three deletions were executed against the guard and each reddened the suite
for the reason it names.
Removing the refusal site:
Widening the comparison to every declared slug, which reddened twenty-eight
cases including both near neighbours:
Removing the clause that compares only two legal slugs, which is the
collision the clause exists against:
The tree was restored between each one and the suite is green at this head.
The gate
Run at this head, in the order
CONTRIBUTING.mdnames:The integration-hardware harness was not asked for and produced nothing here.
Its tests are behind a build constraint and the default run does not compile
them, so nothing above is a measurement about hardware.
The means
Go, because the refusal is one more arm on an operator that already exists in
internal/check, it is proved by the ledger of fixtures the package alreadycarries, and it adds no language, runtime or dependency to the tree.
What this does not do
It does not judge whether a slug describes its experiment, and it does not
judge which of the two strings is the correct one. It holds the agreement,
and a record whose field and directory agree on a poor name passes.
No second person has read this change. The evidence above stands in place of
one: the three executed deletions, the runs they produced, and the gate at
this head.