Skip to content

Fix distribution, CLI validation, and unknown token metrics - #2

Draft
RodrigoAlbe wants to merge 1 commit into
mainfrom
fix/distribution-cli-metrics
Draft

RodrigoAlbe wants to merge 1 commit into
mainfrom
fix/distribution-cli-metrics

Conversation

@RodrigoAlbe

Copy link
Copy Markdown
Owner

Problem and behavior

The advertised Claude Code installation failed manifest validation, the README referenced an unavailable PyPI package, the CLI silently supplied placeholder choices, and missing token usage was recorded as zero. This change makes installation instructions usable, rejects incomplete CLI inputs before inference, and preserves unknown usage in both API results and benchmark reports.

Changes

  • Correct the marketplace owner/source and plugin author metadata, rely on standard skill discovery, and update the plugin version to 1.1.0. Use the explicit system-one@system-one install identifier.
  • Document installation from GitHub and a checkout while no public PyPI release exists. Clarify that agent instructions and the Python library are separate installations.
  • Replace manual CLI argument parsing with argparse; require explicit choice/score options, support --provider, --model, and --json, and return useful exit codes with runtime errors on stderr.
  • Make token counts optional. Missing/null usage stays None, explicit zero stays zero, malformed reported counts remain invalid. Benchmark reports distinguish complete totals, available subtotals, and measurement coverage.
  • Add regression tests, isolated wheel/CLI installation checks across the existing Python/OS matrix, and a pinned official Claude Code validator plus isolated plugin installation in CI.

Validation

  • 223 tests passed with current dependencies.
  • 223 tests passed on Python 3.9 with httpx==0.24.0.
  • Both manifests passed claude plugin validate --strict with Claude Code 2.1.240.
  • Installed the local marketplace/plugin under a temporary CLAUDE_CONFIG_DIR; the enabled plugin exposes exactly one system-one skill.
  • Built wheel/source distributions and installed the wheel in a clean virtual environment; verified the real CLI entry point, help flags, and failure exit code for missing choices.
  • Ruff undefined/unused-name checks and git diff --check passed.

No live inference calls, PyPI publication, or merge were performed. Consumers must now handle nullable token counts; README migration notes describe the change.

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