Relationships
#4958 CEL model.<name>.resource loads every latest resource of the behavior, not just the one referenced
Opened by zack · 11/20/2026
Follow-up to #4941. ModelResolver populateFromItems (src/domain/expressions/model_resolver.ts) fills model..resource on first access by reading and JSON-parsing the latest version of every resource the behavior has. An expression that references one instance, such as model.big.resource.blob["blob-0"].attributes, therefore materializes all of them. With a dozen 400 MiB resources this exhausted the heap; after #4941 it fails with a ResourceTooLargeToLoadError, but the error can name a different instance than the one referenced (it named blob-4 for a reference to blob-0). Load each instance's attributes lazily on first access (or per spec), so a reference costs only what it reads. Watch for consumers that enumerate or serialize context.model and would trigger every getter.
In Progress
Click a lifecycle step above to view its details.
Sign in to post a ripple.