Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion internal/cmd/access_cmd_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand Down
6 changes: 3 additions & 3 deletions internal/cmd/memory/member.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 <memoryRef> --user <user> --role <owner|writer|reader>",
Short: "Add (or upsert) a member on a memory",
Use: "add <memoryRef> --user <user> --role <owner|writer|reader>",
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 {
Expand Down
1 change: 0 additions & 1 deletion internal/cmd/node/export.go
Original file line number Diff line number Diff line change
Expand Up @@ -251,4 +251,3 @@ func isUnknownFieldErr(err error, field string) bool {
strings.Contains(msg, "Unknown field") ||
strings.Contains(msg, "GRAPHQL_VALIDATION_FAILED")
}

12 changes: 6 additions & 6 deletions internal/cmd/node_import_content_cmd_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`
Expand Down
12 changes: 6 additions & 6 deletions internal/cmdutil/memref_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion internal/nodedoc/markdown_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down