Skip to content

Release 0.2.1: describe derives input_formats from the registry; add --version - #49

Merged
copyleftdev merged 1 commit into
mainfrom
fix/describe-formats-0.2.1
May 31, 2026
Merged

copyleftdev merged 1 commit into
mainfrom
fix/describe-formats-0.2.1

Conversation

@copyleftdev

@copyleftdev copyleftdev commented May 31, 2026 •

Copy link
Copy Markdown
Owner

Found while verifying the installed 0.2.0 binary: describe under-reported supported formats.

The bug

describe.rs hardcoded input_formats as the original six
(csv/tsv/ndjson/json/parquet/arrow) — a literal that never tracked
the 26 parsers added since. So the machine-discovery surface claimed 6 formats
while the binary actually reads 32
. An agent calling describe to learn
capabilities would never know to feed it pcap/syslog/EVTX/etc. (ironically,
describe.rs's own doc comment promises it's "derived from the same registries
scan uses, so the description can never drift from behavior").

Fix

  • input_formats now derives from the live ParserRegistry — reflecting the
    build's features (all 32 by default; fewer under --no-default-features).
  • A guard test asserts describe's input_formats equal the registry ids,
    so it can't silently drift again.
  • Wired anomalyx --version (-V / version), which previously printed
    nothing.

Bumps the workspace version 0.2.0 → 0.2.1. fmt / clippy / full workspace
tests green.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Bug Fixes

    • The describe command now retrieves supported formats from the live parser registry instead of using a hardcoded list.
  • New Features

    • Added support for version flags (-V, --version, version subcommand).
  • Chores

    • Released version 0.2.1.

…--version

describe advertised only the original six input_formats (csv/tsv/ndjson/json/
parquet/arrow) — a stale literal in describe.rs that never tracked the 26 parsers
added since, so the machine-discovery surface claimed 6 formats while the binary
reads 32. Derive the list from the live ParserRegistry instead (reflects the
build's features: all 32 by default, fewer under --no-default-features); this is
what describe.rs's own doc comment already promised. A guard test asserts
describe's input_formats equal the registry ids, so it can't drift again.

Also wire 'anomalyx --version' (-V / version), which previously printed nothing.

Bumps the workspace version 0.2.0 -> 0.2.1.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented May 31, 2026 •

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

Pull request was closed or merged during review

📝 Walkthrough

Walkthrough

This release (v0.2.1) fixes the describe command to source input_formats from the live parser registry instead of a stale hardcoded list, adds a guard test to prevent future drift, bumps the workspace version, documents the release in the changelog, and adds CLI version flag support.

Changes

v0.2.1 Release

Layer / File(s) Summary
Derive describe input formats from live parser registry
crates/anomalyx/src/describe.rs
describe_json imports ParserRegistry and computes input_formats from ParserRegistry::default().ids() instead of a hardcoded list. A new test parses the output and verifies the formats match the registry's advertised ids.
v0.2.1 version bump and changelog
Cargo.toml, CHANGELOG.md
Workspace package version bumped from 0.2.0 to 0.2.1, workspace dependencies for ax-core, ax-normalize, and ax-detect updated to 0.2.1, and changelog updated with a new [0.2.1] section documenting the registry sync fix plus updated comparison reference links.
CLI version flag support
crates/anomalyx/src/main.rs
Command dispatcher extended to recognize -V, --version, and version flags, printing the crate version and returning a clean exit code.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Poem

🐰 A registry now guides the describe,
No stale hardcodes here to relieve,
The version is bumped, the changelog neat,
And -V flags make our CLI complete! 🎉

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title directly summarizes the main changes: releasing v0.2.1, fixing describe to derive input_formats from the registry, and adding --version support.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/describe-formats-0.2.1

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 and usage tips.

@copyleftdev
copyleftdev merged commit d4c8ce8 into main May 31, 2026
1 of 2 checks passed
@copyleftdev
copyleftdev deleted the fix/describe-formats-0.2.1 branch May 31, 2026 21:30
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