Skip to main content
← Back to list
01Issue
FeatureShippedSwamp CLIPublic
Assigneesstack72

Relationships

#1816 data.latest() should error on ambiguous specName matches across multiple data items

Opened by stack72 · 8/25/2026· Shipped 8/25/2026

Summary

data.latest(modelName, dataName) silently picks an arbitrary winner when the second argument matches a specName tag shared by multiple data items under the same model, rather than erroring on the ambiguity. This can lead to confusing behavior where the expression resolves to unexpected data depending on catalog row ordering.

Example

A model household-fleet has two data items:

  • run-exec-thinkpad (specName tag: runResult)
  • run-exec-clara (specName tag: runResult)

Calling data.latest("household-fleet", "runResult") silently resolves to one of them based on catalog ordering. The caller has no indication the match was ambiguous.

Proposed behavior

When data.latest(model, name) matches by specName tag and finds multiple data items, it should either:

  1. Error loudly with a message like: Ambiguous data.latest() match: specName "runResult" resolves to multiple data items (run-exec-thinkpad, run-exec-clara). Use the specific data name instead.
  2. Or return the most recent across all matches with a debug-level warning.

Option 1 is preferred — it catches workflow bugs early rather than silently resolving to potentially stale data.

Context

Discovered via #1808 where the ambiguous resolution masked the root cause (an is_latest cross-demotion regression) and made the error message ("No such key: attributes") misleading.

02Bog Flow
OPENTRIAGEDIN PROGRESSSHIPPED+ 1 MOREASSIGNED+ 10 MOREREVIEW+ 6 MOREPR_MERGED+ 2 MORESESSION_SUMMARIZED

Shipped

8/25/2026, 8:16:50 PM

Click a lifecycle step above to view its details.

03Sludge Pulse
stack72 assigned stack728/25/2026, 5:58:49 PM

Sign in to post a ripple.