Skip to content

hub: default auto-created repos to internal source#124

Open
Vishnu Suresh (vishnu-ssuresh) wants to merge 3 commits into
mainfrom
vishnu/fix-hub-integration-json-readme-cleanup
Open

hub: default auto-created repos to internal source#124
Vishnu Suresh (vishnu-ssuresh) wants to merge 3 commits into
mainfrom
vishnu/fix-hub-integration-json-readme-cleanup

Conversation

@vishnu-ssuresh
Copy link
Copy Markdown
Contributor

@vishnu-ssuresh Vishnu Suresh (vishnu-ssuresh) commented May 10, 2026

Summary

  • default hub auto-created repos to source: "internal"
  • switch hub repo creation path to raw POST /api/v1/repos so source can be set
  • keep existing metadata behavior (description, readme, tags, is_public) and 409 conflict tolerance
  • add test coverage asserting source is set to internal

Testing

  • go test ./internal/cmd -run 'TestEnsureHubRepo|TestHubPush_CreatesRepoAndPostsCommit'

@matercomus
Copy link
Copy Markdown

This looks like the fix for #133 — confirming the bug from the user side.

langsmith hub push <new-name> --type agent creates a repo that langsmith hub list / langsmith hub get and the runtime SDK all see fine, but it never appears in the /context Context Hub UI ("No context yet"). Root cause matches this PR exactly: the CLI-pushed repo object has no source field, while UI-created repos have "source": "internal", and the /context list filters on it.

One observation worth preserving in the test coverage: pushing into an already-existing UI-created repo currently keeps its source: "internal" (the field is only set at creation, untouched by later commits). So when switching the creation path to raw POST /api/v1/repos, it'd be good to confirm the existing-repo update path still doesn't reset or drop source.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants