This is a v0.2+ feature as release v0.1 doesn't havea any write actions; sandbox is useful for write/edit/publish testing
Summary
Our unit tests mock API responses, but the mocks can be wrong. In PR #51, a unit test passed with a fake response shape that didn't match the real Zenodo API — the bug shipped because the cardboard cutout didn't look like the real opponent.
See .claude/reference/v0.1/bugs/integrated-testing.md for full write-up.
Problem
- Unit tests only verify "if the API returns X, does the CLI do Y?"
- They cannot verify "does the API actually return X?"
- Wrong assumptions about response shapes, endpoints, and field names go undetected
- This caused three bugs in a single session: wrong endpoint, wrong return type, verbose table dump
Proposal
Add integration tests that hit sandbox.zenodo.org with a real token, gated behind ZENODO_SANDBOX_TOKEN env var. Tests skip gracefully when the token is absent.
Use Context7 MCP to pull live Zenodo API documentation when generating test cases — this ensures mocks and assertions match the actual API spec rather than relying on assumptions.
Action Items
Ideation
Planning
Implementation
🤖 Generated with Claude Code
This is a v0.2+ feature as release v0.1 doesn't havea any write actions; sandbox is useful for write/edit/publish testing
Summary
Our unit tests mock API responses, but the mocks can be wrong. In PR #51, a unit test passed with a fake response shape that didn't match the real Zenodo API — the bug shipped because the cardboard cutout didn't look like the real opponent.
See
.claude/reference/v0.1/bugs/integrated-testing.mdfor full write-up.Problem
Proposal
Add integration tests that hit
sandbox.zenodo.orgwith a real token, gated behindZENODO_SANDBOX_TOKENenv var. Tests skip gracefully when the token is absent.Use Context7 MCP to pull live Zenodo API documentation when generating test cases — this ensures mocks and assertions match the actual API spec rather than relying on assumptions.
Action Items
Ideation
Planning
*_integration_test.gowith build tags)Implementation
ListUserRecords,SearchRecords,GetRecord,ListVersionsZENODO_SANDBOX_TOKENas GitHub Actions secret🤖 Generated with Claude Code