This repository was archived by the owner on Oct 23, 2026. It is now read-only.
Repository navigation
fix(release): polish --from ref errors and dashed-value parsing - #1203
Merged
Merged
Conversation
Rewrite `--from VALUE` to `--from=VALUE` when VALUE starts with `-` so Stricli passes injection attempts to validation instead of treating them as unknown flags. Map unknown git refs to ValidationError instead of raw git stderr. Co-authored-by: Cursor <cursoragent@cursor.com>
Contributor
|
Contributor
Codecov Results 📊✅ Patch coverage is 94.64%. Project has 5335 uncovered lines. Files with missing lines (3)
Coverage diff@@ Coverage Diff @@
## main #PR +/-##
==========================================
+ Coverage 81.81% 81.83% +0.02%
==========================================
Files 423 423 —
Lines 29308 29354 +46
Branches 19082 19124 +42
==========================================
+ Hits 23975 24019 +44
- Misses 5333 5335 +2
- Partials 1982 1986 +4Generated by Codecov Action |
Match agent-friendly error patterns used elsewhere (hex-id, ResolutionError): each --from/--path validation failure now includes example commands and notes about the ref..HEAD range semantics. Co-authored-by: Cursor <cursoragent@cursor.com>
Move agent-friendly validation message building to errors.ts (matching ContextError/ResolutionError conventions from lore). Use Note: for diagnostic context and always pass field for Sentry fingerprinting. Co-authored-by: Cursor <cursoragent@cursor.com>
Contributor
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Want reviews to match your repository better? Bugbot Learning can learn team-specific rules from PR activity. A team admin can enable Learning in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 1db4b5b. Configure here.
Skip rewrite when the token after --from is a registered global or set-commits flag so --json/--auto are not swallowed. Replace the misleading --from=<ref> Note with accurate git ref / injection wording. Co-authored-by: Cursor <cursoragent@cursor.com>
5 tasks
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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
--from VALUE→--from=VALUEwhenVALUEstarts with-, so Stricli passes dashed refs (e.g.--from --format=x) through to our validation guard instead of treating them as unknown flagsgetCommitLogto a friendlyValidationErrorinstead of surfacing raw git stderr/stack tracesTest plan
pnpm vitest run test/lib/argv-hoist.test.ts test/lib/git-commit-log.test.tssentry release set-commits test --from bogus-ref→Unknown git ref 'bogus-ref': not found in this repository.(exit 21)sentry release set-commits test --from --format=x→--from must be a git ref, not an option(exit 21)Made with Cursor