Repository navigation
docs(tasks): 8398 has one cause and a probe that reds today - #300
Merged
Merged
Conversation
Measured on the trunk seed 188e5a6: all twelve plan forgeries are rejected by the very same binary when asked through `flang test`, and accepted silently by `flang check`. Four candidate explanations are ruled out one by one: the parser carries both plan nodes, the printed compiler carries the rules and calls them from `Proverit svyazannoe`, the linker keeps the `plans` field, and the rules answer correctly on the linked program. What is left is the one cause: `flang check` repeats the checking road in `repl_check_sources` and never asks the plan judge. The call was never there -- `git log --all -S` over `flang/src/emit/c/flang_repl.c` is empty. The task's former "where the fix lives" pointed at `flang/self/io.flang`; both files there are right. The former expectation of return code 2 is corrected to 1: code 2 means "checked NOT to the end", a rule remark gives 1.
A new probe set `flang/proof/probes/plan-rules-asked` runs the fourteen samples of `flang/test/fixtures/plany` past two judges of one binary: `flang check` and `flang test`. Twenty nine rows in all. The expectations are measured, not predicted. The quiet call of the plan judge was inserted into a copy of the tree outside the repository, the binary was rebuilt, and every code and line was taken from that run. On the trunk binary the probe answers code 1 and names twelve parted rows -- exactly the twelve `check` rows and nothing else; on the patched binary it answers code 0 and none. The fourteen `test` rows are green on both: the rules themselves are whole. Called by the short command `plan-rules:probe` in `.flangrc`. A CI step belongs with the fix (task 7706): until then the probe is red by design, and a gate would paint the trunk red for a known debt.
Negative control for 8398 and 7706, measured: all 268 tree programs that declare a plan were run through `check --fast` twice, once by the trunk binary and once by a patched copy outside the repository. The answer changed for exactly twelve files -- the forgeries themselves, from code 4 to code 1 with FLANG_PLAN. No other file in the tree moved. Three code-1 answers on the trunk binary are debt older than this task, and one file did not answer within 150 s under either binary -- it is written down as NOT measured, not as green. Two more judges of the same binary already ask the rules: `flang test` and `flang io` without the trust key both reject the forgeries. Only the road in `repl_check_sources`, shared by `check` and the shell, stays silent.
the-homeless-god
force-pushed
the
a/8398-twelve-wrong-programs
branch
from
October 4, 2026 14:56
db0f4ac to
a73fdec
Compare
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.
Диагноз 8398: причина одна, и она не там, где искали
Двенадцать нарочно сломанных объявлений
планполучают отbootstrap/flang checkтот же ответ, что и целая программа: «замечаний нет»,код 0. Воспроизведено на всех двенадцати (двоичный из семени ствола
188e5a6e).Причина одна на все двенадцать:
flang checkповторяет дорогу проверкисвоим кодом в
repl_check_sources(flang/src/emit/c/flang_repl.c), и вызова«Проверить планы»в этом списке нет — ни одного, и так было с рождения файла(
git log --all -Sпо нему пуст). Это та же порода, что задача 7101 упроцессов.
Четыре других объяснения сняты замером, по одному на каждое: парсер несёт оба
объявления; правила и их вызов из
«Проверить связанное»напечатаны вbootstrap/compiler_flang.c; связывание полеplansне теряет; сами правилана всех двенадцати отвечают верно. Решающая улика — ДВА судьи одного двоичного
на одном файле:
flang checkпринимает молча,flang testотвергает кодом 1 ипечатает
FLANG_PLAN.flang ioбез--на-веру— тоже отвергает.Что в этом PR
docs/tasks/8398-…flang/self/io.flang— оба файла там правыdocs/tasks/7706-…repl_check_sources. Перепечатка самосборной части НЕ нужнаflang/proof/probes/plan-rules-asked/checkи уtest.flangrcplan-rules:probe— проба позванаПроба красна сегодня и зелена, когда причину закроют
Ожидания в
expected.tsvСНЯТЫ ЗАМЕРОМ, а не предсказаны: тихий вызов вставленв копию дерева ВНЕ репозитория, двоичный пересобран, коды и строки списаны с
прогона.
Двенадцать расхождений — ровно двенадцать строк
checkпо подделкам, ни однойлишней. Четырнадцать строк
testзелены на обоих: правила целы.Правила не отвергают верное
268 программ дерева с объявлением
планпрогнаныcheck --быстродважды.Расхождение между двоичными — РОВНО двенадцать файлов, сами подделки (4 → 1,
FLANG_PLAN). Ни один другой файл ответ не сменил. Один файл(
flang/self/bootstrap/emit-from-source.flang) не ответил за 150 с ни у того,ни у другого — он записан как НЕ МЕРЕН, а не как зелёный.
Шага CI здесь нарочно нет
Проба обязана краснеть сегодня — в этом её смысл. Поставить её шагом в
binary.ymlсейчас значит покрасить ствол. Шаг ставится ТЕМ ЖЕ коммитом, что иправка, и это записано в «Когда задача сделана» у 7706.
Чего этот PR не трогает
Ни
flang/self/**, ниflang/proof/tables/**, ниproof-kernel.flang, ни*.sh/*.mjs, ниbootstrap/**. Код в чужих файлах не писан: правка 7706 —за владельцем
flang/src/emit/c/flang_repl.c.Отдельно: заметка
docs/zettel/plans-are-not-judged-at-all-and-unlike-processes-the-binary-says-nothing.mdустарела целиком — она говорит «ввозит его никто», а судья ввезён коммитом
7bac56022. Править её здесь не стал: чужой файл.