Skip to content

test(spec): verify portable parser settings - #1053

Merged
jdx merged 1 commit into
agent/fleet-adoption-findingsfrom
agent/spec-unknown-flags
Aug 19, 2026
Merged

test(spec): verify portable parser settings#1053
jdx merged 1 commit into
agent/fleet-adoption-findingsfrom
agent/spec-unknown-flags

Conversation

@jdx

@jdx jdx commented Aug 19, 2026

Copy link
Copy Markdown
Owner

Stack created with GitHub Stacks CLIGive Feedback 💬


Note

Low Risk
Test-only changes and a dev-dependency; no production parsing or spec behavior is modified.

Overview
Adds an integration test on the usage-rs facade that derive-emitted KDL keeps parser settings such as unknown_flags = "error" as portable spec metadata, not just runtime behavior.

The test defines a strict CLI (StrictEx), asserts unknown flags fail at parse time, checks the generated KDL includes unknown_flags "error", and round-trips that KDL through usage-lib to confirm Spec.unknown_flags is Error. usage-lib is wired in as a dev-dependency only for this assertion.

Reviewed by Cursor Bugbot for commit 40b369d. Bugbot is set up for automated code reviews on this repo. Configure here.

@coderabbitai

coderabbitai Bot commented Aug 19, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Central YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro Plus

Run ID: ff98e51d-7b14-4ac6-954b-6ace950377b6

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@github-actions

github-actions Bot commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

Instruction counts

benchmark trend instructions Δ wall (min) Δ
markdown ▂▂▃▂▂▃▃▃▁█▇██ 198,800,919 → 198,849,216 +0.02% 18.77 → 18.68ms -0.50%
startup ▁▁▁▁▁▁▁▁▁████ 1,214,930 → 1,214,934 +0.00% 1.25 → 1.29ms +3.57%

No instruction-count regression above 1%.

Only instruction counts gate. Wall clock is shown for context — on identical hardware it moves 4-20% run to run.

Measured by tak — instruction-counted CLI benchmarks, stored in this repository's git notes.

Shadow comparison

Parsing mise use -g node@20 against a shadow of mise's committed spec.
Reported, not gated: the shadow grows as the derive learns to express more, so
what to watch is the ratio rather than either column.

framework instructions, cold parse vs usage
usage 4253
argh 6292 1.5x
clap 5893640 1385x
bpaf 21917948 5153x
                                              min       p01       p10    median
usage-rs: argv -> struct                      191       194       198       207  ns
argh: argv -> struct                          272       276       281       289  ns
clap: build tree + parse -> struct         484240    485132    486684    489281  ns
bpaf: build parser + parse -> struct      1611270   1611270   1619372   1707026  ns

usage: argv -> struct                             204 ns      0.20 µs
clap: build tree + parse -> struct             490573 ns    490.57 µs
clap: parse -> struct, tree reused              23587 ns     23.59 µs
clap: build tree only                          299719 ns    299.72 µs

40b369d49c56 vs 93ea42d8d54e · measured on the runner, not pushed to the history.

@jdx
jdx force-pushed the agent/spec-unknown-flags branch 2 times, most recently from a46ac8b to b3b6e3f Compare August 19, 2026 14:01
@jdx
jdx force-pushed the agent/spec-unknown-flags branch from b3b6e3f to 22cbfcc Compare August 19, 2026 14:09
@jdx
jdx force-pushed the agent/spec-unknown-flags branch from 22cbfcc to 40b369d Compare August 19, 2026 14:51
@jdx
jdx merged commit c552c4e into main Aug 19, 2026
10 checks passed
@jdx
jdx deleted the agent/spec-unknown-flags branch August 19, 2026 16:59
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