Skip to main content
← Back to list
01Issue
FeatureOpenSwamp CLI
Assigneeskeeb

First-class methodRunId / invocationId on DataRecord

Opened by keeb · 4/9/2026

Problem

After PR #1145 promoted workflow provenance fields (workflowRunId, workflowName, jobName, stepName, source, ownerRef) to first-class DataRecord fields, one provenance dimension is still missing: the identity of the specific method invocation that produced a record.

Workflows have workflowRunId. Workflow steps have stepName + jobName. But a single method invocation — whether triggered by swamp model method run or by a workflow step — has no identifier on its outputs. Two invocations of the same method on the same model produce records that are indistinguishable except by createdAt (per-record, not per-invocation) or version (per-data-name, doesn't correlate across data names).

What's missing

A methodRunId (or invocationId) field, peer to workflowRunId. Properties:

  • Generated by the framework at the start of every method invocation, manual or workflow-triggered
  • Set on every data record the invocation produces
  • First-class queryable: in QUERY_FIELDS, indexed in the catalog, populated during backfill
  • Always populated — never empty

Same shape of change as PR #1145.

What it unlocks

# All data from a specific invocation
methodRunId == "abc-123"

# Per-item records from the latest run of a model
modelName == "X" && methodRunId == data.latestMethodRunId("X")

The latter case is the one that has no clean expression today. Workarounds (batch manifests, createdAt clustering, per-extension tagging conventions) all push a missing primitive into the extension layer.

Why this is not "execution identity scoping"

Earlier discussion (#1123) rejected automatic scoping by execution identity. That was about hidden framework-injected filters. This is the opposite: methodRunId is a plain queryable field that authors compose into predicates explicitly. No auto-injection. The framework's job is just to expose the field.

Out of scope

  • Per-invocation execution metadata beyond identity (timestamps, duration, status) — separate
  • A data.latestMethodRunId(modelName) helper — sugar that could come later
02Bog Flow
OPENTRIAGEDIN PROGRESSSHIPPED

Open

4/9/2026, 1:34:22 AM

No activity in this phase yet.

03Sludge Pulse
stack72 assigned keeb4/9/2026, 4:20:38 PM
keeb assigned adam4/9/2026, 6:06:37 PM
keeb unassigned adam4/9/2026, 6:06:48 PM

Sign in to post a ripple.