Tracer bullet: an empty installer package, end to end #2

Closed
opened 2026-10-14 01:26:50 -05:00 by jeff · 1 comment
Owner

Parent

Part of #1

What to build

The thinnest path through every stage. zixl -o out.msi product.wxs turns a WiX source holding only Wix, Product, Package, Feature and Property — every GUID written out explicitly, built for x64 in codepage 1252 — into an installer package that Windows Installer opens and installs, though it installs nothing.

This brings into being the parts every later ticket widens: the zixl module's compiling, linking and writing stages (preprocessing is a pass-through until the preprocessor tickets); the installer database as a format-level model of tables, rows and summary information; the string pool, the table streams and the summary information stream; the compound-file writer per [MS-CFB] version 3; the file source the library reads through; diagnostics carrying file, line and column; and the command line with -o, -v and --version, refusing the reference implementation's options zixl does not implement (--ext, --extdir, --wxidir) and any WiX element it does not support.

It also brings the end-to-end test harness, as NixOS VM tests run by nix flake check on nixos-do-m, which every later ticket adds fixtures to.

Acceptance criteria

  • A seam 1 test (zig build test) builds the installer database for the fixture from an in-memory file source and asserts its tables, rows and summary information.
  • A seam 1 test shows an unsupported element is a diagnostic naming the element, file, line and column.
  • zixl --ext ui, --extdir and --wxidir each stop with an error saying the option is not supported.
  • VM test: zixl and the reference implementation build the fixture; msidump of each, with generated columns masked, gives identical tables.
  • VM test: msiinfo opens zixl's output and reports the summary information the WiX source set.
  • VM test: wine msiexec /i installs zixl's output and /x removes it, both exiting 0.
  • The CI workflow runs the VM tests on nixos-do-m with the niks3 push.
  • Nothing is written from the source of msitools, wixl, libmsi or the WiX Toolset (ADR-0001); the specifications used are added to the README's references.
## Parent Part of #1 ## What to build The thinnest path through every stage. `zixl -o out.msi product.wxs` turns a WiX source holding only `Wix`, `Product`, `Package`, `Feature` and `Property` — every GUID written out explicitly, built for x64 in codepage 1252 — into an installer package that Windows Installer opens and installs, though it installs nothing. This brings into being the parts every later ticket widens: the `zixl` module's compiling, linking and writing stages (preprocessing is a pass-through until the preprocessor tickets); the installer database as a format-level model of tables, rows and summary information; the string pool, the table streams and the summary information stream; the compound-file writer per [MS-CFB] version 3; the file source the library reads through; diagnostics carrying file, line and column; and the command line with `-o`, `-v` and `--version`, refusing the reference implementation's options zixl does not implement (`--ext`, `--extdir`, `--wxidir`) and any WiX element it does not support. It also brings the end-to-end test harness, as NixOS VM tests run by `nix flake check` on `nixos-do-m`, which every later ticket adds fixtures to. ## Acceptance criteria - [ ] A seam 1 test (`zig build test`) builds the installer database for the fixture from an in-memory file source and asserts its tables, rows and summary information. - [ ] A seam 1 test shows an unsupported element is a diagnostic naming the element, file, line and column. - [ ] `zixl --ext ui`, `--extdir` and `--wxidir` each stop with an error saying the option is not supported. - [ ] VM test: zixl and the reference implementation build the fixture; `msidump` of each, with generated columns masked, gives identical tables. - [ ] VM test: `msiinfo` opens zixl's output and reports the summary information the WiX source set. - [ ] VM test: `wine msiexec /i` installs zixl's output and `/x` removes it, both exiting 0. - [ ] The CI workflow runs the VM tests on `nixos-do-m` with the niks3 push. - [ ] Nothing is written from the source of msitools, wixl, libmsi or the WiX Toolset (ADR-0001); the specifications used are added to the README's references.
jeff self-assigned this 2026-10-14 02:11:37 -05:00
Author
Owner

Done in 6b37bf4; CI run 2 is green: test, e2e and docs.

How each acceptance criterion is met:

  • Seam 1 tests: tests/database.zig builds installer databases from in-memory WiX sources and checks the Property, Feature and sequence tables and the summary information. It also covers the diagnostics for unsupported elements and attributes, missing required attributes, duplicate IDs, invalid values, the wrong namespace and malformed XML.
  • CLI refusals: --ext, --extdir, --wxidir, -D, -I and -E are each refused by name (tests/e2e/cli.sh).
  • Table comparison: tests/e2e/compare.sh runs zixl and wixl on each fixture (tracer.wxs, and features.wxs with nested features, every feature attribute and a per-user package). It sorts the msidump output of both and diffs it with summary information 9, 12, 13 and 18 masked. Every table matches.
  • msiinfo reads zixl's output.
  • Wine: msiexec /i and /x both succeed. The product's Uninstall key is checked to appear after install and to be gone after uninstall.
  • CI: a new e2e job on nixos-do-m runs nix flake check and pushes to niks3.
  • References: rust-msi, Rob Mensching's two posts, [MS-CFB], [MS-OLEPS] and the Windows Installer docs are in the README.

Deviations from the ticket:

  • No VM: the end-to-end tests are ordinary sandboxed derivations under nix flake check, not NixOS VM tests, because Wine runs headless in the build sandbox. They need no KVM.
  • Undocumented layout: Microsoft never documented how the database sits inside the compound file, so ADR-0004 allows permissively licensed sources for that layer alone, and docs/msi-layout.md describes it from rust-msi (MIT).
  • Reference behavior found and matched:
    • wixl ignores an explicit Package/@Id and writes a random package code. zixl uses the one written, and the comparison masks it.
    • wixl gives every collapsed feature Display=2 rather than numbering them.
    • wixl sets the compressed source bit even with Compressed="no".
    • wixl ignores Product/@Codepage for the database; that question is noted on #14.
  • Default output path: without -o, the package is written beside its WiX source, as wixl does. This settles user story 8 on #1.
Done in 6b37bf4; CI run 2 is green: `test`, `e2e` and `docs`. How each acceptance criterion is met: - **Seam 1 tests:** `tests/database.zig` builds installer databases from in-memory WiX sources and checks the Property, Feature and sequence tables and the summary information. It also covers the diagnostics for unsupported elements and attributes, missing required attributes, duplicate IDs, invalid values, the wrong namespace and malformed XML. - **CLI refusals:** `--ext`, `--extdir`, `--wxidir`, `-D`, `-I` and `-E` are each refused by name (`tests/e2e/cli.sh`). - **Table comparison:** `tests/e2e/compare.sh` runs zixl and wixl on each fixture (`tracer.wxs`, and `features.wxs` with nested features, every feature attribute and a per-user package). It sorts the `msidump` output of both and diffs it with summary information 9, 12, 13 and 18 masked. Every table matches. - **msiinfo** reads zixl's output. - **Wine:** `msiexec /i` and `/x` both succeed. The product's Uninstall key is checked to appear after install and to be gone after uninstall. - **CI:** a new `e2e` job on `nixos-do-m` runs `nix flake check` and pushes to niks3. - **References:** rust-msi, Rob Mensching's two posts, [MS-CFB], [MS-OLEPS] and the Windows Installer docs are in the README. Deviations from the ticket: - **No VM:** the end-to-end tests are ordinary sandboxed derivations under `nix flake check`, not NixOS VM tests, because Wine runs headless in the build sandbox. They need no KVM. - **Undocumented layout:** Microsoft never documented how the database sits inside the compound file, so ADR-0004 allows permissively licensed sources for that layer alone, and `docs/msi-layout.md` describes it from rust-msi (MIT). - **Reference behavior found and matched:** - wixl ignores an explicit `Package/@Id` and writes a random package code. zixl uses the one written, and the comparison masks it. - wixl gives every collapsed feature `Display=2` rather than numbering them. - wixl sets the compressed source bit even with `Compressed="no"`. - wixl ignores `Product/@Codepage` for the database; that question is noted on #14. - **Default output path:** without `-o`, the package is written beside its WiX source, as wixl does. This settles user story 8 on #1.
jeff closed this issue 2026-10-14 02:59:10 -05:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
jeff/zixl#2
No description provided.