Skip to content

docs(adr): ADR-0044 — toml replaces the unmaintained basic-toml as the config parser (Proposed) - #213

Merged
gonzafg2 merged 3 commits into
mainfrom
docs/adr-0044-toml-config-parser
Oct 28, 2026
Merged

gonzafg2 merged 3 commits into
mainfrom
docs/adr-0044-toml-config-parser

Conversation

@gonzafg2

Copy link
Copy Markdown
Owner

Summary

ADR-0044 replaces basic-toml with toml as the config-file parser. It supersedes only the "Parser crate" bullet of ADR-0029; the rest of ADR-0029 stands.

  • Why: RUSTSEC-2026-0374 (2026-09-26) marks basic-toml unmaintained. The repository is archived, there is no patched version, and the advisory names toml as the alternative. cargo deny fails on main because of it, and fix(deps): clear cargo deny on main — ctutils 0.4.6, tokio 1.51.6, ignore RUSTSEC-2026-0374 #212 is the stopgap ignore until this lands.
  • The crate: toml 1.1.8 with default-features = false and only std, serde and parse.
    • unbounded is not enabled, so the parser's recursion limit stays in force.
    • display, preserve_order and debug are left out.
  • Lockfile: five crates come in (toml, toml_parser, toml_datetime, serde_spanned, winnow) and basic-toml leaves, so the net change is four.
    • Licences are MIT OR Apache-2.0, and MIT for winnow.
    • MSRV is ≤ 1.85.
    • RustSec has no advisories for any of the five. All of this was checked on 2026-10-28.
  • schema_error stays one line: {origin}: {message} at line {L} column {C}, built from Error::message() and Error::span(). The crate's multi-line Display excerpt is not used, so no config text reaches stderr or the log.
  • Grammar: TOML 1.1.0 is a superset of 1.0, so a schema-v1 file that is valid TOML 1.0 stays valid.
  • Alternatives rejected: a permanent ignore, toml-span (no serde derive, so hand-written key checks), toml_edit (formatting preservation the binary does not need), and a first-party parser for a TOML subset.

The ADR stays Proposed. The implementing PR swaps the dependency, removes the #212 ignore, flips this ADR to Accepted, and points ADR-0029's Status field at it.

Refs #109, #212

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that changes existing behaviour)
  • Documentation only
  • Refactor / chore / CI / build

Checklist

  • My commits are signed off under the
    Developer Certificate of Origin
    (git commit -s).
  • My commit messages follow Conventional Commits.
  • I have run cargo fmt --all and cargo clippy --workspace --all-targets -- -D warnings locally. (Docs only.)
  • I have added or updated tests where appropriate. (Docs only.)
  • I have updated documentation (rustdoc, docs/, or README.md) where appropriate.
  • I have added a CHANGELOG.md entry under ## [Unreleased] if this change is user-visible. (The implementing PR adds it.)
  • If this change introduces a new dependency, I have justified it in the PR description and verified it passes cargo deny check. (Justified here. cargo deny check runs in the implementing PR.)

Security considerations

The parser reads the operator's own config file, after the StrictModes checks. It never reads peer input and is off the pre-authentication path (threat model §4.1). The trust base grows by four crates, all checked by hand above. The recursion limit and the fail-closed deny_unknown_fields rule are kept.

https://claude.ai/code/session_01QpBZ4qUr3ypV22CvmVwwHp

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-28T21:09:08.889959Z c5b15e3 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@opencode-agent

Copy link
Copy Markdown

APIError: Insufficient Balance (request_id: eb534bfa-be61-4a5a-b3e5-75a6cb79dbde)

github run

@claude

claude Bot commented Oct 28, 2026

Copy link
Copy Markdown
Contributor

PR Review: docs(adr): ADR-0044 — toml replaces the unmaintained basic-toml as the config parser (#213)

Decision: 🟢 Approved
Iteration: First review (Codex reviewed commit dbb2518 and found no findings; opencode ran out of balance)
Lenses applied: design decision (docs/adr/0044)

Executive summary

ADR-0044 is a well-reasoned dependency supersession triggered by RUSTSEC-2026-0374. The decision correctly scopes the supersession to only the "Parser crate" bullet of ADR-0029, the dependency justification is thorough (licences, MSRV, RustSec all checked by hand), and explicitly excluding the unbounded feature preserves the recursion bound by construction. All five MANIFIESTO commitments are satisfied, and no hard rule from CLAUDE.md is broken.

One wording imprecision in Decision §3 is worth correcting before the ADR is flipped to Accepted, since accepted ADRs are immutable except Status and errata (ADR-0015).

New findings

💡 Suggestions (nice to have)

  • docs/adr/0044…#L65-L71: Decision §3 concludes "so no config text reaches stderr or the log" from the fact that the crate's Display excerpt is not used. This is imprecise — Error::message() carries serde's error text, which quotes the offending key or value (unknown variant \xml`, expected `json` or `human`; invalid type: string "30s", expected u64`). The config holds no key material so threat model §4.3 is unaffected, but the absolute phrasing could mislead a future auditor or steer the implementing test toward asserting a property the code does not have. Consider rewording to: "no multi-line file excerpt reaches stderr or the log; the message may quote the offending key or value, as serde does."

@gonzafg2

Copy link
Copy Markdown
Owner Author

Applied in 0184781: §3 now says only the multi-line file excerpt stays out of stderr and the log. The message may still quote the offending key or value, as serde's (and basic-toml's) messages do, and the config holds no key material (threat model §4.3).

@gonzafg2

Copy link
Copy Markdown
Owner Author

@codex review

@opencode-agent

Copy link
Copy Markdown

APIError: Insufficient Balance (request_id: a4116c59-a3c8-450f-b023-c4c74cce31f5)

github run

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 🎉

Reviewed commit: 0184781f97

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

gonzafg2 added a commit that referenced this pull request Oct 28, 2026
The ignore's comment and reason presented the toml migration as decided.
ADR-0044 is still Proposed in #213, so both now say TBD and point at it.

Claude-Session: https://claude.ai/code/session_01QpBZ4qUr3ypV22CvmVwwHp
Signed-off-by: Gonzalo Fleming <[email protected]>
@gonzafg2

Copy link
Copy Markdown
Owner Author

@codex review

@opencode-agent

Copy link
Copy Markdown

APIError: Insufficient Balance (request_id: 30f96440-99dc-4062-8ddd-d1e92ec9fa50)

github run

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Bravo.

Reviewed commit: c5b15e30cf

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@claude

claude Bot commented Oct 28, 2026

Copy link
Copy Markdown
Contributor

PR Review: docs(adr): ADR-0044 — toml replaces the unmaintained basic-toml as the config parser (#213)

Decision: 🟢 Approved
Iteration: Review #2 (1 resolved, 0 open)
Lenses applied: design decision (docs/adr/0044)

Executive summary

ADR-0044 records the supersession of basic-toml with toml 1.1.8 in response to RUSTSEC-2026-0374. The revision correctly addresses the §3 wording imprecision from the first review, and the document is internally consistent, well-anchored to the existing ADR/RFC chain, and satisfies all five MANIFIESTO commitments. No new findings meet the ≥ 80 confidence threshold.

Previous issues

# Issue Status Notes
1 Decision §3: "no config text reaches stderr or the log" was too absolute — Error::message() may quote the offending key or value ✅ resolved Applied in commit 0184781: §3 now distinguishes the multi-line file excerpt (not used) from the serde-style key/value quote that the message may still carry.

gonzafg2 added a commit that referenced this pull request Oct 28, 2026
…nore RUSTSEC-2026-0374 (#212)

* chore(deny): ignore RUSTSEC-2026-0374 until basic-toml is replaced

RustSec marked basic-toml, the ADR-0029 config parser, unmaintained on
2026-09-26 (informational, no patched version). cargo deny has failed on
main since, which blocks every merge. basic-toml parses only the
operator's config file after the StrictModes checks, never peer input.
The migration to toml, under an ADR superseding ADR-0029's parser
choice, removes the entry.

Claude-Session: https://claude.ai/code/session_01QpBZ4qUr3ypV22CvmVwwHp
Signed-off-by: Gonzalo Fleming <[email protected]>

* fix(deps): ctutils 0.4.6 for RUSTSEC-2026-0385

ctutils before 0.4.4 generates masks and compares u128 values in
non-constant time (crypto-failure). aes-gcm, hybrid-array,
module-lattice and universal-hash reach it. Lockfile only; 0.4.6 is the
newest Rust 1.92-compatible release.

Claude-Session: https://claude.ai/code/session_01QpBZ4qUr3ypV22CvmVwwHp
Signed-off-by: Gonzalo Fleming <[email protected]>

* fix(deps): tokio 1.51.6 for RUSTSEC-2026-0386

tokio 1.51.6 deprecates the safe AsyncFd constructors, which are unsound
for a descriptor closed or replaced under a live AsyncFd, in favour of
unsafe register constructors that ADR-0018 forbids. The three uses keep
the deprecated constructor under #[allow(deprecated)]: each AsyncFd owns
its OwnedFd (the pidfd, the PTY master), which is never duplicated or
closed underneath it. The ponytail comments name the upgrade path.

Claude-Session: https://claude.ai/code/session_01QpBZ4qUr3ypV22CvmVwwHp
Signed-off-by: Gonzalo Fleming <[email protected]>

* docs(changelog): ctutils and tokio security updates

Claude-Session: https://claude.ai/code/session_01QpBZ4qUr3ypV22CvmVwwHp
Signed-off-by: Gonzalo Fleming <[email protected]>

* chore(deny): mark the basic-toml replacement as TBD (ADR-0044, Proposed)

The ignore's comment and reason presented the toml migration as decided.
ADR-0044 is still Proposed in #213, so both now say TBD and point at it.

Claude-Session: https://claude.ai/code/session_01QpBZ4qUr3ypV22CvmVwwHp
Signed-off-by: Gonzalo Fleming <[email protected]>

---------

Signed-off-by: Gonzalo Fleming <[email protected]>
…e config parser (Proposed)

RUSTSEC-2026-0374 marks basic-toml unmaintained, and cargo deny fails on
main because of it (#212 is the stopgap ignore). ADR-0044 supersedes
ADR-0029's parser-crate bullet: toml 1.1.8 with std, serde and parse
only, so the recursion limit stays in force, five crates in and one out,
and a single-line schema_error built from message() and span(), with no
file excerpt.

Claude-Session: https://claude.ai/code/session_01QpBZ4qUr3ypV22CvmVwwHp
Signed-off-by: Gonzalo Fleming <[email protected]>
Only the multi-line file excerpt is kept out of the log. serde's message
text still names the key or value at fault, as basic-toml's did, and the
config holds no key material.

Claude-Session: https://claude.ai/code/session_01QpBZ4qUr3ypV22CvmVwwHp
Signed-off-by: Gonzalo Fleming <[email protected]>
…t claimed

The third requirement was not ADR-0029's, and only its recursion half
holds: config::load reads the whole file with read_to_string, which
RFC-0010 allows for the operator's own file. The Context now says so.

Claude-Session: https://claude.ai/code/session_01QpBZ4qUr3ypV22CvmVwwHp
Signed-off-by: Gonzalo Fleming <[email protected]>
@gonzafg2
gonzafg2 force-pushed the docs/adr-0044-toml-config-parser branch from c5b15e3 to 5ec6d7b Compare October 28, 2026 23:10
@opencode-agent

Copy link
Copy Markdown

APIError: Insufficient Balance (request_id: 2f66f554-9cfc-468e-a616-557693a4a1ac)

github run

@gonzafg2
gonzafg2 merged commit 94ccc28 into main Oct 28, 2026
10 of 11 checks passed
@claude

claude Bot commented Oct 28, 2026

Copy link
Copy Markdown
Contributor

Code review

No issues found. Checked for bugs and CLAUDE.md compliance.

@gonzafg2
gonzafg2 deleted the docs/adr-0044-toml-config-parser branch December 1, 2026 20:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant