elasticdash-test 0.1.21-alpha-1 → 0.1.21-alpha-2

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "elasticdash-test",
3
- "version": "0.1.21-alpha-1",
3
+ "version": "0.1.21-alpha-2",
4
4
  "description": "AI-native test runner for ElasticDash workflow testing",
5
5
  "type": "module",
6
6
  "bin": {
@@ -29,13 +29,15 @@ export function prepareOutputForJudge(
29
29
  maxChars: number = DEFAULT_MAX_CHARS,
30
30
  ): string {
31
31
  if (!output) return output
32
- if (output.length <= maxChars) return output
33
32
 
34
- // Try JSON-aware extraction first
33
+ // Always attempt JSON-aware processing (value truncation + key extraction).
34
+ // Even outputs under maxChars can contain arrays with 100+ items that
35
+ // drown out the fields the judge actually needs to evaluate.
35
36
  const jsonResult = tryJsonExtract(output, judgePrompt, maxChars)
36
37
  if (jsonResult !== null) return jsonResult
37
38
 
38
- // Fallback: head/tail truncation for non-JSON or unparseable content
39
+ // Non-JSON: only truncate if over budget
40
+ if (output.length <= maxChars) return output
39
41
  return truncateHeadTail(output, maxChars)
40
42
  }
41
43