#6744·openhuman

LinkedIn enrichment still calls the removed backend route POST /agent-integrations/apify/run

Author: M3gA-MindCreated Sep 28, 2026Updated Sep 28, 2026
Labelspriority: p1

Summary

openhuman-core still calls POST /agent-integrations/apify/run for LinkedIn profile scraping. The TinyHumans backend spec vendored in the SDK records that endpoint as no longer available: tinyhumansai/sdk 6e3c3ae99, "remove deprecated Apify routes … no longer available". So every LinkedIn scrape/enrichment path calls a removed route.

This was found while bumping vendor/tinyhumans-sdk (#6743). The bump does not change it: the SDK's route policy doesn't block the path. It is in neither UNEXPOSED_ROUTES nor under /internal, so the request is still sent. The backend side is what went away.

Callers

  • crates/openhuman-core/src/agent/learning/linkedin_enrichment/gmail_discovery.rs:162: scrape_linkedin_profile → IntegrationClient::post("/agent-integrations/apify/run", …).
    • Used by run_linkedin_enrichment (agent/learning/linkedin_enrichment.rs:223). That is reached from the RPC learning_linkedin_enrichment (agent/learning/schemas/profile_handlers.rs:17) and the agent tool in agent/learning/tools.rs:630 (learning_enrich_profile).
  • crates/openhuman-core/src/tools/schemas/apify.rs: the tools_apify_linkedin_scrape controller (handle_apify_linkedin_scrape).
  • Mock routes in integrations/test_support_backend.rs still serve the endpoint, so tests pass against a route production no longer has.

What a user sees (read from the code)

  • Enrichment: the apify-scrape stage is recorded as Failed, with log LinkedIn scrape failed: <error>. PROFILE.md falls back to the URL-only variant (write_profile_md_url_only), so the profile is never actually enriched.
  • RPC tools_apify_linkedin_scrape: returns Apify LinkedIn scrape failed: <error>.
  • Agent tool: errors with learning_enrich_profile: <error>.
  • Not verified against the live backend: the exact status (404 or otherwise). That rests on the SDK's backend spec.

The frontend makes no direct calls to these routes. Its onboarding LinkedIn-scrape stage is already skipped (ContextGatheringStep.tsx, apify_disabled).

Fix

To be decided; this is a product call. Either remove the Apify path (enrichment stage, controller, tool and mocks), or move LinkedIn enrichment to another data source.