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

Relationships

#2124 Repeated targeted lookups reparse unrelated model and workflow definitions

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

Description

Repeated lookups for one model or workflow can repeatedly scan and parse unrelated YAML definitions. Several callers also discard identity information already available to them, adding searches that cannot succeed or needlessly crossing model types.

Reproduction scenario

  1. Use a repository with many definitions and a target model/workflow stored under a legacy UUID filename or a filename different from its declared name, so lookup uses the fallback path.
  2. Repeatedly resolve that same target by name using the same repository instance; trace YAML reads and parses.
  3. Resolve an absent name such as missing-model-name and trace the subsequent ID fallback.
  4. Execute a workflow with multiple model-method steps and trace definition lookups while assembling its report context, where each executed step already records its model type.

Actual behavior

  • YamlDefinitionRepository.findByName() falls back to loading definitions in the type; findByNameGlobal() recursively parses candidates. YamlWorkflowRepository.findByName() falls back to findAll(). Repeated fallback lookups repeat unrelated parsing.
  • findDefinitionByIdOrName() tries global ID lookup after a name miss even when the input is not a UUID. ModelResolver.resolveModel() similarly scans all definitions for an exact ID match after a name miss without UUID gating.
  • Workflow report-context assembly globally searches evaluated definitions and then source definitions by model name even though the step's modelType is known.

Expected behavior

Repeated targeted lookups reuse valid identity information, impossible exact UUID searches are skipped, and callers with a known model type stay within that type. External edits, renames, additions, and deletions remain visible to subsequent lookups.

Suggested fix direction

Use lightweight name/ID-to-path hints, validate a hinted file's identity while reading its current contents, and fall back to discovery when a hint is stale. Gate exact-ID fallback on UUID syntax while preserving supported name/prefix behavior at their existing entry points. Use type-scoped definition lookup for workflow report assembly. Avoid caching parsed definitions or permanent misses in a way that hides external filesystem changes.

Evidence and scope

Inspected swamp core source at revision 7b111963. The reproduction scenario and actual behavior below are derived from source inspection; no released binary or end-to-end reproduction was tested for this report.

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

Shipped

9/16/2026, 12:30:28 AM

Click a lifecycle step above to view its details.

03Sludge Pulse
hammz assigned hammz9/15/2026, 10:48:33 PM

Sign in to post a ripple.