fix(agent): ADR-0011 перепроверен — виноват баг nix, а не пин nixpkgs
Первая редакция ADR-0011 утверждала: «на закреплённом nixpkgs nix flake check
падает на любом derivation-выводе, поэтому output'ов formatter и checks быть
не может». Перепроверка это опровергла, и ADR переписан.
Измерено (WSL, nix 2.34.9):
formatter = pkgs.hello -> error: 'outPath' is not a valid system type
formatter = hand-written derivation -> та же ошибка (nix-internal/derivation-internal.nix:50)
formatter = derivation без outPath -> error: 'drvPath' is not a valid system type
checks.x86_64-linux.hello = pkgs.hello -> all checks passed!
packages.x86_64-linux.hello = pkgs.hello -> all checks passed!
control (без derivation-выводов) -> all checks passed!
То есть:
* поломка НЕ зависит от nixpkgs — воспроизводится на флейке без инпутов;
* nix 2.34.9 при проверке вывода formatter перебирает ИМЕНА атрибутов
derivation'а и трактует каждое как системный тип (outPath -> drvPath);
* вывод checks работает нормально. В этом репозитории он уже есть
(checks.deploy-schema, checks.deploy-activate из deploy-rs) и проходит.
Выводы ADR-0011 не изменились, изменились причины:
* output'а formatter нет — по-прежнему, но из-за бага nix, а не из-за
пина nixpkgs;
* python-проверки остаются в .ci/checks.sh — теперь это ВЫБОР, а не
запрет: derivation в checks видит только закоммиченный flake source
(а не рабочее дерево, нужное pre-commit'у) и вытеснил бы проверки
deploy-rs, занявшие имя checks.
Попутно: комментарии в flake.nix и .ci/checks.sh, README и AGENTS.md приведены
в соответствие с измеренным — чтобы следующий агент не «починил» это, не
заметив, что чинить нечего.
This commit is contained in:
1 parent
3bc6b5452b
commit
129c6b0aef
5 files changed
+111
-67
No files matched your search
+5
-3
@@ -26,9 +26,11 @@
|
||||
#
|
||||
# Every python check below is also a standalone script, so it can be run
|
||||
# directly: `python3 .ci/tests/<script>.py .`. They deliberately are NOT
|
||||
# exposed as `checks.*` flake outputs: on the pinned nixpkgs, `nix flake
|
||||
# check` fails with "'outPath' is not a valid system type" on any
|
||||
# derivation output built from it (see the note in flake.nix).
|
||||
# exposed as `checks.*` flake outputs: a derivation there would only see the
|
||||
# committed flake source (not the working tree a pre-commit hook needs), and
|
||||
# the `checks` name is already taken by the deploy-rs checks. The `formatter`
|
||||
# output is impossible for a different reason: nix 2.34.9 breaks on it
|
||||
# ("'outPath' is not a valid system type") — see ADR-0011.
|
||||
#
|
||||
# Not yet implemented (candidates from analysis-report.md §5):
|
||||
# #3 coredns domains ↔ nginx vhosts bidirectional match
|
||||
|
||||
Reference in new issue
Block a user