add api to read current patches
unit tests for loader patch logic