Repository navigation
fix(config): refuse to start when a rejected settings document discarded a store selection (#1305) - #1383
Conversation
🦋 Changeset detectedLatest commit: c0e1252 The changes in this PR will be included in the next version bump. This PR includes changesets to release 0 packagesWhen changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the
|
Confidence Score: 5/5
[Medium impact] The PR appears safe to merge; no actionable issues were found.
|
Issue: #1305 (closed by hand with the merge sha after merge —
Closesis inert againstrewrite/main).The defect
One rejected field anywhere in
settings.yamlmadenostream_config::loadreturn the shipped defaults withused_defaults: true, andsettings_gatelogged the issues and continued. Since the shippedeventStore.backendispostgres, an LMDB deployment silently dialled Postgres and served and accepted writes into the old store while the data directory it was pointed at sat unused — a data-loss-class failure that fires exactly when an operator is editing config.Measured at
7019957a: a valideventStore.backend: lmdbdocument pluslimits.rateLimiter.strategy: randomprintedcontinuing on the shipped defaults, resolvedbackend=Postgres, and died on the Postgres dial with an empty LMDB directory.The fix
LoadOutcomenow carriesdiscarded_store_selection— the user document's owneventStore.backendvalue (or the subtree, for a typo insideeventStore) — recorded on the shape-walk and fit arms andNonewhen the document named no store.apply_settings_gaterefuses to start (exit 2,InvalidSettings) when the discarded selection is not the backend the defaults would serve, printingA document that names no store, an explicit
postgres, and an unparseable file keep today's continue-on-defaults behaviour (ADR 0022 D5 records the unparseable limit).--checkoutput is byte-identical, refusal is checked after it, and the refusal happens before telemetry, bind and store open.ADR
0022-store-selection-refusal.mdrecords the rule and the safe-field partition and amends 0009 and 0008;deploying.mdcarries the amended exit-2 claim.Evidence
All 14 criteria in the job record with commands and output, including the process test (exit 2, exact stderr, empty stdout, no
event store backend resolved) proven to fail at base (exit 1, backend=Postgres), four inversions (refusal disabled, blanket refusal, refusal on the check path, merged-document selection), and the S1–S8 behaviour diff measured against a base binary.