Repository navigation
CI: cli suite tests assert codes, not sentences (#1089) - #1565
Conversation
Assisted-by: Claude Code:claude-opus-5-5
The three covgap files in the cli test binary get names that say what they cover: api_client_org_fallback.rs, prompts_tty.rs and list_render.rs. A copy edit to the org-fallback warning no longer breaks five tests: the --json runs now check the api_auth_fallback warning code through common::envelope, and only the human run pins the stderr text, once per message family. The vlt list test reads the vendored purls from the envelope instead of searching its text. Test-only; the cli binary and its CI job are unchanged. Refs #1089 Assisted-by: Claude Code:claude-opus-5-5
Review follow-up. The --json run checks again that the org fallback warning is printed once, the api_auth_fallback detail must still name the --org remedy, and the human run pins the hint's remedy line and the token-shape reason. A run that dies before printing JSON now shows its stderr, through a shared output_envelope helper. The core doc comment points at the renamed suite. Refs #1089 Assisted-by: Claude Code:claude-opus-5-5
|
BugBot review Generated by Claude Code |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 4c2517a. Configure here.
|
Ready for review at
Generated by Claude Code |
Final review brief: #1565 at
|
LLM Description written by Claude Code:claude-opus-5-5
Refs #1089 (
clislice of child 6). The tracking issue stays open:covgap_commands_scan_mod.rs(#1560),covgap_commands_vex.rs(#1563), theupdate/andscan/covgap files,covgap_utils_socket_cli_config.rsandcoverage_fix_scan_hosted_dryrun_vendored.rsremain for later slices.Root cause
CLI tests pin English sentences and private helpers instead of the shared
--jsonenvelope readers intests/common/envelope.rs. A copy edit to the org-fallback warning broke five tests at once, and the JSON runs only proved the behavior through the warning's prose.What changed (test-only, plus one doc comment)
cli/covgap_api_client.rs→cli/api_client_org_fallback.rs. The five--jsontests assert theapi_auth_fallbackcode inwarnings[](and that its detail names--org) throughcommon::envelope, plus the request log as before. Only the human run pins stderr text, one check per message family (org fallback + remedy, stored-hash hint + remedy, token-shape warning). The--jsonrun still checks the warning prints once and isn't muted;--silentstill checks it is. The privatejson_stdoutcopy is gone.common/envelope.rs: newoutput_envelope(&Output), which panics with stdout and stderr, so a run that dies before printing JSON shows why.cli/covgap_output.rs→cli/prompts_tty.rs(PTY render tests; fixtures renamed off "covgap", behavior unchanged).cli/covgap_commands_list.rs→cli/list_render.rs; the vlt test reads the vendored purls viamode_events(&env, "vendored")instead of searching the envelope text.socket-patch-core/src/api/client.rs: a doc comment points at the renamed suite.Sentence (4+-word
.contains) assertions in these files: 10 → 4, all in human/PTY render tests.CI cost
Same
clitest binary, no new job or workflow change. A lean PR run is unchanged: about 28 Linux jobs, about 8 min wall, same job-minutes before and after.Test evidence
cargo test -p socket-patch-cli --all-features --test cli: 113 passed, 0 failed (same count as main).cargo fmt --all -- --check: clean.cargo clippy --locked --workspace --all-features -- -D warnings: clean.cargo clippy --test cli -- -D warningsreports the same 10 pre-existing lints inprebuilt_common/mod.rsandcommon/mod.rson main and on this branch; none are in the changed files./code-review highran on the diff. Fixed: warn-once count in--json, remedy in the warning detail, hint/shape remedy pins, stderr on parse failure, the--silentcheck matching message bodies, the stale doc comment. Not fixed: "empty start commit". It is the agent claim marker, and a squash merge drops it.prompts_tty.rsiscfg(unix), so I dispatched one full-scope run on this branch to cover macOS.🤖 Generated with Claude Code
https://claude.ai/code/session_01AZa8HreenUM7a9mcyWuevm
Generated by Claude Code