// Shared S3 key conventions + the synthetic join-column name for bulk-upload
// artifacts. The finaliser join (ADR-0006) depends on the classifier CSV key
// being built *identically* in two places — where the CSV is written
// (start-address-matching) and where the finaliser is dispatched
// (dispatchFinaliser) — and on the `source_row_id` column appearing in both the
// address CSV and the classifier CSV. Keeping the convention here is the single
// source of truth that stops those two callers drifting.

export const BULK_UPLOAD_INPUT_PREFIX = "bulk_onboarding_inputs";

export function addressCsvKey(portfolioId: string, uploadId: string): string {
  return `${BULK_UPLOAD_INPUT_PREFIX}/${portfolioId}/${uploadId}.csv`;
}

export function classifierCsvKey(portfolioId: string, uploadId: string): string {
  return `${BULK_UPLOAD_INPUT_PREFIX}/${portfolioId}/${uploadId}-classifier.csv`;
}

// The synthetic per-row UUID column. Minted at start-address-matching and
// emitted into both CSVs so the finaliser can join a row's identity (combiner
// output) to its raw descriptions (classifier CSV). The Model finaliser reads
// this exact header — keep the two in sync.
export const SOURCE_ROW_ID_COLUMN = "source_row_id";
