Skip to content

Harden task serialization failures - #49

Merged
vikranthreddimasu merged 1 commit into
masterfrom
harden-task-serialization-errors
Jul 19, 2026
Merged

vikranthreddimasu merged 1 commit into
masterfrom
harden-task-serialization-errors

Conversation

@vikranthreddimasu

@vikranthreddimasu vikranthreddimasu commented Jul 19, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • Pre-serialize outbound task specs before registering dispatcher pending state, so non-msgpack-native arguments fail immediately without leaking pending futures.
  • Convert worker result serialization failures into structured remote task errors instead of letting the worker reply coroutine die and strand the coordinator.
  • Added regression coverage for invalid task arguments and invalid worker return values.

Security changes

  • No auth, credential, TLS, or authorization policy changes.
  • Added an audit event for worker result serialization failures, with only task metadata and exception type.

Usability changes

  • Callers now get explicit serialization errors instead of timeouts when task payloads or return values cannot cross the wire.

Tests/checks run

  • python -m pytest tests/test_compute/test_dispatch.py -v
  • python -m pytest tests/test_compute tests/test_fuzz/test_fuzz_task_spec.py -v
  • ruff check macfleet/compute/dispatch.py macfleet/compute/worker.py tests/test_compute/test_dispatch.py
  • ruff check macfleet/compute tests/test_compute tests/test_fuzz/test_fuzz_task_spec.py
  • make lint
  • make test
  • GitHub Actions test workflow: all 11 jobs passed
  • git diff --check master...HEAD
  • git diff master...HEAD | rg -n "(BEGIN .*PRIVATE KEY|AWS_SECRET_ACCESS_KEY|GITHUB_TOKEN|password=|token=|secret=|sk-[A-Za-z0-9])" || true

Commits

  • 8b7dfe4 Harden task serialization failures

Risks / manual review notes

  • Low risk. Change is limited to remote task dispatch/worker serialization error handling and tests.
  • make test passed with 1025 tests and 2 existing legacy cloudpickle deprecation warnings.

Merge status

  • Merged into master after all checks passed.

@vikranthreddimasu
vikranthreddimasu merged commit 0ea641b into master Jul 19, 2026
11 checks passed
@vikranthreddimasu
vikranthreddimasu deleted the harden-task-serialization-errors branch July 19, 2026 15:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant