Skip to content

docs: add wallet and webhook guides and dry-run every documented change - #26

Open
thebrandonlucas wants to merge 1 commit into
feat/cli-ux-followupsfrom
docs/cli-guides
Open

thebrandonlucas wants to merge 1 commit into
feat/cli-ux-followupsfrom
docs/cli-guides

Conversation

@thebrandonlucas

Copy link
Copy Markdown
Contributor

Stack: master ← #20 ← #22 ← #24 ← #19 ← this PR. Plan 07, phase 3 (guides). Docs-only apart from tests.

  • New guides: docs/guides/wallets.md (create, inspect, ledger, policies, delete) and docs/guides/webhooks.md (create with --output-file for the one-time secret, event names from the contract, test, stop/start, key rotation, deliveries). The docs index links both.
  • Offline dry run of every documented change: a new integration test takes each docs example that passes --execute, swaps in --dry-run --json, and requires exit 0 and outcome: dry_run, with no request reaching the mock API and no --output-file created. Placeholder IDs become a fixed UUID. Examples that read a --data file are skipped; request body tests cover those.
  • Shared extractor: tests/support/examples.rs holds the docs example extractor, included by the existing parse test in src/cli.rs and by the new integration test.

The new test found a real docs bug while writing these guides: webhooks test needs a --data body (delivery_id and payload), so the guide shows it that way.

Payments, receive/send, prices, checkout, and payment reliability are already covered by payments.md, checkout.md, and the safety model, so this PR does not split or duplicate them.

Validation: cargo fmt --check, cargo clippy --locked --all-targets -- -D warnings, cargo machete --with-metadata, cargo test --locked (94 unit, 69 integration), and python3 scripts/check-coverage.py.

New guides cover wallets (create, inspect, ledger, policies, delete) and
webhooks (create with a saved secret, events, test, pause, rotation,
deliveries). The docs index links both.

An integration test now runs every change the docs show with --execute as an
offline --dry-run --json and requires exit 0 and outcome dry_run, with no
request reaching the mock API. It caught that webhooks test needs a --data
body. The docs example extractor moves to tests/support/examples.rs so the
parse test and the dry-run test share it.
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