Skip to content

docs(message): document Input/InputMapping public API with a doctest - #2848

Merged
trunk-io[bot] merged 1 commit into
mainfrom
claude/dreamy-bardeen-90d0pc-config-input-docs
Jul 28, 2026
Merged

docs(message): document Input/InputMapping public API with a doctest#2848
trunk-io[bot] merged 1 commit into
mainfrom
claude/dreamy-bardeen-90d0pc-config-input-docs

Conversation

@phil-opp

Copy link
Copy Markdown
Collaborator

Issue

dora-message's most user-facing config types carried no doc comments, unlike the well-documented NodeRunConfig right above them:

  • Input struct fields (mapping, queue_size, input_timeout, queue_policy)
  • InputMapping variants (Timer, User)
  • UserInputMapping fields (source, output)

These map directly onto the inputs: YAML surface users author.

Fix

Add doc comments to those items, plus a compile-checked doctest on InputMapping demonstrating the FromStrDisplay round-trip (camera/image, dora/timer/millis/100, and the missing-separator error case), so the documented wire format stays in sync with the code.

Docs-only; no behavior change.

Validation

  • cargo test -p dora-message --doc runs the new doctest and passes.
  • cargo clippy ... -D warnings and cargo fmt --all --check pass.

⚠️ This PR is machine-generated by Claude (Claude Code), an AI assistant. Please review carefully before merging.

🤖 Generated with Claude Code

https://claude.ai/code/session_01D2eu6P1CvTvoKdK9fK3ZSd


Generated by Claude Code

`dora-message`'s most user-facing config types — the `Input` struct fields
(`mapping`, `queue_size`, `input_timeout`, `queue_policy`), the
`InputMapping` variants, and `UserInputMapping`'s fields — carried no doc
comments, unlike the well-documented `NodeRunConfig` right above them. These
map directly onto the `inputs:` YAML surface users author.

Add doc comments to those items and a compile-checked doctest on
`InputMapping` demonstrating the `FromStr` <-> `Display` round-trip
(`camera/image`, `dora/timer/millis/100`, and the missing-separator error
case), so the documented wire format stays in sync with the code.

Docs-only; no behavior change.

Validation: `cargo test -p dora-message --doc` (runs the new doctest),
`cargo clippy`, and `cargo fmt --check` pass.

This change was generated by Claude (Claude Code), an AI assistant. It is
machine-generated and should be reviewed carefully before merging.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01D2eu6P1CvTvoKdK9fK3ZSd
@trunk-io

trunk-io Bot commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

😎 Merged successfully - details.

Copy link
Copy Markdown
Collaborator Author

🤖 Fully automated review by Claude — this review was generated end-to-end by an automated agent with no human vetting. Treat it accordingly.

No issues found. Docs-only, no behavior change. The doctest is a real round-trip check rather than a trivial assertion: dora/timer/millis/100 matches the Display impl (which renders millis for a value that is a multiple of 1ms but not 1s), camera/image exercises the User variant, and the no-separator case correctly asserts a parse error.


Generated by Claude Code

@phil-opp
phil-opp marked this pull request as ready for review July 28, 2026 11:09
@trunk-io
trunk-io Bot merged commit 4da20e0 into main Jul 28, 2026
27 checks passed
@trunk-io
trunk-io Bot deleted the claude/dreamy-bardeen-90d0pc-config-input-docs branch July 28, 2026 13:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants