{"record":{"id":"5347f3a4a0cd510c","repo":"aaif-goose/goose","slug":"rust-version-must-look-like-0-1-0-or-0-1-0-alpha-0","errorCode":null,"errorMessage":"rust_version must look like 0.1.0 or 0.1.0-alpha.0","messagePattern":"rust_version must look like 0\\.1\\.0 or 0\\.1\\.0-alpha\\.0","errorType":"validation","errorClass":"SystemExit","httpStatus":null,"severity":"error","filePath":"crates/goose-sdk/justfile","lineNumber":124,"sourceCode":"        goose-providers \\\n        goose-agent \\\n        goose-context-management \\\n        goose-sdk; do \\\n        cargo publish -p \"$crate\" $dry_run_flag --allow-dirty; \\\n    done\n\nbump-version rust_version:\n    #!/usr/bin/env bash\n    set -euo pipefail\n    python3 - \"{{rust_version}}\" <<'PY'\n    import re\n    import sys\n    from pathlib import Path\n\n    rust_version = sys.argv[1]\n    match = re.fullmatch(r\"(\\d+)\\.(\\d+)\\.(\\d+)(?:-alpha\\.(\\d+))?\", rust_version)\n    if not match:\n        raise SystemExit(\"rust_version must look like 0.1.0 or 0.1.0-alpha.0\")\n\n    major, minor, patch, alpha = match.groups()\n    python_version = f\"{major}.{minor}.{patch}\" if alpha is None else f\"{major}.{minor}.{patch}a{alpha}\"\n\n    crate_names = [\n        \"goose-provider-types\",\n        \"goose-sdk-types\",\n        \"goose-download-manager\",\n        \"goose-local-inference\",\n        \"goose-providers\",\n        \"goose-agent\",\n        \"goose-context-management\",\n        \"goose-sdk\",\n    ]\n    crate_paths = {name: Path(\"crates\") / name / \"Cargo.toml\" for name in crate_names}\n\n    def replace_unique(path: Path, pattern: str, replacement: str) -> None:\n        text = path.read_text()","sourceCodeStart":106,"sourceCodeEnd":142,"githubUrl":"https://github.com/aaif-goose/goose/blob/3810898a7447ec3299be72e223d3570a7aabf0ab/crates/goose-sdk/justfile#L106-L142","documentation":"SystemExit raised by the bump-version recipe in crates/goose-sdk/justfile when the rust_version argument fails the regex ^(\\d+)\\.(\\d+)\\.(\\d+)(-alpha\\.(\\d+))?$ . The recipe validates before rewriting version lines across the SDK crates, because the version string is also converted to a Python-style version (0.1.0-alpha.3 -> 0.1.0a3).","triggerScenarios":"Running 'just bump-version <version>' from crates/goose-sdk with a malformed version: 'v1.2.3' (v prefix), '1.2' (missing patch), '1.2.3-beta.1' (beta not supported), '1.2.3-alpha' (missing alpha number), or trailing whitespace/garbage.","commonSituations":"Copy-pasting a git tag (v-prefix) into the command; using -dev or -rc suffixes that the recipe never supported; assuming arbitrary semver prerelease strings are allowed.","solutions":["Use exactly MAJOR.MINOR.PATCH, e.g. just bump-version 0.2.0","For pre-release use only the alpha form: just bump-version 0.2.0-alpha.0","Strip any 'v' prefix or whitespace before passing the argument","If you need -beta/-rc releases, extend the regex in the justfile first"],"exampleFix":"# before\njust bump-version v0.2.0\njust bump-version 0.2.0-rc.1\n\n# after\njust bump-version 0.2.0\njust bump-version 0.2.0-alpha.0","handlingStrategy":"validation","validationCode":"import re, sys\nif not re.fullmatch(r\"(\\d+)\\.(\\d+)\\.(\\d+)(-alpha\\.(\\d+))?\", sys.argv[1] if len(sys.argv) > 1 else \"\"):\n    raise SystemExit(\"version must be X.Y.Z or X.Y.Z-alpha.N\")","typeGuard":"def is_valid_rust_version(v: str) -> bool:\n    import re\n    return re.fullmatch(r\"\\d+\\.\\d+\\.\\d+(-alpha\\.\\d+)?\", v) is not None","tryCatchPattern":null,"preventionTips":["Validate the version in the release script before calling just","Never pass git tag names with a 'v' prefix","Automate: derive the version string from a single source of truth"],"tags":["justfile","versioning","release","validation"],"backgroundTag":null,"analyzedSha":"3810898a7447ec3299be72e223d3570a7aabf0ab","analyzedAt":"2026-08-16T10:14:26.282Z","schemaVersion":2},"datasetVersion":"2026-08-16T13:17:31.715Z"}