Skip to content

test(ssh): cover host certs, accessors, debug redaction, and stable_bytes deltas#695

Merged
EffortlessSteven merged 1 commit into
mainfrom
claude/cov-ssh-accessors
May 16, 2026
Merged

test(ssh): cover host certs, accessors, debug redaction, and stable_bytes deltas#695
EffortlessSteven merged 1 commit into
mainfrom
claude/cov-ssh-accessors

Conversation

@EffortlessSteven

Copy link
Copy Markdown
Member

Summary

Closes coverage gaps in uselesskey-ssh identified by manually walking the public surface against tests/ssh_fixtures.rs and the inline mod tests blocks. No production code changes.

Gaps closed

Area What was missing New test
SshCertSpec::host / to_cert_type(Host) Host cert path was only used as a fixture in one test, the cert type was never asserted host_cert_decodes_with_host_cert_type
Builder::all_principals_valid (empty principals) Branch never exercised empty_principals_yields_all_principals_valid
SshKeyPair::label() / spec() accessors Never read key_pair_accessors_report_label_and_spec
SshCertFixture::label() / spec() accessors Never read cert_fixture_accessors_report_label_and_spec
Default impls on SshSpec and SshCertType Compiled but never checked ssh_spec_default_is_ed25519
SshCertType::stable_byte Host vs User Only User was tested ssh_cert_type_stable_byte_distinguishes_variants
SshKeyPair/SshCertFixture Debug impl Never asserted; key/cert material could leak key_pair_debug_omits_key_material, cert_fixture_debug_omits_key_material
SshCertSpec::stable_bytes sensitivity Only principal-change was checked; validity, cert_type, critical_options, extensions all silent on regression cert_spec_stable_bytes_change_with_critical_options_and_extensions, cert_spec_stable_bytes_change_with_validity_and_cert_type

10 new tests, all using TestResult + ensure!/ensure_eq!/require_ok so the no-panic-family check stays at zero new debt.

Test plan

  • cargo test -p uselesskey-ssh --tests — 13/13 pass (10 new + 3 existing)
  • cargo clippy -p uselesskey-ssh --tests --all-features -- -D warnings
  • cargo xtask check-no-panic-family — only the pre-existing xtask/src/user_path_smoke.rs:126 debt remains, no new debt from this branch
  • cargo fmt --check -p uselesskey-ssh

https://claude.ai/code/session_01R9SN1o9XoVTaVxj9w4VMzD


Generated by Claude Code

…ytes deltas

Adds 10 fallible tests using the existing TestResult helpers to fill
coverage gaps in `uselesskey-ssh`:

- host certificate path (`SshCertSpec::host`, `to_cert_type(Host)`)
- empty-principals branch (`Builder::all_principals_valid`)
- `SshKeyPair`/`SshCertFixture` `label()` and `spec()` accessors
- `Default` impls on `SshSpec` and `SshCertType`
- `Debug` redaction (no key/cert body in output)
- `stable_bytes` sensitivity to validity, cert_type, critical_options,
  and extensions

No production code changes. All new tests use `ensure!`/`ensure_eq!`/
`require_ok` so the no-panic-family check stays at zero new debt.

https://claude.ai/code/session_01R9SN1o9XoVTaVxj9w4VMzD
@gemini-code-assist

Copy link
Copy Markdown

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@coderabbitai

coderabbitai Bot commented May 16, 2026

Copy link
Copy Markdown

Warning

Rate limit exceeded

@EffortlessSteven has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 29 minutes and 30 seconds before requesting another review.

You’ve run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 464789bd-d77e-47ba-b90d-8fa8964d7a6d

📥 Commits

Reviewing files that changed from the base of the PR and between fad488d and e6bf9a6.

⛔ Files ignored due to path filters (1)
  • Cargo.lock is excluded by !**/*.lock
📒 Files selected for processing (2)
  • crates/uselesskey-ssh/Cargo.toml
  • crates/uselesskey-ssh/tests/ssh_fixtures.rs
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/cov-ssh-accessors

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.

@EffortlessSteven EffortlessSteven marked this pull request as ready for review May 16, 2026 02:40
@gemini-code-assist

Copy link
Copy Markdown

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

@EffortlessSteven EffortlessSteven merged commit 1d7e34a into main May 16, 2026
6 checks passed
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.

2 participants