Skip to content

DraftOwner fileset-explorerReviewed 2026-11-09

Fileset explorer — Testing ​

Every requirement of the contract is checked by a unit test of the module that owns it, or by a recorded run of the explorer (runAppRecorded), which drives the real component with scripted events and no terminal.

Oracles ​

The generators (FXE) are where the explorer could be wrong without noticing: a translation that looks right selects different files. Each target is therefore checked by the tool that defines its meaning, on the same trees the fileset library is checked on.

TargetOracleWhere it comes from
nixnix eval of lib.fileset.toList over the emitted expression, in both the shim and the snapshot modesthe host's Nix; lib from the flake's nixpkgs input ($SPARKLES_FLAKE_INPUT_NIXPKGS)
git-pathspecgit ls-files --cached --others with the emitted pathspecs, in a fresh repository holding the treethe host's git
gitignoregit ls-files --others --exclude-standard in a fresh repository with the emitted .gitignorethe host's git
rsyncrsync -r --dry-run --out-format=%n --prune-empty-dirs --filter='merge FILE' into an empty directoryrsync in the dev shell
tartar -tf of the archive the emitted command createsGNU tar in the dev shell
cargocargo package --list --allow-dirty --offline of a crate holding the treecargo in the dev shell
bazelbazel --batch query 'labels(srcs, //:x)' of a filegroup over the emitted glob, in a WORKSPACE without Bzlmodbazel when on PATH; skipped otherwise
dubdub describe --data=source-files of a package beside the tree, its sourceFiles the emitted ones made absolutethe dev shell's dub

Each oracle test runs every query of the generator corpus (fileset/emit/testing.d) that the target accepts, on the fileset library's fixture trees and seeded random trees, and compares the oracle's list with the resolution's members. A query the target refuses is checked to be refused for the documented reason. The corpus has, for every target, at least one query just inside its grammar and one just outside.

The query language has two independent checks: the canonical form re-parses to the same members (FXL7), and the tree-sitter grammar, generated from its own grammar.js, agrees with the D parser on every corpus query (FXL8).

The tutorial checks itself: every try block's expected result is compared with its runner's result (FXT5), so the help cannot describe a result the explorer does not give.

Sending has two checks. The screen's side (FXS3–FXS6, FXS8) runs against a scripted stand-in provider, so a test can step through each phase and report a wrong collection. The transport (FXS7) runs the real bridge against the real receiver: sendme 0.37 from the flake's nixpkgs, which the shells export as $SPARKLES_SENDME, receives on loopback with relays disabled. The names in Stats are each the content-addressing library's, checked there against Nix, git and iroh-blobs.

Evidence ledger ​

Evidence is from Linux x86_64 with DMD and LDC. A requirement the ledger does not list is unverified.

The oracles found three behaviours the contract now states: git ignores an unanchored glob exclude when every include shares a literal directory (FXE4); dub's globs list directories as source files and its excludes miss (FXE10, X15); Cargo packages README.md unasked (FXE8).

RequirementsStateEvidenceGap
FXL1–FXL4, FXL6, FXL7verified (Linux x86_64)paths of joined bare and quoted pieces, anchored at the root, ./ allowed and / refused; quoted pieces literal; calls for the keywords, a bare name a path; comments inside and outside paths; braces with commas; | and - mixed refused; bare and glob predicate arguments and !=; glob syntax errors at their byte; the canonical form re-parsing to itself, a run a bare piece cannot hold quoted (fileset.query.lexAndParse, fileset.query.tokens, fileset.query.precedence, fileset.query.functions, fileset.query.errors, fileset.query.canonicalRoundTrips); every form compiles to the fileset it means, README.md the root's alone (fileset.query.compile); every target's oracle agrees over the corpus rewritten in the new language (fileset.emit.oracle.libFileset and the others)—
FXL5verified (Linux x86_64)gitTracked() lists a fresh repository's index beneath the root, relative to it, and is null in a plain directory, which fails the query with not a git work tree (fileset.query.FXL5.gitTracked, fileset.query.compile)—
FXL8verified (Linux x86_64)over 49 queries, valid and invalid, the grammar errs exactly where parseQuery fails, and its capture is the parser's kind on every byte of every token: a path's text, glob metacharacters, escapes and the rest (fileset_explorer.FXL8.grammarIsTheParser); a fileset fence, in the help or the Export tab, draws them in the editor's slots (fileset_explorer.FXL8.fencesHighlightPaths)skipped without the grammar bundle; a path beginning with - written right after another path (a -b) lexes as a difference in the grammar but one path in the parser, outside the corpus
FXL9verified (Linux x86_64)all | none over a tree with a file none hints only all(), on the result line too (fileset_explorer.FXL9.bareCallNameHints)—
FXU1, FXU6, FXU8, FXU9verified (Linux x86_64)a keystroke re-resolves and redraws; the tree's leaves are the members, directories only on the way and before the files beside them, with hue's icons, folder glyphs and connectors, which in the touch layout run on between the tall rows (fileset_explorer.FXU9.touchConnectors); the badges end at the row's edge (ui.tree_widget.badgeRight, fileset_explorer.memberTree.dirsFirst); a closed directory stays closed across an edit; a plain frame has the title, query, tree and hints (fileset_explorer.FXU1.live, fileset_explorer.FXU6.treeAndIcons, fileset_explorer.FXU8.plainFrame, fileset_explorer.memberTree); CI's example runner prints a frame without a terminalthe GUI arm's frame is not recorded
FXU2verified (Linux x86_64)a multi-line query renders line by line with its prompt and keeps the caret in view; Tab moves focus and Ctrl+Enter leaves for the tree (fileset_explorer.FXU3.hostCursor, fileset_explorer.FXT3.runningABlock)—
FXU3, HST20verified (Linux x86_64; Android arm64, a Xiaomi tablet)the recorded cursor follows the caret, two cells left after two Lefts, hidden when the tree has focus; the query's text runs are unchanged (fileset_explorer.FXU3.hostCursor, ui_app.run_app.textCursorFollowsTheCaret, editor.view.hostCursor, term_control.writeTextCursor)the terminal's DECSCUSR shape and the GPU caret are checked by hand; the native (Vulkan) host now paints the caret too, as Android had none — seen on the Android emulator (API 36) and on the tablet, where a tap in the query puts it under the finger
FXU4verified (Linux x86_64)each token in its kind's slot, an error's bytes in the error slot, the line's text unchanged (fileset_explorer.highlight); a refused span is marked (fileset_explorer.FXE12.exportTab)—
FXU5verified (Linux x86_64)at 100 and 160 columns the tree's pane and the right group's are within a column in width, with each tab showing (fileset_explorer.FXU5.equalHalves)—
FXU7verified (Linux x86_64)F1 shows the help beside the tree and focuses it; F1 again restores the tab and focus (fileset_explorer.FXU7.helpBesideTheTree)skipped without the grammar bundle
FXU10verified (Linux x86_64; Android arm64, a Xiaomi tablet)recorded taps switch the right group's tabs, step the Export target with ▶ and focus the query; a precise 2.5-row scroll leaves the tree at 2.5 with its cursor still on the first row; a notch eases to 3 rows; the gesture recogniser's fling tail moves the tree exactly as far as its events add up to; thirty Downs bring the view to the cursor and settle on a whole row (fileset_explorer.FXU10.tapsSwitchTabs, fileset_explorer.FXU10.dragFollowsTheFinger, fileset_explorer.FXU10.notchEases, fileset_explorer.FXU10.flingCoasts, fileset_explorer.FXU10.cursorKeepsTheView); the native host declares subCellScroll (ui_app.native_loop.declaresSubCellScroll); on the tablet a fling's frames stop the tree between rowsthe fraction's paint on the GPU arm is checked by hand, from screenshots
FXU11, FXU12, FXU13verified (Linux x86_64; Android arm64, a Xiaomi tablet)a recorded touch frame has no border or key hint, its tree rows the dense list's height apart, and the | chip inserts | at the caret; 32 dp take two 16-dp cells and 48 dp three; at 140×40 the segments share the tree header's row, at 60×60 they are below the tree, and at 50 columns every chip, the prompt and the member count keep their cells; taps open and close a directory, collapse and expand all, ask for the ids, and select expand; Back leaves the help without quitting (fileset_explorer.FXU11.touchFrame, fileset_explorer.FXU12.tabletAndPhone, fileset_explorer.FXU13.touchInThePanes); on the tablet, taps switch the segments, the help and the tree fling, the query raises the soft keyboard; with the display set to a phone's 1080×2340 at 440 dpi, the tree stacks above the tabsthe phone layout runs on the tablet's display resized, not on a phone
FXU14verified (Linux x86_64; Android arm64, a Xiaomi tablet)a long tree draws a bar whose content and viewport are its rows and its view, and a press and drag down the bar scrolls it to its end with the cursor in place (fileset_explorer.FXU14.treeBar); on the tablet the help's bar shows while it moves and has faded three seconds afterthe help's and Export's bars are checked on the device, not recorded
FXU15verified (Linux x86_64)recorded moves over the query, a tab and the tree ask for text, pointer and default; a click on the query's fifth column puts the caret at byte 2 (fileset_explorer.FXU15.pointerOverTheEditor)the shapes the window systems draw are theirs (wsi); on Android a hover now reaches the window's views, which apply the icon, not yet seen with the tablet's touchpad
FXU16verified (Linux x86_64; Android arm64, a Xiaomi tablet)the explorer's options carry 12 points, within 25–40% under the toolkit's 18 (fileset_explorer.FXU16.density); on the tablet the text and the tree rows are a third smaller—
FXU17verified (Linux x86_64; Android arm64, a Xiaomi tablet)every chip's and segment's box in a recorded touch frame is its target's height and asks for 32 dp (fileset_explorer.FXU17.pillsFillTheirTargets); the touch frame painted offscreen through the Vulkan canvas shows each pill with room above and below its label (fileset_explorer.vulkan.touchScreens, opt-in)seen on the tablet: the chips are right; the segments, drawn as wide as their group, touched its outline — now inset 3 dp (Decoration.drawInset), seen evenly inset on the Android emulator and the tablet
FXU18verified (Linux x86_64)a recorded tap on Stats, then on src, closes it; a tap on Stats after one on the tree leaves the tree as it was (fileset_explorer.FXU18.tapsFindTheirPane)seen on the tablet: taps on the side panes stay there (directory collapse not reported)
FXU19verified (Linux x86_64)the cheat sheet's snippets include *.d, a | b and p || q and none of the keys table (fileset_explorer.FXU19.cheatSnippets); a recorded tap on the ▶ after src/*.d makes it the query, resolved, the help still showing (fileset_explorer.FXU19.cheatSheetTries); the button follows each code span of its column, one for a span a | cut in pieces (md.view.codeActions)not yet seen on the tablet
FXU20verified (Linux x86_64)a frame of a 300-line gitignore export builds rows for no more lines than the view is tall, its scroll spanning every line (fileset_explorer.FXU20.exportBuildsWhatShows)on the tablet a fast swipe over the expanded Nix export coasts dozens of lines past where a slow one of the same length stops; the fling's frame rate is not yet measured
FXU21, INP25verified (Linux x86_64; Android arm64, a Xiaomi tablet)a recorded Ctrl+V in a window asks the host for one clipboard read, and its answer goes in at the caret (fileset_explorer.FXU21.pasteReadsTheClipboard); the native host streams the clipboard's text offer and answers the request after the drain the read ends in (ui_app.native_loop.ClipboardRead.answersTheRequest); a soft keyboard's selection in its field becomes keys (ime_diff.moveOf)on the Android emulator, Ctrl+V pastes the copied export at the caret and Gboard's ▶ moves it; on the tablet, Gboard's ◀, ▶, jumps to either end and Select All move and select in the query (its Down, on one line, leaves the caret); a paste from another app is not yet seen
FXU22verified (Linux x86_64; Android arm64, a Xiaomi tablet)a recorded horizontal pan over a 200-column export moves its lines 30 columns under the header (fileset_explorer.FXU22.exportScrollsAcross); a long union is written a path a line (emit.nix.nixCall), and the oracle still evaluates it (fileset.emit.oracle.libFileset)on the Android emulator, a swipe across moves the lines under a header that stays, and the expanded Nix is a path a line; on the tablet too, the glob shim's long lines swiped to their ends
FXU23verified (Linux x86_64)at 140×40 with Export showing, ◀, the target, ▶, the three glob modes (labelled short) and Copy share the segments' row, a tap on expand there selects it and ▶ steps the target; at 60×60 the glob modes stay below the segments (fileset_explorer.FXU23.exportControlsBesideTheTabs)seen on the Android emulator at 1920×1600: the target, the glob modes and Copy beside the segments, and on the tablet
FXU24verified (Linux x86_64)the help painted offscreen through the Vulkan canvas: the first try fence is one ring whose top, bottom, left and right are one width, its surface fills its top corners, its label and ▶ are badges of its top row, left and right, filled with the page's colour (surface.base, ui.display_list.surfaceBaseAskedForPaintsThePage), the ▶'s outlined in another colour, and inside the ▶'s the ring is hidden (fileset_explorer.vulkan.FXU24.fenceFrame, opt-in); a glyph frame's box draws one ring and its cellsOnly glyphs nothing (ui_vulkan.painter.aGlyphFrameIsOneRing); in cells the frame stays its glyphs, the badges the band (ui.cells.aPixelTargetsFrameIsNotDrawnInCells, md.goldens.interactiveChrome)seen on the tablet: the badges on the ring, filled with the page's colour, "▶ try it" green at the right, and a tap on it runs the block; one run of taps there ran nothing, not seen again, with the presses logged
FXU25verified (Linux x86_64; Android arm64, a Xiaomi tablet)at 140×40 a finger moving 40 columns across the help's first fence shows its line's end, not its start, the page unmoved (fileset_explorer.FXU25.helpFenceScrollsAcross); a swipe begun across on the fence's top row that wavers more down than across still moves the fence and not the page (fileset_explorer.FXU25.gestureKeepsItsAxis); on the tablet, a swipe across the nix run fence shows its enda real finger's wavering swipe is the test's model of one
FXU26verified (Linux x86_64)dub build :fileset-explorer and nix build .#fileset-explorer take sparkles:ui-app's full-vulkan; --help lists --window-system, --appearance and --debug; fileset-explorer --gui --debug frames=60 opened a native window on Wayland (radv), presented 60 frames and exited 0, from the build tree and from the packagechecked by hand: no CI lane opens a window
FXA1, FXA2, FXA3verified (Android arm64, a Xiaomi tablet)nix build .#fileset-explorer-apk builds; installed, it extracts the repository and opens on it, the default query listing 2107 members; the help renders as markdown and the Nix export is highlightedchecked by hand; no emulator lane runs it
FXT1, FXT2verified (Linux x86_64)the model folds ::: try and leaves malformed ones alone (md.model.tryBlock); the HTML escapes the runner (md.render_html.tryBlock); ▶ shows only for an offered runner, as a hit target, with the host's result under the block (md.render_widgets.tryBlock); in the explorer a tap on a block's "▶ try it", on its ▶ or its words, runs it, at 140×40 and at the tablet's 120×44 cells (fileset_explorer.FXT2.tapTryIt)the docs site's card is not built in a test
FXT3, FXT4verified (Linux x86_64)running a block loads its query and its tree and shows "✓ result, as expected" under it; Esc returns to the directory; an undeclared tree is reported (fileset_explorer.FXT3.runningABlock, fileset_explorer.FXT4.unknownTree)a click on ▶ is routed through the paint phase's hit list, not driven in a test
FXT5verified (Linux x86_64)every expected fence of the help equals its block's result, seven of them (fileset_explorer.FXT5.tutorialChecksItself)skipped without the grammar bundle
FXE1, FXE2verified (Linux x86_64)normalization flattens, distributes differences and folds d/** & g (fileset.emit.ir.normalize); every oracle test below checks each accepted corpus query and counts the refused ones—
FXE3verified (Linux x86_64)lib.fileset.toList equals the members for every corpus query Nix accepts, in the shim and the snapshot modes, five or more of them names at any depth written as fileFilter (fileset.emit.oracle.libFileset); the glob regex (fileset.emit.nix.globRegex); which globs are fileFilters (fileset.emit.nix.nameFilterOf)gitignored's condition is not exercised by the oracle
FXE4, FXE5, FXE6, FXE7, FXE10verified (Linux x86_64)git, rsync, GNU tar and dub list exactly the members for every accepted query, over a tree with a directory named x.d, a file and a directory both named x, dotfiles, an executable and a space (fileset.emit.oracle.gitPathspec, fileset.emit.oracle.gitignore, fileset.emit.oracle.rsync, fileset.emit.oracle.tar, fileset.emit.oracle.dub)—
FXE8, FXE9verified (Linux x86_64)cargo package --list and bazel query list exactly the members for every accepted query (fileset.emit.oracle.cargo, fileset.emit.oracle.bazel)skipped without cargo or bazel on PATH; run with nix shell nixpkgs#cargo nixpkgs#rustc nixpkgs#bazel_7
FXE11verified (Linux x86_64)code and 0, the refusal with its text and 2, a bad target or query 1 (fileset_explorer.FXE11.emitCommand)—
FXE12verified (Linux x86_64)the tab shows Nix with the shim, g switches to snapshots, t to git pathspecs, and a refusal shows its reason and its bytes (fileset_explorer.FXE12.exportTab)highlighting depends on the target's grammar in the bundle
FXS1, FXS2verified (Linux x86_64)on an in-memory tree with a link and an executable file, the outcome's castore, NarHash, store path, git tree, its SRI form, SWHID and collection equal what each scheme names the tree alone, every one is on the Stats tab, and so are the link left out and the executable bit dropped (fileset_explorer.FXS1.namesInStats); a member holding \ shows the collection's reason (fileset_explorer.FXS1.whyNot); a recorded click on the store path's line copies it and marks it, and Up, Down and y copy the NarHash (fileset_explorer.FXS2.copyAName)—
FXS3–FXS6, FXS8verified (Linux x86_64)recorded runs over a directory on disk, with a scripted stand-in provider: s asks with the count, size, link left out, executable bit dropped and collection, Escape starts nothing, s and Enter start it once with the three files' labelled names and paths (fileset_explorer.FXS3.asksFirst); an in-memory tree has nothing to send (fileset_explorer.FXS3.notFromMemory); on the touch layout, Send twice starts it, and Copy and Stop do what y and x do (fileset_explorer.FXS3.touchButtons); importing, online and serving show, the 122-byte receive command wraps whole, the frame asks to be woken in 250 ms, y copies the command and x stops (fileset_explorer.FXS4.whileSending); on the keyboard's layout, clicks on Send, Send, Copy and Stop start it, copy the command and mark it copied, and stop it, and Share, absent without a share sheet, hands a stand-in sheet the command or shows why it could not open (fileset_explorer.FXS4.copyButton); an edit while serving starts nothing and names the sent query (fileset_explorer.FXS5.snapshot); a stand-in naming another collection is stopped with both names (fileset_explorer.FXS6.theCollectionsAgree); with the bridge's path missing, Send says why and the names stay (fileset_explorer.FXS8.withoutTheBridge)—
FXS7verified (Linux x86_64)the bridge sends four files, one of 100 000 bytes and one empty, on loopback with relays disabled, a fifth file beside them left out; sendme receive from sendme 0.37 writes exactly the four under the label, byte for byte, the session's collection is the one named offline, and the provider counts more than 100 000 bytes sent (iroh_send.FXS7.sendmeReceives)not yet over relays, or between two machines
FXS9verified (Android arm64, a Xiaomi tablet)on the tablet, Send over the documents-and-recipes fileset computed its names, asked, and served it; sendme receive from sendme 0.37 on the desktop, over Wi-Fi, wrote its 2112 files (48.92 MiB) in 9 s under sparkles/, and iroh-collection names what arrived 2264079105ed…b64004, the collection the tablet showed; the tablet then counted 2 requests and 50.2 MiB sent, files, metadata and the receiver's size reads; Stop returned to the namesthe ticket was read from a debug build's log, the receive command not being copyable off the device by adb; a first tap after launch was lost twice, as before
FXC1–FXC4verified (Linux x86_64)a command line with no subcommand parses to view with --render-plain; --dir before and after stats names the same root; emit nix --nix-globs expand and send --yes --no-relay parse; --help lists the four (fileset_explorer.FXC1.subcommands); stats prints the Stats tab's lines without its Send section, the store path and collection among them, and a query that does not parse exits 1 on standard error (fileset_explorer.FXC2.stats); over 32 MiB the names wait for --ids, which computes them (fileset_explorer.FXC2.ids); with a scripted provider, send --yes starts it once with the two members' labelled names and paths, names the executable bit dropped, prints the receive command alone on standard output, its phases and progress on standard error, and stops it when interrupted (fileset_explorer.FXC3.sendYes); without --yes and a terminal, or answered no, nothing starts, and a failing provider and an in-memory tree exit 1 with their reasons (fileset_explorer.FXC3.sendRefuses); the packaged program, run for real: stats and emit gitignore exit 0, a bad query 1, send without a terminal refuses, and send --yes --no-relay is received by sendme receive as an identical tree, exiting 0 on an interruptemit keeps FXE11's evidence
FXC5verified (Linux x86_64)over BlockingVfs and over RingVfs, a fileset with an executable file, a relative link and a file left out is copied, the copy's castore, NAR and git ids equal the fileset's, and RingVfs has more than one file in flight; a second cp copies nothing, naming the paths, --force replaces them, and --dry-run lists them and leaves the destination absent (fileset_explorer.FXC5.cp); a link to an absolute target beneath no --link-root stops the copy before the destination is made, naming it, a dry run too, and so does a root that cannot be opened; beneath a root reached through a link, it is made over each backend holding the root's real path (fileset_explorer.FXC5.cpLinkRoot, fileset_tools.copy.coverOf); the packaged program copies the repository's default fileset, 2112 files, over both backends, and .pre-commit-config.yaml's link into the store only with --link-root /nix/store, the link identical—