Skip to content

fix(core,cli): unknown wire messages count is null, empty read_file path rejected - #360

Merged
ajianaz merged 1 commit into
developfrom
fix/usage-report-messages-unknown
Oct 9, 2026
Merged

ajianaz merged 1 commit into
developfrom
fix/usage-report-messages-unknown

Conversation

@ajianaz

@ajianaz ajianaz commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

What

Two small fixes found by the pre-tag scan for v0.8.1, plus the CHANGELOG entry under [0.8.1].

Why

  • usage_report fabricated messages: 0 when the field was absent, contradicting the module's "unknown is never a measured zero" contract (status JSON consumers saw a false 0).
  • read_file with an empty path joined to the jail root and failed with a confusing "is a directory" error.

Changes

  • crates/tole-cli/src/usage_report.rs: WirePoint.messages is Option<u64>, serialized as null when unknown; new test missing_messages_is_unknown_not_zero.
  • crates/tole-core/src/read_file.rs: empty path rejected with read_file: path is empty; new test rejects_empty_path.
  • CHANGELOG.md: ### Fixed under [0.8.1].

Testing

cargo fmt, clippy -D warnings and cargo test --workspace pass locally; CI runs all profiles.

🤖 Generated with Claude Code

…ath rejected

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Oct 9, 2026

Copy link
Copy Markdown

🔍 Cora AI Code Review

✅ No issues found. Code looks good!


Review powered by cora-code · BYOK · MIT

@ajianaz
ajianaz merged commit bb3c592 into develop Oct 9, 2026
17 checks passed
@ajianaz ajianaz mentioned this pull request Oct 9, 2026
@ajianaz
ajianaz deleted the fix/usage-report-messages-unknown branch October 9, 2026 10:05
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