Skip to main content
← Back to list
01Issue
BugOpenSwamp CLIPublic
AssigneesNone

Relationships

#2477 Clear error when hydrateFile reports success but the file is missing

Opened by skunk-ape · 9/24/2026

Problem

When a datastore's hydrateFile returns true but the file is still missing at the path core asked for, core surfaces a bare No such file or directory from the retry read. Nothing indicates that the datastore claimed success, so a hydrate that wrote to the wrong place looks like an unrelated filesystem error.

This hid swamp-club#2404 in production: @swamp/s3-datastore wrote hydrated files to <cachePath>/<ns>/<ns>/..., returned true, and its span reported OK, while core failed with ENOENT at <cachePath>/<ns>/....

Where

src/infrastructure/persistence/unified_data_repository.ts, the lazy content read: on NotFound it calls this.hydrateFile(contentPath) and, when that returns true, re-reads with Deno.readFile(contentPath) without handling a second NotFound.

Suggested change

If the post-hydrate read fails with NotFound, raise an error that names the datastore contract violation, e.g. "datastore reported hydrateFile success for but no file exists at ". Consider recording it on the active span too. Check the other hydrateFile call sites (workflow run/resume, serve) for the same pattern.

  • swamp-club#2404 (the extension bug this would have exposed immediately)
02Bog Flow
◉OPEN○TRIAGED○IN PROGRESS○SHIPPED

Open

9/24/2026, 1:25:28 PM

No activity in this phase yet.

03Sludge Pulse
Editable. Press Enter to edit.

system commented 9/24/2026, 1:25:28 PM

Classified automatically when this issue was filed.

  • Type: Bug

If you feel this classification is incorrect, add a ripple to tell us so.

Sign in to post a ripple.