Lineage
Lineage records one row per message per adapter invocation. Input hash, output hash, status, timestamps, error payload. Independent of the main pipeline flow — a broken pipeline still records the lineage up to the point of breakage.
This guide is the operator’s lineage toolbox: how to find a failure, trace it to its root cause, and audit what ran.
Find a failure
Section titled “Find a failure”Most recent failures across all executions:
factflow lineage failuresScoped to one execution:
factflow lineage failures --execution EXEC_IDEach row shows: lineage id, execution, route, adapter, timestamp, error class. Pick the one you want to drill into.
Trace a chain
Section titled “Trace a chain”Given a lineage id, walk both directions (ancestors + descendants):
factflow lineage chain LINEAGE_IDAncestors let you see what input produced this message. Descendants let you see how far the failure cascaded.
Just children (messages this one produced):
factflow lineage children LINEAGE_IDJust one row:
factflow lineage get LINEAGE_IDList lineage for an execution
Section titled “List lineage for an execution”All rows, filterable:
factflow lineage list --execution EXEC_IDfactflow lineage list --execution EXEC_ID --status failedfactflow lineage list --execution EXEC_ID --adapter web_scraperBatch view
Section titled “Batch view”If an adapter processed messages in a batch (e.g., embedding generator batching 100 texts at a time), every message in the batch shares a batch_id. Inspect one batch:
factflow lineage batch BATCH_IDUseful when debugging partial batch failures.
Summary stats
Section titled “Summary stats”Counts per route and adapter:
factflow lineage stats --execution EXEC_IDSample output (abbreviated):
ROUTE ADAPTER COUNT COMPLETED FAILEDsitemap_scraper sitemap_parser 1 1 0sitemap_scraper url_expander 1 1 0sitemap_scraper web_scraper 42 40 2sitemap_scraper web_content_storage 40 40 0Two failures in web_scraper. That’s where to investigate.
Debugging workflow
Section titled “Debugging workflow”factflow execution get EXEC_ID— confirmstatus=failedfactflow lineage failures --execution EXEC_ID— find the failing rows- Pick one row’s
id, runfactflow lineage chain IDto see the parent chain - The chain’s root points back to an input message — find its storage key via
metadata.input_key factflow storage get INPUT_KEYto read the bytes that tripped the adapter- Reproduce locally in a unit test
- Fix, push, redeploy
factflow execution replay EXEC_ID --from-stage FAILED_STAGEto rerun with the same input
Via the API
Section titled “Via the API”GET /api/v1/lineage?execution_id=X&status=failed— list with filtersGET /api/v1/lineage/{id}/chain— forward + backward chainGET /api/v1/lineage/{id}/childrenGET /api/v1/lineage/failuresGET /api/v1/lineage/stats?execution_id=X
Invariants
Section titled “Invariants”Two guarantees lineage maintains:
- Commits independently. A lineage DB issue never fails the pipeline. A pipeline crash still records lineage up to the crash.
- Pending children are counted. A parent row is only truly complete when its recorded children have also completed. Prevents false-positive “done” states in chain queries.
Related
Section titled “Related”- Concept: Lineage — the underlying model
- factflow-lineage reference
- Replay guide — how lineage feeds replay decisions