-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
bugSomething isn't workingSomething isn't working
Milestone
Description
Description
When using langstar prompt push to update an existing prompt repository, the command fails with a 409 conflict error:
ℹ Checking if repository -/<prompt-name> exists...
✓ Repository exists
ℹ Loading schema file...
ℹ Validating schema...
ℹ ✓ Schema valid
ℹ Pushing structured prompt to -/<prompt-name> (method: json_schema)...
Error: API error: 409 - {"error":"Parent commit validation failed: reference ID <commit-hash>"}
Steps to Reproduce
- Pull an existing prompt:
langstar prompt pull -- "-/<prompt-name>" - Modify the schema (e.g., update a field type)
- Attempt to push the updated prompt:
langstar prompt push \ -o "-" \ -r "<prompt-name>" \ -t "$(cat template.txt)" \ -i "var1,var2,var3" \ --schema updated_schema.json
Expected Behavior
Either:
- The push should automatically fetch the latest commit hash and use it as the parent commit
- There should be a
--parent-commit <hash>option to specify the parent commit - There should be a
--forceoption to override versioning
Current Behavior
The push fails with a 409 conflict error because the LangSmith API requires a valid parent commit reference when updating an existing prompt.
Suggested Solution
Add one or more of:
--parent-commit <HASH>option to specify the parent commit explicitly--auto-parentflag to automatically fetch and use the latest commit as parent--forceflag to override (with appropriate warnings)
Environment
- langstar version: (latest)
- OS: macOS
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working