Treat environment variables and configuration flags as a documented contract: the code must (1) read settings from the correct source with safe defaults, (2) make feature-flag behavior explicit (including what becomes a true no-op when disabled), and (3) validate any external runtime dependency that the integration relies on.
Apply this standard:
docs = {}
if include_document_metadata:
documents = DocumentService.get_by_ids([...])
docs = {d.id: DocMetadataService.get_document_metadata(d.id) or {} for d in documents}
# When false, metadata loop should no-op; chunk title/url/content still come from chunks.
secure = str(settings.MINIO.get("secure", False)).lower() == "true"
client = Minio(host, access_key=..., secret_key=..., secure=secure)
CUDA_VISIBLE_DEVICES remapping makes device indices continuous within the process), and ensure the code aligns with those semantics.DEBUG from the correct settings namespace).Enter the URL of a public GitHub repository