Commit Graph

5 Commits

Author SHA1 Message Date
Maximiliano Korp 078ee356e0 fix(sdk-python): align ZIP bounds and the second-304 error code with the other SDKs
D4 - Python enforced only total archive bytes, entry count, and declared total
uncompressed bytes. It had no per-file byte bound, no compression-method
allowlist, and no artifact path-length bound, while TypeScript and C# enforce
`maxFileBytes` 10 MB, `maxFiles` 1000, stored/deflate only, and `maxPathLength`
512. Executed against the real SDKs on identical bundles at default limits,
Python accepted a 15 MB member, 3001 files, an LZMA member, and a 610-character
path that TypeScript rejected. All four are now refused with the same
`LEARNING_BLOB_INTEGRITY_FAILURE`/`validation` code and the peer messages. The
pre-existing `max_archive_entries` knob is kept for compatibility and both
bounds are enforced.

`_extract` also re-labelled every specific bound violation as "Invalid skill ZIP
archive", because `IntelligenceError` subclasses `RuntimeError` and its own
generic handler swallowed it. Typed errors are now re-raised first.

D5 - the second unconditional 304 raised `LEARNING_BLOB_INTEGRITY_FAILURE` in
the `validation` category, contradicting the shared golden fixture's
`expectations.secondUnconditional304Code` and both peer SDKs. It now raises
`IntelligenceCacheMissError`, which carries `LEARNING_SDK_CACHE_CORRUPT` in the
`internal` category, and the test asserts the fixture field rather than a
restated constant. `errors.*.invalidatesCache` is likewise asserted from the
fixture.

Collision and identity keys now route through the shared pinned folding helper
instead of `str.casefold()`, so Python cannot drift from TypeScript and C# on
code points added after the interpreter's Unicode version.
2026-07-24 16:33:54 -07:00
Maximiliano Korp 1ba4f1062e fix(intelligence-sdks): align canonical error allowlists 2026-07-23 11:01:33 -07:00
Maximiliano Korp a7bd811890 feat: expose verified Intelligence skill descriptors 2026-07-22 08:55:37 -07:00
Maximiliano Korp ada7a34168 fix(intelligence): enforce cross-SDK registry parity 2026-07-16 17:48:43 -07:00
Maximiliano Korp f2080c58cb feat(sdk-python): add Intelligence registry client 2026-07-16 14:20:22 -07:00