fix(runtime): normalize legacy attachment content URLs #66

Merged
hongming merged 1 commits from fix/legacy-content-attachment-uri into main 2026-05-25 13:20:15 +00:00
Owner

What

  • Normalize legacy /workspaces/<ws>/content/<file>/content attachment URIs to the current pending-upload fetch/ack endpoints.
  • Preserve cross-workspace token/platform URL lookup for those legacy URIs.
  • Let inbox rewrite cached legacy URIs to local file/workspace URIs before an external agent sees them.

Why

External/MCP workspaces can receive text normally but attachment messages fail when an in-flight or historical message contains the older platform content URL shape. The runtime must fetch/cache/ack those bytes the same way it handles platform-pending:.

Verification

  • PYTHONPATH=. pytest -q tests/test_executor_helpers.py tests/test_inbox_uploads_external.py
  • git diff --check
## What - Normalize legacy `/workspaces/<ws>/content/<file>/content` attachment URIs to the current pending-upload fetch/ack endpoints. - Preserve cross-workspace token/platform URL lookup for those legacy URIs. - Let inbox rewrite cached legacy URIs to local file/workspace URIs before an external agent sees them. ## Why External/MCP workspaces can receive text normally but attachment messages fail when an in-flight or historical message contains the older platform content URL shape. The runtime must fetch/cache/ack those bytes the same way it handles `platform-pending:`. ## Verification - `PYTHONPATH=. pytest -q tests/test_executor_helpers.py tests/test_inbox_uploads_external.py` - `git diff --check`
hongming added 1 commit 2026-05-25 13:10:17 +00:00
fix(runtime): normalize legacy attachment content URLs
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 12s
ci / lint (pull_request) Successful in 44s
ci / unit-tests (pull_request) Successful in 1m13s
ci / smoke-install (pull_request) Successful in 56s
ci / build (pull_request) Successful in 1m7s
d90aad990c
sdk-lead approved these changes 2026-05-25 13:17:15 +00:00
sdk-lead left a comment
Member

[sdk-lead-agent] APPROVED

Reviewed runtime URI normalization and regression coverage. Legacy platform content URLs now use the same authenticated pending-upload fetch/ack path and cached inbox rewrites. No findings.

[sdk-lead-agent] APPROVED Reviewed runtime URI normalization and regression coverage. Legacy platform content URLs now use the same authenticated pending-upload fetch/ack path and cached inbox rewrites. No findings.
integration-tester approved these changes 2026-05-25 13:20:08 +00:00
integration-tester left a comment
Member

[integration-tester-agent] APPROVED

Reviewed focused tests for executor-helper fetch/ack and inbox rewrite compatibility. The regression path is covered. No findings.

[integration-tester-agent] APPROVED Reviewed focused tests for executor-helper fetch/ack and inbox rewrite compatibility. The regression path is covered. No findings.
release-manager approved these changes 2026-05-25 13:20:08 +00:00
release-manager left a comment
Member

[release-manager-agent] APPROVED

Second review: checks are green, change is scoped to legacy attachment URI normalization with regression coverage. No release-blocking findings.

[release-manager-agent] APPROVED Second review: checks are green, change is scoped to legacy attachment URI normalization with regression coverage. No release-blocking findings.
hongming merged commit 7c2c0baa8f into main 2026-05-25 13:20:15 +00:00
hongming deleted branch fix/legacy-content-attachment-uri 2026-05-25 13:20:15 +00:00
Sign in to join this conversation.
4 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: molecule-ai/molecule-ai-workspace-runtime#66