Skip to main content
← Back to list
01Issue
BugShippedSwamp CLIPublic
Assigneeshammz

Relationships

#2188 data.latest() cannot see ephemeral data once the light expression context is used (breaks verify-reviews and verify-skills guards)

Opened by hammz · 9/16/2026· Shipped 9/16/2026

Symptom

Since swamp 20260916.163631.0-sha.34d98319, every verify-reviews and verify-skills run fails immediately after detect-changes:

InvalidExpressionError: Invalid expression: No such key: attributes
data.latest('repo', 'diff').attributes.files.filter(...)

All three guarded review steps fail, so no attestation can be produced and no PR can be opened. Two sessions hit it within minutes of the binary update (runs 417de1bc and 7ac47d6a in the verify-reviews history).

Root cause

@swamp/git writes diffResult with lifetime: ephemeral, so the record only exists in the run's in-memory catalog. ModelResolver.buildDataNamespace().latest() has two paths:

  1. If the model is in the pre-built coordinates map, it calls dataRepo.findByName on the composite repo, which sees ephemeral data.
  2. Otherwise it falls back to dataQueryService.getLatestRecord().

CompositeDataQueryService overrides query and querySync but not getLatestRecord, so path 2 only consults the persistent catalog and returns null. latest() then yields an empty map and any .attributes access throws.

Before #2468 (swamp-club#2123) every workflow run built the full context, so any model that already existed on disk (the repo auto-definition) took path 1 and the bug was masked. #2468 switches workflows with no model./file references to buildLightContext(), whose coordinates map is empty, so every data.latest() now takes path 2. The latent bug was already reachable before #2468 for any model created during the run (direct-type steps), which is why the minimal repro below fails on older binaries too.

Repro

Workflow with a @swamp/git diff step into a fresh direct-type model, then a later job reading data.latest('<model>', 'diff').attributes.files.size() in a step input or a guard. Fails with No such key: attributes on 8d16b629, 6de30270, 600af419 and 34d98319.

Fix

Override getLatestRecord in CompositeDataQueryService: ask the ephemeral query service first, fall back to super. With that one method the repro passes (files=20 printed, guard evaluated) on the dev build. Unit test added alongside the existing composite tests.

02Bog Flow
OPENTRIAGEDIN PROGRESSSHIPPED+ 1 MOREASSIGNED+ 5 MOREREVIEW+ 7 MOREPR_MERGED+ 2 MORESESSION_SUMMARIZED

Shipped

9/16/2026, 6:14:20 PM

Click a lifecycle step above to view its details.

03Sludge Pulse
hammz assigned hammz9/16/2026, 5:47:23 PM

Sign in to post a ripple.