Skip to content

feat(spec): omit versions from metadata views - #1066

Merged
jdx merged 1 commit into
agent/default-optionalityfrom
agent/spec-omit-version
Aug 19, 2026
Merged

jdx merged 1 commit into
agent/default-optionalityfrom
agent/spec-omit-version

Conversation

@jdx

@jdx jdx commented Aug 19, 2026

Copy link
Copy Markdown
Owner

Add SpecView::omit_version() for checked-in generated specs whose release automation manages versions separately. The base derived spec remains versioned, so runtime --version behavior is unchanged; only the cold metadata view omits it. A later version(...) override restores an explicit version.

Tests:

  • cargo test -p usage-argv --all-features a_spec_view_applies_identity_and_sparse_effects_without_mutating_the_base
  • cargo clippy -p usage-argv --all-features -- -D warnings

Note

Low Risk
Cold-path metadata only; parsing and version responses still use the base spec, with small API surface and test coverage.

Overview
Adds SpecView::omit_version() so cold-path metadata (KDL emission, help consumers) can drop the version string while the derived Spec still carries one for runtime --version.

The view tracks an omit_version flag: spec() and to_kdl() then emit no version instead of inheriting the base; calling version(...) clears omission and restores an explicit override. Tests cover base KDL still including version, omitted KDL without a version line, and omit_version then version ordering.

Reviewed by Cursor Bugbot for commit 5d9fb00. 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: 98c31938-c30f-4895-a28a-b49b298701af

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.

@jdx
jdx force-pushed the agent/spec-omit-version branch from 9bd0595 to c2782ea Compare August 19, 2026 15:33
@github-actions

github-actions Bot commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

Instruction counts

Nothing was compared, and so nothing was gated. No series appears on both sides: either the base has no measurements recorded, or the two were measured on different runner classes, which are deliberately not comparable — counts shift between machine types by more than a real regression does.

New, nothing to compare against: markdown on bamboo-v2-ubuntu24.04-x64-30vcpu-24gb-rust1.97.1, startup on bamboo-v2-ubuntu24.04-x64-30vcpu-24gb-rust1.97.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                      204       208       212       216  ns
argh: argv -> struct                          307       313       316       329  ns
clap: build tree + parse -> struct         479695    480817    483778    487853  ns
bpaf: build parser + parse -> struct      1581256   1581256   1595510   1602408  ns

usage: argv -> struct                             208 ns      0.21 µs
clap: build tree + parse -> struct             491078 ns    491.08 µs
clap: parse -> struct, tree reused              23189 ns     23.19 µs
clap: build tree only                          303662 ns    303.66 µs

5d9fb000af63 vs 0b137759b66b · measured on the runner, not pushed to the history.

@jdx
jdx force-pushed the agent/spec-omit-version branch from c2782ea to 12ec766 Compare August 19, 2026 16:59
@jdx
jdx force-pushed the agent/spec-omit-version branch from 12ec766 to 11df93c Compare August 19, 2026 17:11
@jdx
jdx force-pushed the agent/spec-omit-version branch 2 times, most recently from 30a227f to 86d5ac2 Compare August 19, 2026 17:20
@jdx
jdx force-pushed the agent/spec-omit-version branch from 86d5ac2 to a018105 Compare August 19, 2026 17:33
@jdx
jdx force-pushed the agent/spec-omit-version branch from a018105 to 5d9fb00 Compare August 19, 2026 21:16
@jdx
jdx merged commit 5330085 into main Aug 19, 2026
10 of 16 checks passed
@jdx
jdx deleted the agent/spec-omit-version branch August 19, 2026 23:51
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