diff --git a/internal/cmd/access_cmd_test.go b/internal/cmd/access_cmd_test.go index dfe112b..09fea71 100644 --- a/internal/cmd/access_cmd_test.go +++ b/internal/cmd/access_cmd_test.go @@ -233,7 +233,6 @@ func TestAccessCheckExactMatchBeyondFirstPage(t *testing.T) { } } - // An @handle ref resolves through the user(ref:) find-one fast path — one // round trip, no paged search at all (SearchUsers is deliberately not // registered: calling it would fail the test). diff --git a/internal/cmd/memory/member.go b/internal/cmd/memory/member.go index 29ab156..44c8b95 100644 --- a/internal/cmd/memory/member.go +++ b/internal/cmd/memory/member.go @@ -69,11 +69,11 @@ func newCmdMemberLs(f *cmdutil.Factory) *cobra.Command { func newCmdMemberAdd(f *cmdutil.Factory) *cobra.Command { var user, role string cmd := &cobra.Command{ - Use: "add --user --role ", - Short: "Add (or upsert) a member on a memory", + Use: "add --user --role ", + Short: "Add (or upsert) a member on a memory", Example: ` hadron memory member add acme.com::kb --user jane@acme.com --role writer hadron memory member add acme.com::kb --user jane --role reader`, - Args: cobra.ExactArgs(1), + Args: cobra.ExactArgs(1), RunE: func(cmd *cobra.Command, args []string) error { r, err := parseMemberRole(role) if err != nil { diff --git a/internal/cmd/node/export.go b/internal/cmd/node/export.go index 58a312d..20ca6c6 100644 --- a/internal/cmd/node/export.go +++ b/internal/cmd/node/export.go @@ -251,4 +251,3 @@ func isUnknownFieldErr(err error, field string) bool { strings.Contains(msg, "Unknown field") || strings.Contains(msg, "GRAPHQL_VALIDATION_FAILED") } - diff --git a/internal/cmd/node_import_content_cmd_test.go b/internal/cmd/node_import_content_cmd_test.go index 58fb806..f30d051 100644 --- a/internal/cmd/node_import_content_cmd_test.go +++ b/internal/cmd/node_import_content_cmd_test.go @@ -22,12 +22,12 @@ func importNodeResp(loc, name, nodeType string) string { // ingestVars is the decoded request-variable shape of an ImportNode call. type ingestVars struct { Input struct { - MemoryId *string `json:"memoryId"` - Loc *string `json:"loc"` - NodeUrn *string `json:"nodeUrn"` - Url *string `json:"url"` - Content *string `json:"content"` - ContentType *string `json:"contentType"` + MemoryId *string `json:"memoryId"` + Loc *string `json:"loc"` + NodeUrn *string `json:"nodeUrn"` + Url *string `json:"url"` + Content *string `json:"content"` + ContentType *string `json:"contentType"` Name *string `json:"name"` NodeType *string `json:"nodeType"` TaskRef *string `json:"taskRef"` diff --git a/internal/cmdutil/memref_test.go b/internal/cmdutil/memref_test.go index d78ba69..65e7bbf 100644 --- a/internal/cmdutil/memref_test.go +++ b/internal/cmdutil/memref_test.go @@ -4,12 +4,12 @@ import "testing" func TestCanonicalMemoryRef(t *testing.T) { cases := map[string]string{ - "acme.com:kb": "hrn:mem:acme.com:kb", // single colon → canonical v2 - "acme.com::kb": "hrn:mem:acme.com:kb", // legacy double colon → canonical v2 - " acme.com:kb ": "hrn:mem:acme.com:kb", // trimmed - "hrn:memory:acme.com::kb": "hrn:mem:acme.com:kb", // v1 URN → canonical v2 - "urn:memory:acme.com::kb": "hrn:mem:acme.com:kb", // legacy prefix normalizes - "hrn:mem:acme.com:kb": "hrn:mem:acme.com:kb", // already canonical v2 + "acme.com:kb": "hrn:mem:acme.com:kb", // single colon → canonical v2 + "acme.com::kb": "hrn:mem:acme.com:kb", // legacy double colon → canonical v2 + " acme.com:kb ": "hrn:mem:acme.com:kb", // trimmed + "hrn:memory:acme.com::kb": "hrn:mem:acme.com:kb", // v1 URN → canonical v2 + "urn:memory:acme.com::kb": "hrn:mem:acme.com:kb", // legacy prefix normalizes + "hrn:mem:acme.com:kb": "hrn:mem:acme.com:kb", // already canonical v2 "019f01ebcafef00dcafe": "019f01ebcafef00dcafe", // raw id (no colon) "": "", // A node-URN-shaped ref (3+ parts) is NOT a memory ref — leave it alone. diff --git a/internal/nodedoc/markdown_test.go b/internal/nodedoc/markdown_test.go index fe30ad4..4d4a141 100644 --- a/internal/nodedoc/markdown_test.go +++ b/internal/nodedoc/markdown_test.go @@ -110,7 +110,7 @@ func TestBuildEdgeEntries(t *testing.T) { {Name: "a", Priority: 0, TargetID: "t1", TargetLoc: "loc1"}, // priority 0 omitted {Name: "", Priority: 3, TargetID: "t2", TargetLoc: ""}, // empty rel kept, loc omitted {Name: "c", Condition: map[string]any{"==": "x"}, TargetID: "t3"}, // condition kept - {Name: "orphan"}, // no target id → skipped + {Name: "orphan"}, // no target id → skipped } got := buildEdgeEntries(edges) if len(got) != 3 {