Verified full API coverage matrix (CLI + SDK, positive + negative) + working-order execute fix#28
Merged
Merged
Conversation
…e cell check Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…streams) Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
… (fixes login rate-limit cascade) Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…e-order Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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
Proves
capctlcovers the complete Capital.com Open API surface with a verifiable test matrix, and fixes a real bug that the matrix uncovered.tests/e2e/endpoints.py): all 41 REST + WebSocket operations, each mapped to its CLI command and SDK method. An offline cross-check asserts the registry equals the documented Capital.com surface and that every command/method exists. Finding: nothing was missing — every endpoint already has a CLI command and an SDK method (the CLI surface even exceeds the official MCP toolset).GET /time,GET /session,GET /session/encryptionKey) are marked N/A in the SDK columns by design.make coverage-docrenders the matrix intodocs/api-coverage.mdand a shields.io endpoint JSON (docs/coverage-badge.json); a README API coverage badge links to the proof table. A drift test keeps the doc/badge in sync with the registry, and a completeness gate fails if any cell regresses.Bug fixed (found by the live matrix)
trade execute-ordercrashed withINTERNAL_ERROR: 'type'. Working-order previews were persisted to the state file before the working-ordertype/levelfields were attached, so executing a previewed working order from a separate CLI invocation (which reloads the preview from disk) hit aKeyError. The in-process SDK path kept the in-memory copy and worked, which is why it was never caught — working-order execute had no e2e coverage before. Fixed incore/risk.py(re-save the preview after adding the fields) with a TDD regression test that exercises the state-file round-trip.Safety note
Negative tests use no-network failure modes (missing-config → exit 3 /
ConfigMissingError, Typer type-errors → exit 2, and guard rejections that short-circuit before any HTTP). An earlier draft used wrong-password logins, which tripped the demo login rate limit and risked locking the account — that approach was removed.Test Plan
🤖 Generated with Claude Code