Record the check-writing gotchas from the microvm host work #34
No reviewers
Labels
No labels
bug
duplicate
enhancement
help wanted
invalid
question
wontfix
bug
duplicate
enhancement
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
allod/memory!34
Loading…
Reference in a new issue
No description provided.
Delete branch "agent/shell-nix-check-gotchas"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Five gotchas found while writing the
allod/nexusmicrovm host checks (allod/nexus#24), all of the kind that turns a check into one that cannot fail.Two shell ones, in
shell.md's existing "a guard that cannot be shown to fail does not count" family:ls <dangling-symlink>exits 0, so an access probe ending inls <link>passes whether or not the target exists; andrm -fexits 0 on an absent path, so it cannot show that a deletion was denied. Both were found by an isolation fixture reporting two attacks as successful when the boundary was in fact closed — the probe, not the boundary, was wrong.Three Nix ones, in
nix.md:lib.escapeShellArgleaves a shell-safe string unquoted, so a check grepping generated shell for'<path>'passes or fails on nixpkgs' quoting optimisation rather than on the generator. With unquoted needles, "this path must not appear" also stops working as a substring check, because every derived path carries its root as a prefix — set comparison over the extracted argument list is the replacement.ExecStart=<script>with a trailing space when there are no arguments, so a$-anchored extraction silently matches nothing; and a unit defined withscriptkeeps its payload in a separateunit-script-*derivation.builtins.tryEvaldoes not catchabort, and nixpkgs aborts on a group name over 31 characters. A mutation fixture that trips it takes the whole check down rather than recording an outcome, and an assertion meant to give that input a friendlier diagnostic can never be the reported one.The
nix flake checkmemory note gains a clarification: exposing a second host system costs nothing by default, because Nix omits systems it cannot build and says which. The OOM risk is per-configuration.Risk
R0. Documentation only, in the topic files that already own these subjects.
Validation
Every statement was measured while writing allod/nexus#24: the two shell behaviours directly on this VM's coreutils, the escaping and trailing-space behaviours against the rendered artefacts that first failed on them, the
abortbehaviour by a fixture that took a check down with it, and the flake-check omission fromnix flake check's own output.df1e16713atoc424108ebc