Dashboard › craft › Session 15J5Gql5Tmsi
15J5Gql5TmsidRgHFPerform a fresh strict read-only adversarial review in /home/byk/Code/getsentry/craft-workspace-action-propagation of the current uncommitted fix for Craft PR #872. Do not edit/mutate/format. Review exact diff from f174ceafa57355e71617f32ba1b0a030953be0a2 and relevant source/tests. Verify: broken symlink candidate is demonstrably emitted by glob and safely skipped only on ENOENT; unexpected realpath errors (ELOOP/EACCES/etc.) are rethrown; no bypass of safe path, lexical/physical realpath containment, directory-only checks, sorted determinism, or config behavior. Confirm tests and diff hygiene. Return severity-ranked file:line findings, PASS/FAIL coverage, test gaps, ending exactly MERGE or DO-NOT-MERGE.
<path>/home/byk/Code/getsentry/craft-workspace-action-propagation/AGENTS.md</path> <type>file</type> <content> 1: # AGENTS.md 2: 3: This file provides guidance for AI coding assistants working with the Craft codebase. 4: 5: ## Package Management 6: 7: - **Always use `pnpm`** for package management. Never use `npm` or `yarn`. 8: - Node.js version is managed by [Volta](https://volta.sh/) (currently v22.12.0). 9: - Install dependencies with `pnpm install --frozen-lockfile`. 10: 11: ## Development Commands 12: 13: | Command | Description | 14: | ------------ | ------------------------------------------- | 15: | `pnpm build` | Build the project (outputs to `dist/craft`) | 16: | `pnpm test` | Run tests | 17: | `pnpm lint` | Run ESLint | 18: | `pnpm fix` | Auto-fix lint issues | 19: 20: To manually test changes: 21: 22: ```bash 23: pnpm build && ...
M src/__tests__/config.test.ts M src/config.ts src/__tests__/config.test.ts | 43 +++++++++++++++++++++++++++++++++++++++++++ src/config.ts | 11 ++++++++++- 2 files changed, 53 insertions(+), 1 deletion(-) M src/__tests__/config.test.ts M src/config.ts f174cea (HEAD -> feat/workspace-action-propagation, origin/feat/workspace-action-propagation) test: describe workspace paths accurately d48b906 feat: support concrete release workspaces 4862056 feat: support compact release workspaces 6dae341 feat: propagate release workspaces 21270a1 (origin/master, origin/HEAD) feat(config): add release workspaces 32f5462 fix(git): prevent fatal error for missing 'origin' remote (#871) 5d0ec43 fix(registry): retry registry push with backoff on concurrent updates (#870) 35e8063 meta: Bump new development version
diff --git a/src/__tests__/config.test.ts b/src/__tests__/config.test.ts
index 619c940..58c0f1a 100644
--- a/src/__tests__/config.test.ts
+++ b/src/__tests__/config.test.ts
@@ -1,82 +1,83 @@
import { describe, test, expect, vi, afterEach, beforeEach } from 'vitest';
import { mkdtempSync, mkdirSync, rmSync, symlinkSync, writeFileSync } from 'fs';
+import { globSync } from 'glob';
import { tmpdir } from 'os';
import { join } from 'path';
/**
* Tests of our ability to read craft config files. (This is NOT general test
* configuration).
*/
import {
getGitTagPrefix,
loadConfigurationFromString,
validateConfiguration,
setActiveWorkspace,
getActiveWorkspace,
getConfiguration,
getVersioningPolicy,
getWorkspaceNames,
WORKSPACES_MIN_VERSION,
} from '../config';
import { CraftProjectConfigSchema } from '../schemas/project_config';
import { logger } from '../logger';
describe('validateConfiguration', () => {
test('parses minimal configuration', () ...
<path>/home/byk/Code/getsentry/craft-workspace-action-propagation/src/config.ts</path>
<type>file</type>
<content>
1: import { existsSync, lstatSync, readFileSync, realpathSync } from 'fs';
2: import path from 'path';
3: import { globSync, hasMagic } from 'glob';
4:
5: import { load } from 'js-yaml';
6: import GitUrlParse from 'git-url-parse';
7: import { createGitClient } from './utils/git';
8: import { ZodError } from 'zod';
9:
10: import { logger } from './logger';
11: import {
12: CraftProjectConfig,
13: CraftProjectConfigSchema,
14: GitHubGlobalConfig,
15: ArtifactProviderName,
16: StatusProviderName,
17: TargetConfig,
18: ChangelogPolicy,
19: VersioningPolicy,
20: Workspace,
21: } from './schemas/project_config';
22: import { ConfigurationError } from './utils/errors';
23: import { isCompiledGitHubAction } from './utils/detection';
24: import {
25: getPackageVersion,
26: parseVersion,
27: versionGreaterOrEqualThan,
28: SemVer,
29: } from ...
<path>/home/byk/Code/getsentry/craft-workspace-action-propagation/src/__tests__/config.test.ts</path>
<type>file</type>
<content>
350:
351: test('a different workspace resolves independently', () => {
352: setActiveWorkspace('mcp');
353: const config = loadConfigurationFromString(WS_CONFIG);
354: expect(config.releaseBranchPrefix).toBe('release/mcp');
355: expect(getGitTagPrefix()).toBe('mcp@');
356: expect(getVersioningPolicy()).toBe('calver');
357: expect(config.github).toEqual({ owner: 'getsentry', repo: 'toolkit' });
358: });
359:
360: test('errors when workspaces are defined but none is selected', () => {
361: setActiveWorkspace(undefined);
362: expect(() => loadConfigurationFromString(WS_CONFIG)).toThrow(
363: /defines workspaces; select one/,
364: );
365: });
366:
367: test('lists concrete workspace names without requiring a selection', () => {
368: setActiveWorkspace(undefined);
369: const directory = ...
Found 38 matches
/home/byk/Code/getsentry/craft-workspace-action-propagation/src/schemas/project_config.ts:
Line 219: function isSafeWorkspaceGlobSegment(segment: string): boolean {
Line 230: return isSafeWorkspaceGlobPattern(segment);
Line 233: function isSafeWorkspaceGlobPattern(segment: string): boolean {
Line 287: function isSafeWorkspaceGlob(name: string): boolean {
Line 293: expanded.split('/').every(isSafeWorkspaceGlobSegment),
Line 332: .refine(isSafeWorkspaceGlob, {
/home/byk/Code/getsentry/craft-workspace-action-propagation/src/config.ts:
Line 124: const available = getWorkspaceNamesFromConfig(base, workspaceDirectory);
Line 197: ? getWorkspaceGlobMatches(key, workspaceDirectory).includes(workspaceName)
Line 201: function getWorkspaceNamesFromConfig(
Line 210: ? getWorkspaceGlobMatches(key, workspaceDirectory)
Line 231: function getWorkspaceGlobMatches(
Line 235: if (!isSafeWorkspaceGlob(workspaceGlob)) {
Line ...
<path>/home/byk/Code/getsentry/craft-workspace-action-propagation/src/config.ts</path>
<type>file</type>
<content>
430: );
431: }
432: }
433:
434: /**
435: * SemVer build metadata does not affect precedence, but the comparison helper
436: * intentionally rejects versions carrying it. Strip it before compatibility
437: * checks so config values such as `2.29.0+linux` remain valid.
438: */
439: function withoutBuildMetadata(version: SemVer): SemVer {
440: return version.build ? { ...version, build: undefined } : version;
441: }
442:
443: /**
444: * Applies workspace selection + validation to a freshly-parsed config.
445: *
446: * - No `workspaces` in config, no active selection → returns the config as-is.
447: * - `workspaces` present but no selection → error (must pick one explicitly).
448: * - Selection present but no `workspaces` in config → error. ...
<path>/home/byk/Code/getsentry/craft-workspace-action-propagation/src/schemas/project_config.ts</path>
<type>file</type>
<content>
180: */
181: const releaseUnitFields = {
182: github: GitHubGlobalConfigSchema.optional(),
183: targets: z.array(TargetConfigSchema).optional(),
184: preReleaseCommand: z.string().optional(),
185: postReleaseCommand: z.string().optional(),
186: releaseBranchPrefix: z.string().optional(),
187: changelog: ChangelogConfigSchema.optional(),
188: changelogPolicy: z.enum(['auto', 'simple', 'none']).optional(),
189: requireNames: z.array(z.string()).optional(),
190: statusProvider: BaseStatusProviderSchema.optional(),
191: artifactProvider: BaseArtifactProviderSchema.optional(),
192: versioning: VersioningConfigSchema.optional(),
193: /**
194: * Do not merge the release branch after publishing.
195: * Defaults to true for compiled GitHub Actions (Node.js actions with dist/ folder).
196: */
197: noMerge: ...
RUN v4.1.8 /home/byk/Code/getsentry/craft-workspace-action-propagation
Test Files 1 passed (1)
Tests 69 passed (69)
Start at 17:24:38
Duration 1.64s (transform 448ms, setup 0ms, import 1.30s, tests 126ms, environment 0ms)
<path>/home/byk/Code/getsentry/craft-workspace-action-propagation/package.json</path>
<type>file</type>
<content>
1: {
2: "name": "@sentry/craft",
3: "version": "2.31.0-dev.0",
4: "description": "The universal sentry workflow CLI",
5: "main": "dist/craft",
6: "repository": "https://github.com/getsentry/craft",
7: "author": "Sentry",
8: "license": "MIT",
9: "bin": {
10: "craft": "dist/craft",
11: "sentry-craft": "dist/craft"
12: },
13: "devDependencies": {
14: "@aws-sdk/client-lambda": "^3.984.0",
15: "@eslint/js": "^9.17.0",
16: "@google-cloud/storage": "^7.14.0",
17: "@octokit/plugin-retry": "^7.1.2",
18: "@octokit/request-error": "^7.0.0",
19: "@octokit/rest": "^21.0.2",
20: "@sentry/esbuild-plugin": "^2.23.0",
21: "@sentry/node": "^10.27.0",
22: "@types/async": "^3.0.1",
23: "@types/aws4": "^1.5.1",
24: "@types/cli-table": "^0.3.0",
25: "@types/git-url-parse": "^9.0.0",
26: "@types/is-ci": "^2.0.0",
27: ...
> @sentry/craft@2.31.0-dev.0 typecheck /home/byk/Code/getsentry/craft-workspace-action-propagation > tsc --noEmit M src/__tests__/config.test.ts M src/config.ts src/__tests__/config.test.ts src/config.ts
No findings. No MUST-FIX, CONCERN, or FAIL items.
src/__tests__/config.test.ts:523-525 directly verifies the installed glob emits packages/broken.src/config.ts:253-259 suppresses only realpathSync() errors with code === 'ENOENT'; test asserts only the valid directory remains at src/__tests__/config.test.ts:526.src/config.ts:260 rethrows every non-ENOENT error. The ELOOP regression at src/__tests__/config.test.ts:529-545 passes.src/config.ts:263-271.src/config.ts:197, 210, 471-489, and 623-638.f174ceafa57355e71617f32ba1b0a030953be0a2 changes only src/config.ts and src/__tests__/config.test.ts; git diff --check is clean.pnpm vitest run src/__tests__/config.test.ts --printConsoleTrace passed (69 tests); pnpm typecheck passed.No material gap. EACCES lacks a direct regression, but the explicit ENOENT-only catch proves all other realpath errors propagate.
MERGE
Date: Sep 8, 2026 * 🟡 (17:24) `vitest` v4.1.8 ran in `/home/byk/Code/getsentry/craft-workspace-action-propagation`: 1 test file passed; 69 tests passed; duration 1.64s (transform 448ms, import 1.30s, tests 126ms). * 🟡 (17:25) `/home/byk/Code/getsentry/craft-workspace-action-propagation/package.json` identifies the package as `@sentry/craft` version `2.31.0-dev.0`, description “The universal sen…
Date: Sep 8, 2026 * 🟡 (17:24) `src/schemas/project_config.ts:181-198` defines `releaseUnitFields`: optional `github: GitHubGlobalConfigSchema`, `targets: z.array(TargetConfigSchema)`, `preReleaseCommand`, `postReleaseCommand`, `releaseBranchPrefix`, `changelog`, `changelogPolicy: z.enum(['auto', 'simple', 'none'])`, `requireNames`, `statusProvider`, `artifactProvider`, `versioning`, and `noMerge…
Date: Sep 8, 2026 * 🔴 (17:23) User stated package-management preference: always use `pnpm`; never use `npm` or `yarn`. * 🔴 (17:23) User stated the Craft repository uses Volta-managed Node.js v22.12.0 and dependencies are installed with `pnpm install --frozen-lockfile`. * 🔴 (17:23) User stated Craft development commands: `pnpm build` outputs `dist/craft`; `pnpm test` runs tests; `pnpm lint` run…