Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.drpn.ai/llms.txt

Use this file to discover all available pages before exploring further.

The reconciliation engine is the run pipeline. It stages source data, normalizes records, compares matching keys, applies rules, and writes generated output for review.

High-level flow

UI workflow
  -> JSON-RPC facade service
  -> access and tenant checks
  -> saved run, RuleSet, mapping, or source records
  -> source data staging
  -> Spark dataset preparation
  -> base diff and optional rule execution
  -> generated output descriptor and file
  -> UI result view

Run responsibilities

StageResponsibility
Setup and accessPersist run setup and resolve user, company, and tenant scope.
Source stagingSave uploaded files, text payloads, or configured-source inputs for processing.
Base comparisonNormalize records and compute missing-object or matched-pair output.
Rule evaluationApply RuleSet rules to compare-ready data and matched pairs.
Output storageStore generated output metadata and files for review.

Current execution paths

Darpan has two execution paths.
PathRole
RuleSet pathA saved run points to a RuleSetCompareScope with compare sources and optional rules.
Mapping pathA reconciliation mapping describes source members and comparison behavior.
Darpan supports both paths. New run contracts center on RuleSetCompareScope; existing services and release history may still reference mappings.

RuleSet compare flow

The RuleSet path is built from these records:
  • RuleSet
  • RuleSetCompareScope
  • RuleSetCompareSource
  • Rule
  • ReconciliationRun
  • Generated output descriptor records
The compare flow is:
  1. The facade service creates or loads a saved run and its compare scope.
  2. Generic reconciliation saves uploaded or text payloads in a tenant-scoped temp location.
  3. prepare#RuleSetCompareScope resolves compare sources and builds normalized Spark datasets.
  4. reconcile#RuleSetCompareScopeBaseDiff finds base missing-object differences and matched pairs.
  5. reconcile#RuleSetCompareScope preserves base diffs and appends rule-generated diffs from matched pairs.
  6. The backend writes result data and summary metadata as a generated output.

File and source handling

The backend can compare uploaded files, text payloads, and configured sources. CSV and JSON inputs are normalized before comparison. The comparison layer receives structured data and saved run context, not UI-specific state. Generic file reconciliation is routed through:
reconciliation.ReconciliationGenericServices.reconcile#GenericFiles
RuleSet comparison uses:
reconciliation.ReconciliationCoreServices.prepare#RuleSetCompareScope
reconciliation.ReconciliationCoreServices.reconcile#RuleSetCompareScope
The legacy mapping path still routes through:
reconciliation.ReconciliationCoreServices.reconcile#FilesByMapping

Generated outputs

Generated outputs are not just downloaded files. The backend stores descriptor metadata so the UI can list, open, and delete outputs consistently. Generated-output metadata can include:
  • Saved run ID and display name
  • RuleSet and compare-scope IDs
  • Source labels
  • Output location
  • Diff counts and summary fields
  • Created user and tenant scope
Generated output operations are exposed through facade services such as:
facade.ReconciliationFacadeServices.list#GeneratedOutputs
facade.ReconciliationFacadeServices.get#GeneratedOutput
facade.ReconciliationFacadeServices.delete#GeneratedOutput