The first setting saved to a custom runtime configuration file in a folder that did not exist at start now applies live #322

Merged
claude merged 2 commits from feature/321-custom-settings-missing-folder into develop 2026-11-05 16:43:28 -05:00
Owner

When a custom runtime configuration file's folder does not exist at start, ResolveFileProvider() roots the file watcher at the nearest existing ancestor. That watcher can miss the creation of the folder and of the first file, so the first settings save did not apply live. RuntimeConfigurationFileSource.AddIfMissing now creates the folder before it builds the source. If the folder cannot be created (read-only location, ProtectSystem=strict), startup continues: the file is optional, and the first save reports its own error.

  • The new tests are a deterministic unit test, which fails without the fix in 5 of 5 runs, and a host test that starts a second host with a missing folder and PATCHes once. The race is timing-dependent, so the host test fails without the fix in only 1 of 5 runs.
  • A CHANGELOG line extends the #314 entry: Ninlil creates the missing folder, so a mistyped path leaves an empty folder.

Verified: build has 0 warnings, csharpier is clean, and Ninlil.Web.Tests passes (2128 tests, without the Docker-only ones). The verifier reported no blocking findings.

Closes #321

🤖 Generated with Claude Code

https://claude.ai/code/session_01T33E3pmQvqkTriyQUMNUTK

When a custom runtime configuration file's folder does not exist at start, `ResolveFileProvider()` roots the file watcher at the nearest existing ancestor. That watcher can miss the creation of the folder and of the first file, so the first settings save did not apply live. `RuntimeConfigurationFileSource.AddIfMissing` now creates the folder before it builds the source. If the folder cannot be created (read-only location, `ProtectSystem=strict`), startup continues: the file is optional, and the first save reports its own error. - The new tests are a deterministic unit test, which fails without the fix in 5 of 5 runs, and a host test that starts a second host with a missing folder and PATCHes once. The race is timing-dependent, so the host test fails without the fix in only 1 of 5 runs. - A CHANGELOG line extends the #314 entry: Ninlil creates the missing folder, so a mistyped path leaves an empty folder. Verified: build has 0 warnings, csharpier is clean, and `Ninlil.Web.Tests` passes (2128 tests, without the Docker-only ones). The verifier reported no blocking findings. Closes #321 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01T33E3pmQvqkTriyQUMNUTK
Closes #321

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01T33E3pmQvqkTriyQUMNUTK
The changelog says Ninlil creates a missing folder for a custom runtime configuration file
Some checks failed
Build / Build Binary (macos-arm64) (pull_request) Successful in -52s
Build / Build Binary (windows-amd64) (pull_request) Successful in -55s
Build / Pack and Push NuGet Packages (dns-server) (pull_request) Successful in 3m0s
Build / Pack and Push NuGet Packages (dns-core) (pull_request) Successful in 3m35s
Build / Test .NET (push) Failing after 11m26s
Build / Pack and Push NuGet Packages (common) (push) Has been skipped
Build / Pack and Push NuGet Packages (dhcp) (push) Has been skipped
Build / Stage Draft Release (push) Has been skipped
Build / Pack and Push NuGet Packages (dns-core) (push) Has been skipped
Build / Pack and Push NuGet Packages (dns-server) (push) Has been skipped
Build / Build Binary (linux-amd64) (push) Has been skipped
Build / Build Binary (macos-amd64) (push) Has been skipped
Build / Build Binary (macos-arm64) (push) Has been skipped
Build / Build Binary (linux-arm64) (push) Has been skipped
Build / Build Binary (windows-amd64) (push) Has been skipped
Build / Build Arch Linux Packages (push) Has been skipped
Build / Smoke Test the Windows Binary (push) Has been skipped
Build / Build and Push Image (push) Has been skipped
Build / Build and Test Deb and RPM Packages (push) Has been skipped
Build / Pipeline (push) Failing after 0s
Build / Publish Release (push) Has been skipped
Build / Build Binary (linux-amd64) (pull_request) Successful in 5m16s
Build / Build Binary (macos-amd64) (pull_request) Successful in 5m18s
Build / Build Binary (linux-arm64) (pull_request) Successful in 5m19s
Build / Build and Push Image (pull_request) Successful in 10s
Build / Smoke Test the Windows Binary (pull_request) Successful in 16s
Build / Build Arch Linux Packages (pull_request) Successful in 26s
Build / Build and Test Deb and RPM Packages (pull_request) Successful in 2m16s
Build / Publish Release (pull_request) Successful in -2m39s
Build / Pipeline (pull_request) Successful in 0s
610f8cfb89
Refs #321

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01T33E3pmQvqkTriyQUMNUTK
claude merged commit 1ed2ea5d85 into develop 2026-11-05 16:43:28 -05:00
Sign in to join this conversation.
No reviewers
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.

Dependencies

No dependencies set

Reference
lantea-one/ninlil!322
No description provided.