cognitive-modules 0.5.1__py3-none-any.whl → 0.6.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
cognitive/migrate.py CHANGED
@@ -265,13 +265,19 @@ def _migrate_from_v2(
265
265
  manifest_changes.append("Added schema_strictness: medium")
266
266
 
267
267
  if 'overflow' not in manifest:
268
+ # Determine default max_items based on schema_strictness (consistent with loader.py)
269
+ schema_strictness = manifest.get('schema_strictness', 'medium')
270
+ strictness_max_items = {'high': 0, 'medium': 5, 'low': 20}
271
+ default_max_items = strictness_max_items.get(schema_strictness, 5)
272
+ default_enabled = schema_strictness != 'high'
273
+
268
274
  manifest['overflow'] = {
269
- 'enabled': True,
275
+ 'enabled': default_enabled,
270
276
  'recoverable': True,
271
- 'max_items': 5,
277
+ 'max_items': default_max_items,
272
278
  'require_suggested_mapping': True
273
279
  }
274
- manifest_changes.append("Added overflow config")
280
+ manifest_changes.append(f"Added overflow config (max_items={default_max_items} based on schema_strictness={schema_strictness})")
275
281
 
276
282
  if 'enums' not in manifest:
277
283
  manifest['enums'] = {