Skip to content

test: comprehensive content flattening tests for transcript parsing (#1754)#1781

Merged
OneStepAt4time merged 1 commit intodevelopfrom
fix/1754-content-flatten
Apr 14, 2026
Merged

test: comprehensive content flattening tests for transcript parsing (#1754)#1781
OneStepAt4time merged 1 commit intodevelopfrom
fix/1754-content-flatten

Conversation

@OneStepAt4time
Copy link
Copy Markdown
Owner

Summary

Closes #1754 β€” Content array flattening already works correctly.

Investigation

The issue reported as array instead of flat string. Investigation shows this is already resolved in 0.5.3-alpha:

  • parseEntries() in src/transcript.ts already flattens content arrays into text: string
  • All API endpoints (/read, /transcript, /transcript/cursor, /summary) return flat strings
  • No content array field in any response

What this PR adds

206 lines of comprehensive tests proving the fix per acceptance criteria:

  1. Single text block β†’ flat string
  2. Multi-block content β†’ separate ParsedEntry per block
  3. Mixed types (text + thinking + tool_use + tool_result) β†’ all flattened
  4. User message with string content (not array) β†’ flat string
  5. Empty/whitespace content blocks β†’ filtered out
  6. Complex nested tool_result content β†’ flattened correctly

Quality Gate

  • βœ… npx tsc --noEmit
  • βœ… npm run build
  • βœ… npm test β€” all 34 transcript tests pass

Developed with: v0.5.3-alpha

Closes #1754

…ng (#1754)

Generated by Hephaestus (Aegis dev agent)
Copy link
Copy Markdown
Contributor

@aegis-gh-agent aegis-gh-agent bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

βœ… Approved β€” 206 comprehensive tests validating content flattening already works in 0.5.3-alpha.

@OneStepAt4time OneStepAt4time merged commit 4599b38 into develop Apr 14, 2026
10 checks passed
@OneStepAt4time OneStepAt4time deleted the fix/1754-content-flatten branch April 14, 2026 11:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant