Severity: Low
Category: Compose resolver
Platform: All
Confidence: Flagged during PR 2C review
Description
Both the built-in and user-extension loops in resolve-compose-stack.sh call
manifest.get("schema_version") and similar after parsing YAML. If the
manifest file is present but empty, yaml.safe_load returns None, and
None.get(...) raises AttributeError — which is NOT caught by the narrow
dispatch (YAMLError, JSONDecodeError, KeyError, TypeError) and falls
through to the outer except OSError (which re-raises because it doesn't
match), causing the whole resolver to crash with a stack trace.
DreamServer's "Let It Crash" philosophy technically allows this, but the
crash happens far from the user's action (resolver is an indirect
dependency), and the stack trace mentions .get() not "empty manifest
file" — hard to diagnose.
Affected file(s)
dream-server/scripts/resolve-compose-stack.sh — both extension loops
Suggested approach
Either (a) add if not isinstance(manifest, dict): continue after YAML parse,
or (b) catch AttributeError in the narrow dispatch alongside
KeyError/TypeError. Option (a) is more explicit.
Labels
enhancement, resolver, robustness
Severity: Low
Category: Compose resolver
Platform: All
Confidence: Flagged during PR 2C review
Description
Both the built-in and user-extension loops in
resolve-compose-stack.shcallmanifest.get("schema_version")and similar after parsing YAML. If themanifest file is present but empty,
yaml.safe_loadreturnsNone, andNone.get(...)raisesAttributeError— which is NOT caught by the narrowdispatch (
YAMLError,JSONDecodeError,KeyError,TypeError) and fallsthrough to the outer
except OSError(which re-raises because it doesn'tmatch), causing the whole resolver to crash with a stack trace.
DreamServer's "Let It Crash" philosophy technically allows this, but the
crash happens far from the user's action (resolver is an indirect
dependency), and the stack trace mentions
.get()not "empty manifestfile" — hard to diagnose.
Affected file(s)
dream-server/scripts/resolve-compose-stack.sh— both extension loopsSuggested approach
Either (a) add
if not isinstance(manifest, dict): continueafter YAML parse,or (b) catch
AttributeErrorin the narrow dispatch alongsideKeyError/TypeError. Option (a) is more explicit.Labels
enhancement,resolver,robustness