Repository navigation
Name gathered checks as exported configurations are named - #160
Merged
Merged
Conversation
clhodapp
force-pushed
the
feat/check-names-by-integration
branch
from
November 13, 2026 07:55
5e53350 to
593426e
Compare
clhodapp
force-pushed
the
feat/check-names-by-integration
branch
from
November 13, 2026 18:05
593426e to
0b5f4e5
Compare
clhodapp
marked this pull request as ready for review
November 13, 2026 18:05
A caisson top names the checks it gathers under `checks.<system>`
as it names the configurations in an output keyed by system: each
check has a path, the configurations from the caisson top down to the
configuration that declares it as `{ type, name }` segments without
the systems, then the check, and the names are `caisson-core.elide`
over the paths, written by `displayName`. A check whose name is alone
keeps it, and checks of the same name gain the segments that tell them
apart: `nas-1/toplevel` and `nas-2/toplevel`, or `nixos/box/toplevel`
and `system-manager/box/toplevel` for a NixOS configuration and a
system-manager configuration both named `box`.
In an output keyed by system, the checks output and an export whose
`exportsTo` says `bySystem`, `elide` runs once over the paths of every
system, each path counted once, so an entry has the same name under
each system it appears under. Entries that still share a name are
refused for each system, with the error the exports give.
`namedByPath` pairs members with their names and `refuseShared`
refuses members that share a name; the exports and the gathered
checks both use them. The check record adds `from.check`, the name of
the check in the configuration that declares it, beside
`from.namePath`.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…d` toplevels The tests that list gathered checks read the names `elide` gives over the checks of every system, the nix-unit test among them: the check `unit` of the nix-unit configurations `passing` and `failing` is `passing/unit` and `failing/unit`. The system-manager configuration `registered` of the registered world turns its `toplevel` check back on, and a new test reads `nixos/registered/toplevel` and `system-manager/registered/toplevel`. A new unit test publishes an output keyed by system whose entry collides under one system alone and has the same name under both. The clash tests declare a check on the caisson top under the name `elide` gives a check of a NixOS configuration, `nas-1/smoke`. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
clhodapp
force-pushed
the
feat/check-names-by-integration
branch
from
November 14, 2026 04:07
6f908ff to
01cb618
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.
A caisson top gathers the checks of every configuration declared inside it into
checks.<system>. This change names those checks the way the exports name configurations in an output attribute set, so a NixOS configuration and a system-manager configuration declared under the same name no longer publish the same check name.The rule
Each gathered check has a path of
{ type, name }segments:type, flake-parts configurations included and systems left out (as the exports drop the systems in an output keyed by system);{ type = "check"; name = <check name>; }.The published name is
caisson-core.elideover the paths of the checks gathered for every system, each path counted once, written bydisplayName:toplevelof the only NixOS configuration istoplevel;/: the checkstoplevelof the NixOS configurationsnas-1andnas-2arenas-1/toplevelandnas-2/toplevel;type/namewhere the branches at that fork hold the same name under different integrations: a NixOS configuration and a system-manager configuration both namedboxgivenixos/box/toplevelandsystem-manager/box/toplevel;checks.x86_64-linux: these checks would be published under the same name, ....A check has the same name under every system it is gathered for. The NixOS configuration
nas-1evaluated for x86_64-linux and aarch64-linux, beside a NixOS configurationarminside the structural configurationlabevaluated for aarch64-linux alone, givesnas-1/toplevelunder both systems andlab/toplevelunder aarch64-linux.The exports name an output keyed by system the same way: for an export whose
exportsTosaysbySystem, such aspackages,elideruns once over the paths of every system, so an entry has the same name under each system. Outputs not keyed by system are named as on main.caisson-core.elideis used unchanged: the paths are deduplicated before the call, and two members with equal paths under one system get the same name, which the refusal catches. Inlib-overlays/integrations/default.nix,namedByPathpairs members with their names andrefuseSharedrefuses members that share a name.publicationOfandgatheredChecksOfboth call them. The check record keepsfrom.namePath, the address of the declaring configuration underchildren(systems included), and addsfrom.check, the name of the check there, so the full path of every check is in the record.Measured names
caisson.manifest.checkRecordof each flake, evaluated with--override-input caissonset to main (3d9e52c) and then to this branch, on workspace main. Both flakes evaluate their configurations forx86_64-linuxalone, so every check is underx86_64-linux.ch-personal-machines
aacs-cat-packageaacs-cat-packageam2r-packageam2r-packagebuilder-1-builder-1-toplevelbuilder-1/toplevelbuilder-1inside caisson-diskobuilder-1builder-2-builder-2-toplevelbuilder-2/toplevelbuilder-2builder-3-builder-3-toplevelbuilder-3/toplevelbuilder-3builder-4-builder-4-toplevelbuilder-4/toplevelbuilder-4builder-5-builder-5-toplevelbuilder-5/toplevelbuilder-5builder-6-builder-6-toplevelbuilder-6/toplevelbuilder-6chris-desktop-2-chris-desktop-2-chris-activationchris-desktop-2/activationchrisinside NixOSchris-desktop-2inside caisson-facterchris-desktop-2chris-desktop-2-chris-desktop-2-toplevelchris-desktop-2/toplevelchris-desktop-2inside caisson-facterchris-desktop-2chris-laptop-1-chris-activationchris-laptop-1/activationchrisinside NixOSchris-laptop-1chris-laptop-1-toplevelchris-laptop-1/toplevelchris-laptop-1chris-tablet-1-chris-activationchris-tablet-1/activationchrisinside NixOSchris-tablet-1chris-tablet-1-toplevelchris-tablet-1/toplevelchris-tablet-1colmenaHive-nas-1-toplevelcolmenaHive/nas-1/toplevelnas-1inside caisson-colmenacolmenaHivecolmenaHive-router-primary-router-primary-toplevelcolmenaHive/router-primary/toplevelrouter-primaryinside caisson-diskorouter-primaryinside caisson-colmenacolmenaHiveeval-weight-report-packageeval-weight-report-packagegreeter-display-test-toplevelgreeter-display-test/toplevelgreeter-display-testhpt-cli-packagehpt-cli-packageinstaller-toplevelinstaller/toplevelinstallerjellium-desktop-packagejellium-desktop-packagerecovery-smoke-recovery-smoke-toplevelrecovery-smoke/toplevelrecovery-smokeinside caisson-diskorecovery-smokeregistriesregistriessteam-deck-1-toplevelsteam-deck-1/toplevelsteam-deck-1The
toplevelchecks share a name, and so do theactivationchecks, so each gains the first segment of its path; the paths of the checks insidecolmenaHivefork again below it. A check name that appears once, such as each<name>-package, stays bare.ch-emacs-config
No name changes:
emacs-package,emacs-package-manifest-package,emacs-pgtk-packageandregistriesare declared by the caisson top, and each name appears once.A nixos-test configuration inside a NixOS configuration
The test
smokedeclared inside the NixOS configurationnas-1(tests/nixos-test-vm) wasnas-1-smoke-test. Its checktestis the only check of that name there, so it is nowtest, and its record holdsfrom.check = "test"andfrom.namePathsystem x86_64-linux / nixos nas-1 / system x86_64-linux / nixos-test smoke.caisson
The checks of caisson are declared by the flake-parts configuration
checks(configs/flake/checks) inside the flake-parts caisson top, andregistriesby the caisson top. Every name appears once, so all stay bare: the 46 names underchecks.x86_64-linuxanddarwin-systemunderchecks.aarch64-darwinare the same on main (e22972c) and on this branch.nix-unit configurations
The nix-unit test (tests/nix-unit) declares the nix-unit configurations
passingandfailing, and the default check of each isunit. The checks share their name, so they arepassing/unitandfailing/unitunder both systems; on main they arepassing-unitandfailing-unit.Tests
elidegives, and the record tests readfrom.check. In the pinned-world fixture, the checksmokeofnas-1isnas-1/smokeunder both systems.ainsidelabcollides under x86_64-linux alone, and islab/aunder both systems.reachesunder its name, and the nix-unit test from Add the nix-unit integration #157 readspassing/unitandfailing/unit.registeredof the registered world turns itstoplevelcheck back on; Declare the default checks of the integrations and the check registries #154 had turned it off to avoid the clash with the NixOS configurationregistered. The new pinned-world testsameNameInDifferentIntegrationsPublishesBothChecksreadsnixos/registered/toplevelandsystem-manager/registered/toplevel, each the toplevel of its configuration.nas-1/smoke, the nameelidegives the checksmokeof the NixOS configurationnas-1beside anothersmoke; the unit test matches the error and both paths.Checks run
Six checks under
checks.x86_64-linuxhave a differentdrvPathfrom main (e22972c):argument-errors,deferred-errors,eval-weight,nix-unit,nix-unit-integrationandtreefmt. All six pass locally.pinned-worldpasses too; its suite is forced while the checks evaluate.nixos-test-vmbuilds the same derivation as on main and reads it under its new name.topside
topside main (c845901) runs a check whose name holds
/: over a fixture flake with flake-parts configurationsaandbthat each declaresmoke,topside checkslistsa/smokeandb/smoke, andtopside check a/smokebuilds it and reports it passed. topside builds a check by itsdrvPath, so the name never appears in an installable.🤖 Generated with Claude Code