fix(front): upgrade to SDK 2.0.0, add unit tests#288
fix(front): upgrade to SDK 2.0.0, add unit tests#288Shubhank-Jonnada wants to merge 4 commits intomasterfrom
Conversation
- Upgrade autohive-integrations-sdk to ~=2.0.0 - Access FetchResponse.data on all context.fetch() call sites - Replace error dict returns with ActionError(message=...) - Replace success dict returns with ActionResult(data=...) - Remove legacy result/error fields from all output schemas in config.json - Bump integration version to 2.0.0 - Add pytest unit tests (77 tests) following the writing-unit-tests skill - Add front/tests/conftest.py
🔍 Integration Validation ResultsCommit: Changed directories:
|
TheRealAgentK
left a comment
There was a problem hiding this comment.
LGTM. SDK 2.0.0 migration is clean — context.fetch().data, ActionError(message=...) everywhere, schema envelope fields removed, version bumped. 77 unit tests across all 20 actions.
Local CI verified: validate_integration ✅, check_code ✅, ruff ✅, pytest ✅.
Minor: send_message (line 404) and send_channel_message (line 689) use aiohttp directly for multipart uploads and the helpers return raw {"error": "..."} dicts on HTTP errors. Verified the calling action handlers correctly translate that into ActionError, so this is fine — but the contract is hidden. Worth a small refactor in a follow-up to either raise or return tuples so it's obvious to future readers.
Follow-up tracked in #296 — please add a test_front_integration.py in a follow-up PR, with specific coverage of the multipart-upload paths above. Not blocking this merge.
Process nit: branch doesn't follow <type>/<issue#>/<desc> per AGENTS.md. Please follow the convention next time.
- Add test_front_integration.py with FRONT_API_TOKEN env var skip guard - Add FRONT_API_TOKEN to .env.example - Apply ruff format to all front test files and front.py
Summary
.dataaccess on allcontext.fetch()return valuesActionError(message=...)and success returns withActionResult(data=...)resultanderrorfields from all output schemas in config.jsonTest plan