You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Replace 15+ concrete type assertions with capability interfaces in cmd/server/main.go #59
cmd/server/main.go iterates the service registry using 15+ type assertions like if gen, ok := svc.(*module.OpenAPIGenerator); ok { ... }. This forces the server to know about every specific module type at compile time, breaking plugin isolation.
Fix Direction
Define capability interfaces (e.g. SchemaRegistrar, WorkflowStoreProvider) that modules opt into. Iterate the service registry checking for interface satisfaction instead of type identity:
for_, svc:=rangeapp.SvcRegistry() {
ifregistrar, ok:=svc.(SchemaRegistrar); ok {
registrar.RegisterSchemas()
}
}
Note
This item depends on the serverApp god object refactor (see related issue) being merged first, as both touch cmd/server/main.go.
Context
See docs/DEFERRED_ISSUES.md — Architecture section.
Activity
refactor: replace concrete type assertions with capability interfaces (…
refactor: replace concrete type assertions with capability interfaces (…