Dashboard › craft › Session 16AXMjUYkCm6
16AXMjUYkCm6y1U3XReturn your completed review result now. If incomplete, finish read-only and report exact cited findings and MERGE/DO-NOT-MERGE. Do not edit.
None.
workspaces is a normal z.record object, but resolution uses inherited-property lookup (workspaces[workspaceName]) and only checks truthiness. Selecting --workspace toString, constructor, or __proto__ passes validation even when that name is not configured. Object.entries() then finds no workspace overrides and returns the base config, bypassing the required named-workspace selection and potentially releasing with base targets/settings. Require an own-property check before resolving.src/schemas/project_config.ts:232; src/config.ts:114-116, src/config.ts:129-160, src/config.ts:208-239; missing regression coverage at src/__tests__/config.test.ts:301-306.None.
DO-NOT-MERGE
Re-review your previous prototype-workspace MAJOR against the current worktree. Read-only; do not edit. Verify Object.hasOwn behavior and tests for constructor/toString/proto. Report PASS/FAIL with file:line citations and MERGE/DO-NOT-MERGE.
## feat/workspaces-schema...origin/feat/workspaces-schema
ab63572 (HEAD -> feat/workspaces-schema, origin/feat/workspaces-schema) fix(publish): isolate workspace release state
086a633 fix(config): address workspace review feedback
c099bbf Merge branch 'master' into feat/workspaces-schema
e5a7f97 fix(deps): bump vulnerable packages and add overrides (#866)
8cc5425 (master) feat(targets): add vercel deploy target (#865)
M src/__tests__/config.test.ts
M src/commands/publish.ts
M src/config.ts
M src/index.ts
M src/schemas/project_config.ts
M src/utils/__tests__/helpers.test.ts
M src/utils/__tests__/publishState.test.ts
M src/utils/helpers.ts
M src/utils/publishState.ts
diff --git a/src/__tests__/config.test.ts b/src/__tests__/config.test.ts
index 243835d..90e145b 100644
--- a/src/__tests__/config.test.ts
+++ b/src/__tests__/config.test.ts
@@ -1,192 +1,411 @@
import { describe, test, expect, vi, afterEach } from 'vitest';
/**
* Tests of our ability to read craft config files. (This is NOT general test
* configuration). ...
<path>/home/byk/Code/getsentry/craft-workspaces-schema/src/config.ts</path>
<type>file</type>
<content>
108: * - `minVersion` and `workspaces` themselves are stripped from the result.
109: */
110: function resolveWorkspaceConfig(
111: base: CraftProjectConfig,
112: workspaceName: string,
113: ): CraftProjectConfig {
114: const workspaces = base.workspaces || {};
115: if (!Object.hasOwn(workspaces, workspaceName)) {
116: const available = Object.keys(workspaces);
117: throw new ConfigurationError(
118: `Unknown workspace "${workspaceName}". ` +
119: (available.length
120: ? `Available workspaces: ${available.join(', ')}.`
121: : 'No workspaces are defined in the configuration.'),
122: );
123: }
124: const workspace = workspaces[workspaceName];
125:
126: // eslint-disable-next-line @typescript-eslint/no-unused-vars
127: const { workspaces: _ignoredWorkspaces, ...baseWithoutWorkspaces } = base;
128:
129: const resolved: ...
<path>/home/byk/Code/getsentry/craft-workspaces-schema/src/__tests__/config.test.ts</path>
<type>file</type>
<content>
290: // mcp did not override github.projectPath, so it inherits base github only.
291: expect(config.github).toEqual({ owner: 'getsentry', repo: 'toolkit' });
292: });
293:
294: test('errors when workspaces are defined but none is selected', () => {
295: setActiveWorkspace(undefined);
296: expect(() => loadConfigurationFromString(WS_CONFIG)).toThrow(
297: /defines workspaces; select one/,
298: );
299: });
300:
301: test('errors on an unknown workspace name', () => {
302: setActiveWorkspace('nope');
303: expect(() => loadConfigurationFromString(WS_CONFIG)).toThrow(
304: /Unknown workspace "nope"/,
305: );
306: });
307:
308: test.each(['constructor', 'toString', '__proto__'])(
309: 'rejects prototype-named workspace %s',
310: workspace => {
311: setActiveWorkspace(workspace);
312: expect(() ...
constructor false toString false __proto__ false own constructor true 0
PASS β prototype-workspace MAJOR fixed.
Object.hasOwn() rejects inherited constructor, toString, and __proto__ before lookup, while allowing an explicitly configured workspace with such a name. src/config.ts:114-124.
Regression coverage rejects all three inherited names against a nonempty workspace map. src/__tests__/config.test.ts:308-316.
MERGE for this previously reported issue.
Return the focused correctness recheck result now with PASS/FAIL and MERGE/DO-NOT-MERGE. Do not edit.
PASS β Object.hasOwn() blocks inherited constructor, toString, and __proto__ before workspace resolution: src/config.ts:114-124. Focused tests cover all three: src/__tests__/config.test.ts:308-316.
MERGE for the prototype-workspace finding.
Date: Aug 25, 2026 * π΄ [requested-code-review] (09:58) User requested the focused correctness recheck result immediately, requiring PASS/FAIL and MERGE/DO-NOT-MERGE, and instructed not to edit. * π‘ (09:58) Assistant returned PASS: `Object.hasOwn()` blocks inherited `constructor`, `toString`, and `__proto__` before workspace resolution at `src/config.ts:114-124`; focused tests cover all three atβ¦
Date: Aug 25, 2026 * π΄ [requested-code-review] (09:50) User requested a read-only re-review of the prior prototype-workspace Major finding against the current worktree; instructed not to edit and requested Object.hasOwn behavior plus tests for `constructor`/`toString`/`__proto__`, with PASS/FAIL file:line citations and a MERGE/DO-NOT-MERGE verdict. * π‘ (09:51) Current worktree branch is `feat/wβ¦
Date: Aug 25, 2026 * π΄ [requested-code-review] (09:45) User requested the completed review result immediately; instructed that if incomplete, finish read-only, report exact cited findings and a MERGE/DO-NOT-MERGE decision, and do not edit. * π‘ (09:45) Assistant completed a read-only code review: Critical findings: none; Minor findings: none. * π‘ (09:45) Assistant identified 1 Major finding: unβ¦