Skip to content

Tell a decided question from an open one on the legal notice [#236] - #238

Merged
iderex merged 1 commit into
mainfrom
enhancement/the-legal-notice-tells-a-decided-question-from-an-open-one
Sep 5, 2026
Merged

Tell a decided question from an open one on the legal notice [#236]#238
iderex merged 1 commit into
mainfrom
enhancement/the-legal-notice-tells-a-decided-question-from-an-open-one

Conversation

@iderex

@iderex iderex commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

What was wrong

The legal notice rendered every entry of data/publisher.json in one of two
states, and all three entries were undecided, so the produced page said three
times that the question of who publishes this site is not decided yet. Entry 8
of #7 was answered on 2026-08-24, and decisions/0017-what-the-site-says-about-who-publishes-it.md
carries that answer on the mainline since #237. I read the state at a2ed5ea
before changing anything:

jq -r 'to_entries[] | "\(.key)  \(.value.state)  \(.value.waiting)"' data/publisher.json
publisher  undecided  entry 8 of issue 7
contact  undecided  entry 8 of issue 7
postal  undecided  entry 8 of issue 7
go run . build | grep legal
wrote dist/legal/index.html (3562 bytes, 0 of 3 answered)
git ls-tree --name-only origin/main decisions/ | grep 0017
decisions/0017-what-the-site-says-about-who-publishes-it.md

The loader admitted exactly two states and refused every shape between them,
which is right for the two it knew and wrong for this one: the question is
decided, the record carrying the decision is in the tree, and the name, the
address and the contact alias are booked outside this repository and have not
arrived. An answered entry with no value is refused, an undecided one renders
as not decided, and neither is true of these three.

What this does

Adds a third state, decided, to the loader in internal/site/legal.go and a
sentence for it in templates/page.html.tmpl. A decided entry names the record
that carries the decision and what the value waits on, carries no value, and
renders as a sentence saying exactly that. The three entries in
data/publisher.json are in that state and point at 0017, and the build log
counts the decided entries beside the answered ones:

go run . build | grep legal
wrote dist/legal/index.html (4547 bytes, 0 of 3 answered, 3 decided and waiting on a value)
grep -c 'Not decided yet' dist/legal/index.html
0
grep -c 'Decided, and the value has not arrived yet' dist/legal/index.html
3

The loader refuses a decided entry that carries a value, names no record, names
a record outside decisions/, names a record that is not in the tree, or names
nothing the value waits on. It also refuses an answered or an undecided entry
that names a record, so a record is a pointer only the third state carries. A
state outside the three is still refused by name, naming all three.

One sentence is added to content/legal.txt saying what the page does for a
decided question, and the comment in internal/site/install.go that counted
the legal notice's states as two now says the catalogue uses the first two.

The fixture tree under internal/site/testdata/tree carries one entry in each
of the three states rather than three undecided ones, and a fixture record for
the decided one to point at, so the golden legal page shows all three sentences
and a template change to any of them moves the golden. The golden diff is the
legal page alone:

git diff --stat origin/main...HEAD -- internal/site/testdata/golden/
 internal/site/testdata/golden/legal/index.html.golden | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

What it prevents is the page calling a decided question open, which was the one
sentence on it that a reader who followed its pointer to #7 could already see
was false.

Closes

Closes #236.

What was run

At bf8226b:

go run . ci
gate: 7 legs, in order: format, vet, test, build, links, sitemap, invariants
  needs-network was not asked for. Asking costs a request to the public name from whatever machine runs it, and a verdict that moves when somebody else's service does rather than when this tree changes. Ask with: go run ./harness/needs-network
  format: ok, 74 file(s)
  vet: ok
  test: ok, 37 test file(s)
  build: ok, 22 file(s)
  links: every reference that stays inside this site resolves to a file the build wrote
  sitemap: every page the build wrote is listed once, and every entry has a page behind it
  invariants: ok, 39 rule(s) decided, 2 owed and not decided
7 of 7 legs ran. None was skipped.

go run . hygiene origin/main HEAD
hygiene: 1 non-merge commit(s) in origin/main..HEAD, origin internal
  bf8226b380f8: subject carries its reference
1 commit(s) judged, none refused.

npx --yes "prettier@3.9.6" --check --end-of-line auto internal/site/testdata/tree/decisions/0001-a-fixture-decision.md
All matched files use Prettier code style!

The guards are proven by deleting each one and watching the suite go red. Each
refusal in readEntry and the record-in-the-tree check in readPublisher was
removed in turn, the three legal tests run, and the file restored between:

decided carrying a value                                RED
decided naming no record                                RED
decided naming a record outside decisions/              RED
decided naming nothing the value waits on               RED
decided naming a record not in the tree                 RED
answered still naming a record                          RED
undecided naming a record                               RED
decided renders through its own branch                  RED

The last row drops the Record field from the notice a decided entry produces,
which is what the template keys on, and both the render test and the refusal
test go red for it. The needs-network harness was not run; it is not a leg and
this change reaches nothing it reads.

The means

Go, in the loader that already holds the two states, their refusals and the
tests that prove the refusals bite, and the one template every page renders
through. The third state is a value in the same closed set, so a machine
refuses every shape it does not admit, each refusal carries a fixture that reds
the suite when the guard is deleted, and every claim above carries the command
behind it. Nothing is added to the toolchain, and the golden suite that already
compares every produced file is what judges the page.

Who read it

No second reader. This board has no second reader tonight, and the evidence
above stands in place of one. The merge is by whoever opened this.

The legal notice rendered every entry of data/publisher.json in one of two
states, and all three entries were undecided, so the produced page said three
times that the question of who publishes this site is not decided yet. Entry 8
of #7 was answered on 2026-08-24 and decisions/0017 carries that answer, so
the page had been saying something false for twelve days. I measured that at
a2ed5ea before changing anything:

    jq -r 'to_entries[] | "\(.key)  \(.value.state)  \(.value.waiting)"' data/publisher.json
    publisher  undecided  entry 8 of issue 7
    contact  undecided  entry 8 of issue 7
    postal  undecided  entry 8 of issue 7
    go run . build | grep legal
    wrote dist/legal/index.html (3562 bytes, 0 of 3 answered)

The loader admitted exactly two states, and neither fits an answer that is
decided and whose value is booked outside this repository and has not arrived:
an answered entry with no value is refused, and an undecided one renders as
not decided.

This adds the third state. A decided entry names the record that carries the
decision and what the value waits on, carries no value, and renders as a
sentence saying exactly that. The loader refuses a decided entry carrying a
value, naming no record, naming a record outside decisions/, naming a record
that is not in the tree, or naming nothing the value waits on, and it refuses
an answered or an undecided entry that names a record. I deleted each of those
refusals in turn and the suite went red for each one. The three entries in
data/publisher.json are decided and point at 0017. The fixture tree carries
one entry in each of the three states, so the golden page shows all three
sentences rather than one repeated, and the build log counts the decided
entries beside the answered ones.

What it prevents is the page calling a decided question open, which is the one
sentence on it that a reader who followed its pointer to #7 could already see
was false.

Signed-off-by: Nils Lehnen <30603423+iderex@users.noreply.github.com>
@iderex
iderex merged commit ee44ae2 into main Sep 5, 2026
17 checks passed
@iderex
iderex deleted the enhancement/the-legal-notice-tells-a-decided-question-from-an-open-one branch September 5, 2026 18:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The legal notice says a question is not decided yet, twelve days after it was

1 participant