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

Relationships

#3487 bundle freshness: a one-off deno info failure leaves a source on the in-directory fallback for good

Opened by zack · 10/14/2026· Shipped 10/15/2026

Follow-up to swamp-club#3385 (PR swamp-club/swamp#3128), from its adversarial review.

Problem

When ExtensionLoader.bundleWithCache bundles a local source successfully but the deno info module graph read fails (timeout, killed process, abort under load), recordSourceModules records the resolveLocalImports walk bounded at the kind directory instead. From then on the source has a recorded list, so scanCatalogFreshness never treats it as unrecorded again and the graph is never re-read. A model in extensions/models importing ../lib/msg.ts then goes back to the #3385 behaviour: edits to msg.ts do not rebuild the bundle, until a file the walk reaches changes.

Expected

A transient graph-read failure is retried. Retrying on every scan would loop when deno info fails deterministically, so the retry must be bounded. Suggested approach: mark a fallback list recorded after a successful bundle as graph pending, treat it as stale once on the next scan, and record the fallback for good if the retry also fails.

Smaller items from the same review

  • recordSourceModules on the success path is not guarded: a catalog write error after a good bundle surfaces as a bundle failure. The failure path already catches and logs at debug.
  • findSourceModules rejects lists over 10,000 modules, but recordSourceModules stores them, so such a source is rebundled on every command. Apply the cap on write too.
  • rebundleAndUpdateCatalog returns early when the source no longer matches the adapter's export regex, before bundleWithCache, so a source the heal marks stale is never recorded and is re-checked on every command (cheap, but it never settles).
  • design/primitives/extensions.md says pulled sources stay on the fallback; a pulled source that rebundles locally does get its graph recorded. Reword to: pulled sources with no recorded list are not forced stale.
02Bog Flow
✓OPEN✓TRIAGED✓IN PROGRESS✓SHIPPED+ 1 MOREASSIGNED+ 5 MOREREVIEW+ 11 MOREPR_MERGED+ 2 MORESESSION_SUMMARIZED

Shipped

10/15/2026, 1:33:17 PM

Click a lifecycle step above to view its details.

03Sludge Pulse
zack assigned zack10/14/2026, 10:37:23 PM

Sign in to post a ripple.