@codeyam/codeyam-cli 0.1.4 → 0.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (68) hide show
  1. package/analyzer-template/.build-info.json +7 -7
  2. package/analyzer-template/log.txt +3 -3
  3. package/analyzer-template/package.json +13 -13
  4. package/analyzer-template/packages/ai/src/lib/dataStructure/ScopeDataStructure.ts +232 -5
  5. package/analyzer-template/packages/ai/src/lib/dataStructure/helpers/stripNullableMarkers.ts +35 -0
  6. package/analyzer-template/packages/analyze/src/lib/asts/nodes/getNodeType.ts +1 -0
  7. package/analyzer-template/packages/aws/package.json +10 -10
  8. package/analyzer-template/packages/utils/dist/utils/src/lib/fs/rsyncCopy.d.ts.map +1 -1
  9. package/analyzer-template/packages/utils/dist/utils/src/lib/fs/rsyncCopy.js +6 -2
  10. package/analyzer-template/packages/utils/dist/utils/src/lib/fs/rsyncCopy.js.map +1 -1
  11. package/analyzer-template/packages/utils/src/lib/fs/rsyncCopy.ts +14 -2
  12. package/analyzer-template/project/constructMockCode.ts +32 -5
  13. package/analyzer-template/project/orchestrateCapture.ts +4 -1
  14. package/analyzer-template/project/writeScenarioComponents.ts +62 -12
  15. package/background/src/lib/virtualized/project/constructMockCode.js +28 -5
  16. package/background/src/lib/virtualized/project/constructMockCode.js.map +1 -1
  17. package/background/src/lib/virtualized/project/orchestrateCapture.js +4 -1
  18. package/background/src/lib/virtualized/project/orchestrateCapture.js.map +1 -1
  19. package/background/src/lib/virtualized/project/writeScenarioComponents.js +46 -7
  20. package/background/src/lib/virtualized/project/writeScenarioComponents.js.map +1 -1
  21. package/codeyam-cli/src/cli.js +31 -20
  22. package/codeyam-cli/src/cli.js.map +1 -1
  23. package/codeyam-cli/src/commands/memory.js +3 -56
  24. package/codeyam-cli/src/commands/memory.js.map +1 -1
  25. package/codeyam-cli/src/utils/__tests__/npmVersionCheck.test.js +6 -0
  26. package/codeyam-cli/src/utils/__tests__/npmVersionCheck.test.js.map +1 -1
  27. package/codeyam-cli/src/utils/npmVersionCheck.js +2 -2
  28. package/codeyam-cli/src/utils/npmVersionCheck.js.map +1 -1
  29. package/codeyam-cli/src/utils/rules/__tests__/parser.test.js +83 -0
  30. package/codeyam-cli/src/utils/rules/__tests__/parser.test.js.map +1 -0
  31. package/codeyam-cli/src/utils/rules/__tests__/pathMatcher.test.js +118 -0
  32. package/codeyam-cli/src/utils/rules/__tests__/pathMatcher.test.js.map +1 -0
  33. package/codeyam-cli/src/utils/rules/__tests__/sourceFiles.test.js +83 -0
  34. package/codeyam-cli/src/utils/rules/__tests__/sourceFiles.test.js.map +1 -0
  35. package/codeyam-cli/src/utils/rules/index.js +1 -0
  36. package/codeyam-cli/src/utils/rules/index.js.map +1 -1
  37. package/codeyam-cli/src/utils/rules/parser.js +14 -4
  38. package/codeyam-cli/src/utils/rules/parser.js.map +1 -1
  39. package/codeyam-cli/src/utils/rules/pathMatcher.js +34 -3
  40. package/codeyam-cli/src/utils/rules/pathMatcher.js.map +1 -1
  41. package/codeyam-cli/src/utils/rules/sourceFiles.js +47 -0
  42. package/codeyam-cli/src/utils/rules/sourceFiles.js.map +1 -0
  43. package/codeyam-cli/src/utils/simulationGateMiddleware.js +138 -0
  44. package/codeyam-cli/src/utils/simulationGateMiddleware.js.map +1 -0
  45. package/codeyam-cli/src/utils/syncMocksMiddleware.js +5 -24
  46. package/codeyam-cli/src/utils/syncMocksMiddleware.js.map +1 -1
  47. package/codeyam-cli/src/utils/versionInfo.js +21 -0
  48. package/codeyam-cli/src/utils/versionInfo.js.map +1 -1
  49. package/codeyam-cli/src/webserver/build/client/assets/globals-B4MPiL7S.css +1 -0
  50. package/codeyam-cli/src/webserver/build/client/assets/labs-DAvt-sy-.js +1 -0
  51. package/codeyam-cli/src/webserver/build/client/assets/{manifest-040dab1c.js → manifest-e24d6600.js} +1 -1
  52. package/codeyam-cli/src/webserver/build/client/assets/{memory-UIDVz141.js → memory-bAp4y2hv.js} +22 -22
  53. package/codeyam-cli/src/webserver/build/client/assets/root-DoB3B10-.js +62 -0
  54. package/codeyam-cli/src/webserver/build/server/assets/{index-B3dE0r28.js → index-C_nP9_jr.js} +1 -1
  55. package/codeyam-cli/src/webserver/build/server/assets/server-build-BEaMCeTu.js +273 -0
  56. package/codeyam-cli/src/webserver/build/server/index.js +1 -1
  57. package/codeyam-cli/src/webserver/build-info.json +5 -5
  58. package/package.json +5 -5
  59. package/packages/ai/src/lib/dataStructure/ScopeDataStructure.js +213 -3
  60. package/packages/ai/src/lib/dataStructure/ScopeDataStructure.js.map +1 -1
  61. package/packages/analyze/src/lib/asts/nodes/getNodeType.js +1 -0
  62. package/packages/analyze/src/lib/asts/nodes/getNodeType.js.map +1 -1
  63. package/packages/utils/src/lib/fs/rsyncCopy.js +6 -2
  64. package/packages/utils/src/lib/fs/rsyncCopy.js.map +1 -1
  65. package/codeyam-cli/src/webserver/build/client/assets/globals-BSZfYCkU.css +0 -1
  66. package/codeyam-cli/src/webserver/build/client/assets/labs-BK0C1H1T.js +0 -1
  67. package/codeyam-cli/src/webserver/build/client/assets/root-D1WadSdf.js +0 -62
  68. package/codeyam-cli/src/webserver/build/server/assets/server-build-DYbfdxa3.js +0 -273
@@ -1,10 +1,10 @@
1
1
  {
2
- "buildTimestamp": "2026-02-14T14:55:04.828Z",
3
- "buildTime": 1771080904828,
4
- "gitCommit": "363c3939b0b49bd96be6efd33c0b232b395dcb10",
2
+ "buildTimestamp": "2026-02-23T19:25:17.318Z",
3
+ "buildTime": 1771874717318,
4
+ "gitCommit": "3ec9116ec938649253c958a1de3666ec5264d5b0",
5
5
  "nodeVersion": "v20.20.0",
6
- "contentHash": "7f2a19190511996b687bdd764ab6297993590ece837b6bbdec8bda87b904ab50",
7
- "buildNumber": 629,
8
- "semanticVersion": "0.1.629",
9
- "version": "0.1.629 (2026-02-14T14:55+7f2a191)"
6
+ "contentHash": "2ecaac9a4db618717f2df27f667eaab3b8630093f73966eff1cec34d3899aca6",
7
+ "buildNumber": 646,
8
+ "semanticVersion": "0.1.646",
9
+ "version": "0.1.646 (2026-02-23T19:25+2ecaac9)"
10
10
  }
@@ -1,7 +1,7 @@
1
1
 
2
- [2/14/2026, 2:55:04 PM] > codeyam-combo@1.0.0 mergeDependencies
3
- [2/14/2026, 2:55:04 PM] > node ./scripts/mergePackageJsonFiles.cjs
2
+ [2/23/2026, 7:25:17 PM] > codeyam-combo@1.0.0 mergeDependencies
3
+ [2/23/2026, 7:25:17 PM] > node ./scripts/mergePackageJsonFiles.cjs
4
4
 
5
5
 
6
- [2/14/2026, 2:55:04 PM] Merged dependencies into root package.json
6
+ [2/23/2026, 7:25:17 PM] Merged dependencies into root package.json
7
7
 
@@ -7,17 +7,17 @@
7
7
  "build": "tsc && node ./scripts/postbuild.cjs"
8
8
  },
9
9
  "dependencies": {
10
- "@aws-sdk/client-cloudwatch-logs": "^3.980.0",
11
- "@aws-sdk/client-cloudfront": "^3.985.0",
12
- "@aws-sdk/client-codebuild": "^3.948.0",
13
- "@aws-sdk/client-dynamodb": "^3.956.0",
14
- "@aws-sdk/client-ec2": "^3.899.0",
15
- "@aws-sdk/client-ecr": "^3.948.0",
16
- "@aws-sdk/client-ecs": "^3.956.0",
17
- "@aws-sdk/client-s3": "^3.940.0",
18
- "@aws-sdk/client-sqs": "^3.956.0",
19
- "@aws-sdk/lib-storage": "^3.975.0",
20
- "@aws-sdk/util-dynamodb": "^3.971.0",
10
+ "@aws-sdk/client-cloudwatch-logs": "^3.990.0",
11
+ "@aws-sdk/client-cloudfront": "^3.990.0",
12
+ "@aws-sdk/client-codebuild": "^3.990.0",
13
+ "@aws-sdk/client-dynamodb": "^3.990.0",
14
+ "@aws-sdk/client-ec2": "^3.990.0",
15
+ "@aws-sdk/client-ecr": "^3.990.0",
16
+ "@aws-sdk/client-ecs": "^3.990.0",
17
+ "@aws-sdk/client-s3": "^3.990.0",
18
+ "@aws-sdk/client-sqs": "^3.990.0",
19
+ "@aws-sdk/lib-storage": "^3.990.0",
20
+ "@aws-sdk/util-dynamodb": "^3.990.0",
21
21
  "@octokit/auth-app": "^8.1.0",
22
22
  "@octokit/rest": "^22.0.0",
23
23
  "@sendgrid/mail": "^8.1.4",
@@ -26,7 +26,7 @@
26
26
  "dotenv": "^17.2.3",
27
27
  "express": "^5.2.1",
28
28
  "get-port": "^7.1.0",
29
- "htmlparser2": "^10.0.0",
29
+ "htmlparser2": "^10.1.0",
30
30
  "jest": "^30.2.0",
31
31
  "jsdom": "^27.4.0",
32
32
  "jsonc-parser": "^3.2.1",
@@ -45,7 +45,7 @@
45
45
  "yargs": "^18.0.0",
46
46
  "json5": "^2.2.3",
47
47
  "@anthropic-ai/sdk": "^0.74.0",
48
- "@aws-sdk/s3-request-presigner": "^3.940.0",
48
+ "@aws-sdk/s3-request-presigner": "^3.990.0",
49
49
  "better-sqlite3": "^12.4.1",
50
50
  "fetch-retry": "^6.0.0",
51
51
  "kysely": "^0.28.11",
@@ -3360,6 +3360,22 @@ export class ScopeDataStructure {
3360
3360
  * ensure all sub-paths of that variable are reflected under signature[N].
3361
3361
  */
3362
3362
  private propagateParameterToSignaturePaths(scopeNode: ScopeNode) {
3363
+ // Helper: check if a type is a concrete scalar that cannot have sub-properties.
3364
+ const SCALAR_TYPES = new Set([
3365
+ 'string',
3366
+ 'number',
3367
+ 'boolean',
3368
+ 'bigint',
3369
+ 'symbol',
3370
+ 'void',
3371
+ 'never',
3372
+ ]);
3373
+ const isDefinitelyScalar = (type: string): boolean => {
3374
+ const parts = type.split('|').map((s) => s.trim());
3375
+ const base = parts.filter((s) => s !== 'undefined' && s !== 'null');
3376
+ return base.length > 0 && base.every((b) => SCALAR_TYPES.has(b));
3377
+ };
3378
+
3363
3379
  // Find variable → signature[N] equivalencies
3364
3380
  for (const [varName, equivalencies] of Object.entries(
3365
3381
  scopeNode.equivalencies,
@@ -3390,7 +3406,38 @@ export class ScopeDataStructure {
3390
3406
 
3391
3407
  // Only add if the signature path doesn't already exist
3392
3408
  if (!scopeNode.schema[sigKey]) {
3393
- scopeNode.schema[sigKey] = scopeNode.schema[key];
3409
+ // Check if this path represents variable conflation:
3410
+ // When a standalone variable (e.g., showWorkoutForm from useState)
3411
+ // appears as a sub-property of a scalar-typed ancestor (e.g.,
3412
+ // activity_type = "string"), it's from scope conflation, not real
3413
+ // property access. Block these while allowing legitimate built-in
3414
+ // accesses like string.length or string.slice.
3415
+ let isConflatedPath = false;
3416
+ let checkPos = signaturePath.length;
3417
+ while (true) {
3418
+ checkPos = sigKey.indexOf('.', checkPos + 1);
3419
+ if (checkPos === -1) break;
3420
+ const ancestorPath = sigKey.substring(0, checkPos);
3421
+ const ancestorType = scopeNode.schema[ancestorPath];
3422
+ if (ancestorType && isDefinitelyScalar(ancestorType)) {
3423
+ // Ancestor is scalar — check if the immediate sub-property
3424
+ // is also a standalone variable (indicating conflation)
3425
+ const afterDot = sigKey.substring(checkPos + 1);
3426
+ const nextSep = afterDot.search(/[.\[]/);
3427
+ const subPropName =
3428
+ nextSep === -1
3429
+ ? afterDot
3430
+ : afterDot.substring(0, nextSep);
3431
+ if (scopeNode.schema[subPropName] !== undefined) {
3432
+ isConflatedPath = true;
3433
+ break;
3434
+ }
3435
+ }
3436
+ }
3437
+
3438
+ if (!isConflatedPath) {
3439
+ scopeNode.schema[sigKey] = scopeNode.schema[key];
3440
+ }
3394
3441
  }
3395
3442
  }
3396
3443
  }
@@ -4165,6 +4212,24 @@ export class ScopeDataStructure {
4165
4212
  }
4166
4213
  }
4167
4214
 
4215
+ // Helper: check if a type is a concrete scalar that cannot have sub-properties.
4216
+ // e.g., "string", "number | undefined", "boolean | null" are scalar.
4217
+ // "object", "array", "function", "unknown", "Workout", etc. are NOT scalar.
4218
+ const SCALAR_TYPES = new Set([
4219
+ 'string',
4220
+ 'number',
4221
+ 'boolean',
4222
+ 'bigint',
4223
+ 'symbol',
4224
+ 'void',
4225
+ 'never',
4226
+ ]);
4227
+ const isDefinitelyScalarType = (type: string): boolean => {
4228
+ const parts = type.split('|').map((s) => s.trim());
4229
+ const base = parts.filter((s) => s !== 'undefined' && s !== 'null');
4230
+ return base.length > 0 && base.every((b) => SCALAR_TYPES.has(b));
4231
+ };
4232
+
4168
4233
  // Propagate nested paths from variables to their signature equivalents
4169
4234
  // e.g., if workouts = signature[0].workouts, then workouts[].title becomes
4170
4235
  // signature[0].workouts[].title
@@ -4189,7 +4254,69 @@ export class ScopeDataStructure {
4189
4254
 
4190
4255
  // Add to schema if not already present
4191
4256
  if (!tempScopeNode.schema[signatureKey]) {
4192
- tempScopeNode.schema[signatureKey] = schema[schemaKey];
4257
+ // Check if this path represents variable conflation:
4258
+ // When a standalone variable (e.g., showWorkoutForm from useState)
4259
+ // appears as a sub-property of a scalar-typed ancestor (e.g.,
4260
+ // activity_type = "string"), it's from scope conflation, not real
4261
+ // property access. Block these while allowing legitimate built-in
4262
+ // accesses like string.length or string.slice.
4263
+ let isConflatedPath = false;
4264
+ let checkPos = signaturePath.length;
4265
+ while (true) {
4266
+ checkPos = signatureKey.indexOf('.', checkPos + 1);
4267
+ if (checkPos === -1) break;
4268
+ const ancestorPath = signatureKey.substring(0, checkPos);
4269
+ const ancestorType = tempScopeNode.schema[ancestorPath];
4270
+ if (ancestorType && isDefinitelyScalarType(ancestorType)) {
4271
+ // Ancestor is scalar — check if the immediate sub-property
4272
+ // is also a standalone variable (indicating conflation)
4273
+ const afterDot = signatureKey.substring(checkPos + 1);
4274
+ const nextSep = afterDot.search(/[.\[]/);
4275
+ const subPropName =
4276
+ nextSep === -1 ? afterDot : afterDot.substring(0, nextSep);
4277
+ if (schema[subPropName] !== undefined) {
4278
+ isConflatedPath = true;
4279
+ break;
4280
+ }
4281
+ }
4282
+ }
4283
+
4284
+ if (!isConflatedPath) {
4285
+ tempScopeNode.schema[signatureKey] = schema[schemaKey];
4286
+ }
4287
+ }
4288
+ }
4289
+ }
4290
+ }
4291
+
4292
+ // Post-process: filter out conflated signature paths.
4293
+ // During phase 2 scope analysis, useState(false) conflation can create
4294
+ // bad paths like signature[0].mockWorkouts[].activity_type.showWorkoutForm
4295
+ // directly in scopeNode.schema. These flow through signatureInSchema into
4296
+ // tempScopeNode.schema without any guard. Filter them out here by checking:
4297
+ // 1. An ancestor in the path has a concrete scalar type (string, number, boolean, etc.)
4298
+ // 2. The immediate sub-property of that scalar ancestor is also a standalone
4299
+ // variable in the schema (indicating conflation, not a real property access)
4300
+ for (const key of Object.keys(tempScopeNode.schema)) {
4301
+ if (!key.startsWith('signature[')) continue;
4302
+
4303
+ // Walk through the path looking for scalar-typed ancestors
4304
+ let pos = 0;
4305
+ while (true) {
4306
+ pos = key.indexOf('.', pos + 1);
4307
+ if (pos === -1) break;
4308
+ const ancestorPath = key.substring(0, pos);
4309
+ const ancestorType = tempScopeNode.schema[ancestorPath];
4310
+ if (ancestorType && isDefinitelyScalarType(ancestorType)) {
4311
+ // Found a scalar ancestor — check if the sub-property name
4312
+ // is a standalone variable in the getSchema() result
4313
+ const afterDot = key.substring(pos + 1);
4314
+ const nextSep = afterDot.search(/[.\[]/);
4315
+ const subPropName =
4316
+ nextSep === -1 ? afterDot : afterDot.substring(0, nextSep);
4317
+ if (schema[subPropName] !== undefined) {
4318
+ delete tempScopeNode.schema[key];
4319
+ break;
4193
4320
  }
4194
4321
  }
4195
4322
  }
@@ -4929,9 +5056,109 @@ export class ScopeDataStructure {
4929
5056
  // Replace cyScope placeholders in all external function call data
4930
5057
  // This ensures call signatures and schema paths use actual callback text
4931
5058
  // instead of internal cyScope names, preventing mock data merge conflicts.
4932
- return this.externalFunctionCalls.map((efc) =>
4933
- this.cleanCyScopeFromFunctionCallInfo(efc),
4934
- );
5059
+ const rootScopeName = this.scopeTreeManager.getRootName();
5060
+ const rootSchema = this.scopeNodes[rootScopeName]?.schema ?? {};
5061
+
5062
+ return this.externalFunctionCalls.map((efc) => {
5063
+ const cleaned = this.cleanCyScopeFromFunctionCallInfo(efc);
5064
+ return this.filterConflatedExternalPaths(cleaned, rootSchema);
5065
+ });
5066
+ }
5067
+
5068
+ /**
5069
+ * Filters out conflated paths from external function call schemas.
5070
+ *
5071
+ * When multiple useState(false) calls create equivalency conflation during
5072
+ * Phase 1 analysis, standalone boolean state variables (like showWorkoutForm,
5073
+ * showGoalForm) can bleed into external function call schemas as sub-properties
5074
+ * of unrelated data fields (like data[].activity_type.showWorkoutForm).
5075
+ *
5076
+ * Detection: group sub-properties by parent path. If 2+ sub-properties of
5077
+ * the same parent all match standalone root scope variable names, treat them
5078
+ * as conflation artifacts and remove them.
5079
+ */
5080
+ private filterConflatedExternalPaths(
5081
+ efc: FunctionCallInfo,
5082
+ rootSchema: Record<string, string>,
5083
+ ): FunctionCallInfo {
5084
+ // Build a set of top-level root scope variable names (simple names, no dots/brackets)
5085
+ const topLevelRootVars = new Set<string>();
5086
+ for (const key of Object.keys(rootSchema)) {
5087
+ if (!key.includes('.') && !key.includes('[')) {
5088
+ topLevelRootVars.add(key);
5089
+ }
5090
+ }
5091
+
5092
+ if (topLevelRootVars.size === 0) return efc;
5093
+
5094
+ // Group sub-property matches by their parent path.
5095
+ // For a path like "...data[].activity_type.showWorkoutForm",
5096
+ // parent = "...data[].activity_type", child = "showWorkoutForm"
5097
+ const parentToConflatedKeys = new Map<string, string[]>();
5098
+
5099
+ for (const key of Object.keys(efc.schema)) {
5100
+ const lastDot = key.lastIndexOf('.');
5101
+ if (lastDot === -1) continue;
5102
+
5103
+ const parent = key.substring(0, lastDot);
5104
+ const child = key.substring(lastDot + 1);
5105
+
5106
+ // Skip array access or function call patterns
5107
+ if (child.includes('[') || child.includes('(')) continue;
5108
+
5109
+ // Only consider paths inside array element chains (contains []).
5110
+ // Direct children of functionCallReturnValue are legitimate destructured
5111
+ // return values, not conflation. Conflation happens deeper in the chain
5112
+ // when array element fields get corrupted sub-properties.
5113
+ if (!parent.includes('[')) continue;
5114
+
5115
+ if (topLevelRootVars.has(child)) {
5116
+ if (!parentToConflatedKeys.has(parent)) {
5117
+ parentToConflatedKeys.set(parent, []);
5118
+ }
5119
+ parentToConflatedKeys.get(parent)!.push(key);
5120
+ }
5121
+ }
5122
+
5123
+ // Only filter when 2+ sub-properties of the same parent match root scope vars.
5124
+ // This threshold avoids false positives from coincidental name matches.
5125
+ const keysToRemove = new Set<string>();
5126
+ const parentsToRestore = new Set<string>();
5127
+
5128
+ for (const [parent, conflatedKeys] of parentToConflatedKeys) {
5129
+ if (conflatedKeys.length >= 2) {
5130
+ for (const key of conflatedKeys) {
5131
+ keysToRemove.add(key);
5132
+ }
5133
+ parentsToRestore.add(parent);
5134
+ }
5135
+ }
5136
+
5137
+ if (keysToRemove.size === 0) return efc;
5138
+
5139
+ // Create a new schema without the conflated paths
5140
+ const newSchema: Record<string, string> = {};
5141
+ for (const [key, value] of Object.entries(efc.schema)) {
5142
+ if (keysToRemove.has(key)) continue;
5143
+
5144
+ // Restore parent type: if it was changed to "object" because of conflated
5145
+ // sub-properties, and now all those sub-properties are removed, change it
5146
+ // back to "unknown" (we don't know the original type)
5147
+ if (parentsToRestore.has(key) && value === 'object') {
5148
+ // Check if there are any remaining sub-properties
5149
+ const hasRemainingSubProps = Object.keys(efc.schema).some(
5150
+ (k) =>
5151
+ !keysToRemove.has(k) &&
5152
+ k !== key &&
5153
+ (k.startsWith(key + '.') || k.startsWith(key + '[')),
5154
+ );
5155
+ newSchema[key] = hasRemainingSubProps ? value : 'unknown';
5156
+ } else {
5157
+ newSchema[key] = value;
5158
+ }
5159
+ }
5160
+
5161
+ return { ...efc, schema: newSchema };
4935
5162
  }
4936
5163
 
4937
5164
  /**
@@ -0,0 +1,35 @@
1
+ /**
2
+ * Recursively strips `_nullable` keys from LLM-generated mock data.
3
+ *
4
+ * The `_nullable` marker is an internal CodeYam concept used in type definitions
5
+ * to indicate that a field can be null/undefined. The LLM sometimes includes
6
+ * these markers in its generated scenario data, which causes runtime errors
7
+ * when code iterates over object keys (e.g., `Object.keys(importedBy)` picks
8
+ * up `_nullable` as a key alongside real data).
9
+ *
10
+ * This function mutates the input object in-place, consistent with other
11
+ * post-processing helpers like `convertNullToUndefinedBySchema`.
12
+ */
13
+ export default function stripNullableMarkers(
14
+ data: Record<string, unknown>,
15
+ ): void {
16
+ if (data == null || typeof data !== 'object') return;
17
+
18
+ // Delete _nullable from this level
19
+ if ('_nullable' in data) {
20
+ delete data._nullable;
21
+ }
22
+
23
+ // Recurse into nested objects and arrays
24
+ for (const value of Object.values(data)) {
25
+ if (Array.isArray(value)) {
26
+ for (const item of value) {
27
+ if (item !== null && typeof item === 'object' && !Array.isArray(item)) {
28
+ stripNullableMarkers(item as Record<string, unknown>);
29
+ }
30
+ }
31
+ } else if (value !== null && typeof value === 'object') {
32
+ stripNullableMarkers(value as Record<string, unknown>);
33
+ }
34
+ }
35
+ }
@@ -39,6 +39,7 @@ export function getNodeType(node: ts.Node, sourceFile: ts.SourceFile) {
39
39
  case 'StringLiteral':
40
40
  case 'NumericLiteral':
41
41
  case 'ObjectLiteralExpression':
42
+ case 'ArrayLiteralExpression':
42
43
  nodeType = 'data';
43
44
  break;
44
45
  case 'TypeAliasDeclaration':
@@ -11,15 +11,15 @@
11
11
  "author": "",
12
12
  "license": "ISC",
13
13
  "dependencies": {
14
- "@aws-sdk/client-codebuild": "^3.948.0",
15
- "@aws-sdk/client-cloudwatch-logs": "^3.980.0",
16
- "@aws-sdk/client-dynamodb": "^3.956.0",
17
- "@aws-sdk/client-ecr": "^3.948.0",
18
- "@aws-sdk/client-ecs": "^3.956.0",
19
- "@aws-sdk/client-s3": "^3.940.0",
20
- "@aws-sdk/client-sqs": "^3.956.0",
21
- "@aws-sdk/lib-storage": "^3.975.0",
22
- "@aws-sdk/s3-request-presigner": "^3.940.0",
23
- "@aws-sdk/util-dynamodb": "^3.971.0"
14
+ "@aws-sdk/client-codebuild": "^3.990.0",
15
+ "@aws-sdk/client-cloudwatch-logs": "^3.990.0",
16
+ "@aws-sdk/client-dynamodb": "^3.990.0",
17
+ "@aws-sdk/client-ecr": "^3.990.0",
18
+ "@aws-sdk/client-ecs": "^3.990.0",
19
+ "@aws-sdk/client-s3": "^3.990.0",
20
+ "@aws-sdk/client-sqs": "^3.990.0",
21
+ "@aws-sdk/lib-storage": "^3.990.0",
22
+ "@aws-sdk/s3-request-presigner": "^3.990.0",
23
+ "@aws-sdk/util-dynamodb": "^3.990.0"
24
24
  }
25
25
  }
@@ -1 +1 @@
1
- {"version":3,"file":"rsyncCopy.d.ts","sourceRoot":"","sources":["../../../../../src/lib/fs/rsyncCopy.ts"],"names":[],"mappings":"AAqFA,wBAA8B,SAAS,CAAC,EACtC,UAAU,EACV,eAAe,EACf,QAAa,EACb,YAAoB,EACpB,MAAc,EACd,SAAc,GACf,EAAE;IACD,UAAU,EAAE,MAAM,CAAC;IACnB,eAAe,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;CACtB,GAAG,OAAO,CAAC,IAAI,CAAC,CAsEhB"}
1
+ {"version":3,"file":"rsyncCopy.d.ts","sourceRoot":"","sources":["../../../../../src/lib/fs/rsyncCopy.ts"],"names":[],"mappings":"AAqFA,wBAA8B,SAAS,CAAC,EACtC,UAAU,EACV,eAAe,EACf,QAAa,EACb,YAAoB,EACpB,MAAc,EACd,SAAc,GACf,EAAE;IACD,UAAU,EAAE,MAAM,CAAC;IACnB,eAAe,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;CACtB,GAAG,OAAO,CAAC,IAAI,CAAC,CAkFhB"}
@@ -1,4 +1,4 @@
1
- import { spawn, execSync } from 'child_process';
1
+ import { execSync, spawn } from 'child_process';
2
2
  import { existsSync, readdirSync, rmSync } from 'fs';
3
3
  import { join } from 'path';
4
4
  /**
@@ -97,7 +97,8 @@ export default async function rsyncCopy({ sourcePath, destinationPath, excludes
97
97
  const dest = destinationPath.endsWith('/')
98
98
  ? destinationPath
99
99
  : `${destinationPath}/`;
100
- const rsyncArgs = ['-a'];
100
+ // -a includes --specials which tries to copy sockets/FIFOs and can fail
101
+ const rsyncArgs = ['-a', '--no-specials'];
101
102
  if (!keepExisting) {
102
103
  rsyncArgs.push('--delete', '--force');
103
104
  }
@@ -118,6 +119,9 @@ export default async function rsyncCopy({ sourcePath, destinationPath, excludes
118
119
  resolve();
119
120
  }
120
121
  else {
122
+ console.error(`CodeYam Error: rsync failed with code: ${code}`, JSON.stringify({
123
+ rsyncArgs,
124
+ }, null, 2));
121
125
  reject(new Error(`rsync failed with exit code ${code}`));
122
126
  }
123
127
  });
@@ -1 +1 @@
1
- {"version":3,"file":"rsyncCopy.js","sourceRoot":"","sources":["../../../../../src/lib/fs/rsyncCopy.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,IAAI,CAAC;AACrD,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAE5B;;;;;GAKG;AACH,SAAS,YAAY,CAAC,EACpB,UAAU,EACV,eAAe,EACf,QAAQ,EACR,MAAM,GAMP;IACC,IAAI,OAAO,CAAC,QAAQ,KAAK,QAAQ;QAAE,OAAO,KAAK,CAAC;IAEhD,oDAAoD;IACpD,gEAAgE;IAChE,IAAI,UAAU,CAAC,eAAe,CAAC,EAAE,CAAC;QAChC,IAAI,CAAC;YACH,MAAM,QAAQ,GAAG,WAAW,CAAC,eAAe,CAAC,CAAC;YAC9C,IAAI,QAAQ,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;gBACxB,iEAAiE;gBACjE,OAAO,KAAK,CAAC;YACf,CAAC;YACD,MAAM,CAAC,eAAe,EA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CAAC;QAED,SAAS,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;QAE7B,MAAM,YAAY,GAAG,KAAK,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC;QAE/C,YAAY,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,EAAE;YAC/B,IAAI,IAAI,KAAK,CAAC,EAAE,CAAC;gBACf,IAAI,CAAC,MAAM,EAAE,CAAC;oBACZ,MAAM,QAAQ,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,SAAS,CAAC,GAAG,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;oBAC9D,OAAO,CAAC,GAAG,CACT,yBAAyB,UAAU,OAAO,eAAe,WAAW,QAAQ,IAAI,CACjF,CAAC;gBACJ,CAAC;gBACD,OAAO,EAAE,CAAC;YACZ,CAAC;iBAAM,CAAC;gBACN,OAAO,CAAC,KAAK,CACX,0CAA0C,IAAI,EAAE,EAChD,IAAI,CAAC,SAAS,CACZ;oBACE,SAAS;iBACV,EACD,IAAI,EACJ,CAAC,CACF,CACF,CAAC;gBAEF,MAAM,CAAC,IAAI,KAAK,CAAC,+BAA+B,IAAI,EAAE,CAAC,CAAC,CAAC;YAC3D,CAAC;QACH,CAAC,CAAC,CAAC;QAEH,YAAY,CAAC,EAAE,CAAC,OAAO,EAAE,CAAC,KAAK,EAAE,EAAE;YACjC,IAAI,CAAC,MAAM,EAAE,CAAC;gBACZ,OAAO,CAAC,GAAG,CAAC,iBAAiB,EAAE,KAAK,CAAC,CAAC;YACxC,CAAC;YACD,MAAM,CAAC,KAAK,CAAC,CAAC;QAChB,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC"}
@@ -1,4 +1,4 @@
1
- import { spawn, execSync } from 'child_process';
1
+ import { execSync, spawn } from 'child_process';
2
2
  import { existsSync, readdirSync, rmSync } from 'fs';
3
3
  import { join } from 'path';
4
4
 
@@ -128,7 +128,8 @@ export default async function rsyncCopy({
128
128
  ? destinationPath
129
129
  : `${destinationPath}/`;
130
130
 
131
- const rsyncArgs = ['-a'];
131
+ // -a includes --specials which tries to copy sockets/FIFOs and can fail
132
+ const rsyncArgs = ['-a', '--no-specials'];
132
133
 
133
134
  if (!keepExisting) {
134
135
  rsyncArgs.push('--delete', '--force');
@@ -156,6 +157,17 @@ export default async function rsyncCopy({
156
157
  }
157
158
  resolve();
158
159
  } else {
160
+ console.error(
161
+ `CodeYam Error: rsync failed with code: ${code}`,
162
+ JSON.stringify(
163
+ {
164
+ rsyncArgs,
165
+ },
166
+ null,
167
+ 2,
168
+ ),
169
+ );
170
+
159
171
  reject(new Error(`rsync failed with exit code ${code}`));
160
172
  }
161
173
  });
@@ -2288,6 +2288,23 @@ export default function constructMockCode(
2288
2288
  }
2289
2289
  }
2290
2290
 
2291
+ // Post-processing: When the root functionCallReturnValue is typed as "function" but the
2292
+ // return value also has nested properties (methods like .from(), .auth, etc.), it's actually
2293
+ // an object, not a function to be called. Clear returnsFunctionArgs to prevent double-wrapping
2294
+ // (adding an extra () => { return { ... } } wrapper and ["()"] data paths).
2295
+ // This handles cases like Supabase's createClient() which returns an object with methods.
2296
+ // Only applied to the root level - nested parts that are functions with methods (like
2297
+ // useSearchParams()[1] which is a setter function with .set() and .delete()) should keep
2298
+ // their returnsFunctionArgs since they genuinely ARE functions.
2299
+ if (
2300
+ returnValueParts.returnsFunctionArgs &&
2301
+ returnValueParts.returnsFunctionArgs.length === 0 &&
2302
+ returnValueParts.nested &&
2303
+ returnValueParts.nested.length > 0
2304
+ ) {
2305
+ returnValueParts.returnsFunctionArgs = undefined;
2306
+ }
2307
+
2291
2308
  const contents = constructReturnValueString(returnValueParts);
2292
2309
 
2293
2310
  if (mockNameParts.length > 1) {
@@ -2360,16 +2377,26 @@ export default function constructMockCode(
2360
2377
  const nameAssignment = isErrorSubclass
2361
2378
  ? `this.name = '${baseMockName}';`
2362
2379
  : '';
2363
- // Use the safe function name for the class definition
2364
- const className = mockNameIsCallSignature
2365
- ? derivedFunctionName
2366
- : baseMockName;
2380
+ // Use the base class name for the class definition, not the call-signature-derived name.
2381
+ // When mockName is "StatsCalculator(supabase)", baseMockName is "StatsCalculator"
2382
+ // and derivedFunctionName would be "StatsCalculator_supabase" which is wrong.
2383
+ // Classes are instantiated with `new ClassName(args)` so the name must match the original.
2384
+ const className = baseMockName;
2385
+
2386
+ // Use the already-generated contents (which has proper function wrappers for methods)
2387
+ // instead of raw scenarios().data() which would create non-callable string-keyed properties.
2388
+ // For classes with methods like calculateStats(), the contents will have:
2389
+ // { calculateStats: (...args) => scenarios().data()?.["key"]?.["calculateStats(...)"], ... }
2390
+ // which makes methods callable on the instance.
2391
+ const classContents = enhancedContents.trim().startsWith('{')
2392
+ ? enhancedContents
2393
+ : `scenarios().data()?.${quotePropertyKey(dataKey)} || {}`;
2367
2394
 
2368
2395
  return `class ${className}${isErrorSubclass ? ' extends Error' : ''} {
2369
2396
  constructor(message) {
2370
2397
  ${superCall}
2371
2398
  ${nameAssignment}
2372
- Object.assign(this, scenarios().data()?.${quotePropertyKey(dataKey)} || {});
2399
+ Object.assign(this, ${classContents});
2373
2400
  }
2374
2401
  }`;
2375
2402
  }
@@ -32,7 +32,10 @@ import type {
32
32
  } from './orchestrateCapture/taskRunner';
33
33
  import KyselyAnalysisLoader from './orchestrateCapture/KyselyAnalysisLoader';
34
34
 
35
- const MAX_BATCH_SIZE = 6;
35
+ // Temporarily set to 1 (effectively disabling batching) to work around reliability
36
+ // issues where multi-analysis batches cause cascading failures. Revisit once we
37
+ // reassess the SQS protocol and worker error handling.
38
+ const MAX_BATCH_SIZE = 1;
36
39
  const POLLING_INTERVAL = 30 * 1000; // 30 seconds
37
40
  const TASK_HEALTH_CHECK_INTERVAL = 60 * 1000; // 1 minute
38
41
  const ANALYSIS_TIMEOUT = 20 * 60 * 1000;