Skip to content

Avoid decoding external activity payloads in metadata projections #490

Description

@rmcdaniel

Reproduction

During qualification of durable-workflow/server#141, a 64 MiB external Avro activity result is validated and retained without an inline copy, but activity completion still exhausts the published Server image PHP 128 MiB limit. ActivityOutcomeRecorder::projectRun() invokes RunSummaryProjector, which calls RunActivityView::activitiesForRun() and decodes the complete activity result through publicTypedValue(). The summary needs lifecycle metadata, not the decoded application value.

The same eager helper is used by Server standalone activity inspection to obtain attempt metadata. Catching Throwable does not recover a PHP memory-limit fatal.

Required outcome

  • Provide a metadata-only activity view mode that does not download or decode arguments/results while preserving typed-history authority and attempt/retry state.
  • Use it for summary projection and other verified metadata-only consumers. Keep existing decoded-view behavior as the default for callers that explicitly need values.
  • Preserve workflow/activity completion, history, task leasing, and external references across a fresh process/database reload.
  • Add a regression whose external storage driver rejects reads, proving metadata projection never touches stored payload bytes.
  • Qualify the package with the Server real-HTTP reproducer before publishing the combined fix.

Accepted dependency of durable-workflow/server#141; implementation stays in this owning package, with Server integration in durable-workflow/server#142. No production runtime or memory allocation has been changed.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions