Skip to content

fix(config): forward-compatible runner.toml parsing (+ roll 0.14.3)#64

Merged
kjanat merged 2 commits into
masterfrom
fix/config-forward-compat
Jun 26, 2026
Merged

fix(config): forward-compatible runner.toml parsing (+ roll 0.14.3)#64
kjanat merged 2 commits into
masterfrom
fix/config-forward-compat

Conversation

@kjanat

@kjanat kjanat commented Jun 26, 2026

Copy link
Copy Markdown
Owner

Problem

An unrecognized section/field in runner.toml was a hard parse error (deny_unknown_fields). So a config written by one runner version could brick task dispatch under another — concretely: a 0.14.0-init'd file carrying [github]/[parallel] killed run setup under a stale 0.11.0 npm-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.

  • Swap 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 a toml::Value, 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.
  • Genuine errors stay fatal: unreadable file, malformed TOML, wrong type on a known field.

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].node still applied

Gates: 685 lib tests (flipped 6 reject→warn tests, added wrong-type-stays-fatal + KNOWN_SCHEMA drift guard), clippy --all-features clean, dprint clean, schema regen zero-diff.

Release

Rolls [Unreleased]0.14.3: bumps Cargo.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.

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).
@coderabbitai

coderabbitai Bot commented Jun 26, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The PR bumps release metadata to 0.14.3. It also changes runner.toml parsing to accept unknown sections and fields, record them as UnknownConfigKey warnings, and pass those warnings through dispatch and validation output. Known-key type errors still fail, and JSON Schema strictness remains in place.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Suggested labels

enhancement, area: cli, documentation

Poem

Ahoy, the rogue keys no longer sink the ship,
they bob in warnings with a jaunty skip.
0.14.3 gleams on the mast so bright,
while strict true errors still bite just right.
A tidy tide, me hearties.

🚥 Pre-merge checks | ✅ 8
✅ Passed checks (8 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly matches the config parsing fix and release roll, and it includes the required fix prefix.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 30.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Changelog Update ✅ Passed CHANGELOG.md has the new ## [0.14.3] - 2026-06-26 section with a Fixed entry and updated compare links, matching the version bump.
Semver Version Bump Validation ✅ Passed Cargo.toml bumps 0.14.2→0.14.3, which fits this patch-level bug fix; the changed Rust code keeps APIs crate-private and avoids breaking config changes.
Agents.Md Documentation Updated ✅ Passed No AGENTS.md exists in the repo, so there was nothing to update despite the CLI/automation changes.
Description check ✅ Passed The description matches the config parsing fix and release bump in the changeset.

Comment @coderabbitai help to get the list of available commands.

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

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

@kjanat kjanat self-assigned this Jun 26, 2026
@kjanat kjanat added the cr:review Allow CodeRabbit review label Jun 26, 2026
@coderabbitai coderabbitai Bot added area: cli Argument parsing, commands, and CLI UX enhancement New feature or request labels Jun 26, 2026
coderabbitai[bot]

This comment was marked as resolved.

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.
@coderabbitai coderabbitai Bot added the documentation Improvements or additions to documentation label Jun 26, 2026
@kjanat kjanat merged commit ba27216 into master Jun 26, 2026
18 checks passed
@kjanat kjanat deleted the fix/config-forward-compat branch June 26, 2026 20:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: cli Argument parsing, commands, and CLI UX cr:review Allow CodeRabbit review documentation Improvements or additions to documentation enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant