molecule-sdk-python/tests
Molecule AI SDK-Dev 99bb64ddf3
Some checks failed
Test / test (3.11) (pull_request) Failing after 2s
Test / test (3.12) (pull_request) Failing after 1s
Test / test (3.13) (pull_request) Failing after 1s
feat(molecule_agent): add strip_a2a_boundary() for OFFSEC-003 trust-boundary markers
Platform now wraps peer A2A responses in [A2A_RESULT_FROM_PEER]...
[/A2A_RESULT_FROM_PEER] markers (OFFSEC-003) to mark them as untrusted
third-party content. This change adds:

- strip_a2a_boundary(text): strips the wrapper and returns the interior
  content. Safe on pre-OFFSEC-003 responses (returns input unchanged when
  markers absent or malformed) and on None/empty.

Exported from molecule_agent/__init__.py and added to __all__.

README updated with a dedicated OFFSEC-003 section and call_peer() table
note pointing to strip_a2a_boundary().

8 new tests: basic, whitespace edges, no-markers passthrough, only-start,
only-end, empty/None, end-before-start edge case, multiline content.
305 total tests pass.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-10 16:25:59 +00:00
..
conftest.py feat(tests): GAP-05 add _get_with_retry() with 429 back-off + fix broken test_call_peer_errors 2026-04-23 18:18:12 +00:00
test_a2a_server.py feat(sdk): add A2AServer for Phase 30.8b inbound A2A support 2026-04-23 22:50:19 +00:00
test_call_peer_errors.py feat(tests): GAP-05 add _get_with_retry() with 429 back-off + fix broken test_call_peer_errors 2026-04-23 18:18:12 +00:00
test_cli_connect.py feat: poll-mode inbound delivery + molecule connect CLI (Phase 30.8c) 2026-04-30 13:03:44 -07:00
test_inbound.py feat(sdk): add peer_id and before_ts filter params to fetch_inbound() 2026-05-10 13:01:43 +00:00
test_remote_agent.py feat(molecule_agent): add strip_a2a_boundary() for OFFSEC-003 trust-boundary markers 2026-05-10 16:25:59 +00:00
test_retry_backoff.py feat(tests): GAP-05 add _get_with_retry() with 429 back-off + fix broken test_call_peer_errors (#11) 2026-04-21 07:08:01 +00:00
test_safe_extract.py fix(tests): add conftest.py + fix test_call_peer_errors.py broken imports 2026-04-23 18:18:10 +00:00
test_sdk.py fix(tests): add pytest-asyncio markers to async adaptor tests (#4) 2026-04-21 00:54:07 +00:00
test_sha256_verification.py fix(tests): add conftest.py + fix test_call_peer_errors.py broken imports 2026-04-23 18:18:10 +00:00
test_validators.py feat: initial Python SDK (extracted from molecule-monorepo/sdk/python) 2026-04-16 03:15:38 -07:00