push: 5 explicit update actions, drop auto-detect prompt language#243
Merged
Conversation
Mirrors engine PR #2326. The interactive --eval prompt now lists five explicit options the user picks from — no engine-side auto-detect, so the message no longer claims "(auto-detected: added meta/viz, metric-direction, insight-config)" and the printed plan no longer tails an "Auto-detect …" bullet: [ ] Added or edited a metadata — triggers full re-evaluation [ ] Added or edited a metric — triggers full re-evaluation [ ] Edited metric direction or insight-config — cheap update [ ] Added or edited a visualization — regenerate all visualizations [ ] Reinforce insights — regenerate insights from scratch AskForEvaluatePlan now requires at least one selection (survey.Required) since there's nothing for the engine to "auto-detect" anymore — pushes without an eval intent should drop --eval rather than submit empty. --update / -u gains metric_direction / metric-direction / direction aliases routing to UPDATEACTION_UPDATE_METRIC_DIRECTION (added to the Go enum). metadata and metric still trigger a full re-evaluation (the node-server delegates to resetEvaluate). push-examples.md updated to match the new prompt + plan output and to list metric_direction in the alias table.
9d7ab3f to
e3cb83c
Compare
Two related changes folded together (the tensorleapapi parts that previously lived in this work now come from the dedicated "Update node server api" commit): 1. Prompt copy reworded as "What do you want to update?" with shorter noun-led options and a slimmer plan summary in PrintEvaluatePlan. 2. The overwrite branch now ALWAYS asks the multi-select prompt, even without --eval — the picked actions are persisted onto the version doc via PersistUpdateActions so the UI dialog and any later evaluation see the user's recorded intent. Dispatch logic in triggerEvaluate routes the persisted-only case to the new endpoint; --eval keeps the existing update_evaluate / resetEvaluate branching.
GetSlimActiveVersions returns versions in mongo insertion order, which leaves a long-lived project showing brand-new pushes at the bottom of the picker. Sort by `UpdatedAt` descending so the version the user just touched is the first option below "Create new".
e3cb83c to
4f9b031
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Mirrors engine PR #2326 (and node-server PR for
update-actions-explicit). The CLI now asks the user to pick exactly what changed instead of leaning on engine auto-detect:AskForEvaluatePlan(no more "(auto-detected: …)" hint, no more "Auto-detect …" tail inPrintEvaluatePlan).survey.Requiredvalidator — empty submit isn't valid anymore; a push without an eval intent should drop--eval.-u/--updategainsmetric_direction/metric-direction/directionaliases, mapping to the newUPDATEACTION_UPDATE_METRIC_DIRECTIONenum value.metadataandmetricstill trigger a full re-evaluation (server-sideresetEvaluatedelegation).Prompt before → after
Before:
After:
Files
pkg/tensorleapapi/model_update_action.go— addUPDATEACTION_UPDATE_METRIC_DIRECTIONpkg/model/evaluate.go— 5-optionChangeKeyenum + table-drivenplanUpdateEvaluate,survey.Requiredvalidator, dropped auto-detect language, updatedFormatEvaluatePlan/PrintEvaluatePlancmd/root_cmd/push.go—--updatehelp lists all five values + notes metadata/metric trigger full re-eval; Long help removes "(auto-detects changes)" phrasingdocs/push-examples.md— matches new prompt + plan output, addsmetric_directionrowTest plan
leap push -o <name> -e→ prompt shows 5 options, empty submit rejectedleap push -o <name> -u metric_direction→ "Update metric direction" plan, no full re-evalleap push -o <name> -u visualization -u insights→ both bullets shownleap push -o <name> -u metric→ "Re-evaluate (full)" plan, dispatches resetEvaluateleap push -o <name> -u metedata→ typo errors with allowed-values hint-u update_visualizationlong-form still parsesRollout
Depends on engine PR #2326 landing +
@tensorleap/engine-contract@0.0.408published (so the node-server route is live and accepts the new action value).🤖 Generated with Claude Code