Dashboard › craft › Distillation
64dae093-7ca4-478d-86bf-02996e4dc1e0["lore_tm_v1_EGSiBD_gJc6fV34f1fnQ0qNWpeDkLRkqcRwm-VSoz_U","lore_tm_v1_0yTpjNDAcP2LM386IHSRxonrKiOT9zFHcWvGAMeYiXc","lore_tm_v1_11E5r2VBKJN3osLKmq7aZ8_PGw8l5fa7XpzWvYmMVRg","lore_tm_v1_Oqkzun-At1clxO-PY3FElJkRCUhyLpm-eKHS2FDim8s","lore_tm_v1_BcMyIxz8ewrUGdFan5bKhtDP0SaVEs73HR-TgSJ8-0M","lore_tm_v1_epWZiegHm3-5dSOo-rNItsI4QrVHTwebS7AUgubneh8","lore_tm_v1_HVNwUmY7zQpIkJL424th8OHfhplPqup8dXXdu7NKCus","lore_tm_v1_e3g4L37P9Go2CjfYZ_xwIY2rdYyh-ofUPG3E1wvkGJQ","lore_tm_v1_rbRlfaSOgNDvlHDYw9riay8aEJ9EN1YWOLXhp9kmKj8","lore_tm_v1__UcH9lXhaPuvggkzcZG4SHd3ijSQXeZcMAKzWfvA1Sc","lore_tm_v1_dZKGaI_W7zzijZ2g6wgFoIqPix74LsRsccpBxAASPRo","lore_tm_v1_629RCCJ3Z5_yND7e5g26he0JUAADZbXJx8avpjAOEeU","lore_tm_v1_JzxsHGVdiNcLYvlWbCczfWCRgs0CTTaa_pd3R17Ifyo","lore_tm_v1_KzLBDjNdqoQWGljL3jdJgiksNNpt4SBHE1GdME-uwmo","lore_tm_v1_YEURvTnYYJtKkiJwrVIt1F4Y_sJTjB8IEsjaiPx7O-Q"]
Date: Aug 25, 2026
/home/byk/Code/getsentry/craft/src/utils/publishState.ts (110 lines). Publish-resume state was moved from repository-local .craft-publish-<version>.json to $XDG_STATE_HOME/craft/, falling back to $HOME/.local/state/craft/, to prevent committed repository contents or prior CI steps from pre-populating completed targets and causing silent skips. getCraftStateDir() uses XDG_STATE_HOME when non-empty, otherwise homedir()/.local/state/craft./home/byk/Code/getsentry/craft/src/utils/publishState.ts, getPublishStateFilename(version, githubConfig, cwd = process.cwd()) sanitizes strings by lowercasing and replacing non-[a-z0-9._-] runs with _, trimming edge underscores. With GitHub config it returns publish-state-<owner>-<repo>-<sha1(cwd)[:12]>-<version>.json; without GitHub config it returns publish-state-<sha256(cwd)[:16]>-<version>.json. getPublishStatePath() joins this filename to getCraftStateDir()./home/byk/Code/getsentry/: cli-api-1423/, cli-wt/, cli/, codecov-action/, craft-vercel-prebuilt-output/, craft-vercel-project-config/, craft-workspace-action-propagation/, craft-workspaces-schema/, craft/, devinfra-coder-infra/, devinfra-deployment-service/, getsentry/, ops/, package_grant_publish_repo/, publish-workspace-acceptance/, publish/, security-as-code/, self-hosted/, sentry-api-schema/, sentry-docs/, sentry-forge/, sentry-go/, sentry-javascript/, sentry-orbital/, sentry-python/, sentry-release-registry/, sentry-wizard/, sentry/, snuba/, spotlight/, sqlish/, static-sites/, stripe-app/, symbolic/./home/byk/Code/getsentry/craft-workspace-action-propagation/action.yml found 11 workspace-related matches: input workspace at lines 34β35 is described as βNamed Craft release workspace to prepare and publishβ; WORKSPACE is passed from ${{ inputs.workspace }} at lines 168, 202, and 231; Craft arguments append/use --workspace "$WORKSPACE" at lines 185 and 206; issue title handling JSON-encodes workspace with jq -Rn --arg workspace "$WORKSPACE" '$workspace' and adds [workspace: ${workspace_json}] at lines 258β265.pnpm; npm and yarn must never be used.pnpm install --frozen-lockfile..prettierrc.yml; ESLint 9.x uses flat config in eslint.config.mjs with typescript-eslint; unused variables prefixed _ are allowed. Mutating operations must use getGitClient()/createGitClient() for Git, getGitHubClient() for GitHub API, safeFs.writeFile()/safeFs.unlink() rather than raw fs, or safeExec(action, description) for custom operations./home/byk/Code/getsentry/craft-workspace-action-propagation/src/utils/publishState.ts (121 lines). getPublishStateFilename() and getPublishStatePath() now accept optional workspace?: string; when present it adds workspace-${Buffer.from(workspace).toString('base64url')}- immediately before sanitized version in both GitHub-config and cwd-hash-only filenames. This losslessly encoded workspace prefix isolates completed-target resume state for independent same-repository, same-version release workspaces.--workspace --dry-run must never be mistaken for a workspace name./home/byk/Code/getsentry/craft-workspace-action-propagation/src/utils/workspaces.ts supports workspace discovery from package.json npm/yarn workspaces and pnpm-workspace.yaml; it detects workspace packages/dependencies and topologically sorts them, reporting circular dependencies. Search also confirmed workspace-aware publish state in src/utils/publishState.ts and workspace selection parsing in src/utils/helpers.ts./home/byk/Code/getsentry/craft-workspace-action-propagation/src/utils/helpers.ts lines 1β140. MAX_STEP_OUTPUT_BYTES = 64 * 1024; envToBool() treats '', 'undefined', 'null', '0', 'false', and 'no' as false. extractWorkspaceSelection(argv, env = process.env) reads CRAFT_WORKSPACE, parses raw argv using Node parseArgs() with { workspace: { type: 'string' } }, allowPositionals: true, strict: false, and tokens: true.extractWorkspaceSelection() in src/utils/helpers.ts supports --workspace foo and --workspace=foo; last --workspace occurrence wins, but a bare/empty final flag clears earlier CLI selection and falls back to CRAFT_WORKSPACE. It accepts a token value only if non-empty and either inline or not prefixed with -; therefore --workspace=-foo is valid while --workspace --foo is not.resolveWorkspaceConfig at line 110 and its call at line 239 in /home/byk/Code/getsentry/craft-workspace-action-propagation/src/config.ts./home/byk/Code/getsentry/craft-workspace-action-propagation/src/config.ts lines 80β269. setActiveWorkspace(name) sets _activeWorkspaceName and invalidates _configCache and _globalGitHubConfigCache; getActiveWorkspace() returns the active workspace.resolveWorkspaceConfig(base, workspaceName), unknown workspaces throw ConfigurationError listing available workspaces or stating none are defined. Workspace release-relevant fields shallowly override base fields; workspaces and minVersion are omitted from the resolved config. github is shallow-merged so a workspace can override projectPath while inheriting owner/repo; if merged GitHub config lacks owner or repo, github is removed so getGlobalGitHubConfig() can fall back to Git remote detection.applyWorkspaceSelection(config) in src/config.ts returns config unchanged when no workspaces and no active selection; errors if --workspace/active selection is provided without defined workspaces; errors when workspaces exist but none is explicitly selected, instructing --workspace <name> or CRAFT_WORKSPACE; and requires config.minVersion >= WORKSPACES_MIN_VERSION before resolving the selected workspace. SemVer build metadata is stripped before compatibility comparisons because the comparison helper rejects versions containing build metadata./home/byk/Code/getsentry/publish-workspace-acceptance/src/publish/inputs.js (13 lines): inputs() calls detailsFromContext({ context: github.context }) and writes the result with core.setOutput('result', result)./home/byk/Code/getsentry/craft-workspace-action-propagation/src/__tests__/versionBump.test.ts, including describe('workspace:* handling (issue #804)', ...), fixtures using @scope/core: 'workspace:*', simulated npm error code EUNSUPPORTEDPROTOCOL / Unsupported URL Type "workspace:", and assertions that nested dependency pins remain "workspace:*". Search also found selected-workspace config resolution coverage in src/__tests__/config.test.ts line 265./home/byk/Code/getsentry/publish-workspace-acceptance/src/modules/details-from-context.js at line 19 and tests in src/modules/__tests__/details-from-context.js at lines 3, 38, 50, 93, 105, 127, 147, 164, 176, and 198./home/byk/Code/getsentry/publish-workspace-acceptance/src/publish/update-issue.js (9 lines): it imports updateIssue, gets an Octokit client using github.getOctokit(getGitHubToken()), parses process.env.PUBLISH_ARGS as JSON, and calls updateIssue({ context: github.context, octokit, inputs })./home/byk/Code/getsentry/publish-workspace-acceptance/src/modules/update-issue.js (78 lines). updateTargets() currently reads repository-local state from ${process.env.GITHUB_WORKSPACE}/__repo__/.craft-publish-${version}.json; if absent it returns. If present, it concurrently fetches the issue and parses state JSON, then updates the issue body using transformIssueBody().update-issue.js, transformIssueBody(craftState, issueBody) updates target checkboxes in TARGETS_SECTION_PARSER_REGEX using TARGETS_PARSER_REGEX; declared target IDs become - [x] <target> when craftState.published[targetId] is truthy, otherwise - [ ] <target>. Published targets absent from the declared section are appended. updateIssue() derives version, context.repo, and context.payload.issue.number, then concurrently updates targets and removes the "accepted" issue label.