Skip to content

fix(hubspot): allow partial list membership responses - #448

Merged
Shubhank-Jonnada merged 1 commit into
masterfrom
sj/447-hubspot-response-schema-20260820-1427
Aug 20, 2026
Merged

fix(hubspot): allow partial list membership responses#448
Shubhank-Jonnada merged 1 commit into
masterfrom
sj/447-hubspot-response-schema-20260820-1427

Conversation

@Shubhank-Jonnada

Copy link
Copy Markdown
Contributor

Summary

  • Makes HubSpot list-membership result arrays optional because HubSpot omits arrays with no values.
  • Keeps the top-level result object required.
  • Adds regression coverage for the observed success response containing only recordsIdsAdded.
  • Documents the conditional response fields and bumps HubSpot from 3.0.0 to 3.0.1.

Closes #447.

Why

HubSpot successfully adds a contact to a manual list but may omit recordIdsMissing and recordIdsRemoved when both arrays would be empty. Requiring all three arrays caused Autohive to raise an output ValidationError after the write had already succeeded.

Flow

flowchart LR
    A["Add contact to manual list"] --> B["HubSpot completes membership write"]
    B --> C["Response includes only populated result arrays"]
    C --> D["Optional array fields pass output validation"]
    D --> E["Automation reports success and continues"]
Loading

Verification

  • python -m pytest hubspot -q — 282 passed.
  • HubSpot structure validation passed with only the existing oauth and content scope heuristic warning.
  • Syntax, imports, JSON, lint, formatting, security, dependency audit, config sync, and fetch-pattern checks passed.
  • Version and README checks passed.

Author commitment

  • Reproduced the failure from the observed HubSpot response shape.
  • Added focused regression coverage.
  • Ran the complete HubSpot test and validation suite.
  • Updated the integration documentation and version.

@github-actions

Copy link
Copy Markdown

🔍 Integration Validation Results

Commit: 537b65c6d07fab5e45ad19e339045f6ab8f1953b · fix(hubspot): allow partial list membership responses
Changed directories: hubspot

Check Result
Structure ⚠️ Passed with warnings
Code ⚠️ Passed with warnings
Tests ✅ Passed
README ✅ Passed
Version ⚠️ Passed with warnings
⚠️ Structure Check output
Validating 1 integration(s)...

============================================================
Integration: hubspot
============================================================

Warnings (1):
  ⚠️ Potentially unused scopes (please verify): oauth, content

============================================================
SUMMARY
============================================================
Integrations validated: 1
Total errors: 0
Total warnings: 1

⚠️ Validation passed with warnings - please review
⚠️ Code Check output
----------------------------------------
Checking: hubspot
----------------------------------------

🐍 Checking Python syntax...
   ✅ Syntax OK

📥 Checking imports...
   ✅ Imports OK

📄 Checking JSON files...
   ✅ JSON files OK

🔍 Linting with ruff...
   ✅ Lint OK

🎨 Checking formatting with ruff...
   ✅ Formatting OK

🔒 Scanning for security issues with bandit...
   ✅ Security OK

🛡️ Checking dependencies for vulnerabilities with pip-audit...
   ✅ Dependencies OK

🔗 Checking config-code sync...
   ⚠️ Existing integration has config-code input drift; treating as historic warning
   ⚠️ Action 'create_note': parameter 'associations' accessed in code but not defined in input_schema
   ⚠️ Action 'create_contact': parameter 'properties' is required in schema but accessed with inputs.get() (safe for missing)
   ⚠️ Action 'update_contact': parameter 'properties' is required in schema but accessed with inputs.get() (safe for missing)
   ⚠️ Action 'search_contacts': parameter 'query' is required in schema but accessed with inputs.get() (safe for missing)
   ⚠️ Action 'add_ticket_comment': parameter 'is_public' defined in input_schema but never accessed in code
   ⚠️ Action 'create_company': parameter 'properties' is required in schema but accessed with inputs.get() (safe for missing)
   ⚠️ Action 'update_company': parameter 'properties' is required in schema but accessed with inputs.get() (safe for missing)
   ⚠️ Action 'search_companies': parameter 'query' is required in schema but accessed with inputs.get() (safe for missing)
   ⚠️ Action 'get_deals': parameter 'after' accessed in code but not defined in input_schema
   ⚠️ Action 'search_deals': parameter 'fetch_all' accessed in code but not defined in input_schema
   ⚠️ Action 'search_deals': parameter 'max_total' accessed in code but not defined in input_schema
   ⚠️ Action 'search_deals': parameter 'after' accessed in code but not defined in input_schema
   ⚠️ Action 'search_deals': parameter 'year' accessed in code but not defined in input_schema
   ⚠️ Action 'create_deal': parameter 'properties' is required in schema but accessed with inputs.get() (safe for missing)
   ⚠️ Action 'update_deal': parameter 'properties' is required in schema but accessed with inputs.get() (safe for missing)
   ⚠️ Action 'get_lists': parameter 'include_filters' defined in input_schema but never accessed in code
   ⚠️ Action 'get_marketing_emails': parameter 'archived' accessed in code but not defined in input_schema
   ⚠️ Action 'get_marketing_emails': parameter 'name' defined in input_schema but never accessed in code
   ⚠️ Action 'get_marketing_emails': parameter 'status' defined in input_schema but never accessed in code
   ⚠️ Action 'get_campaign_assets': parameter 'end_date' accessed in code but not defined in input_schema
   ⚠️ Action 'get_campaign_assets': parameter 'start_date' accessed in code but not defined in input_schema
   ⚠️ Action 'get_campaign_performance': parameter 'end_date' accessed in code but not defined in input_schema
   ⚠️ Action 'get_campaign_performance': parameter 'start_date' accessed in code but not defined in input_schema
   ✅ Config-code sync OK

🔄 Checking fetch patterns...
   ✅ Fetch patterns OK

========================================
✅ CODE CHECK PASSED
========================================
✅ Tests Check output
Integration      Tests  Coverage        Status
----------------------------------------------
hubspot        282/282       88%      ✅ Passed
----------------------------------------------
Total          282/282            ✅ All passed

✅ Tests passed: hubspot
✅ README Check output
========================================
✅ README CHECK PASSED
========================================
⚠️ Version Check output
✅ hubspot: 3.0.0 → 3.0.1 (patch bump) (⚠️ consider a minor bump — new features detected (new functions, classes, or actions))

========================================
✅ VERSION CHECK PASSED
========================================

@Shubhank-Jonnada

Copy link
Copy Markdown
Contributor Author
image

@Shubhank-Jonnada
Shubhank-Jonnada merged commit bb21cf3 into master Aug 20, 2026
3 checks passed
@Shubhank-Jonnada
Shubhank-Jonnada deleted the sj/447-hubspot-response-schema-20260820-1427 branch August 20, 2026 02:35
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.

fix(hubspot): allow partial list membership responses

2 participants