SPB Git forge

spb/ai-atlas

Public
41commits 1branches 0releases
4.6 MBsize
maindefault branch
12 days agolast push
HTML 77.2% TypeScript 10.5% Python 9.6% JavaScript 2.5%

writer: normalise nested dict values before comparison

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Simon-Pierre Boucher committed 12 days ago (Sep 11, 2026) parent 17ad554

2 changed files +3 −1

modified src/aiatlas/sdk/connector.py +1 −1
@@ -259,7 +259,7 @@ class BaseConnector:
259 259 try:
260 260 async with sem:
261 261 followups = await self._process_target(ctx, target)
262 except Exception as exc: # noqa: BLE001 — never lose a document silently
262 + except Exception as exc:
263 263 ctx.stats.docs_failed += 1
264 264 ctx.log.exception("target failed", extra={"url": target.url})
265 265 try:
modified src/aiatlas/sdk/writer.py +2 −0
@@ -41,6 +41,8 @@ NEW_IMPORTANCE = {"model": 3, "company": 2, "provider": 2, "paper": 1, "dataset"
41 41 def _norm_value(v: Any) -> Any:
42 42 if isinstance(v, datetime):
43 43 return v.astimezone(UTC).isoformat(timespec="seconds")
44 + if isinstance(v, dict):
45 + return {k: _norm_value(x) for k, x in v.items()}
44 46 if isinstance(v, (set, tuple, list)):
45 47 items = [_norm_value(x) for x in v]
46 48 return sorted(items) if all(isinstance(x, (str, int, float)) and not isinstance(x, bool) for x in items) else items
47 49