refactor(forgerpc): identity RPC subjects are keyed by identity ID

This commit is contained in:
sam committed 2026-10-04 18:58:10 +11:00
1 parent c28b0adbc2
commit 6c208f2b0a
2 files changed
+7 -2

No files matched your search

+3 -1
View File
@@ -13,6 +13,7 @@ import (
"github.com/nats-io/nats.go"
domainidentity "github.com/samcharles93/archie-core/internal/domain/identity"
"github.com/samcharles93/archie-core/internal/domain/workflow"
"github.com/samcharles93/archie-core/internal/natsrpc"
"github.com/samcharles93/archie-core/internal/worktree"
@@ -28,7 +29,8 @@ func SubjectFor(identity, base string) string {
if identity == "" {
return base
}
return "archie.worktree." + identity + "." + strings.TrimPrefix(base, "archie.worktree.")
// Keyed by the identity's ID, as forgerpc.SubjectFor is.
return "archie.worktree." + string(domainidentity.StableID(identity)) + "." + strings.TrimPrefix(base, "archie.worktree.")
}
type PushRequest struct {