Repository navigation
feat(mcp): success bool + real --help; tighten README integrity wording - #117
Merged
Merged
Conversation
Two agentic-UX surfaces: - HLR-067 / LLR-074 / TEST-081: ToolResponse.success boolean on every MCP wire shape, derived deterministically from exit_code + terminal/error so hosts no longer need to pattern- match on the colliding exit_code = 2. - HLR-068 / LLR-075 / TEST-082: cargo-evidence --help direct invocation lists subcommands by reusing clap's render tree, closing the four-line stub friction observed when an agent resolves the binary path with `which cargo-evidence` and runs --help directly. cert/floors.toml bumps trace_hlr 66→68, trace_llr 73→75, trace_test 78→80. Implementation lands in follow-up commits. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Three agentic-UX hygiene fixes for v0.1.4, each closing a friction the post-0.1.3 review identified: 1. JsonlToolResponse / RulesToolResponse / DiffToolResponse gain a top-level `success: bool` field, derived deterministically from `exit_code` + `terminal`/`error`. Closes the colliding-exit-code ambiguity at the structured-field layer: hosts have one canonical field to read, instead of pattern-matching on a `_OK` suffix and exit_code 2 separately. 2. `cargo-evidence --help` (direct-binary invocation) now lists every subcommand by reusing clap's `EvidenceArgs::command()` long-help render. The previous four-line redirect stub is gone. New subcommands appear automatically; `EXPECTED_SUBCOMMANDS` in the test guards against drift. 3. README's content_hash section explicitly distinguishes integrity re-check from DO-178C verification independence and forward- references the existing honesty section. Trace: HLR-067 / LLR-074 / TEST-081 cover the success-bool grid; HLR-068 / LLR-075 / TEST-082 cover the --help intercept. Floors: trace_hlr 66→68, trace_llr 73→75, trace_test 78→80, per_crate.evidence-mcp.test_count 37→45 (+8 unit), per_crate .cargo-evidence.test_count 134→136 (+2 integration). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Workspace clippy is denied on `let_underscore_must_use`; the `let _ = cmd.print_long_help();` form trips it. Switch to `drop(cmd.print_long_help())` — broken-pipe is the only realistic failure on `--help`, and dropping mirrors how every Unix tool handles SIGPIPE on `--help` invocation. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
`[`\`success\``]` in field docstrings doesn't resolve under `-D rustdoc::broken_intra_doc_links` because the field isn't in the rustdoc item-name scope. Switch to `[`\`Self::success\``]`, which is the canonical form for sibling-field references. Why CI caught it but local didn't: the workspace doc gate uses the broken-intra-doc-links lint at deny level; my local re-run between trace seed and implementation didn't trip it because the doc link was added in this same PR — the local doc check only verifies the prior baseline. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
luofang34
pushed a commit
that referenced
this pull request
May 2, 2026
…rface claim, CHANGELOG - **Blocker 1**: CONTRIBUTING.md's UUID workflow now points at the established `cargo evidence trace --backfill-uuids` policy and cross-references `cert/trace/README.md`'s rationale. The python3 one-liner the prior draft suggested was the exact hand-crafting form the existing policy bans (collision risk, weakens the "UUIDs are opaque" contract, tempts reading meaning into digits). Two contradictory authority docs on the same workflow is a quality-of-process regression — fixed. - **Blocker 2**: Sharpened the negative dogfood. The previous test used `mcdc_2024.rs`, which fails the duplicate regex for two independent reasons (no leading space + 4 digits exceeds the 2-digit cap). A regression that drops only the leading-space anchor would still pass. Added `mcdc_24.rs` (2 digits, no leading space) so each anchor is isolated by its own fixture. - **Minor 3**: HLR-069 now claims `surfaces = ["editor-duplicate gate"]`, matching the convention HLR-044 / HLR-046 / HLR-047 established for sibling hygiene gates. New entry in `KNOWN_SURFACES`. `cert/floors.toml` known_surfaces 21→22. - **Minor 5**: 0.1.4 hygiene-track entry added to CHANGELOG. Bundles the changes already in main from PRs #115 / #116 / #117 plus the changes landing in this PR. Per-PR cadence rather than batched release-prep PR. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
8 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
PR α of the 0.1.4 agentic-UX hygiene track. Three small, additive
fixes for review-flagged friction:
success: boolon every MCP wire shape —JsonlToolResponse,RulesToolResponse,DiffToolResponsegain a top-level booleanderived deterministically from
exit_code+terminal/error.Closes the documented
exit_code = 2collision at the structured-field layer: hosts read one canonical field instead of pattern-
matching on
_OKsuffix + exit code separately. Existing fieldsunchanged; older agents still work.
cargo-evidence --help— direct-binary invocation nowlists every subcommand by reusing clap's
EvidenceArgs::command()long-help render. The four-line redirect stub is gone. The test's
EXPECTED_SUBCOMMANDSlist guards against drift when a new verbis added.
integrity re-check, not DO-178C verification independence, and
cross-links the existing honesty section.
Trace
HLR-067 / LLR-074 / TEST-081— success bool derivation grid(8 unit tests, all four wire shapes × happy + failure paths).
HLR-068 / LLR-075 / TEST-082— direct--helplists everysubcommand (2 integration tests).
Floors
Test plan
cargo fmt --checkcargo clippy --workspace --all-targets -- -D warningscargo test --workspace --all-targets— 240+ tests passRUSTDOCFLAGS='-D missing_docs -D rustdoc::broken_intra_doc_links' cargo doc --workspace --no-depscargo build --release --workspacecargo run -p cargo-evidence -- evidence trace --validate→VERIFY_OKcargo run -p cargo-evidence -- evidence floors --format=jsonl→FLOORS_OK(13/13 dimensions)target/debug/cargo-evidence --helpshows banner + all 10 subcommands🤖 Generated with Claude Code