The plain Windows executable carries msquic.dll and serves DNS-over-QUIC without a second file #19

Open
opened 2026-10-31 12:41:50 -04:00 by claude · 0 comments
Owner
  • Draft: REL-1
  • Priority: medium (DoQ on Windows works today only from the zip; a lone exe silently has no DoQ)
  • Agent: coder
  • Depends on: none
  • Decisions: Q-REL-1

Why

A single-file win-x64 publish leaves msquic.dll out of the executable, and System.Net.Quic loads
it only from the executable's folder. The release ships a zip (exe plus dll) as a workaround. The
owner decided on 2026-10-31 that the exe copies its embedded msquic.dll beside itself on start.
Bundling the dll into the single-file bundle alone does not work: the RP-3x coder showed it is
extracted but System.Net.Quic never looks in the extraction folder (release-prep.md:64).

What changes

  • src/dotnet/src/Ninlil.Web/Ninlil.Web.csproj:586-605: for win-* single-file publishes, embed
    the runtime pack's msquic.dll (the RuntimePackAsset the NinlilCopyMsQuicBesideExecutable
    target already finds) as a manifest resource of Ninlil.Web, so it travels inside the exe.
  • New Ninlil.Web/Startup/WindowsMsQuicPlacement.cs (internal, Windows only), called from
    Program.cs before anything touches a QUIC type (before WebApplication.CreateBuilder, next to
    NativeRuntimeSettingsRelaunch.Apply() at Program.cs:107; System.Net.Quic decides
    IsSupported once, on first use). Behaviour, as the owner answered (release-prep.md:81):
    1. No embedded resource (non-Windows, or a framework-dependent build): do nothing.
    2. msquic.dll beside the exe (AppContext.BaseDirectory) has the embedded file's SHA-256:
      use it.
    3. Missing or different hash: write the embedded bytes there (temp file plus rename, so a
      half-written dll is never loaded).
    4. The folder is not writable, or the overwrite fails: log one Warning naming the folder and
      telling the operator to place msquic.dll there, and make sure a mismatched file is never
      loaded (do not touch QUIC; the DoQ listener then reports not running, which the transports
      health check already turns into an unhealthy /status entry). Everything else keeps
      running.
      The logger does not exist yet at that point: collect the outcome and log it once the host's
      logger is built.
  • Release asset (Q-REL-1): the bare ninlil-windows-amd64.exe only. Remove the zip from
    .forgejo/scripts/publish-binary.sh, .forgejo/scripts/release.sh and
    .forgejo/workflows/pipeline.yml:279-291; .forgejo/scripts/windows-smoke.ps1 tests the bare
    exe in an empty folder; README.md Windows install describes the one file; CHANGELOG.md
    Unreleased says the zip is gone (the platform table at line 58 belongs to the released
    section and stays).
  • The Windows MSI (#220) installs msquic.dll next to the exe itself; with a matching hash,
    step 2 above uses it and nothing is written into %ProgramFiles%.

Acceptance

  • Unit tests (Ninlil.Web.Tests) drive the placement logic against a temp folder with an
    injected "embedded" byte array: missing file is written; a file with a wrong hash is
    replaced; a read-only folder yields the warning text naming the folder and a "do not load"
    result; a matching file is left untouched (assert timestamps). Each test fails before the
    code exists.
  • On Lofnheim: the bare exe in an empty folder answers a DoQ query on first start
    (windows-smoke.ps1 under powershell.exe 5.1 and pwsh 7); with the folder made read-only
    for the process, /status reports DoQ unhealthy, the log has the one warning, DNS over
    UDP/TCP/DoT and the console still answer.
  • Release script tests (bash .forgejo/scripts/tests/release.test.sh) assert no zip asset;
    lint in the container passes; build 0 warnings; csharpier.
  • README Windows guide describes the one asset; CHANGELOG Unreleased entry.
  • No schema, API or option change.

Source

release-prep.md:79-81 ("Post-release (owner, 2026-10-31)" and the owner's answers);
release-prep.md:64 (W2 finding); release-prep.md:85 (RP-3y zip).
Owner decision 2026-10-31 (Q-REL-1): "bare exe only".

- **Draft:** REL-1 - **Priority:** medium (DoQ on Windows works today only from the zip; a lone exe silently has no DoQ) - **Agent:** coder - **Depends on:** none - **Decisions:** Q-REL-1 ### Why A single-file win-x64 publish leaves `msquic.dll` out of the executable, and System.Net.Quic loads it only from the executable's folder. The release ships a zip (exe plus dll) as a workaround. The owner decided on 2026-10-31 that the exe copies its embedded `msquic.dll` beside itself on start. Bundling the dll into the single-file bundle alone does not work: the RP-3x coder showed it is extracted but System.Net.Quic never looks in the extraction folder (`release-prep.md:64`). ### What changes - `src/dotnet/src/Ninlil.Web/Ninlil.Web.csproj:586-605`: for `win-*` single-file publishes, embed the runtime pack's `msquic.dll` (the `RuntimePackAsset` the `NinlilCopyMsQuicBesideExecutable` target already finds) as a manifest resource of `Ninlil.Web`, so it travels inside the exe. - New `Ninlil.Web/Startup/WindowsMsQuicPlacement.cs` (internal, Windows only), called from `Program.cs` before anything touches a QUIC type (before `WebApplication.CreateBuilder`, next to `NativeRuntimeSettingsRelaunch.Apply()` at `Program.cs:107`; System.Net.Quic decides `IsSupported` once, on first use). Behaviour, as the owner answered (`release-prep.md:81`): 1. No embedded resource (non-Windows, or a framework-dependent build): do nothing. 2. `msquic.dll` beside the exe (`AppContext.BaseDirectory`) has the embedded file's SHA-256: use it. 3. Missing or different hash: write the embedded bytes there (temp file plus rename, so a half-written dll is never loaded). 4. The folder is not writable, or the overwrite fails: log one Warning naming the folder and telling the operator to place `msquic.dll` there, and make sure a mismatched file is never loaded (do not touch QUIC; the DoQ listener then reports not running, which the transports health check already turns into an unhealthy `/status` entry). Everything else keeps running. The logger does not exist yet at that point: collect the outcome and log it once the host's logger is built. - Release asset (Q-REL-1): the bare `ninlil-windows-amd64.exe` only. Remove the zip from `.forgejo/scripts/publish-binary.sh`, `.forgejo/scripts/release.sh` and `.forgejo/workflows/pipeline.yml:279-291`; `.forgejo/scripts/windows-smoke.ps1` tests the bare exe in an empty folder; `README.md` Windows install describes the one file; `CHANGELOG.md` `Unreleased` says the zip is gone (the platform table at line 58 belongs to the released section and stays). - The Windows MSI (#220) installs `msquic.dll` next to the exe itself; with a matching hash, step 2 above uses it and nothing is written into `%ProgramFiles%`. ### Acceptance - [ ] Unit tests (Ninlil.Web.Tests) drive the placement logic against a temp folder with an injected "embedded" byte array: missing file is written; a file with a wrong hash is replaced; a read-only folder yields the warning text naming the folder and a "do not load" result; a matching file is left untouched (assert timestamps). Each test fails before the code exists. - [ ] On Lofnheim: the bare exe in an empty folder answers a DoQ query on first start (`windows-smoke.ps1` under powershell.exe 5.1 and pwsh 7); with the folder made read-only for the process, `/status` reports DoQ unhealthy, the log has the one warning, DNS over UDP/TCP/DoT and the console still answer. - [ ] Release script tests (`bash .forgejo/scripts/tests/release.test.sh`) assert no zip asset; lint in the container passes; build 0 warnings; csharpier. - [ ] README Windows guide describes the one asset; CHANGELOG `Unreleased` entry. - [ ] No schema, API or option change. ### Source `release-prep.md:79-81` ("Post-release (owner, 2026-10-31)" and the owner's answers); `release-prep.md:64` (W2 finding); `release-prep.md:85` (RP-3y zip). Owner decision 2026-10-31 (Q-REL-1): "bare exe only".
claude removed this from the Release: ValKey milestone 2026-11-12 16:55:21 -05:00
Sign in to join this conversation.
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
lantea-one/ninlil#19
No description provided.