fix(config): forward-compatible runner.toml parsing (+ roll 0.14.3)#64
Merged
Conversation
An unrecognized section or field in runner.toml was a hard parse error, so a config written by one runner version could brick task dispatch (including postinstall `run` hooks) under another — e.g. a 0.14.0-init'd file with [github]/[parallel] killed `run` under an older 0.11.0 binary. Parsing is now forward-compatible: unknown keys are ignored and surfaced as warnings instead of aborting. The config still loads, known values still apply, and dispatch proceeds. Genuine errors stay fatal: unreadable file, malformed TOML, or a wrong-typed *known* field. - swap serde(deny_unknown_fields) -> schemars(deny_unknown_fields) on every section: runtime tolerates unknowns, JSON Schema stays strict (additionalProperties:false) so editors keep flagging typos inline. Committed schema is byte-identical (verified via regen). - load() parses to a toml::Value first, walks it against KNOWN_SCHEMA for unknown-key warnings, then does the typed conversion. - new DetectionWarning::UnknownConfigKey, folded into ctx.warnings on both dispatch paths and reported by `config validate`. Rolls [Unreleased] into 0.14.3 (install-PM filter, install-dir collision warnings, npm metadata, this fix).
📝 WalkthroughWalkthroughThe PR bumps release metadata to 0.14.3. It also changes Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Suggested labels
Poem
🚥 Pre-merge checks | ✅ 8✅ Passed checks (8 passed)
Comment |
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
runner | 5f4be84 | Commit Preview URL Branch Preview URL |
Jun 26 2026, 08:12 PM |
The section-only guard missed a field added to a struct + INIT_TEMPLATE but forgotten in KNOWN_SCHEMA — exactly the drift that yields a spurious unknown-key warning at runtime. Parse the template into section -> fields and assert set-equality with KNOWN_SCHEMA, both directions.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
An unrecognized section/field in
runner.tomlwas a hard parse error (deny_unknown_fields). So a config written by onerunnerversion could brick task dispatch under another — concretely: a0.14.0-init'd file carrying[github]/[parallel]killedrun setupunder a stale0.11.0npm-pinned binary, swallowing the whole postinstall. Version skew shouldn't brick dispatch.Fix
Parsing is now forward-compatible: unknown keys are ignored (config still loads, known values still apply, dispatch proceeds) and surfaced as warnings so genuine typos stay visible.
serde(deny_unknown_fields)→schemars(deny_unknown_fields)on every section. Runtime tolerates unknowns; the JSON Schema stays strict (additionalProperties: false) so editors keep flagging typos inline. Committed schema is byte-identical (verified via regen).load()parses to atoml::Value, walks it againstKNOWN_SCHEMAfor unknown-key warnings, then does the typed conversion.DetectionWarning::UnknownConfigKey, folded intoctx.warningson both dispatch paths and reported byconfig validate.Verified
Config with
[future_feature]+[chain].bogus_knob:config validate→ warns on each, exit 0 ("valid")info/run→ warns, exit 0 (no abort); known[pm].nodestill appliedGates: 685 lib tests (flipped 6 reject→warn tests, added wrong-type-stays-fatal + KNOWN_SCHEMA drift guard), clippy
--all-featuresclean, dprint clean, schema regen zero-diff.Release
Rolls
[Unreleased]→0.14.3: bumpsCargo.toml/Cargo.lock, compare link, both AUR PKGBUILDs, doctor example JSON. 0.14.3 = install-PM filter + install-dir collision warnings + npm metadata + this fix. Tag/publish awaits explicit go-ahead post-merge.