Dashboard › craft › Distillation
ffcacb82-81b0-43db-89e2-777a979be6bb["lore_tm_v1_m2J7qWNrClfdKsg8VxLzZYHweXsAeV774GghCsbQr3Q","lore_tm_v1_DCgnhcfqwdH3xOYkMWYjfbeVxQsLSCnHhSef2h6kvVI","lore_tm_v1_l_D8Z3RLW_0P9Zk-hgnkloimRKoTERTZrK0raF2Di-c","lore_tm_v1_qcwHqFHAICydqwF9bNq9IpajT4Oz7HjMD29rjMT1sEI","lore_tm_v1_aZC5Yuz3DARUuODPwyt5CgQdS430k_UDMd1qrKD3Tqs","lore_tm_v1_h4CRA1U8Z7xjz7m3lT7dRhTwjmmmPmMww_3QPZ0TU44","lore_tm_v1_hGYGkrjKnqJL2JXC5dSUhoSYWw8gpkHaJ_Vmo0wn9Bg","lore_tm_v1_6ppp1pbFfjJwKqdkjTFkSg5iY07g3N56x9liWK4THmY","lore_tm_v1_rgumd3wxxE-ezdqT6IRPyCyOLafwKcwuDkGyzQuLgAU","lore_tm_v1_sg48dSOHc-pdkK--8IauAH6FUqsrx9T69_dasuid9z4","lore_tm_v1_ozfwVXhzAHxHxxg4bePtshQCkDDLMeZnnlbjPVAOyAQ","lore_tm_v1_Lx_sdFUAuNvWw6mWM7oFdl_W4ELr2-WsUoUK_jwrjj8","lore_tm_v1_HukM8W1mrZqI0SIWgmHCRdEROPW5fdm5VjTjIZjnmU4","lore_tm_v1_usUaiSzZ5SwR_Jt0nDzZRtT2TTl_K7p2ioct6BiUnKo","lore_tm_v1_qFVZ1NCZvAa9I6p_qr9_agQt_61zDALlNQq3jlGwHSM","lore_tm_v1_XmJmvIKIoLyZfdH77crWwGzttcZooE33XhLFFtfRvjk","lore_tm_v1_iziGW0uDZNd7RPaLGTjqTfLJeJ77kpK5H4Ssj9r8vis","lore_tm_v1_H3bHqima5jFoHHRUj-Ai_tL9xxdhrniZ1JIoQb8j-7U","lore_tm_v1_cygiEb5lOTnz5S3L5tNE7hKvbTBq_qr9QQJorRjvyvY","lore_tm_v1_vM4HM0t6otfRb1ROgBkk9lFmX_lDgKpozdtDB_V5Dsw","lore_tm_v1_RNsE07Pdn8pq9dK6VJdCoF-ldvLD9mpPi3fQYjA5MLY","lore_tm_v1_Gab2nypDc7bFJcAFNOD5aQBAJjjKTvzwLkbvA4Fvtyo"]
Date: Aug 25, 2026
/home/byk/Code/getsentry/craft-workspace-action-propagation/src/commands/prepare.ts:1-130: command is prepare [NEW-VERSION], aliases are p, prerelease, prepublish, prepare, release, and description is 🚢 Prepare a new release branch.prepare positional NEW-VERSION accepts semver (example "1.2.3"), bump types ("major", "minor", "patch"), "auto" conventional-commit detection, or "calver" calendar versioning; if omitted, it uses .craft.yml versioning.policy.prepare options shown: --rev/-r source git SHA/tag; --no-push default false; --no-git-checks default false; --no-changelog default false; --publish default false; --remote default "origin"; --config-from remote branch for .craft.yml; and --calver-offset declaration begins at line 130.src/commands/prepare.ts constants: DEFAULT_BUMP_VERSION_PATH = join('scripts', 'bump-version.sh'), AUTO_VERSION_MIN_VERSION = '2.14.0', and AUTO_BUMP_MIN_VERSION = '2.21.0'./home/byk/Code/getsentry/craft-workspace-action-propagation/src/commands/targets.ts: targets lists defined targets as a JSON array; handler() gets getConfiguration().targets || [], expands them with expandWorkspaceTargets(), filters named targets against getAllTargetNames(), maps them through BaseTarget.getId, and prints formatJson(allowedTargetNames)./home/byk/Code/getsentry/craft-workspace-action-propagation/package.json: package is @sentry/craft version 2.31.0-dev.0, universal Sentry workflow CLI, MIT-licensed, repository https://github.com/getsentry/craft, with craft and sentry-craft binaries both at dist/craft.build:fat: tsc -p tsconfig.build.json, build:watch: tsc -p tsconfig.build.json --watch, build: node build.mjs, precli: pnpm build, cli: node -r source-map-support/register dist/craft, clean: rm -rf dist coverage, lint: eslint --cache --cache-strategy content, fix: pnpm lint --fix, format: prettier --write ., format:check: prettier --check ., test: vitest run, test:watch: vitest, typecheck: tsc --noEmit, docs:dev: cd docs && pnpm dev, and docs:build: cd docs && pnpm build.24.18.0 and pnpm 10.27.0; test tooling is vitest ^4.1.0 and TypeScript is ^5.7.2./home/byk/Code/getsentry/craft-workspace-action-propagation/vitest.config.mts: Vitest uses globals, node environment, includes src/**/*.test.ts, excludes **/node_modules/**, **/dist/**, and **/fixtures/**, has testTimeout: 30000, and aliases ^marked$ to marked/lib/marked.umd.js.src/__tests__/config.test.ts workspace configuration tests and src/__tests__/versionBump.test.ts tests for workspace:* handling (issue #804), fallback after EUNSUPPORTEDPROTOCOL workspace:*, bun.lock workspace-version patching, workspace-boundary regression handling, and post-checking private workspace packages./home/byk/Code/getsentry/craft-workspace-action-propagation/src/__tests__/config.test.ts:228-411: WS_CONFIG requires minVersion: ${WORKSPACES_MIN_VERSION}, has base GitHub getsentry/toolkit, changelog: CHANGELOG.md, and two workspaces: cli (releaseBranchPrefix: release/cli, github.projectPath: cli, GitHub target tagPrefix: "cli@") and mcp (releaseBranchPrefix: release/mcp, versioning.policy: calver, GitHub target tagPrefix: "mcp@").workspaces; cli resolves release/cli, cli@, GitHub { owner: 'getsentry', repo: 'toolkit', projectPath: 'cli' }, and inherited CHANGELOG.md; mcp resolves release/mcp, mcp@, CalVer, and inherited base GitHub config."nope" and prototype-named selections "constructor", "toString", and "__proto__", reject selecting a workspace when no workspaces are defined, and reject workspace use below WORKSPACES_MIN_VERSION; build metadata suffix +linux is accepted.setActiveWorkspace() re-resolves cli to mcp; selected cli exposes targets [{ name: 'github', tagPrefix: 'cli@' }] for the publish-builder contract; incomplete workspace-only GitHub { projectPath: 'cli' } is dropped to preserve git-remote fallback; a workspace GitHub override that supplies owner/repo/projectPath is retained./home/byk/Code/getsentry/craft-workspace-action-propagation/src/commands/prepare.ts:740-819: CalVer format is config.versioning?.calver?.format ?? DEFAULT_CALVER_CONFIG.format, passed to calculateCalVer(git, { offset: calverOffset, format: calverFormat }).resolveVersion treats "auto" and bump types through requiresMinVersion(AUTO_VERSION_MIN_VERSION); otherwise it throws ConfigurationError requiring .craft.yml minVersion >= 2.14.0. "auto" obtains and validates a bump type using getChangelogWithBumpType(git, latestTag) and validateBumpType; explicit bump type is cast as BumpType; it derives current version from getVersion(latestTag) || '0.0.0', calculates via calculateNextVersion, logs Version bump: ${currentVersion} -> ${newVersion} (${bumpType} bump), and returns it. Explicit semver returns unchanged.prepareMain --config-from warning states that remote .craft.yml preReleaseCommand will execute and that the branch must be trusted; it fetches and loads the remote config as previously inspected./home/byk/Code/getsentry/craft-workspace-action-propagation/src/utils/publishState.ts: publish-resume state was moved from repository-local .craft-publish-<version>.json to a repository-unwritable state directory because committed repository content or earlier CI steps could pre-populate completed targets and silently skip publishing.getCraftStateDir() returns $XDG_STATE_HOME/craft when nonempty XDG_STATE_HOME exists; otherwise it returns $HOME/.local/state/craft. The cited getsentry/publish Docker image runs with HOME=/root, yielding a clean workflow-writable location outside committed repository contents.sanitiseForFilename(raw) lowercases and replaces runs of characters outside [a-z0-9._-] with _, then strips leading/trailing underscores. shortCwdHash(cwd) is the first 12 hex characters of SHA-1 of the absolute cwd.getPublishStateFilename(version, githubConfig, cwd = process.cwd(), workspace?) emits publish-state-<owner>-<repo>-<sha1(cwd)[:12]>-<workspacePrefix><version>.json when GitHub config exists; without it, emits publish-state-<sha256(cwd)[:16]>-<workspacePrefix><version>.json.workspace-${Buffer.from(workspace).toString('base64url')}- before the sanitized version, preventing independent release units at the same repository/cwd/version from sharing completed-target state. getPublishStatePath() joins this filename to getCraftStateDir()./home/byk/Code/getsentry/craft-workspace-action-propagation/src/commands/publish.ts:650-904: it expands config.targets || [] with expandWorkspaceTargets(), resolves getGlobalGitHubConfig() for publish-state naming but falls back to null on error, and calls getPublishStatePath(newVersion, publishStateGithubConfig, process.cwd(), getActiveWorkspace()).publishMain warns if legacy repository-local .craft-publish-${newVersion}.json exists, never reads it for security reasons, and directs workflows to ${publishStateFile} under $XDG_STATE_HOME/craft/.{ published: Object.create(null) }. Targets marked in publishState.published are logged and skipped.mkdirSync(dirname(publishStateFile), { recursive: true }) ensures the state directory exists. After each publishToTarget(target, newVersion, revision), it sets publishState.published[BaseTarget.getId(target.config)] = true and writes JSON using safeFs.writeFileSync(publishStateFile, JSON.stringify(publishState)).captureException(mergeError) and logged without failing a fully published release. MergeConflictError reports failure of both ort and resolve, conflicting files, optional diff, and manual merge/delete steps; PushError says local merge succeeded but remote push likely failed due to expired auth token, common for publishes over 1 hour, and gives re-authenticate/merge/delete steps; other errors give merge/delete steps.safeFs.unlink(publishStateFile) is intentionally not awaited; errors are traced but ignored, and success logs Version ${newVersion} has been published!. Publishing only specific targets leaves the release branch unmerged and instructs running craft publish ${newVersion} --target none./home/byk/Code/getsentry/craft-workspace-action-propagation/src/utils/__tests__/publishState.test.ts: tests cover XDG state-directory selection, owner/repo + 12-character cwd-hash + version filenames, monorepo cwd disambiguation, base64url workspace isolation, no collision among workspace names CLI, cli, cli/workspace, and cli_workspace, owner/repo/version sanitization, SHA-256 cwd-only fallback, stable inputs, path joining, and the security requirement that state paths never live inside an untrusted repository cwd with or without GitHub config.cli filename suffix -workspace-Y2xp-1.2.3.json and workspace mcp suffix -workspace-bWNw-1.2.3.json./home/byk/Code/getsentry/craft-workspace-action-propagation passed: 3 test files and 99 tests passed; duration 1.72s (transform 706ms, import 2.36s, tests 105ms)./home/byk/Code/getsentry/publish-workspace-acceptance/package.json: package publish is private version 0.0.1, approval-based Sentry publishing system, Apache-2.0, repository git@github.com:getsentry/publish.git; Volta pins Node 24.0.0 and Yarn 1.22.22; test command is vitest run.vitest command: error Command "vitest" not found.vitest run src/modules/__tests__/details-from-context.js through Yarn also failed with /bin/sh: 1: vitest: not found and exit code 127.cli [preview] "next": {"repo":"toolkit","path":".","version":"1.2.3","dry_run":"","merge_target":"","workspace":"cli [preview] \"next\""}. A second JSON input had no workspace field: {"repo":"repo","path":"./path","version":"1.2.3","dry_run":"","merge_target":""}.--workspace as its option value even when they resemble flags: --dry-run, --config-from=untrusted, and -cli; each was parsed after positional "prepare" as { kind: "option", name: "workspace", rawName: "--workspace", index: 1, value: ..., inlineValue: false }./home/byk/Code/getsentry/craft-workspace-action-propagation failed to load yargs-parser with MODULE_NOT_FOUND under Node v24.18.0.workspace value interpreted subsequent apparent flags normally: --dry-run produced workspace: "", "dry-run": true, and dryRun: true; --config-from=untrusted produced workspace: "", "config-from": "untrusted", and configFrom: "untrusted"; -cli produced workspace: "" and separate boolean aliases c: true, l: true, i: true.publish: getsentry/toolkit [workspace: "x\\"] @999.0.0 # $(printf pwned)"] @1.2.3 from workspace input x"] @999.0.0 # $(printf pwned); the result JSON preserved that workspace string..github/workflows/release.yml and action.yml; diff statistics were 9 additions and 0 deletions in .github/workflows/release.yml, and 27 additions and 3 deletions in action.yml.