Dashboard › craft › Distillation
Distillation
ID: 74563719-772d-4352-b3fb-7831477d8404
Generation: 0
Tokens: 2779
R_compression: 25.840
C_norm: 0.000
Archived: No
Created: 2026-07-21 16:36:18
Source IDs:
["31049a198133b932f3fa6e4672ad7424","05f597d958b7c4fc0e4b49f53048913c","fe88c310632b96469c568edcd6b8a949","7779847211a23a64d8be55c35e1b68be","77caad62b21d1e7de97e77cca9f7e423","47893f3e02e8f94632a10b12d77d3145","434332aa3bdd148278129063d7f06473","1956110b8b87369e0c8f74c36ff3092b","fa40b3dc50b177ade0165cbcdaecb768"]
Observations
<observations>
Date: Jul 21, 2026
* 🔴 (16:11) User surfaced (via grep tool result) a documented recovery procedure in /home/byk/Code/getsentry/craft/.lore.md line 93 titled "getsentry/craft publish recovery: check completed targets before retry to avoid duplicate-publish 403": When a craft publish run fails mid-way (e.g., docker[release] 400 Bad Request), some targets (npm, gcs, registry) may have already succeeded. Recovery steps: (1) verify which targets completed (check npm registry, GCS bucket, release-registry repo); (2) update the publish issue body to check off completed targets; (3) re-add the 'accepted' label to re-trigger the publish workflow — it will skip already-checked targets. Always verify npm publish before retry to avoid duplicate-publish 403. Docker Hub 400 during blob upload is a known transient infrastructure flake — retry resolves it.
* 🟡 (16:11) [tool-result] Grep for "publish_repo" found 9 matches across craft repo files: CHANGELOG.md line 255 ("Support `publish_repo: self` for single-repo setups by @BYK in #760"); action.yml lines 21 (`publish_repo:` input) and 213 (`PUBLISH_REPO: ${{ inputs.publish_repo || format('{0}/publish', github.repository_owner) }}`) and 310 ("Assign the **accepted** label to this issue to approve the release."); README.md line 126 (table row: `publish_repo` — "Repository for publish issues. Use `\"self\"` to create issues in the source repository itself." default `{owner}/publish`); .github/workflows/release.yml lines 37 and 138 (`publish_repo:` input passthrough); docs/src/content/docs/github-actions.md line 48 (same table row).
* 🟡 (16:11) [tool-result] Assistant read action.yml (elided/partial view) — key lines: issue title template uses `${GITHUB_REPOSITORY}${SUBDIRECTORY}@${RESOLVED_VERSION}` where SUBDIRECTORY is `inputs.path`; line 236 `MAX_CHANGELOG_CHARS=60000`; comment line 243 "Check if issue already exists by listing all open issues and filtering by exact title match"; comment line 257 "Extract checked targets from the existing body"; line 264 `targets_section=$(echo "$existing_body" | sed -n '/### Targets/,/Checked targets will be skipped/p')`; comment line 271 "For each target in the new list, check if it was marked as checked in the original"; comment line 278 "This target was checked in the original, preserve that state"; line 307 changelog compare link `https://github.com/${GITHUB_REPOSITORY}/compare/${RELEASE_PREVIOUS_TAG}...${RELEASE_BRANCH}`; comment line 321 "This may fail if the token doesn't have permission to update issues in the publish repo".
* 🔴 (16:11) Craft's GitHub Action (action.yml) generates publish issues with title format `${GITHUB_REPOSITORY}${SUBDIRECTORY}@${RESOLVED_VERSION}` and truncates changelogs longer than `MAX_CHANGELOG_CHARS=60000` characters.
* 🟢 (16:11) Assistant identified this as "the key finding for part 4" regarding the issue title template, and stated next step: check release.yml workflow (accept side) and read changelog.ts & autoVersion.ts.
* 🟡 (16:12) [tool-result] Assistant read /home/byk/Code/getsentry/craft/.github/workflows/release.yml (142 lines, full file) — key structures (file:line):
- `name: Release` (line 1); `concurrency: ${{ github.workflow }}-${{ github.ref }}` (line 2).
- Two triggers: `workflow_dispatch` (lines 6-14, inputs: `version` default `'auto'`, `force` optional) and `workflow_call` (lines 17-58, inputs: `version`, `force` default `'false'`, `merge_target`, `blocker_label` default `'release-blocker'`, `publish_repo`, `git_user_name`, `git_user_email`, `path` default `'.'`, `craft_config_from_merge_target` default `'false'`).
- Outputs (lines 59-74): `version`, `branch`, `sha`, `previous_tag`, `changelog` — each piped from `jobs.release.outputs.*`.
- `build` job (line 78) only runs `if: github.repository == 'getsentry/craft'`, uses `./.github/workflows/build.yml`.
- `release` job (line 85) needs `[build]`, condition `always() && (needs.build.result == 'success' || needs.build.result == 'skipped')`; permissions `contents: write`.
- Step "Get auth token" (line 101) uses `actions/create-github-app-token@v3` with `client-id: ${{ vars.SENTRY_RELEASE_BOT_CLIENT_ID }}` and `private-key: ${{ secrets.SENTRY_RELEASE_BOT_PRIVATE_KEY }}`, only `if: github.event_name == 'workflow_dispatch' && github.repository == 'getsentry/craft'`.
- `actions/checkout@v6` (line 109) with `fetch-depth: 0`, token from release bot or `github.token`.
- Step "Prepare release (dogfooding)" (line 116, id `craft-local`) uses local action `./` — only for `getsentry/craft` repo itself.
- Step "Prepare release" (line 127, id `craft-action`) uses published action `getsentry/craft@v2` for external repos, passing through all workflow_call inputs.
* 🟡 (16:12) Assistant concluded release.yml is only the "prepare/request" side; the "accept" side (publish workflow triggered by the `accepted` label) lives in the consuming repo, not in craft's own repo.
* 🟡 (16:12) [tool-result] Assistant read /home/byk/Code/getsentry/craft/src/utils/autoVersion.ts (93 lines, full file) — key structures (file:line):
- Imports `* as semver` from 'semver' (line 1), `SimpleGit` type from 'simple-git' (line 2), `logger` (line 4), and from './changelog': `generateChangesetFromGit`, `BUMP_TYPES`, `isBumpType`, `BumpType`, `ChangelogResult` (lines 5-11); re-exports these (line 14).
- `export function calculateNextVersion(currentVersion: string, bumpType: BumpType): string` (line 24) — defaults empty version to `'0.0.0'` (line 29), calls `semver.inc(versionToBump, bumpType)` (line 31), throws `Failed to increment version "${versionToBump}" with bump type "${bumpType}"` if result falsy (lines 33-37).
- `export async function getChangelogWithBumpType(git: SimpleGit, rev: string): Promise<ChangelogResult>` (line 50) — logs `Analyzing commits since ${rev || '(beginning of history)'} for auto-versioning...` (line 55), calls `generateChangesetFromGit(git, rev)` (line 58), logs `Auto-version: determined ${result.bumpType} bump (${result.matchedCommitsWithSemver}/${result.totalCommits} commits matched)` if bumpType present (lines 61-64).
- `export function validateBumpType(result: ChangelogResult): asserts result is ChangelogResult & { bumpType: BumpType }` (line 76) — throws `Cannot determine version automatically: no commits found since the last release.` if `totalCommits === 0` (lines 79-83); throws message referencing `.github/release.yml` categories needing `"semver"` fields if `bumpType === null` (lines 85-92).
* 🟢 (16:12) Assistant stated next step: read relevant parts of changelog.ts (getLatestTag usage, config file dir, DEFAULT_RELEASE_CONFIG) and the base target + registry/index of targets, plus the npm target's expand method.
* 🟡 (16:12) [tool-result] Grep for getConfigFileDir/getGitTagPrefix found 100+ matches (truncated) across craft codebase — key definitions (file:line):
- src/config.ts: `export function getConfigFileDir(): string | undefined` (line 110); `export function getConfiguration(clearCache = false): CraftProjectConfig` (line 147); `export function getVersioningPolicy(): VersioningPolicy` (line 266); `export async function getGlobalGitHubConfig(...)` (line 284); `export function getGitTagPrefix(): string` (line 339, reads `getConfiguration().targets || []`, line 340).
- src/utils/git.ts: imports `getConfigFileDir` from '../config' (line 8); `export async function getLatestTag(...)` (line 45); uses `getConfigFileDir() || '.'` (line 119).
- src/utils/env.ts: imports `getConfigFileDir` (line 7); used at line 106.
- src/utils/changelog.ts: imports `getConfigFileDir`, `getGlobalGitHubConfig` (lines 10-11); usage at lines 39, 961, 1846, 2078.
- src/utils/version.ts: imports `getGitTagPrefix` from '../config' (line 1); `const prefix = tagPrefix === undefined ? getGitTagPrefix() : tagPrefix;` (line 136).
- src/utils/calver.ts: imports `getGitTagPrefix` (line 3); `const gitTagPrefix = getGitTagPrefix();` (line 80).
- Test files reference these via mocks: src/utils/__tests__/git.test.ts (getLatestTag tests, incl. tag prefixes `'cli@'`, `'mcp@'`), env.test.ts, changelog-generate.test.ts, calver.test.ts, autoVersion.test.ts, changelog-semver-warning.test.ts, fixtures/changelog-mocks.ts — all mock `getConfigFileDir`/`getGlobalGitHubConfig`/`getGitTagPrefix` from '../config'.