Template reads: ResyncInheritedMembersAsync and HandleGetResolvedTemplateMembers still load the whole tracked library #89
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
After #66/#86 two template reads still load the whole tracked library:
TemplateService.ResyncInheritedMembersAsyncandManagementActor.HandleGetResolvedTemplateMembers(~line 876) both callGetAllTemplatesAsync. Resync can reuse the #86 subtree read (GetTemplateReconcileClosureAsync); resolve-members only needs the parent chain, untracked (#66's analysis closure or a chain-only read). Add equivalence + load tests like #66/#86.Fixed on main
6070cc2b: resync loads only the #86 closure (subtree + parent chain), falling back to just the parent chain (new GetTemplateChainAsync) when nothing derives from the template; HandleGetResolvedTemplateMembers loads only the parent chain, untracked (#66's closure can't be reused there — it drops script bodies, which resolved-members returns). Tests: TemplateChainReadTests (every template in the #86 fixture + unknown id; same writes/audit/result with the whole-library load wired to throw; identical resolved members) — 17 fail on old code, 13 without the empty-closure fallback; TemplateChainRepositoryTests (SQLite: 4-deep chain loads 4 of 46 templates, one query per level); ResolvedTemplateMembersReadTests (never calls GetAllTemplatesAsync). Evidence: slnx 0 warnings/0 errors after rebase; TemplateEngine, ManagementService, Transport, Transport.IntegrationTests, ConfigurationDatabase passed; DeploymentManager passed 3/3 re-runs (one earlier run hit the separately-filed DeploySiteAsync flake).