---
title: "Cron Farcaster Spine Reconcile"
method: POST
path: "/v2/import/cron/farcaster-spine-reconcile"
tags: ["v2 - Import"]
---

# Cron Farcaster Spine Reconcile

`POST /v2/import/cron/farcaster-spine-reconcile`

## Request

- Base URL: `https://api.jubjubapp.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.jubjubapp.com/v2/import/cron/farcaster-spine-reconcile`
- Auth: HTTP bearer

Backstop for the Farcaster vault-visibility gap.

handle_cast writes the vault-visible spine row (onchain_publish_events, keyed
farcaster_<content_id>) best-effort with no backstop — a failed write leaves
a source="farcaster_auto" cast owned/earning but INVISIBLE in the creator's
vault (the vault filters onchain_publish_events by
contributors_jubjub_profile_ids). This sweep finds such orphans and (re)writes
the spine row via record_launch_onchain + _LaunchProxy, reconstructing the
launch from the content doc's own fields. Idempotent + safe:

  - The staged doc is written with .set(merge=True) keyed by launch_id, so a
    double write merges harmlessly.
  - We SKIP any row that already has contributors_jubjub_profile_ids. That
    field is only set once record_launch_onchain reaches step 5 (the full
    staged write), which is BEFORE its on-chain ledger tx (step 6). So
    "no contributors" ⟹ the on-chain tx never fired ⟹ running
    record_launch_onchain fires it exactly once (no double-submit); and any
    already-staged/confirmed row (contributors present) is left untouched.

NOTE: the generic spine-recovery worker (recover_stuck_spine_events) CANNOT
heal these — it loads the launch from launches_v2, which Farcaster casts do
not have. Hence this dedicated sweep.

Called by Cloud Scheduler (needs a NEW job — see TODO). Best-effort, batched.

## Response `200`

Successful Response

- unknown

---

[API](https://skmtc.dev/jubjubapp/apis/jubjub-api.md) - [All operations](https://skmtc.dev/jubjubapp/apis/jubjub-api/llms.txt) - [OpenAPI document](https://skmtc.dev/jubjubapp/apis/jubjub-api/revisions/353157b296f2?raw)
