Skip to content

feat(cli): add --imports/--exports/--symbols convenience flags - #209

Merged
mergify[bot] merged 7 commits into
mainfrom
208-add---imports---exports---symbols-cli-convenience-flags
Jul 5, 2026
Merged

mergify[bot] merged 7 commits into
mainfrom
208-add---imports---exports---symbols-cli-convenience-flags

Conversation

@unclesp1d3r

@unclesp1d3r unclesp1d3r commented Jul 5, 2026 •

Copy link
Copy Markdown
Member

Summary

Adds three boolean convenience flags -- --imports, --exports, --symbols --
as shorthands for the most common reverse-engineering tag filters, so users don't
need to memorize exact Tag spellings. Along the way it consolidates tag-name
rendering onto a single clap ValueEnum source, fixing a Debug leak in
user-facing messages.

Flag Equivalent to
--imports --only-tags import
--exports --only-tags export
--symbols --only-tags demangled

Why

Imports, exports, and demangled symbols are already extracted, tagged, classified,
and ranked. They were filterable only via --only-tags <TAG>, forcing users to
know the canonical spelling. The friction is worst for symbols: the tag is
demangled, but analysts reach for "symbols." These three queries ("what does
this binary import / export / expose") are the highest-frequency RE tasks, so the
vocabulary friction lands on the most-used paths. The set is deliberately closed;
each flag's help points to --only-tags for the full vocabulary.


What changed

Source

  • src/main.rs -- three boolean clap fields; a Cli::resolved_include_tags()
    helper that merges --only-tags with the convenience flags; run() rewired to
    compute the resolved include set once (used for both the --no-tags overlap
    check and the filter build). The overlap-validation error message is generalized
    to describe an include/exclude contradiction rather than naming --only-tags.
  • src/types/mod.rs -- Tag now derives clap::ValueEnum (canonical names live
    once in #[value(name = ...)]); FromStr delegates to ValueEnum (single
    source of truth); a new Display impl renders the CLI form via PossibleValue.
  • src/output/table/formatting.rs, src/output/table/tty.rs -- both tag-display
    sites now use Display; the duplicate 25-arm tag_to_display_string helper is
    removed. The table, summary, error message, and parser now share one mapping.

Tests

  • tests/integration_cli_convenience_flags.rs (new) -- equivalence, union,
    full 6-pair conflict matrix, --no-tags composition, and --help coverage,
    against test_binary_elf (import=81, export=9) so assertions are not vacuous.
  • src/main.rs #[cfg(test)] unit tests -- fixture-independent checks that each
    flag maps to the exact Tag (the --symbols -> DemangledSymbol mapping can't be
    proven via fixtures, since none yield demangled rows).
  • src/types/tests.rs -- Display round-trip test over all variants.
  • Three existing tests updated for the generalized overlap message; one TTY-summary
    test updated for the corrected lowercase tag rendering.

Docs

  • AGENTS.md and docs/src/cli.md -- documented the three flags, --raw's full
    conflict set, and the generalized --no-tags overlap note.
  • docs/plans/2026-07-04-001-feat-cli-convenience-flags-plan.md -- the plan doc.

Type of change

  • New feature (--imports / --exports / --symbols)
  • Refactor (single-source tag-name rendering via ValueEnum)
  • Bug fix (user-facing messages showed Import instead of import)
  • Breaking change

Behavior and compatibility

  • Design decisions: --symbols maps to DemangledSymbol only (all three flags
    orthogonal -> clean union); flags conflict with --only-tags and --raw at parse
    time (clap, bidirectional); compose with --no-tags via the resolved include set.
  • Behavior change (non-breaking): the --no-tags overlap error and the TTY
    "Top tags" summary now render tags in the CLI form users type (import) instead
    of Debug (Import). No machine-readable contract depended on the old text.
  • JSON output is unchanged -- serde serialization (PascalCase for un-renamed
    variants) is a separate, tested contract and was intentionally not touched.
  • Help/parsing unchanged -- the arg parsers keep
    value_parser = <Tag as FromStr>::from_str (now backed by ValueEnum), so
    --help output and parsing behavior are byte-identical.

How this was tested

  • Full suite: 669 tests pass (23 platform-skipped); cargo fmt --check,
    cargo clippy --all-targets -- -D warnings clean.
  • Equivalence tests compare sorted stdout line sets (robust to extraction
    tie-break ordering) against a fixture with real import/export rows.
  • Empirically confirmed: --imports --no-tags import ->
    conflicting tag filters: import are both included and excluded (--no-tags).
  • CI: quality, coverage, all MSRV variants, and cross-platform tests
    (Linux/macOS/Windows) were green on the prior head; re-running on the latest commit.

Review guidance (commit-by-commit)

The five commits are independently reviewable in order:

  1. feat(cli) -- flags + resolved_include_tags + run() rewire + tests + docs.
  2. refactor(cli) -- drop a needless clone (move into with_include_tags).
  3. test(cli) -- split convenience tests into their own file; fix vacuous fixtures.
  4. test(cli) -- fixture-independent mapping unit tests; complete conflict docs.
  5. refactor(tags) -- Tag as ValueEnum; single-source Display; remove the
    duplicate mapping helper.

The highest-leverage file to review is src/types/mod.rs (the ValueEnum +
FromStr + Display wiring); everything else follows from it.


Review checklist

General

  • Change is scoped to CLI ergonomics + tag-display consolidation (no scope creep)
  • No debug/dbg!/println! left in library code
  • ASCII-only respected; no unsafe; no blanket #[allow]

Code quality

  • resolved_include_tags() is the single authority for the include set
  • clap conflicts_with_all covers --only-tags and --raw for all three flags
  • Tag-name rendering is single-sourced (ValueEnum names -> FromStr + Display)

Testing

  • Every requirement (R1-R7) has coverage; equivalence tests are non-vacuous
  • --symbols -> DemangledSymbol is pinned by a fixture-independent unit test
  • Message/assertion co-changes landed in all affected test files

Docs

  • AGENTS.md flag table and mdBook CLI reference match the implemented flags
  • --raw conflict set is complete in both docs

Risk assessment

Overall: Low.

Factor Level Notes
Size Low +524/-96; most additions are tests and the plan doc
Complexity Low Stateless CLI flags; a mechanical display refactor
Test coverage Low risk 669 tests pass; new unit + integration coverage for all paths
Dependencies None No new crates; uses clap's existing derive feature
Security None No input-trust-boundary, auth, or data-handling changes
Compatibility Low JSON contract and --help/parsing unchanged; one non-breaking UX text change

Add three boolean shorthands for the most common reverse-engineering tag
filters: --imports (import), --exports (export), --symbols (demangled
symbols). Each is behaviorally equivalent to the corresponding --only-tags
value, conflicts with --only-tags and --raw at parse time, and composes
with --no-tags via a resolved include set (Cli::resolved_include_tags).

The runtime include/exclude overlap check and its error message are
generalized to cover the resolved include set, not just --only-tags.

Closes #208.

Signed-off-by: UncleSp1d3r <unclesp1d3r@evilbitlabs.io>
Move the resolved include-tag vec into with_include_tags instead of
cloning it (the earlier overlap borrow is dead under NLL), and drop the
inline comment that restated the helper's doc comment. No behavior change.

Signed-off-by: UncleSp1d3r <unclesp1d3r@evilbitlabs.io>
Move the --imports/--exports/--symbols tests into a dedicated
integration_cli_convenience_flags.rs (keeps integration_cli.rs under the
500-line guideline). Run equivalence tests against test_binary_elf, which
has non-zero import (81) and export (9) rows -- the previous PE fixture had
zero exports, making the export/union assertions vacuous. Guard --symbols
against aliasing --imports/--exports (no fixture has demangled rows), assert
non-empty output where tags exist, and cover all six flag/conflict pairs.
Sync the mdBook CLI reference with the three new flags.

Signed-off-by: UncleSp1d3r <unclesp1d3r@evilbitlabs.io>
@unclesp1d3r unclesp1d3r linked an issue Jul 5, 2026 that may be closed by this pull request
5 tasks
Copilot AI review requested due to automatic review settings July 5, 2026 02:44
@coderabbitai

coderabbitai Bot commented Jul 5, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

You’ve reached a temporary PR review limit under our Fair Usage Limits Policy.

Your recent review volume is higher than typical usage, so adaptive limits are currently applied.

Next review available in: 20 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 2ace7390-1c3c-4c33-8b5d-4057d12995f7

📥 Commits

Reviewing files that changed from the base of the PR and between b5f7136 and 7379298.

📒 Files selected for processing (1)
  • src/main.rs
📝 Walkthrough

Walkthrough

Adds shorthand CLI tag-filter flags, resolves them into the effective include-tag set, switches tag rendering to canonical CLI names, and updates docs plus integration coverage for the new conflicts and overlap checks.

Changes

Convenience flags implementation and validation

Layer / File(s) Summary
Feature plan
docs/plans/2026-07-04-001-feat-cli-convenience-flags-plan.md
Adds a planning document describing the convenience flags feature, flag composition, conflict rules, implementation units, and verification gates.
Tag enum canonical names
src/types/mod.rs, src/types/tests.rs
Reworks Tag to use Clap ValueEnum, changes FromStr and Display to canonical CLI names, and updates unit tests for parsing and round-tripping.
CLI flags and include-tag resolution
src/main.rs
Adds shorthand boolean CLI flags, resolves them into the include-tag set, validates overlap against --no-tags, and applies the resolved tags to filter configuration.
Tag rendering changes
src/output/table/formatting.rs, src/output/table/tty.rs, tests/integration_flows_6_7.rs
Switches tag formatting and summary output to canonical Display strings instead of helper mapping or debug formatting.
CLI docs and integration coverage
AGENTS.md, GOTCHAS.md, docs/src/cli.md, tests/integration_cli.rs, tests/integration_cli_coverage.rs, tests/integration_flow8_errors.rs, tests/integration_cli_convenience_flags.rs
Updates CLI documentation and error-message assertions, and adds integration coverage for shorthand equivalence, conflicts, compatibility, and help text.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Possibly related PRs

Suggested labels: enhancement, documentation

Poem

Three flags arrive, terse and neat,
tag filters shift to one clear beat.
Canonical names now print and parse,
while overlap checks stay sharp and sparse.

🚥 Pre-merge checks | ✅ 10
✅ Passed checks (10 passed)
Check name Status Explanation
Title check ✅ Passed The Conventional Commits title matches the PR's main change and uses an allowed type/scope.
Description check ✅ Passed The description is directly about the new CLI convenience flags and related tag-rendering refactor.
Linked Issues check ✅ Passed The PR implements the three flags, clap conflicts, AGENTS.md updates, and integration tests requested by #208.
Out of Scope Changes check ✅ Passed The extra docs and tag-display refactor support the stated CLI feature and do not appear unrelated.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
No Unsafe Code ✅ Passed src/lib.rs and src/main.rs both forbid unsafe_code, and a repo-wide scan of all .rs files found no unsafe blocks/functions or allow(unsafe_code) attributes.
Error Handling ✅ Passed Touched runtime code uses StringyError::ValidationError/IoError; StringyError keeps #[error] and #[from] mappings, with no new raw-string error paths added.
Ascii Only ✅ Passed Scanned the PR-targeted files; none contain non-ASCII characters or Unicode punctuation.
File Size Limit ✅ Passed All touched files are under 500 lines, and no blanket #[allow] attributes were found in modified Rust files.
Section Weight Consistency ✅ Passed PR diff since origin/main touches CLI/docs/tests only; no src/container parser code or section-weight tables changed.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch 208-add---imports---exports---symbols-cli-convenience-flags

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

@mergify

mergify Bot commented Jul 5, 2026 •

Copy link
Copy Markdown
Contributor

Merge Protections

🔴 1 of 4 protections blocking

Protection Waiting on
🔴 🚦 Auto-queue —
🟢 Enforce conventional commit —
🟢 Full CI must pass —
🟢 Do not merge outdated PRs —

🔴 🚦 Auto-queue

This rule is failing.

When all merge protections are satisfied and these conditions match, this pull request will be queued automatically.

  • any of:
    • all of:
      • author = dosubot[bot]
      • base = main
    • all of:
      • author = dependabot[bot]
      • base = main

Show 3 satisfied protections

🟢 Enforce conventional commit

Make sure that we follow https://www.conventionalcommits.org/en/v1.0.0/

  • title ~= ^(fix|feat|docs|style|refactor|perf|test|build|ci|chore|revert)(?:\(.+\))?:

🟢 Full CI must pass

All CI checks must pass. This protection prevents manual merges that bypass the merge queue.

  • check-success = coverage
  • check-success = msrv (stable minus 1 releases)
  • check-success = msrv (stable minus 2 releases)
  • check-success = msrv (stable minus 3 releases)
  • check-success = msrv (stable minus 4 releases)
  • check-success = msrv (stable)
  • check-success = quality
  • check-success = test
  • check-success = test-cross-platform (macos-latest, macOS)
  • check-success = test-cross-platform (ubuntu-latest, Linux)
  • check-success = test-cross-platform (windows-latest, Windows)

🟢 Do not merge outdated PRs

Make sure PRs are within 10 commits of the base branch before merging

  • #commits-behind <= 10

@coderabbitai coderabbitai Bot added the enhancement New feature or request label Jul 5, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds three convenience CLI flags to Stringy to make common reverse-engineering tag filters discoverable and ergonomic without requiring users to remember the exact Tag spellings.

Changes:

  • Added --imports, --exports, and --symbols clap flags and a single resolved include-tag computation path used for both validation and filtering.
  • Generalized the runtime include-vs-exclude overlap validation message to cover both --only-tags and the new convenience flags.
  • Added integration tests and updated existing tests/docs to reflect the new flags and generalized error message.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/main.rs Adds the three convenience flags, resolves include tags in one place, and reuses that set for overlap validation and filtering.
tests/integration_cli_convenience_flags.rs New integration coverage for equivalence, union behavior, clap conflicts, --no-tags composition, and --help surfacing.
tests/integration_cli.rs Updates assertions to match the generalized overlap validation error message.
tests/integration_cli_coverage.rs Updates validation error substring assertion to the generalized message.
tests/integration_flow8_errors.rs Updates overlap error substring assertion to the generalized message.
docs/src/cli.md Documents the new flags in the filtering options table.
AGENTS.md Updates the CLI flags table to include the three new flags and the generalized overlap-check description.
docs/plans/2026-07-04-001-feat-cli-convenience-flags-plan.md Adds an implementation-ready plan artifact capturing requirements, conflicts, and verification gates.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@AGENTS.md`:
- Around line 67-70: Clarify the `--no-tags` entry in the CLI options table so
it matches runtime behavior: the convenience flags in the table (`--imports`,
`--exports`, `--symbols`) are not unconditionally compatible with `--no-tags`,
because overlap with the resolved include set still triggers a failure. Update
the documentation text near the `--no-tags` description to explicitly say
compatibility only holds when the excluded tags do not intersect the resolved
include set, and keep the wording aligned with the existing option names
(`--only-tags`, `--raw`, `--imports`, `--exports`, `--symbols`).

In `@tests/integration_cli_convenience_flags.rs`:
- Around line 133-140: The current convenience-flag compatibility test only
covers cli_imports_no_tags_compatible with --imports, so expand it to verify the
same non-overlap composition rule for the other shorthand flags as well. Update
the integration test in the convenience-flags suite to parameterize the success
case across cli_imports_no_tags_compatible, cli_exports_no_tags_compatible, and
cli_symbols_no_tags_compatible (or equivalent test coverage using
stringy().args(...) with --imports, --exports, and --symbols combined with
--no-tags). Keep the assertion behavior the same and ensure each convenience
flag is exercised with a safe non-overlapping --no-tags value.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yml

Review profile: ASSERTIVE

Plan: Pro

Run ID: ceaca00e-0ad3-4223-ad1d-53aaeb567541

📥 Commits

Reviewing files that changed from the base of the PR and between 8684911 and e61d43a.

📒 Files selected for processing (8)
  • AGENTS.md
  • docs/plans/2026-07-04-001-feat-cli-convenience-flags-plan.md
  • docs/src/cli.md
  • src/main.rs
  • tests/integration_cli.rs
  • tests/integration_cli_convenience_flags.rs
  • tests/integration_cli_coverage.rs
  • tests/integration_flow8_errors.rs

Comment thread AGENTS.md Resolved
@codecov

codecov Bot commented Jul 5, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 98.11321% with 1 line in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/types/mod.rs 83.33% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

@mergify

mergify Bot commented Jul 5, 2026 •

Copy link
Copy Markdown
Contributor

Queued — the merge queue status continues in this comment ↓.

Add fixture-independent unit tests for Cli::resolved_include_tags() so the
--symbols -> DemangledSymbol mapping (and the three-flag union) is falsifiable
even though no fixture yields demangled-tagged rows. Strengthen the --help test
to assert each flag's --only-tags shorthand line, and parameterize the --no-tags
compatibility test across all three flags. Document --raw's full conflict set
(now including the convenience flags) in AGENTS.md and the mdBook CLI reference,
and clarify the resolved_include_tags doc that the convenience mechanism may
combine several flags into a union.

Signed-off-by: UncleSp1d3r <unclesp1d3r@evilbitlabs.io>

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
docs/src/cli.md (1)

24-34: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Same "compatible" overstatement as AGENTS.md, not yet caught here.

Lines 31-33 describe --imports/--exports/--symbols as conflicting only with --only-tags/--raw, omitting that the runtime overlap check against --no-tags still fails when the excluded tag matches the resolved include set (e.g., --imports --no-tags import, verified in tests/integration_cli_convenience_flags.rs lines 119-130). The --no-tags row itself (line 30) also doesn't mention this overlap-check behavior at all, unlike the equivalent AGENTS.md table update. Please align both rows with actual runtime behavior.

As per path instructions, review documentation for accuracy with current implementation.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/src/cli.md` around lines 24 - 34, The CLI docs table is overstating the
compatibility of the convenience flags and omitting the `--no-tags` overlap
behavior. Update the `--no-tags` row and the `--imports`/`--exports`/`--symbols`
rows in `docs/src/cli.md` to match the actual runtime checks in the CLI parser,
so they clearly state that these flags can still fail together when the resolved
include set overlaps with excluded tags (for example, the convenience-flag
handling in the same area as the `--only-tags`/`--raw` conflicts).

Source: Path instructions

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In `@docs/src/cli.md`:
- Around line 24-34: The CLI docs table is overstating the compatibility of the
convenience flags and omitting the `--no-tags` overlap behavior. Update the
`--no-tags` row and the `--imports`/`--exports`/`--symbols` rows in
`docs/src/cli.md` to match the actual runtime checks in the CLI parser, so they
clearly state that these flags can still fail together when the resolved include
set overlaps with excluded tags (for example, the convenience-flag handling in
the same area as the `--only-tags`/`--raw` conflicts).

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yml

Review profile: ASSERTIVE

Plan: Pro

Run ID: b7832817-ebc9-4e5b-86bc-7768a1be7909

📥 Commits

Reviewing files that changed from the base of the PR and between e61d43a and 45e723b.

📒 Files selected for processing (4)
  • AGENTS.md
  • docs/src/cli.md
  • src/main.rs
  • tests/integration_cli_convenience_flags.rs

User-facing messages rendered tags with Debug (`Import`) instead of the CLI
form users type (`import`): the --no-tags overlap error and the TTY summary's
Top-tags line. Make Tag a clap ValueEnum so the canonical names live once in
#[value(name = ...)] attributes; route FromStr through ValueEnum (single source)
and add a Display impl that renders the canonical name via PossibleValue. Switch
both Debug display sites to Display, and collapse the duplicate 25-arm
tag_to_display_string helper (identical output) onto Display so the table,
summary, error message, and parser all share one mapping.

The arg parsers keep value_parser = <Tag as FromStr>::from_str, so --help and
parsing behavior are unchanged; JSON serde serialization is untouched.

Signed-off-by: UncleSp1d3r <unclesp1d3r@evilbitlabs.io>
Copilot AI review requested due to automatic review settings July 5, 2026 03:21
@unclesp1d3r unclesp1d3r self-assigned this Jul 5, 2026
@coderabbitai coderabbitai Bot added the documentation Improvements or additions to documentation label Jul 5, 2026
@unclesp1d3r
unclesp1d3r enabled auto-merge (squash) July 5, 2026 03:24
@unclesp1d3r
unclesp1d3r disabled auto-merge July 5, 2026 03:25
@unclesp1d3r

Copy link
Copy Markdown
Member Author

@Mergifyio queue

@mergify

mergify Bot commented Jul 5, 2026 •

Copy link
Copy Markdown
Contributor

Merge Queue Status

🛑 Queue command has been cancelled

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 13 out of 13 changed files in this pull request and generated 3 comments.

Comment thread src/main.rs Resolved
Comment thread tests/integration_flows_6_7.rs Resolved

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/main.rs`:
- Line 106: The CLI args for Tag still use the custom FromStr parser instead of
clap’s native ValueEnum handling. Update the argument definitions in main.rs for
the --only-tags and --no-tags fields to use clap::value_parser!(Tag) or
#[arg(value_enum)] like the enc: Option<CliEncoding> field, so clap can provide
built-in value suggestions and consistent parsing. Make sure to adjust both
Tag-related args referenced in the same struct and verify tests don’t depend on
the old invalid-value error wording.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 9345f73f-c21e-4a9b-b8c2-2f2920679af2

📥 Commits

Reviewing files that changed from the base of the PR and between 45e723b and 7804bbd.

📒 Files selected for processing (6)
  • src/main.rs
  • src/output/table/formatting.rs
  • src/output/table/tty.rs
  • src/types/mod.rs
  • src/types/tests.rs
  • tests/integration_flows_6_7.rs

Comment thread src/main.rs Resolved
@mergify mergify Bot added the queued label Jul 5, 2026
mergify Bot added a commit that referenced this pull request Jul 5, 2026
@mergify mergify Bot mentioned this pull request Jul 5, 2026
44 of 59 tasks
- main.rs: switch --only-tags/--no-tags to clap value_enum now that Tag derives
  ValueEnum (matches --enc); removes the hand-rolled from_str value_parser and the
  manual long_help tag list (clap now generates possible values). (CodeRabbit)
- main.rs: sort + dedup the overlap error's tag list so repeated --only-tags
  values produce a stable message. (Copilot)
- integration_flows_6_7.rs: tighten the TTY summary assertion to 'url:' so it
  can't match unrelated text. (Copilot)
- AGENTS.md, docs/src/cli.md: qualify the --no-tags compatibility note -- the
  convenience flags still fail when an excluded tag overlaps the include set;
  document the overlap check on the --no-tags row. (CodeRabbit)
- GOTCHAS.md: update the stale value_parser/from_str notes for value_enum.

Signed-off-by: UncleSp1d3r <unclesp1d3r@evilbitlabs.io>
@mergify mergify Bot removed the queued label Jul 5, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/main.rs`:
- Around line 188-190: The `tag_names` collection in `overlap` handling is doing
a sort-then-dedup on `Vec<String>`, which is correct but more verbose than
needed. Replace the `tag_names` vector construction with a `BTreeSet<String>` so
the sorted-unique intent is expressed directly and the extra `sort()` and
`dedup()` calls can be removed. Keep the surrounding `overlap.iter().map(|t|
t.to_string())` logic, but route it into the set-based collection instead of a
mutable vector.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 30775a47-f148-4bed-80b6-ceb82bd7019a

📥 Commits

Reviewing files that changed from the base of the PR and between 7804bbd and b5f7136.

📒 Files selected for processing (5)
  • AGENTS.md
  • GOTCHAS.md
  • docs/src/cli.md
  • src/main.rs
  • tests/integration_flows_6_7.rs

Comment thread src/main.rs Resolved
- main.rs: collect the overlapping tag names into a BTreeSet<String> so they are
  sorted and de-duplicated in one pass, dropping the mutable Vec plus the separate
  sort()/dedup() calls. (CodeRabbit)

Signed-off-by: UncleSp1d3r <unclesp1d3r@evilbitlabs.io>
Copilot AI review requested due to automatic review settings July 5, 2026 03:46

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 14 out of 14 changed files in this pull request and generated 2 comments.

Comment thread src/main.rs Resolved
Comment thread src/types/mod.rs Resolved
@mergify

mergify Bot commented Jul 5, 2026 •

Copy link
Copy Markdown
Contributor

Merge Queue Status

This pull request spent 13 minutes 49 seconds in the queue, including 13 minutes 32 seconds running CI.

Required conditions to merge
  • check-success = coverage
  • check-success = msrv (stable minus 1 releases)
  • check-success = msrv (stable minus 2 releases)
  • check-success = msrv (stable minus 3 releases)
  • check-success = msrv (stable minus 4 releases)
  • check-success = msrv (stable)
  • check-success = quality
  • check-success = test
  • check-success = test-cross-platform (macos-latest, macOS)
  • check-success = test-cross-platform (ubuntu-latest, Linux)
  • check-success = test-cross-platform (windows-latest, Windows)
  • github-code-owner-review-satisfied [🛡 GitHub repository ruleset rule main]
  • github-code-owner-review-satisfied [🛡 GitHub repository ruleset rule ossf_best_practices]
  • github-review-approved [🛡 GitHub repository ruleset rule main]
  • github-review-approved [🛡 GitHub repository ruleset rule ossf_best_practices]
  • all of [🛡 Merge Protections rule Do not merge outdated PRs]:
  • all of [🛡 Merge Protections rule Enforce conventional commit]:
  • all of [🛡 Merge Protections rule Full CI must pass]:
    • check-success = coverage
    • check-success = msrv (stable minus 1 releases)
    • check-success = msrv (stable minus 2 releases)
    • check-success = msrv (stable minus 3 releases)
    • check-success = msrv (stable minus 4 releases)
    • check-success = msrv (stable)
    • check-success = quality
    • check-success = test
    • check-success = test-cross-platform (macos-latest, macOS)
    • check-success = test-cross-platform (ubuntu-latest, Linux)
    • check-success = test-cross-platform (windows-latest, Windows)
  • any of [🛡 GitHub repository ruleset rule main]:
    • check-neutral = @mergify/Mergify Merge Protections
    • check-skipped = @mergify/Mergify Merge Protections
    • check-success = @mergify/Mergify Merge Protections

@mergify mergify Bot added the queued label Jul 5, 2026
mergify Bot added a commit that referenced this pull request Jul 5, 2026
@mergify mergify Bot mentioned this pull request Jul 5, 2026
55 of 59 tasks
@mergify
mergify Bot merged commit d4bfc3c into main Jul 5, 2026
29 checks passed
@mergify
mergify Bot deleted the 208-add---imports---exports---symbols-cli-convenience-flags branch July 5, 2026 04:13
@mergify mergify Bot removed the queued label Jul 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add --imports / --exports / --symbols CLI convenience flags

2 participants