Skip to content

feat(site): the registry page is printed from the ledger - #316

Merged
the-homeless-god merged 1 commit into
devfrom
a/registry-on-pages
Oct 4, 2026
Merged

the-homeless-god merged 1 commit into
devfrom
a/registry-on-pages

Conversation

@the-homeless-god

@the-homeless-god the-homeless-god commented Oct 4, 2026 •

Copy link
Copy Markdown
Member

Решение ADR-0059 говорит: реестр — это ведомость имён, строчный файл из
пяти полей, раздаваемый обычным файлом по HTTP; он отвечает адресом, а не кодом.
До этой ветки ведомость лежала только в дереве — увидеть её было негде, и
отпечатки в ней гнили: четыре из семи разошлись с файлами, потому что реестр
не звала ни одна работа CI (задача 4909).

Адрес, по которому ведомость ляжет на Pages

https://digitable-lol.github.io/flang/registry.list

Что в ветке

  • scripts/site/registry-page.fscript — два плана. «Напечатать страницу
    реестра» читает scripts/registry-example/registry.list, пересчитывает
    sha256 каждого адреса, сличает с полем «отпечаток» и только потом
    печатает обе половины страницы. Разошёлся знак — страница не печатается
    вовсе: FLANG_REESTR_OTPECHATOK, число выхода 1, названы запись, адрес и оба
    отпечатка. «Выложить ведомость» кладёт ведомость в собранный сайт — с тем же
    сличением на входе.
  • docs/site/registry.ru.md и docs/site/registry.md — страница, обе
    половины напечатаны прогоном. Таблица — обратимая запись ведомости: снять
    «| » слева, « |» справа и обратные кавычки — и получаются строки ведомости.
    Поэтому «таблица сходится с ведомостью» отвечает diff, а не глаз.
  • .flangrc — две короткие команды, registry:page и registry:publish;
    обе зовутся по имени из pages.yml, и guard-calls:check зелен.
  • pages.yml — перепечатка страницы до сборки, проба подлогом
    (подкрученный знак обязан покраснеть И назвать именно эту запись), выкладка
    ведомости после сборки (сборка вычищает docs/site/out целиком).
  • Четыре гнилых отпечатка пересобраны тем прибором, которому они принадлежат
    (registry-tool.fscript, план «Собрать реестр»); изменились ровно четыре
    строки, сверка теперь отвечает «отпечатки сошлись у всех записей реестра: 7».

Доказательства прогонами

что чем снято ответ
страница напечатана прогоном flang run-script registry:page Напечатано: записей 7, обе половины страницы; отпечатки сошлись у всех, код 0
таблица = ведомость знак в знак diff таблицы, приведённой тремя заменами sed, с телом ведомости расхождений 0, строк 7
отрицательный контроль один знак отпечатка «Списки 1.4.2» подкручен код 1, FLANG_REESTR_OTPECHATOK, названа ровно эта запись и оба отпечатка; страница не тронута; ведомость возвращена, cmp сошёлся
второй контроль из ведомости убрана запись «Опциональное значение 0.9.0» таблица потеряла ровно эту строку, «Записей в ведомости» 7 → 6
сборка сайта node docs/site/build.mjs --check страниц 833, битых ссылок 0; пар не хватает 0
опись дерева inventory:check опись сходится с docs/tree-inventory.md: сверено языков 17
приметы чисел prose-numbers-guard --plan Check примет 209: сошлось 209, разошлось 0
короткие команды scripts:check объявлений 140: сошлось знак в знак 140, расходится 0
кто зовёт сторожей guard-calls:check сторожа без зова: 28, все названы в ведомости
опись доказанного proved-share-vs-tree.sh опись сходится с деревом

Работа Docs site на запросе слияния зелена целиком, и новые шаги в ней
прошли: Rebuild registry page → Напечатано: записей 7 … отпечатки сошлись у всех, Probe registry fingerprint → подлог покраснел и назвал запись. Шаг
Publish the registry ledger на запросе слияния пропускается по устройству
работы
(выкладка идёт только с пуша в main); локально он проверен: кладёт
1300 байт в docs/site/out/registry.list, cmp с ведомостью дерева сошёлся.
Все проверки запроса слияния: 25 pass, 7 skipping, 0 fail.

--no-verify не применялся: ветка прошла pre-commit и pre-push как есть
(две правки по их замечаниям — убраны комментарии из .fscript и снят
--на-веру у обеих коротких команд).

Долги ствола, не этой ветки

  • links:check — битых путей 88 и на базе, и на ветке: origin/dev —
    88 из 7130, ветка — 88 из 7140 (путей стало на 10 больше, битых — столько же).
    Биты 88 путей на 36 файлах, ни одного из них ветка не трогала (задача 9807).
  • uncalled-checks:check — 2 проверки без зова
    (flang/proof/probes/kernel-memo/run.fscript,
    flang/proof/probes/text-block/tokens.fscript), обе есть на origin/dev.
  • module-names:check — 19 модулей без английского имени, все .flang и
    все с origin/dev.

ADR-0059 says the registry is a ledger of names served as a plain file
over HTTP. Until now the ledger lived only in the tree: there was nowhere
to see it, and its fingerprints rotted unseen -- four of the seven parted
from the files, because no CI job called the registry at all (task 4909).

What is new:

* scripts/site/registry-page.fscript -- two plans. The printing plan
  reads scripts/registry-example/registry.list, recomputes sha256 of
  every address, compares it with the fingerprint field, and only then
  prints both halves of the site page. One character apart and the page
  is not printed at all: the plan fails with FLANG_REESTR_OTPECHATOK,
  exit code 1, naming the record, the address and both fingerprints. The
  publishing plan lays the ledger into the built site, with the same
  comparison on the way in.
* docs/site/registry.ru.md and docs/site/registry.md -- the page itself,
  both halves printed by the run. Its table is a reversible encoding of
  the ledger: strip the leading and trailing pipes, drop the backticks,
  and the rows are the ledger lines again. So "the table agrees with the
  ledger" is answered by diff, not by eye.
* The ledger is served at a stable address inside Pages,
  https://digitable-lol.github.io/flang/registry.list -- the address the
  page names and the one the HTTP order of the language fetches.
* .flangrc -- two shortcuts, registry:page and registry:publish. Both are
  called by name from .github/workflows/pages.yml, so the guard of
  uncalled shortcuts stays green.
* pages.yml reprints the page before the build, probes the check with a
  bent fingerprint (a red that does not name the planted record fails the
  step), and publishes the ledger after the build, because the build
  wipes the output directory.

The four rotted fingerprints in scripts/registry-example/registry.list
are rebuilt by the tool that owns them; only those four lines changed, and
the check now answers "fingerprints agree for every record: 7".

docs/site/packages.ru.md and its English half no longer say there is no
registry: they link to the page and say what the registry is and is not.

docs/tree-inventory.md and docs/javascript-inventory.md carry the five
JavaScript lines added to docs/site/sitemap.mjs: 22660 becomes 22665.
@the-homeless-god
the-homeless-god merged commit ffeca8f into dev Oct 4, 2026
32 checks passed
@the-homeless-god
the-homeless-god deleted the a/registry-on-pages branch October 4, 2026 19:01
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.

1 participant