Skip to content

test(cli): cover main.rs command internals and publish/sync helpers (#638 pass 2)#663

Merged
enricopiovesan merged 2 commits into
mainfrom
claude/issue-638-command-error-paths
Jul 13, 2026
Merged

test(cli): cover main.rs command internals and publish/sync helpers (#638 pass 2)#663
enricopiovesan merged 2 commits into
mainfrom
claude/issue-638-command-error-paths

Conversation

@enricopiovesan

Copy link
Copy Markdown
Collaborator

Summary

Second focused pass at #638 (main.rs coverage), targeting command internals and publish/sync helpers with 8 new tests:

  • inspect_bundle / register_bundle JSON summary branches via the canonical expedition bundle fixture
  • Capability publish guards: non-JSON and private-scope contract rejection, unsafe registry path segments (empty/./../separators), artifact digest read failure and happy path
  • registry_sync_failure_json stable error shape
  • register_generated_app_bundle missing-manifest and incomplete-bundle (empty components) guards
  • browser-adapter serve bind-address parse forms (default, --bind, malformed)
  • curl_text fetch-failure surface against an unreachable host
  • RealPublishProcessRunner: stdout capture, non-zero exit status, and spawn failure
  • Dirty registry checkout blocking capability publish

Measured traverse-cli coverage 86.85% (up from 86.12%). The ci/coverage-targets.txt threshold stays at 86 — 0.15 headroom over 87 is too thin for CI variance; the next pass raises it. Remaining main.rs work stays tracked on #638.

Refs #638.

Governing Spec

  • 033-http-json-api
  • 046-public-cli-app-registration
  • 056-capability-publish

Test-only change; no behavior change (no-spec-needed label on #638).

Project Item

Issue #638 — Project 1 item PVTI_lADOEbiBt84Bbyp1zgyjFKs (Status: In Progress, label agent:claude)

Validation

  • cargo test -p traverse-cli — all green (288 bin tests including the 8 new ones)
  • cargo clippy --workspace --all-targets — clean; cargo fmt --check — clean
  • scripts/ci/coverage_gate.sh — traverse-cli 86.85% (14937/17198) against the 86 threshold; contracts/registry/runtime 100%, mcp 98.92%

🤖 Generated with Claude Code

Second focused pass at #638's main.rs coverage gap:

- bundle inspect/register JSON summary branches via the canonical
  expedition bundle fixture
- capability publish guards: private-scope and non-JSON contract
  rejection, unsafe registry path segments, artifact digest read
  failure and happy path
- registry_sync_failure_json stable shape
- register_generated_app_bundle missing-manifest and incomplete-bundle
  guards
- browser-adapter serve bind-address parse forms
- curl_text fetch-failure surface (unreachable host)
- RealPublishProcessRunner stdout capture, non-zero exit, and spawn
  failure
- dirty-registry-checkout publish block

Measured traverse-cli coverage 86.85% (up from 86.12%); threshold stays
86 to keep CI headroom. Remaining passes tracked on #638.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@enricopiovesan enricopiovesan enabled auto-merge (squash) July 13, 2026 17:42
@enricopiovesan enricopiovesan merged commit 60eb40e into main Jul 13, 2026
26 checks passed
@enricopiovesan enricopiovesan deleted the claude/issue-638-command-error-paths branch July 13, 2026 17:49
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