Repository navigation
versioning: split migration notices into per-change files - #257
Conversation
viberaven
left a comment
There was a problem hiding this comment.
Reviewed ba68a93. No actionable findings.
Compared all 37 notices against the base revision across 28 synthetic configuration/option fixtures, including individual services, removed options, operator access, and explicit listener/whitelist settings. Notice identities and conditions match; rendered message differences are limited to the intended upgrade-guide reference cleanup. Numeric version ordering, the deployment-example version selection, and the referenced upgrade-guide sections are consistent.
Validation:
nix build .#checks.x86_64-linux.module-config --no-link --print-build-logspassed (104 configuration tests)../test/shellcheck.shpassed.git diff --checkpassed.
VM integration tests were not run locally. GitHub CI is green, including ci_gate; the VM scenario job was skipped.
Review assisted by OpenAI Codex (GPT-6-astra).
seberm
left a comment
There was a problem hiding this comment.
@prusnak Thanks for the changes!
Pure refactor, no exposure change. The collector keeps the old semantics; lastChange as the highest directory version is more robust than the last list element.
Verified by rendering all notices at configVersion = "0.0.1" on master and on this branch for two configs (most services with netns; secure-node preset with lndconnect/lnconnect on localhost): 27 and 10 notices, identical apart from the central upgrading.md line. That covers 30 of 37; the 7 isDefined notices for removed options I compared by reading, including the duplicated clightningRestUsed. No message refers to a sibling notice by position, so the alphabetical order within a version is fine.
Nothing else needs testing: the change is eval-only, and CI covers the rest (module-config versioning cases, flake check, shellcheck, and the deployment-examples job, which exercises the new find line).
Should:
- AGENTS.md, "Upgrade notes" bullet: "every
changesentry" refers to the removed list. modules/presets/secure-node.nix: the "Used by ../versioning.nix" comment is stale.
Assisted-by: Claude Code (Fable 5.1)
Concurrent PRs that introduce breaking changes all append notices to the same list in modules/versioning.nix. As the list grows, these edits create avoidable merge conflicts and make individual notices harder to maintain. Move the 37 existing notices into modules/versioning/<version>/<identifier>.nix so independent changes can be added in separate files. Collect them automatically, deriving the version from the directory name and sorting by version, then filename. Preserve the conditions that select notices. Append the upgrade-guide reference centrally for versions >= 0.1.0, with a blank line separating it from the message. Remove repeated references and add the missing 0.1.0 upgrade section. Update contributor instructions and deployment-example CI to use the new directory layout. Validation: 104 configuration checks and ShellCheck passed. Compared all 37 rendered notices with the original list; conditions matched across four configurations, with message and ordering differences reviewed. Assisted-by: OpenAI Codex (GPT-6)
ba68a93 to
99f8364
Compare
Target release: **0.2.0**. Merge after the **v0.1.6 release**.
Replace `services.bitcoind.regtest` with a writable
`services.bitcoind.network` enum: `"mainnet"` (default) or `"regtest"`.
Service modules and VM scenarios use this selection while preserving
existing ports, daemon network names and data paths. The old boolean
forwards to the new option during migration, so existing regtest
configurations receive the Mempool notice and correct historical cookie
and electrs paths. Continued use after updating the config version emits
a deprecation warning.
Replace the positional `services.bitcoind.makeNetworkName` helper with
`nix-bitcoin.lib.networkName`. In modules that take `config`, bind
`nbLib = config.nix-bitcoin.lib;`. Callers specify only names to
override; other names pass through unchanged:
```nix
nbLib.networkName { mainnet = "bitcoin"; }
```
Mempool 3.3.2 supports regtest, but the module previously configured it
as mainnet even when connected to a regtest node. Its backend now
follows `services.bitcoind.network`. On regtest, frontend defaults
select the same network using `MAINNET_ENABLED`, `REGTEST_ENABLED` and
`ROOT_NETWORK`, keeping the site and API at their existing URLs. Mainnet
uses the unchanged packaged frontend, avoiding an unnecessary Angular
rebuild. Explicit frontend settings remain overridable. Existing regtest
deployments receive a 0.2.0 migration notice covering automatic cache
clearing and custom frontend settings.
Include release and upgrade notes, the example config-version update,
configuration tests for network selection, helper overrides and
migrations, and VM checks for the served Mempool frontend configuration
and regtest genesis block through its API.
Charge-LND now receives explicit certificate and macaroon paths instead
of staging symlinks under a synthetic mainnet directory. Remove its
unused state directory and setup script. Default deployments need no
changes; configurations selecting credentials through `--lnddir` in
`extraFlags` receive a targeted 0.2.0 migration notice only if either
`--tlscert` or `--macaroon` is missing.
Migration notices use the per-change files introduced in #257, including
updated network paths in historical notices. Release and upgrade entries
follow #259's heading convention; #260's services guide changes are
preserved.
Validation after rebasing onto `master` (`72e6be0`):
- `nix flake check --all-systems`, the docs build, and shellcheck
passed.
- Full `default` (mainnet) VM suite passed with the updated dependency
pins, RTL certificate-pinning checks, and Tor-enforcement tests.
- The first `netnsRegtest` run failed after LND 0.21.8 panicked during a
stop in the configuration-replacement test (`unable to subscribe to
chans: subscription server shutting down`). LND recovered, but the later
clean-exit test detected the failure recorded in the journal. A full
rerun passed without code changes.
- The final master updates only pin the deployment examples to v0.1.6
and update AGENTS.md release-version guidance; they leave the tested
modules and VM scenarios unchanged.
- Direct evaluation of a legacy regtest configuration confirmed the new
0.1.6 RTL/Tor notices appear alongside all three 0.2.0 migration notices
in version order.
- The versioning collector, 0.1.6 notices and documentation, dependency
pins, and upstream RTL/security changes are preserved.
Concurrent PRs that introduce breaking changes all append notices to the same list in modules/versioning.nix. As the list grows, these edits create avoidable merge conflicts and make individual notices harder to maintain.
Move the 37 existing notices into modules/versioning//.nix so independent changes can be added in separate files. Collect them automatically, deriving the version from the directory name and sorting by version, then filename. Preserve the conditions that select notices.
Append the upgrade-guide reference centrally for versions >= 0.1.0, with a blank line separating it from the message. Remove repeated references and add the missing 0.1.0 upgrade section. Update contributor instructions and deployment-example CI to use the new directory layout.
Validation: 104 configuration checks and ShellCheck passed. Compared all 37 rendered notices with the original list; conditions matched across four configurations, with message and ordering differences reviewed.
Assisted-by: OpenAI Codex (GPT-6)