Skip to content

Graph-Native Infrastructure for Context and Accountable AI Systems

fix(ingest): prevent mutable options mutation in batch/multi-example calls

KaifAhmad1fbdeb6873a2a
diff --git a/semantica/ingest/methods.py b/semantica/ingest/methods.py
index f8cdcb4d..83c05cff 100644
--- a/semantica/ingest/methods.py
+++ b/semantica/ingest/methods.py
@@ -552,6 +552,7 @@ def ingest_public_api(
"delay",
"fail_fast",
"max_retries",
+ "rate_limit_delay",
"validate_no_auth",
):
request_kwargs.pop(config_only_key, None)
diff --git a/semantica/ingest/public_api_ingestor.py b/semantica/ingest/public_api_ingestor.py
index 0b467053..afefbe27 100644
--- a/semantica/ingest/public_api_ingestor.py
+++ b/semantica/ingest/public_api_ingestor.py
@@ -565,7 +565,7 @@ class PublicAPIIngestor(RESTIngestor):
def ingest_examples(self, names: List[str], **options) -> List[APIData]:
"""Ingest multiple pre-configured public API examples."""
- return [self.ingest_example(name, **options) for name in names]
+ return [self.ingest_example(name, **copy.deepcopy(options)) for name in names]
def batch_public_apis(
self,
@@ -578,7 +578,7 @@ class PublicAPIIngestor(RESTIngestor):
for endpoint in endpoints:
try:
results.append(
- self.ingest_public_api(endpoint, method=method, **options)
+ self.ingest_public_api(endpoint, method=method, **copy.deepcopy(options))
)
except Exception as exc:
self.logger.warning(f"Failed to fetch public API {endpoint}: {exc}")