
## Your role
You are a senior architect skilled in assessing TypeScript codebases.
## Documentation
### Architecture
# Meld Architecture
## INTRODUCTION
Meld is a specialized, directive-based scripting language designed for embedding small "@directives" inside an otherwise plain text (e.g., Markdown-like) document. The code in this repository implements:
• Meld grammar rules and token types (e.g., text directives, path directives, data directives).  
• The parsing layer that converts Meld content into an AST (Abstract Syntax Tree).  
• A directive interpretation layer that processes these AST nodes and manipulates internal "states" to store variables and more.  
• A resolution layer to handle variable references, path expansions, data manipulations, etc.  
• Testing utilities and an in-memory FS (memfs) to simulate filesystems for thorough testing.  
The main idea:  
1. Meld code is parsed to an AST.  
2. Each directive node is validated and interpreted, updating a shared "state" (variables, data structures, commands, etc.).  
3. Optional transformations (e.g., output formatting) generate final representations (Markdown, LLM-friendly XML, etc.).  
Below is an overview of the directory and service-level architecture, referencing code from this codebase.
## DIRECTORY & FILE STRUCTURE
At a high level, the project is arranged as follows (select key entries included):
project-root/  
 ├─ api/                    ← High-level API and tests  
 │   ├─ api.test.ts  
 │   └─ index.ts  
 ├─ bin/                    ← CLI entry point  
 │   └─ meld.ts  
 ├─ cli/                    ← CLI implementation  
 │   ├─ cli.test.ts  
 │   └─ index.ts  
 ├─ core/                   ← Core utilities and types  
 │   ├─ config/            ← Configuration (logging, etc.)  
 │   ├─ errors/            ← Error class definitions  
 │   │   ├─ MeldError.ts
 │   │   ├─ ServiceInitializationError.ts   ← Service initialization errors
 │   │   └─ ... other errors
 │   ├─ types/             ← Core type definitions  
 │   │   ├─ dependencies.ts  ← Service dependency definitions
 │   │   └─ index.ts
 │   └─ utils/             ← Logging and utility modules  
 │       ├─ logger.ts
 │       ├─ serviceValidation.ts  ← Service validation utilities
 │       └─ simpleLogger.ts
 ├─ services/              ← Core service implementations  
 │   ├─ pipeline/          ← Main transformation pipeline  
 │   │   ├─ ParserService/     ← Initial parsing  
 │   │   ├─ InterpreterService/← Pipeline orchestration  
 │   │   ├─ DirectiveService/  ← Directive handling  
 │   │   │   ├─ handlers/  
 │   │   │   │   ├─ definition/   ← Handlers for definition directives  
 │   │   │   │   └─ execution/    ← Handlers for execution directives  
 │   │   │   └─ errors/  
 │   │   └─ OutputService/    ← Final output generation  
 │   ├─ state/             ← State management  
 │   │   ├─ StateService/      ← Core state management  
 │   │   └─ StateEventService/ ← Core event system  
 │   ├─ resolution/        ← Resolution and validation  
 │   │   ├─ ResolutionService/ ← Variable/path resolution  
 │   │   ├─ ValidationService/ ← Directive validation  
 │   │   └─ CircularityService/← Circular dependency detection  
 │   ├─ fs/                ← File system operations  
 │   │   ├─ FileSystemService/ ← File operations  
 │   │   ├─ PathService/      ← Path handling  
 │   │   └─ PathOperationsService/ ← Path utilities  
 │   └─ cli/               ← Command line interface  
 │       └─ CLIService/    ← CLI entry point  
 ├─ tests/                  ← Test infrastructure   
 │   ├─ fixtures/          ← Test fixture data  
 │   ├─ mocks/             ← Test mock implementations  
 │   └─ utils/             ← Test utilities and helpers  
 │       ├─ debug/         ← Test debug utilities  
 │       │   ├─ StateDebuggerService/  
 │       │   ├─ StateVisualizationService/  
 │       │   ├─ StateHistoryService/  
 │       │   └─ StateTrackingService/  
 │       ├─ FixtureManager.ts  
 │       ├─ MemfsTestFileSystem.ts  
 │       ├─ ProjectBuilder.ts  
 │       ├─ TestContext.ts  
 │       └─ TestSnapshot.ts  
 ├─ docs/                   ← Documentation  
 ├─ package.json  
 ├─ tsconfig.json  
 ├─ tsup.config.ts  
 └─ vitest.config.ts  
Key subfolders:  
• services/pipeline/: Core transformation pipeline services (parsing, interpretation, directives, output)  
• services/state/: State management and event services  
• services/resolution/: Resolution, validation, and circularity detection services  
• services/fs/: File system, path handling, and operations services  
• services/cli/: Command line interface services  
• core/: Central types, errors, and utilities used throughout the codebase  
• tests/utils/: Test infrastructure including debug utilities, memfs implementation, fixture management, and test helpers  
• api/: High-level public API for using Meld programmatically  
• cli/: Command line interface for Meld  
## CORE LIBRARIES & THEIR ROLE
### meld-ast 
   • parse(content: string): MeldNode[]  
   • Basic parsing that identifies directives vs. text nodes.  
   • Produces an AST which other services manipulate.  
### llmxml 
   • Converts content to an LLM-friendly XML format or can parse partially.  
   • OutputService may call it if user requests "llm" format.  
### meld-spec
   • Contains interface definitions for MeldNode, DirectiveNode, TextNode, etc.  
   • Contains directive kind enumerations.  
## HIGH-LEVEL FLOW
Below is a simplified flow of how Meld content is processed:
   ┌─────────────────────────────┐
   │   Meld Source Document      │
   └─────────────────────────────┘
                │
                ▼
   ┌─────────────────────────────┐
   │ ParserService.parse(...)    │
   │   → uses meld-ast to parse  │
   └─────────────────────────────┘
                │ AST (MeldNode[])
                ▼
   ┌─────────────────────────────────────────────────┐
   │ InterpreterService.interpret(nodes, options)    │
   │   → For each node, pass to DirectiveService     │
   │   → Handles node transformations                │
   └─────────────────────────────────────────────────┘
                │
                ▼
   ┌──────────────────────────────────────────┐
   │ DirectiveService                         │
   │   → Routes to correct directive handler  │
   │   → Handlers can provide replacements    │
   └──────────────────────────────────────────┘
                │
                ▼
   ┌───────────────────────────────────────────────┐
   │ StateService + ResolutionService + Others     │
   │   → Stores variables and transformed nodes    │
   │   → Path expansions, data lookups, etc.       │
   └───────────────────────────────────────────────┘
                │
                ▼
   ┌──────────────────────────────────────────┐
   │ OutputService                            │
   │   → Uses transformed nodes for output    │
   │   → Generates clean, directive-free      │
   │     markdown, LLM XML, or other formats  │
   └──────────────────────────────────────────┘
## MAJOR SERVICES (OVERVIEW)
Below are the key "services" in the codebase. Each follows the single responsibility principle:
### CLIService
   - Provides command-line interface for running Meld
   - Handles file watching and reprocessing
   - Manages format selection and output options
   - Routes to appropriate services based on CLI flags
### ParserService  
   - Wraps the meld-ast parse(content) function  
   - Adds location information with file paths (parseWithLocations)  
   - Produces an array of MeldNode objects  
### DirectiveService  
   - Routes directives to the correct directive handler  
   - Validates directives using ValidationService  
   - Calls ResolutionService for variable resolution  
   - Updates StateService with directive execution results
   - Supports node transformation through DirectiveResult interface
   - Handlers can provide replacement nodes for transformed output
### InterpreterService  
   - Orchestrates the main interpret(nodes) pipeline  
   - For each AST node:
       a) If it's text, store it or pass it along  
       b) If it's a directive:
          - Calls DirectiveService for processing
          - Handles node transformations if provided
          - Updates state with transformed nodes
   - Maintains the top-level process flow
   - Supports transformation mode through feature flags
### StateService  
   - Stores variables in maps:
       • textVars (for @text)  
       • dataVars (for @data)  
       • pathVars (for @path)  
       • commands (for @define)  
   - Tracks both original and transformed MeldNodes
   - Provides transformation capabilities for directive processing
   - Maintains transformation state during cloning
   - Provides child states for nested imports  
   - Supports immutability toggles  
### ResolutionService  
   - Handles all variable interpolation:
       • Variables ("{{var}}", "{{data.field}}")
       • Path expansions ("$HOMEPATH/path")  
       • Command references  
   - Context-aware resolution  
   - Circular reference detection  
   - Sub-fragment parsing support  
### CircularityService  
   - Prevents infinite import loops  
   - Detects circular variable references  
   - Maintains dependency graphs  
### PathService  
   - Validates and normalizes paths  
   - Enforces path security constraints  
   - Handles path joining and manipulation  
   - Supports test mode for path operations  
### ValidationService  
   - Validates directive syntax and constraints  
   - Provides extensible validator registration  
   - Throws MeldDirectiveError on validation failures  
   - Tracks available directive kinds  
###  FileSystemService  
    - Abstracts file operations (read, write)  
    - Supports both real and test filesystems  
    - Handles path resolution and validation  
### OutputService  
    - Converts final AST and state to desired format
    - Uses transformed nodes when available
    - Supports markdown and LLM XML output  
    - Integrates with llmxml for LLM-friendly formatting  
    - Handles format-specific transformations
    - Provides clean output without directive definitions
## TESTING INFRASTRUCTURE
All tests are heavily reliant on a memory-based filesystem (memfs) for isolation and speed. The major testing utilities include:
### MemfsTestFileSystem  
   – Thin wrapper around memfs  
   – Offers readFile, writeFile, mkdir, etc. with in-memory data  
   – Provides an ephemeral environment for all test IO  
### TestContext  
   – Central test harness that creates a new MemfsTestFileSystem  
   – Provides references to all major services (ParserService, DirectiveService, etc.)  
   – Allows writing files, snapshotting the FS, and comparing  
### TestSnapshot  
   – Takes "snapshots" of the current Memfs FS, storing a Map<filePath, content>  
   – Compares snapshots to detect added/removed/modified files  
### ProjectBuilder  
   – Creates mock "projects" in the in-memory FS from JSON structure  
   – Useful for complex, multi-file tests or large fixture-based testing  
### Node Factories  
   – Provides helper functions for creating AST nodes in tests  
   – Supports creating directive, text, and code fence nodes  
   – Includes location utilities for source mapping  
Testing Organization:
• tests/utils/: Core test infrastructure (MemFS, snapshots, contexts)  
• tests/mocks/: Minimal mocks and test doubles  
• tests/fixtures/: JSON-based test data  
• tests/services/: Service-specific integration tests  
Testing Approach:
• Each test uses a fresh TestContext or recreates MemfsTestFileSystem  
• Direct imports from core packages (meld-ast, meld-spec) for types  
• Factory functions for creating test nodes and data  
• Snapshots for tracking filesystem changes  
## DEBUGGING INFRASTRUCTURE
The codebase includes specialized debugging services located in `tests/utils/debug/` that help diagnose and troubleshoot state-related issues:
### StateDebuggerService
   - Provides debug session management and diagnostics
   - Tracks state operations and transformations
   - Offers operation tracing and analysis
   - Helps identify state manipulation issues
### StateVisualizationService
   - Generates visual representations of state
   - Creates Mermaid/DOT graphs of state relationships
   - Visualizes state metrics and transformations
   - Aids in understanding complex state changes
### StateHistoryService
   - Records chronological state changes
   - Maintains operation history
   - Tracks transformation chains
   - Enables state change replay and analysis
### StateTrackingService
   - Monitors state relationships and dependencies
   - Tracks state lineage and inheritance
   - Records metadata about state changes
   - Helps debug scope and inheritance issues
Debugging Approach:
• Services can be enabled selectively in tests
• Debug output includes detailed state snapshots
• Visual representations help understand complex states
• History tracking enables step-by-step analysis
These debugging services are particularly useful for:
• Troubleshooting complex state transformations
• Understanding directive processing chains
• Analyzing variable resolution paths
• Debugging scope inheritance issues
• Visualizing state relationships
## SERVICE RELATIONSHIPS
Services in Meld follow a strict initialization order and dependency graph: 1. Base Services:
   - FileSystemService (no dependencies)
   - PathService (depends on FS)
2. State Management:
   - StateEventService (no dependencies)
   - StateService (depends on events)
3. Core Pipeline:
   - ParserService (independent)
   - ResolutionService (depends on State, FS)
   - ValidationService (depends on Resolution)
   - CircularityService (depends on Resolution)
4. Pipeline Orchestration:
   - DirectiveService (depends on multiple services)
   - InterpreterService (orchestrates others)
5. Output Generation:
   - OutputService (depends on State)
6. Debug Support:
   - DebuggerService (optional, depends on all)
Service initialization and validation is handled through the core/types/dependencies.ts system, which ensures services are created in the correct order and all dependencies are satisfied.
## EXAMPLE USAGE SCENARIO
1) Input: A .meld file with lines like:  
   @text greeting = "Hello"  
   @data config = { "value": 123 }  
   @import [ path = "other.meld" ]  
2) We load the file from disk.  
3) ParserService → parse the content → AST.  
4) InterpreterService → interpret(AST).  
   a) For each directive, DirectiveService → validation → resolution → update StateService.  
   b) If an import is encountered, CircularityService ensures no infinite loops.  
5) Once done, the final StateService has textVars.greeting = "Hello", dataVars.config = { value: 123 }, etc.  
6) OutputService can generate the final text or an LLM-XML representation.  
## ERROR HANDLING
• MeldDirectiveError thrown if a directive fails validation or interpretation.  
• MeldParseError if the parser cannot parse content.  
• PathValidationError for invalid paths.  
• ResolutionError for variable resolution issues.  
• MeldError as a base class for other specialized errors.  
These errors typically bubble up to the caller or test.  
## CONCLUSION
This codebase implements the entire Meld language pipeline:  
• Parsing Meld documents into an AST.  
• Validating & interpreting directives.  
• Storing data in a hierarchical state.  
• Resolving references (text, data, paths, commands).  
• (Optionally) generating final formatted output.  
Plus, it has a robust test environment with an in-memory FS, snapshots, and a test harness (TestContext) for integration and unit tests. Everything is layered to keep parsing, state management, directive logic, and resolution separate, adhering to SOLID design principles.  
The ASCII diagrams, modules, and file references in this overview represent the CURRENT code as it is: multiple specialized services collaborating to parse and interpret Meld scripts thoroughly—test coverage is facilitated by the in-memory mocking and snapshot-based verification.
 
### Meld Processing Pipeline
# Meld Pipeline Flow
## Overview
The Meld pipeline processes `.meld` files through several stages to produce either `.xml` or `.md` output. Here's a detailed look at how it works:
```ascii
┌─────────────┐     ┌─────────────┐     ┌──────────────┐     ┌──────────────┐
│  Service    │     │   Service   │     │   Pipeline   │     │    Final     │
│Initialization├────►│ Validation  ├────►│  Execution   ├────►│   Output     │
└─────────────┘     └─────────────┘     └──────────────┘     └──────────────┘
      │                    │                    │                    │
      ▼                    ▼                    ▼                    ▼
┌─────────────┐     ┌─────────────┐     ┌──────────────┐     ┌──────────────┐
│Dependencies │     │Validate All │     │Process Input │     │Generate Clean│
│  Resolved   │     │ Services    │     │   Content    │     │   Output    │
└─────────────┘     └─────────────┘     └──────────────┘     └──────────────┘
```
## Service Organization
The pipeline is organized into logical service groups, with strict initialization order and dependency validation:
### Pipeline Services (services/pipeline/)
```ascii
┌─────────────┐     ┌─────────────┐     ┌──────────────┐     ┌──────────────┐
│   Parser    │     │  Directive  │     │ Interpreter  │     │   Output     │
│   Service   ├────►│   Service   ├────►│   Service    ├────►│   Service    │
└─────────────┘     └─────────────┘     └──────────────┘     └──────────────┘
      │                    │                    │                    │
      ▼                    ▼                    ▼                    ▼
┌─────────────┐     ┌─────────────┐     ┌──────────────┐     ┌──────────────┐
│Initialize & │     │Validate &   │     │Transform &   │     │Format &     │
│  Validate   │     │Process Dirs │     │Update State  │     │Generate Out │
└─────────────┘     └─────────────┘     └──────────────┘     └──────────────┘
```
### State Services (services/state/)
```ascii
┌─────────────┐     ┌─────────────┐
│    State    │     │    State    │
│   Service   ├────►│    Event    │
└─────────────┘     │   Service   │
                    └─────────────┘
```
### Resolution Services (services/resolution/)
```ascii
┌─────────────┐     ┌─────────────┐     ┌──────────────┐
│ Resolution  │     │ Validation  │     │ Circularity  │
│   Service   ├────►│   Service   ├────►│   Service    │
└─────────────┘     └─────────────┘     └──────────────┘
```
### File System Services (services/fs/)
```ascii
┌─────────────┐     ┌─────────────┐     ┌──────────────┐
│    File     │     │    Path     │     │     Path     │
│   System    ├────►│   Service   ├────►│  Operations  │
│   Service   │     │             │     │   Service    │
└─────────────┘     └─────────────┘     └──────────────┘
```
## Detailed Flow
1. **Service Initialization** (`core/types/dependencies.ts`)
   ```ascii
   ┌─────────────┐
   │Load Service │
   │Dependencies │
   └─────┬───────┘
         │
         ▼
   ┌─────────────┐
   │Initialize in│
   │   Order    │
   └─────┬───────┘
         │
         ▼
   ┌─────────────┐
   │  Validate   │
   │  Services   │
   └─────────────┘
   ```
   - Resolves service dependencies
   - Initializes in correct order
   - Validates service configuration
   - Enables transformation if requested
2. **Input Processing** (`CLIService`)
   - User runs `meld prompt.meld`
   - `CLIService` handles command line options
   - Default output is `.xml` format
   - Can specify `--format markdown` for `.md` output
   - Supports `--stdout` for direct console output
3. **Parsing** (`ParserService`)
   ```ascii
   ┌─────────────┐
   │  Raw Text   │
   │   Input     │
   └─────┬───────┘
         │
         ▼
   ┌─────────────┐
   │  meld-ast   │
   │   Parser    │
   └─────┬───────┘
         │
         ▼
   ┌─────────────┐
   │ MeldNode[]  │
   │    AST      │
   └─────────────┘
   ```
   - Reads the input file content
   - Parses into AST using `meld-ast`
   - Identifies directives and text nodes
   - Adds source location information
4. **Interpretation** (`InterpreterService`)
   ```ascii
   ┌─────────────┐     ┌─────────────┐
   │  MeldNode[] │     │  Directive  │
   │     AST     ├────►│   Service   │
   └─────────────┘     └──────┬──────┘
                              │
                              ▼
   ┌─────────────┐     ┌─────────────┐
   │ Resolution  │◄────┤   Handler   │
   │   Service   │     │(with node   │
   └──────┬──────┘     │replacements)│
          │            └─────────────┘
          ▼
   ┌─────────────┐
   │    State    │
   │   Service   │
   │(Original &  │
   │Transformed) │
   └─────────────┘
   ```
   - Processes each AST node sequentially
   - Routes directives to appropriate handlers
   - Handlers can provide replacement nodes
   - Maintains both original and transformed states
   - Resolves variables and references
   - Handles file imports and embedding
5. **Output Generation** (`OutputService`)
   ```ascii
   ┌─────────────┐     ┌─────────────┐
   │Transformed  │     │   Format    │
   │  Nodes &    ├────►│  Converter  │
   │   State     │     └──────┬──────┘
                              │
                              ▼
   ┌─────────────┐     ┌─────────────┐
   │Clean Output │◄────┤  Formatted  │
   │(No Directive│     │   Output    │
   │Definitions) │     └─────────────┘
   └─────────────┘
   ```
   - Takes transformed nodes and state
   - Converts to requested format:
     - `llm`: Uses `llmxml` library for LLM-friendly XML
     - `markdown`: Clean markdown without directive definitions
   - Writes output to file or stdout
## Transformation Mode and Variable Resolution
When transformation mode is enabled, the pipeline handles directives and variables in a special way. Understanding this flow is critical for debugging and enhancing directive handlers:
```ascii
┌─────────────┐     ┌─────────────┐     ┌──────────────┐     ┌──────────────┐
│  Directive  │     │Interpretation│     │   State      │     │   Output     │
│  Handlers   ├────►│  & Node     ├────►│  Variable    ├────►│  Generation  │
│(with replace│     │Transformation│     │  Resolution  │     │              │
│  nodes)     │     │              │     │              │     │              │
└─────────────┘     └─────────────┘     └──────────────┘     └──────────────┘
```
### Key Transformation Pipeline Concepts
1. **Directive Handler Replacement Nodes**
   - Directive handlers can return replacement nodes when in transformation mode
   - The InterpreterService must properly apply these replacements in the transformed nodes array
   - For import directives, the replacement is typically an empty text node
   - For embed directives, the replacement node contains the embedded content
2. **State Propagation Across Boundaries**
   - Variables must be explicitly copied between parent and child states
   - When importing files, variables must be copied from imported state to parent state
   - The ImportDirectiveHandler must ensure all variable types (text, data, path, commands) are copied
3. **Variable Resolution Process**
   - Variables can be resolved at multiple stages:
     - During directive processing
     - During node transformation
     - During final output generation
     - During post-processing in the main function
   - The OutputService's nodeToMarkdown method handles variable reference resolution in text nodes
   - A final variable resolution pass in the main function ensures any remaining references are resolved
4. **State Management for Transformation**
   - The StateService maintains both original and transformed node arrays
   - Transformed nodes must be explicitly initialized 
   - The transformNode method is used to replace directive nodes with their outputs
   - State must keep track of transformation options to determine which directives to transform
## Service Responsibilities
### Pipeline Services
1. **ParserService** (`services/pipeline/ParserService/`)
   - Wraps meld-ast parser
   - Produces AST nodes
   - Adds file location information
2. **InterpreterService** (`services/pipeline/InterpreterService/`)
   - Orchestrates directive processing
   - Handles node transformations
   - Maintains interpretation state
   - Handles imports and embedding
   - **Critical for transformation:** Applies directive handler replacement nodes to transformed node array
   - **State propagation:** Ensures proper variable inheritance between parent and child states
3. **DirectiveService** (`services/pipeline/DirectiveService/`)
   - Routes directives to handlers
   - Validates directive syntax
   - Supports node transformation
   - Updates state based on directive results
   - **Directive handlers:** Can return replacement nodes in transformation mode
   - **Handler context:** Includes parent state for proper variable propagation
4. **OutputService** (`services/pipeline/OutputService/`)
   - Uses transformed nodes for clean output
   - Supports markdown and LLM XML
   - Generates directive-free output
   - Handles formatting options
   - **Variable resolution:** Resolves variable references in text nodes during output generation
   - **Transformation handling:** Uses special processing for variable references in transformation mode
### State Services
1. **StateService** (`services/state/StateService/`)
   - Stores variables and commands
   - Maintains original and transformed nodes
   - Manages scope and inheritance
   - Tracks file dependencies
   - **Transformation support:** Keeps track of both original and transformed node arrays
   - **Variable copying:** Must explicitly copy variables between parent and child states
   - **Transformation options:** Supports selective transformation of different directive types
2. **StateEventService** (`services/state/StateEventService/`)
   - Handles state change events
   - Manages state updates
   - Provides event hooks
   - Supports state tracking
### Resolution Services
1. **ResolutionService** (`services/resolution/ResolutionService/`)
   - Resolves variables and references
   - Handles path expansions
   - Manages circular dependencies
2. **ValidationService** (`services/resolution/ValidationService/`)
   - Validates directive syntax and constraints
   - Provides extensible validator registration
   - Throws MeldDirectiveError on validation failures
   - Tracks available directive kinds
3. **CircularityService** (`services/resolution/CircularityService/`)
   - Prevents infinite import loops
   - Detects circular variable references
   - Maintains dependency graphs
### File System Services
1. **FileSystemService** (`services/fs/FileSystemService/`)
   - Abstracts file operations (read, write)
   - Supports both real and test filesystems
   - Handles path resolution and validation
2. **PathService** (`services/fs/PathService/`)
   - Validates and normalizes paths
   - Enforces path security constraints
   - Handles path joining and manipulation
   - Supports test mode for path operations
3. **PathOperationsService** (`services/fs/PathOperationsService/`)
   - Handles complex path operations
   - Provides path utilities
   - Manages path transformations
## Test Results
> meld@10.1.0 test
> vitest run
 RUN  v2.1.9 /Users/adam/dev/meld
 ✓ tests/utils/debug/StateVisualizationService/StateVisualizationService.test.ts (26 tests) 16ms
stdout | services/state/StateService/StateService.test.ts > StateService > State Tracking > should track state lineage
Initial State: graph TD;
After Creating Child: graph TD;
    70141f2d-f220-482a-8b06-ced1fb098769 -->|parent-child| parent-child style="solid,#000000";
After Creating Grandchild: graph TD;
    70141f2d-f220-482a-8b06-ced1fb098769 -->|parent-child| parent-child style="solid,#000000";
    374ed017-eba0-4ad7-9504-e5165ab4d097 -->|parent-child| parent-child style="solid,#000000";
State Lineage: [
  '3119c414-ff9b-461b-9c54-4c3b13965668',
  '70141f2d-f220-482a-8b06-ced1fb098769',
  '374ed017-eba0-4ad7-9504-e5165ab4d097'
]
State Transitions: Complete Debug Report: Debug Session Report (74d568a6-2c72-4f39-9224-bec6a8e8c3e6)
Duration: 0.003s
Diagnostics: Metrics:
Snapshots:
 ✓ services/state/StateService/StateService.test.ts (39 tests) 19ms
 ✓ services/resolution/ValidationService/ValidationService.test.ts (43 tests) 17ms
 ✓ services/pipeline/DirectiveService/handlers/definition/DefineDirectiveHandler.test.ts (20 tests) 32ms
 ✓ services/pipeline/DirectiveService/handlers/execution/ImportDirectiveHandler.test.ts (16 tests | 2 skipped) 47ms
 ✓ services/pipeline/DirectiveService/handlers/execution/EmbedDirectiveHandler.test.ts (14 tests) 88ms
stdout | services/pipeline/InterpreterService/InterpreterService.integration.test.ts > InterpreterService Integration > State management > handles state rollback on merge errors
stdout | services/pipeline/InterpreterService/InterpreterService.integration.test.ts > InterpreterService Integration > Error handling > provides location information in errors
stdout | services/pipeline/InterpreterService/InterpreterService.integration.test.ts > InterpreterService Integration > Error handling > maintains state consistency after errors
stdout | services/pipeline/InterpreterService/InterpreterService.integration.test.ts > InterpreterService Integration > Error handling > includes state context in interpreter errors
stdout | api/integration.test.ts > API Integration Tests > Variable Definitions and References > should handle text variable definitions and references
[32minfo[39m: LLMXML instance created {"options":{"defaultFuzzyThreshold":0.7,"includeHlevel":false,"includeTitle":false,"tagFormat":"PascalCase","verbose":false,"warningLevel":"all"},"timestamp":"2025-03-06T19:04:40.677Z"}
stdout | services/pipeline/InterpreterService/InterpreterService.integration.test.ts > InterpreterService Integration > Error handling > rolls back state on directive errors
stdout | services/pipeline/OutputService/OutputService.test.ts > OutputService > XML Output > should preserve text content
[32minfo[39m: LLMXML instance created {"options":{"defaultFuzzyThreshold":0.7,"includeHlevel":false,"includeTitle":false,"tagFormat":"PascalCase","verbose":false,"warningLevel":"all"},"timestamp":"2025-03-06T19:04:40.687Z"}
stdout | services/pipeline/OutputService/OutputService.test.ts > OutputService > XML Output > should preserve code fence content
[32minfo[39m: LLMXML instance created {"options":{"defaultFuzzyThreshold":0.7,"includeHlevel":false,"includeTitle":false,"tagFormat":"PascalCase","verbose":false,"warningLevel":"all"},"timestamp":"2025-03-06T19:04:40.693Z"}
stdout | services/pipeline/OutputService/OutputService.test.ts > OutputService > XML Output > should handle directives according to type
[32minfo[39m: LLMXML instance created {"options":{"defaultFuzzyThreshold":0.7,"includeHlevel":false,"includeTitle":false,"tagFormat":"PascalCase","verbose":false,"warningLevel":"all"},"timestamp":"2025-03-06T19:04:40.715Z"}
stdout | services/pipeline/OutputService/OutputService.test.ts > OutputService > XML Output > should handle directives according to type
[32minfo[39m: LLMXML instance created {"options":{"defaultFuzzyThreshold":0.7,"includeHlevel":false,"includeTitle":false,"tagFormat":"PascalCase","verbose":false,"warningLevel":"all"},"timestamp":"2025-03-06T19:04:40.720Z"}
stdout | api/integration.test.ts > API Integration Tests > Variable Definitions and References > should handle data variable definitions and field access
[32minfo[39m: LLMXML instance created {"options":{"defaultFuzzyThreshold":0.7,"includeHlevel":false,"includeTitle":false,"tagFormat":"PascalCase","verbose":false,"warningLevel":"all"},"timestamp":"2025-03-06T19:04:40.724Z"}
 ✓ services/pipeline/InterpreterService/InterpreterService.integration.test.ts (24 tests | 3 skipped) 200ms
stdout | services/pipeline/OutputService/OutputService.test.ts > OutputService > XML Output > should preserve state variables when requested
[32minfo[39m: LLMXML instance created {"options":{"defaultFuzzyThreshold":0.7,"includeHlevel":false,"includeTitle":false,"tagFormat":"PascalCase","verbose":false,"warningLevel":"all"},"timestamp":"2025-03-06T19:04:40.740Z"}
stdout | services/pipeline/OutputService/OutputService.test.ts > OutputService > Transformation Mode > should handle XML output in both modes
[32minfo[39m: LLMXML instance created {"options":{"defaultFuzzyThreshold":0.7,"includeHlevel":false,"includeTitle":false,"tagFormat":"PascalCase","verbose":false,"warningLevel":"all"},"timestamp":"2025-03-06T19:04:40.783Z"}
stdout | services/pipeline/OutputService/OutputService.test.ts > OutputService > Transformation Mode > should handle XML output in both modes
[32minfo[39m: LLMXML instance created {"options":{"defaultFuzzyThreshold":0.7,"includeHlevel":false,"includeTitle":false,"tagFormat":"PascalCase","verbose":false,"warningLevel":"all"},"timestamp":"2025-03-06T19:04:40.785Z"}
stdout | services/pipeline/OutputService/OutputService.test.ts > OutputService > Error Handling > should throw MeldOutputError for unknown node types
stdout | services/pipeline/OutputService/OutputService.test.ts > OutputService > Error Handling > should wrap errors from format converters
stdout | services/pipeline/OutputService/OutputService.test.ts > OutputService > Error Handling > should preserve MeldOutputError when thrown from converters
 ✓ services/pipeline/OutputService/OutputService.test.ts (24 tests) 249ms
stdout | api/integration.test.ts > API Integration Tests > Variable Definitions and References > should handle complex nested data structures
[32minfo[39m: LLMXML instance created {"options":{"defaultFuzzyThreshold":0.7,"includeHlevel":false,"includeTitle":false,"tagFormat":"PascalCase","verbose":false,"warningLevel":"all"},"timestamp":"2025-03-06T19:04:40.828Z"}
stdout | api/integration.test.ts > API Integration Tests > Variable Definitions and References > should handle template literals in text directives
stdout | api/integration.test.ts > API Integration Tests > Variable Definitions and References > should handle template literals in text directives
[32minfo[39m: LLMXML instance created {"options":{"defaultFuzzyThreshold":0.7,"includeHlevel":false,"includeTitle":false,"tagFormat":"PascalCase","verbose":false,"warningLevel":"all"},"timestamp":"2025-03-06T19:04:40.849Z"}
stdout | api/integration.test.ts > API Integration Tests > Path Handling > should handle path variables with special $PROJECTPATH syntax
[32minfo[39m: LLMXML instance created {"options":{"defaultFuzzyThreshold":0.7,"includeHlevel":false,"includeTitle":false,"tagFormat":"PascalCase","verbose":false,"warningLevel":"all"},"timestamp":"2025-03-06T19:04:40.861Z"}
stdout | api/integration.test.ts > API Integration Tests > Path Handling > should handle path variables with special $PROJECTPATH syntax
[32minfo[39m: LLMXML instance created {"options":{"defaultFuzzyThreshold":0.7,"includeHlevel":false,"includeTitle":false,"tagFormat":"PascalCase","verbose":false,"warningLevel":"all"},"timestamp":"2025-03-06T19:04:40.867Z"}
stdout | api/integration.test.ts > API Integration Tests > Path Handling > should handle path variables with special $PROJECTPATH syntax
[32minfo[39m: LLMXML instance created {"options":{"defaultFuzzyThreshold":0.7,"includeHlevel":false,"includeTitle":false,"tagFormat":"PascalCase","verbose":false,"warningLevel":"all"},"timestamp":"2025-03-06T19:04:40.880Z"}
stdout | api/integration.test.ts > API Integration Tests > Path Handling > should handle path variables with special $PROJECTPATH syntax
[32minfo[39m: LLMXML instance created {"options":{"defaultFuzzyThreshold":0.7,"includeHlevel":false,"includeTitle":false,"tagFormat":"PascalCase","verbose":false,"warningLevel":"all"},"timestamp":"2025-03-06T19:04:40.897Z"}
stdout | api/integration.test.ts > API Integration Tests > Path Handling > should handle path variables with special $. alias syntax
[32minfo[39m: LLMXML instance created {"options":{"defaultFuzzyThreshold":0.7,"includeHlevel":false,"includeTitle":false,"tagFormat":"PascalCase","verbose":false,"warningLevel":"all"},"timestamp":"2025-03-06T19:04:40.910Z"}
stdout | api/integration.test.ts > API Integration Tests > Path Handling > should handle path variables with special $HOMEPATH syntax
[32minfo[39m: LLMXML instance created {"options":{"defaultFuzzyThreshold":0.7,"includeHlevel":false,"includeTitle":false,"tagFormat":"PascalCase","verbose":false,"warningLevel":"all"},"timestamp":"2025-03-06T19:04:40.915Z"}
stdout | api/integration.test.ts > API Integration Tests > Path Handling > should handle path variables with special $~ alias syntax
[32minfo[39m: LLMXML instance created {"options":{"defaultFuzzyThreshold":0.7,"includeHlevel":false,"includeTitle":false,"tagFormat":"PascalCase","verbose":false,"warningLevel":"all"},"timestamp":"2025-03-06T19:04:40.922Z"}
stdout | api/integration.test.ts > API Integration Tests > Path Handling > should reject invalid path formats (raw absolute paths)
[32minfo[39m: LLMXML instance created {"options":{"defaultFuzzyThreshold":0.7,"includeHlevel":false,"includeTitle":false,"tagFormat":"PascalCase","verbose":false,"warningLevel":"all"},"timestamp":"2025-03-06T19:04:40.942Z"}
stdout | api/integration.test.ts > API Integration Tests > Path Handling > should reject invalid path formats (relative paths with dot segments)
[32minfo[39m: LLMXML instance created {"options":{"defaultFuzzyThreshold":0.7,"includeHlevel":false,"includeTitle":false,"tagFormat":"PascalCase","verbose":false,"warningLevel":"all"},"timestamp":"2025-03-06T19:04:40.950Z"}
stdout | api/integration.test.ts > API Integration Tests > Import Handling > should handle simple imports
[32minfo[39m: LLMXML instance created {"options":{"defaultFuzzyThreshold":0.7,"includeHlevel":false,"includeTitle":false,"tagFormat":"PascalCase","verbose":false,"warningLevel":"all"},"timestamp":"2025-03-06T19:04:40.960Z"}
stdout | api/integration.test.ts > API Integration Tests > Import Handling > should handle nested imports with proper scope inheritance
[32minfo[39m: LLMXML instance created {"options":{"defaultFuzzyThreshold":0.7,"includeHlevel":false,"includeTitle":false,"tagFormat":"PascalCase","verbose":false,"warningLevel":"all"},"timestamp":"2025-03-06T19:04:40.978Z"}
 ✓ api/integration.test.ts (14 tests) 417ms
stdout | tests/utils/debug/StateTrackingService/StateTrackingService.test.ts > StateTrackingService > Merge Operations > should handle merge target relationships
Created source state: 3081b3ab-352c-4979-9aa0-a7098edc3054
Created target state: 3eb8e475-2039-47fd-b1cf-b5d566e547a0
Created parent state: e84b4fb1-4e39-45ed-8a3f-efe40c02bd65
Initial States: graph TD;
Added parent-child relationship: {
  parent: 'e84b4fb1-4e39-45ed-8a3f-efe40c02bd65',
  child: '3eb8e475-2039-47fd-b1cf-b5d566e547a0',
  parentMetadata: {
    id: 'e84b4fb1-4e39-45ed-8a3f-efe40c02bd65',
    source: 'new',
    parentId: undefined,
    filePath: undefined,
    transformationEnabled: true,
    createdAt: 1741287881019
  },
  childMetadata: {
    id: '3eb8e475-2039-47fd-b1cf-b5d566e547a0',
    source: 'new',
    parentId: 'e84b4fb1-4e39-45ed-8a3f-efe40c02bd65',
    filePath: undefined,
    transformationEnabled: true,
    createdAt: 1741287881019
  },
  parentRelationships: [
    {
      targetId: '3eb8e475-2039-47fd-b1cf-b5d566e547a0',
      type: 'parent-child'
    }
  ],
  childRelationships: []
}
After Parent-Child Relationship: graph TD;
    3eb8e475-2039-47fd-b1cf-b5d566e547a0 -->|parent-child| parent-child style="solid,#000000";
Added merge-target relationship: {
  source: '3081b3ab-352c-4979-9aa0-a7098edc3054',
  target: '3eb8e475-2039-47fd-b1cf-b5d566e547a0',
  sourceMetadata: {
    id: '3081b3ab-352c-4979-9aa0-a7098edc3054',
    source: 'new',
    parentId: 'e84b4fb1-4e39-45ed-8a3f-efe40c02bd65',
    filePath: undefined,
    transformationEnabled: true,
    createdAt: 1741287881018
  },
  targetMetadata: {
    id: '3eb8e475-2039-47fd-b1cf-b5d566e547a0',
    source: 'new',
    parentId: 'e84b4fb1-4e39-45ed-8a3f-efe40c02bd65',
    filePath: undefined,
    transformationEnabled: true,
    createdAt: 1741287881019
  },
  sourceRelationships: [
    {
      targetId: '3eb8e475-2039-47fd-b1cf-b5d566e547a0',
      type: 'merge-target'
    }
  ],
  targetRelationships: []
}
After Merge-Target Relationship: graph TD;
    3eb8e475-2039-47fd-b1cf-b5d566e547a0 -->|parent-child| parent-child style="solid,#000000";
    3081b3ab-352c-4979-9aa0-a7098edc3054 -->|parent-child| parent-child style="solid,#000000";
State Transitions: State Lineage: {
  sourceId: '3081b3ab-352c-4979-9aa0-a7098edc3054',
  targetId: '3eb8e475-2039-47fd-b1cf-b5d566e547a0',
  parentId: 'e84b4fb1-4e39-45ed-8a3f-efe40c02bd65',
  lineage: [
    'e84b4fb1-4e39-45ed-8a3f-efe40c02bd65',
    '3eb8e475-2039-47fd-b1cf-b5d566e547a0',
    '3081b3ab-352c-4979-9aa0-a7098edc3054'
  ],
  sourceMetadata: {
    id: '3081b3ab-352c-4979-9aa0-a7098edc3054',
    source: 'new',
    parentId: 'e84b4fb1-4e39-45ed-8a3f-efe40c02bd65',
    filePath: undefined,
    transformationEnabled: true,
    createdAt: 1741287881018
  },
  targetMetadata: {
    id: '3eb8e475-2039-47fd-b1cf-b5d566e547a0',
    source: 'new',
    parentId: 'e84b4fb1-4e39-45ed-8a3f-efe40c02bd65',
    filePath: undefined,
    transformationEnabled: true,
    createdAt: 1741287881019
  },
  parentMetadata: {
    id: 'e84b4fb1-4e39-45ed-8a3f-efe40c02bd65',
    source: 'new',
    parentId: undefined,
    filePath: undefined,
    transformationEnabled: true,
    createdAt: 1741287881019
  },
  sourceRelationships: [
    {
      targetId: '3eb8e475-2039-47fd-b1cf-b5d566e547a0',
      type: 'merge-target'
    }
  ],
  targetRelationships: [],
  parentRelationships: [
    {
      targetId: '3eb8e475-2039-47fd-b1cf-b5d566e547a0',
      type: 'parent-child'
    }
  ]
}
Complete Debug Report: Debug Session Report (674efaa3-08cb-49c5-9d14-262632f67783)
Duration: 0.004s
Diagnostics: Metrics:
Snapshots:
 ✓ tests/utils/debug/StateTrackingService/StateTrackingService.test.ts (14 tests) 14ms
stdout | services/pipeline/DirectiveService/handlers/execution/RunDirectiveHandler.test.ts > RunDirectiveHandler > error handling > should handle validation errors
stdout | services/pipeline/DirectiveService/handlers/execution/RunDirectiveHandler.test.ts > RunDirectiveHandler > error handling > should handle resolution errors
stdout | services/pipeline/DirectiveService/handlers/execution/RunDirectiveHandler.test.ts > RunDirectiveHandler > error handling > should handle command execution errors
stdout | tests/debug/import-debug.test.ts > Import Directive Debug > should transform import directive and resolve variables
 ✓ services/pipeline/DirectiveService/handlers/execution/RunDirectiveHandler.test.ts (10 tests) 15ms
 ✓ services/pipeline/DirectiveService/handlers/definition/DataDirectiveHandler.test.ts (14 tests) 76ms
stdout | tests/debug/import-debug.test.ts > Import Directive Debug > should transform import directive and resolve variables
[32minfo[39m: LLMXML instance created {"options":{"defaultFuzzyThreshold":0.7,"includeHlevel":false,"includeTitle":false,"tagFormat":"PascalCase","verbose":false,"warningLevel":"all"},"timestamp":"2025-03-06T19:04:41.095Z"}
 ✓ tests/debug/import-debug.test.ts (1 test) 91ms
 ✓ services/pipeline/DirectiveService/handlers/execution/EmbedDirectiveHandler.transformation.test.ts (9 tests) 67ms
stdout | services/resolution/ResolutionService/ResolutionService.test.ts > ResolutionService > extractSection > should extract section by heading
[32minfo[39m: LLMXML instance created {"options":{"defaultFuzzyThreshold":0.7,"includeHlevel":false,"includeTitle":false,"tagFormat":"PascalCase","verbose":false,"warningLevel":"none"},"timestamp":"2025-03-06T19:04:41.291Z"}
stdout | services/resolution/ResolutionService/ResolutionService.test.ts > ResolutionService > extractSection > should include content until next heading of same or higher level
[32minfo[39m: LLMXML instance created {"options":{"defaultFuzzyThreshold":0.7,"includeHlevel":false,"includeTitle":false,"tagFormat":"PascalCase","verbose":false,"warningLevel":"none"},"timestamp":"2025-03-06T19:04:41.307Z"}
 ✓ services/pipeline/DirectiveService/handlers/definition/TextDirectiveHandler.test.ts (9 tests) 36ms
stdout | services/resolution/ResolutionService/ResolutionService.test.ts > ResolutionService > extractSection > should throw when section is not found
[32minfo[39m: LLMXML instance created {"options":{"defaultFuzzyThreshold":0.7,"includeHlevel":false,"includeTitle":false,"tagFormat":"PascalCase","verbose":false,"warningLevel":"none"},"timestamp":"2025-03-06T19:04:41.309Z"}
 ✓ services/resolution/ResolutionService/ResolutionService.test.ts (19 tests) 112ms
stdout | cli/cli.test.ts > CLI Tests > Argument Parsing Tests > should handle invalid argument combinations
stdout | cli/cli.test.ts > CLI Tests > Argument Parsing Tests > should handle missing required arguments
stdout | cli/cli.test.ts > CLI Tests > File I/O Tests > should handle error for file not found
stdout | cli/cli.test.ts > CLI Tests > File I/O Tests > should handle permission issues for reading files
stdout | cli/cli.test.ts > CLI Tests > Error Handling Tests > should format error messages clearly
 ✓ cli/cli.test.ts (14 tests | 4 skipped) 133ms
stdout | services/pipeline/InterpreterService/InterpreterService.unit.test.ts > InterpreterService Unit > child context creation > handles errors in child context creation
 ✓ services/pipeline/InterpreterService/InterpreterService.unit.test.ts (22 tests) 33ms
 ✓ services/resolution/ResolutionService/resolvers/PathResolver.test.ts (20 tests) 11ms
 ✓ services/pipeline/DirectiveService/handlers/execution/ImportDirectiveHandler.transformation.test.ts (4 tests) 73ms
stdout | services/cli/CLIService/CLIService.test.ts > CLIService > Format Conversion > should output xml format by default
stdout | services/cli/CLIService/CLIService.test.ts > CLIService > Format Conversion > should handle format aliases correctly
stdout | services/cli/CLIService/CLIService.test.ts > CLIService > Format Conversion > should preserve markdown with markdown format
stdout | services/cli/CLIService/CLIService.test.ts > CLIService > Command Line Options > should respect --stdout option
stdout | services/cli/CLIService/CLIService.test.ts > CLIService > Command Line Options > should use default output path when not specified
stdout | services/cli/CLIService/CLIService.test.ts > CLIService > Command Line Options > should handle project path option
stdout | services/cli/CLIService/CLIService.test.ts > CLIService > Command Line Options > should handle home path option
stdout | services/cli/CLIService/CLIService.test.ts > CLIService > Command Line Options > should handle verbose option
stdout | services/cli/CLIService/CLIService.test.ts > CLIService > File Handling > should handle missing input files
stdout | services/cli/CLIService/CLIService.test.ts > CLIService > File Handling > should handle write errors
stdout | services/cli/CLIService/CLIService.test.ts > CLIService > File Handling > should handle read errors
stdout | services/cli/CLIService/CLIService.test.ts > CLIService > Error Handling > should handle parser errors
stdout | services/cli/CLIService/CLIService.test.ts > CLIService > Error Handling > should handle interpreter errors
stdout | services/cli/CLIService/CLIService.test.ts > CLIService > Error Handling > should handle output conversion errors
stdout | services/cli/CLIService/CLIService.test.ts > CLIService > File Overwrite Handling > should prompt for overwrite when file exists
stdout | services/cli/CLIService/CLIService.test.ts > CLIService > File Overwrite Handling > should handle explicit output paths appropriately
 ✓ services/cli/CLIService/CLIService.test.ts (18 tests) 163ms
 ✓ services/fs/PathService/PathService.test.ts (17 tests) 50ms
 ✓ tests/utils/debug/StateVisualizationService/TestVisualizationManager.test.ts (17 tests) 32ms
 ✓ tests/utils/debug/TestOutputFilterService/TestOutputFilterService.test.ts (17 tests) 7ms
 ✓ tests/embed-directive-fixes.test.ts (5 tests) 7ms
 ✓ services/fs/PathService/PathService.tmp.test.ts (14 tests) 25ms
 ✓ services/resolution/ResolutionService/resolvers/StringConcatenationHandler.test.ts (13 tests) 12ms
stdout | api/api.test.ts > SDK Integration Tests > Service Management > should create services in correct initialization order
[32minfo[39m: LLMXML instance created {"options":{"defaultFuzzyThreshold":0.7,"includeHlevel":false,"includeTitle":false,"tagFormat":"PascalCase","verbose":false,"warningLevel":"all"},"timestamp":"2025-03-06T19:04:41.911Z"}
stdout | api/api.test.ts > SDK Integration Tests > Service Management > should allow service injection through options
[32minfo[39m: LLMXML instance created {"options":{"defaultFuzzyThreshold":0.7,"includeHlevel":false,"includeTitle":false,"tagFormat":"PascalCase","verbose":false,"warningLevel":"all"},"timestamp":"2025-03-06T19:04:41.924Z"}
stdout | api/api.test.ts > SDK Integration Tests > Transformation Mode > should enable transformation through options
[32minfo[39m: LLMXML instance created {"options":{"defaultFuzzyThreshold":0.7,"includeHlevel":false,"includeTitle":false,"tagFormat":"PascalCase","verbose":false,"warningLevel":"all"},"timestamp":"2025-03-06T19:04:41.931Z"}
stdout | api/api.test.ts > SDK Integration Tests > Transformation Mode > should respect existing transformation state
[32minfo[39m: LLMXML instance created {"options":{"defaultFuzzyThreshold":0.7,"includeHlevel":false,"includeTitle":false,"tagFormat":"PascalCase","verbose":false,"warningLevel":"all"},"timestamp":"2025-03-06T19:04:41.938Z"}
stdout | api/api.test.ts > SDK Integration Tests > Transformation Mode > should handle execution directives correctly
[32minfo[39m: LLMXML instance created {"options":{"defaultFuzzyThreshold":0.7,"includeHlevel":false,"includeTitle":false,"tagFormat":"PascalCase","verbose":false,"warningLevel":"all"},"timestamp":"2025-03-06T19:04:41.944Z"}
 ✓ services/resolution/ResolutionService/resolvers/DataResolver.test.ts (12 tests) 9ms
stdout | api/api.test.ts > SDK Integration Tests > Transformation Mode > should handle complex meld content with mixed directives
[32minfo[39m: LLMXML instance created {"options":{"defaultFuzzyThreshold":0.7,"includeHlevel":false,"includeTitle":false,"tagFormat":"PascalCase","verbose":false,"warningLevel":"all"},"timestamp":"2025-03-06T19:04:41.970Z"}
stdout | api/api.test.ts > SDK Integration Tests > Debug Mode > should enable debug mode through options
[32minfo[39m: LLMXML instance created {"options":{"defaultFuzzyThreshold":0.7,"includeHlevel":false,"includeTitle":false,"tagFormat":"PascalCase","verbose":false,"warningLevel":"all"},"timestamp":"2025-03-06T19:04:41.977Z"}
stdout | api/api.test.ts > SDK Integration Tests > Format Conversion > should handle definition directives correctly
[32minfo[39m: LLMXML instance created {"options":{"defaultFuzzyThreshold":0.7,"includeHlevel":false,"includeTitle":false,"tagFormat":"PascalCase","verbose":false,"warningLevel":"all"},"timestamp":"2025-03-06T19:04:41.989Z"}
stdout | api/api.test.ts > SDK Integration Tests > Format Conversion > should handle execution directives correctly
[32minfo[39m: LLMXML instance created {"options":{"defaultFuzzyThreshold":0.7,"includeHlevel":false,"includeTitle":false,"tagFormat":"PascalCase","verbose":false,"warningLevel":"all"},"timestamp":"2025-03-06T19:04:41.998Z"}
stdout | api/api.test.ts > SDK Integration Tests > Format Conversion > should handle complex meld content with mixed directives
[32minfo[39m: LLMXML instance created {"options":{"defaultFuzzyThreshold":0.7,"includeHlevel":false,"includeTitle":false,"tagFormat":"PascalCase","verbose":false,"warningLevel":"all"},"timestamp":"2025-03-06T19:04:42.018Z"}
stdout | api/api.test.ts > SDK Integration Tests > Error Handling > should handle missing files correctly
stdout | api/api.test.ts > SDK Integration Tests > Full Pipeline Integration > should handle the complete parse -> interpret -> convert pipeline
[32minfo[39m: LLMXML instance created {"options":{"defaultFuzzyThreshold":0.7,"includeHlevel":false,"includeTitle":false,"tagFormat":"PascalCase","verbose":false,"warningLevel":"all"},"timestamp":"2025-03-06T19:04:42.037Z"}
stdout | api/api.test.ts > SDK Integration Tests > Full Pipeline Integration > should preserve state and content in transformation mode
[32minfo[39m: LLMXML instance created {"options":{"defaultFuzzyThreshold":0.7,"includeHlevel":false,"includeTitle":false,"tagFormat":"PascalCase","verbose":false,"warningLevel":"all"},"timestamp":"2025-03-06T19:04:42.044Z"}
stdout | api/api.test.ts > SDK Integration Tests > Examples > should run api-demo-simple.meld example file
[32minfo[39m: LLMXML instance created {"options":{"defaultFuzzyThreshold":0.7,"includeHlevel":false,"includeTitle":false,"tagFormat":"PascalCase","verbose":false,"warningLevel":"all"},"timestamp":"2025-03-06T19:04:42.052Z"}
 ✓ services/pipeline/DirectiveService/handlers/definition/TextDirectiveHandler.command.test.ts (5 tests) 9ms
 ✓ api/api.test.ts (18 tests | 2 skipped) 272ms
 ✓ tests/utils/debug/StateDebuggerService/StateDebuggerService.test.ts (15 tests) 12ms
 ✓ cli/commands/debug-context.test.ts (3 tests) 5ms
 ✓ services/resolution/ResolutionService/resolvers/StringLiteralHandler.test.ts (17 tests) 18ms
 ✓ services/state/utilities/StateVariableCopier.test.ts (8 tests) 10ms
 ✓ services/pipeline/ParserService/ParserService.test.ts (16 tests) 30ms
 ✓ tests/output-service-embed-transformation.test.ts (5 tests) 6ms
 ✓ services/resolution/ResolutionService/resolvers/CommandResolver.test.ts (12 tests) 41ms
 ✓ tests/pipeline/pipelineValidation.test.ts (8 tests) 16ms
 ✓ services/state/StateService/StateFactory.test.ts (10 tests) 18ms
stdout | services/resolution/ResolutionService/resolvers/VariableReferenceResolver.test.ts > VariableReferenceResolver > resolve > should handle environment variables
stdout | services/resolution/ResolutionService/resolvers/VariableReferenceResolver.test.ts > VariableReferenceResolver > resolve > should throw for undefined variables
 ✓ services/resolution/ResolutionService/resolvers/VariableReferenceResolver.test.ts (15 tests) 33ms
 ✓ services/pipeline/DirectiveService/handlers/definition/PathDirectiveHandler.test.ts (6 tests) 57ms
 ✓ services/pipeline/DirectiveService/handlers/definition/TextDirectiveHandler.integration.test.ts (8 tests | 3 skipped) 7ms
 ✓ services/resolution/ResolutionService/resolvers/TextResolver.test.ts (11 tests) 7ms
 ✓ tests/embed-directive-transformation-fixes.test.ts (4 tests) 8ms
 ✓ cli/commands/debug-transform.test.ts (3 tests) 5ms
 ✓ tests/utils/tests/ErrorTestUtils.test.ts (12 tests) 6ms
stdout | services/state/StateEventService/StateInstrumentation.test.ts > State Instrumentation > Error Handling > should handle errors in event handlers without affecting others
 ✓ services/state/StateEventService/StateInstrumentation.test.ts (7 tests) 24ms
stdout | tests/utils/tests/TestSnapshot.test.ts > TestSnapshot > directory-specific snapshots > returns empty snapshot for non-existent directory
stdout | tests/utils/tests/TestSnapshot.test.ts > TestSnapshot > snapshot comparison > detects added files
Added files: [ '/new.txt' ]
stdout | tests/utils/tests/TestSnapshot.test.ts > TestSnapshot > snapshot comparison > detects removed files
Removed files: [ '/remove.txt' ]
stdout | tests/utils/tests/TestSnapshot.test.ts > TestSnapshot > snapshot comparison > detects modified files
Modified files: [ '/modify.txt' ]
stdout | tests/utils/tests/TestSnapshot.test.ts > TestSnapshot > snapshot comparison > detects multiple changes
Multiple changes - added: [ '/new.txt' ]
Multiple changes - removed: [ '/remove.txt' ]
Multiple changes - modified: [ '/modify.txt' ]
stdout | tests/utils/tests/TestSnapshot.test.ts > TestSnapshot > error handling > handles comparison with empty snapshots
Empty snapshot diff1 added: [ '/file.txt' ]
Empty snapshot diff2 removed: [ '/file.txt' ]
 ✓ tests/utils/tests/TestSnapshot.test.ts (13 tests) 129ms
stdout | services/pipeline/DirectiveService/handlers/execution/RunDirectiveHandler.transformation.test.ts > RunDirectiveHandler Transformation > transformation behavior > should preserve error handling during transformation
stdout | tests/utils/tests/TestContext.test.ts > TestContext > xml conversion > converts content to xml
[32minfo[39m: LLMXML instance created {"options":{"defaultFuzzyThreshold":0.7,"includeHlevel":false,"includeTitle":false,"tagFormat":"PascalCase","verbose":false,"warningLevel":"all"},"timestamp":"2025-03-06T19:04:43.164Z"}
stdout | tests/utils/tests/TestContext.test.ts > TestContext > cleanup > cleans up resources properly
Cleanup completed
Re-initialized file system
File exists after cleanup: false
 ✓ tests/utils/tests/TestContext.test.ts (11 tests) 166ms
 ✓ services/pipeline/DirectiveService/handlers/execution/RunDirectiveHandler.transformation.test.ts (5 tests) 9ms
stdout | cli/commands/init.test.ts > initCommand > should create a meld.json file with custom project root
Meld project initialized successfully.
Project root set to: undefined
 ✓ cli/commands/init.test.ts (4 tests | 1 skipped) 4ms
 ✓ tests/utils/tests/memory-file-system.test.ts (18 tests) 19ms
 ✓ tests/utils/debug/StateHistoryService/StateHistoryService.test.ts (9 tests) 7ms
stdout | services/pipeline/DirectiveService/DirectiveService.test.ts > DirectiveService > Directive processing > Import directives > should detect circular imports
 ✓ services/pipeline/DirectiveService/DirectiveService.test.ts (9 tests) 105ms
stdout | services/fs/FileSystemService/FileSystemService.test.ts > FileSystemService > File operations > throws MeldError when reading non-existent file
stdout | services/fs/FileSystemService/FileSystemService.test.ts > FileSystemService > Directory operations > throws MeldError when reading non-existent directory
 ✓ services/fs/FileSystemService/FileSystemService.test.ts (17 tests) 143ms
 ✓ tests/variable-index-debug.test.ts (3 tests) 5ms
 ✓ services/sourcemap/SourceMapService.test.ts (10 tests) 5ms
 ✓ tests/utils/debug/VariableResolutionTracker/VariableResolutionTracker.test.ts (14 tests) 6ms
 ✓ tests/utils/tests/ProjectBuilder.test.ts (10 tests) 27ms
stdout | services/state/StateService/migration.test.ts > State Migration > error handling > should handle migration errors gracefully
 ✓ services/state/StateService/migration.test.ts (8 tests) 9ms
 ✓ services/fs/ProjectPathResolver.test.ts (5 tests) 5ms
stdout | tests/utils/tests/MemfsTestFileSystem.test.ts > MemfsTestFileSystem > error handling > throws when reading non-existent file
stdout | tests/utils/tests/MemfsTestFileSystem.test.ts > MemfsTestFileSystem > error handling > throws when getting stats of non-existent path
 ✓ tests/utils/tests/MemfsTestFileSystem.test.ts (14 tests) 40ms
 ✓ tests/utils/tests/FixtureManager.test.ts (9 tests) 11ms
 ✓ tests/utils/fs/MockCommandExecutor.test.ts (7 tests) 6ms
 ✓ services/resolution/ValidationService/validators/FuzzyMatchingValidator.test.ts (6 tests | 3 skipped) 3ms
 ✓ services/resolution/ResolutionService/resolvers/ContentResolver.test.ts (5 tests) 19ms
 ✓ services/state/StateService/StateService.transformation.test.ts (8 tests) 5ms
stdout | services/state/StateEventService/StateEventService.test.ts > StateEventService > should continue processing handlers after error
 ✓ services/state/StateEventService/StateEventService.test.ts (8 tests) 48ms
stdout | tests/cli/cli-error-handling.test.ts > CLI Error Handling > Using standalone utilities > should handle permissive mode for missing variables
stdout | tests/cli/cli-error-handling.test.ts > CLI Error Handling > Using standalone utilities > should throw errors in strict mode
stdout | tests/cli/cli-error-handling.test.ts > CLI Error Handling > Using TestContext > should handle multiple errors in permissive mode
stdout | tests/cli/cli-error-handling.test.ts > CLI Error Handling > Using TestContext > should handle multiple errors in permissive mode
 ✓ tests/cli/cli-error-handling.test.ts (3 tests) 88ms
stdout | tests/specific-variable-resolution.test.ts > Variable Resolution Specific Tests > should handle nested object data structures with variable references
[32minfo[39m: LLMXML instance created {"options":{"defaultFuzzyThreshold":0.7,"includeHlevel":false,"includeTitle":false,"tagFormat":"PascalCase","verbose":false,"warningLevel":"all"},"timestamp":"2025-03-06T19:04:44.285Z"}
stdout | tests/specific-variable-resolution.test.ts > Variable Resolution Specific Tests > should handle array access in variable references
[32minfo[39m: LLMXML instance created {"options":{"defaultFuzzyThreshold":0.7,"includeHlevel":false,"includeTitle":false,"tagFormat":"PascalCase","verbose":false,"warningLevel":"all"},"timestamp":"2025-03-06T19:04:44.308Z"}
stdout | tests/specific-variable-resolution.test.ts > Variable Resolution Specific Tests > should format output with variable references
[32minfo[39m: LLMXML instance created {"options":{"defaultFuzzyThreshold":0.7,"includeHlevel":false,"includeTitle":false,"tagFormat":"PascalCase","verbose":false,"warningLevel":"all"},"timestamp":"2025-03-06T19:04:44.335Z"}
 ✓ tests/specific-variable-resolution.test.ts (3 tests) 234ms
stdout | api/run-meld.test.ts > runMeld API > should output content in XML format when specified
[32minfo[39m: LLMXML instance created {"options":{"defaultFuzzyThreshold":0.7,"includeHlevel":false,"includeTitle":false,"tagFormat":"PascalCase","verbose":false,"warningLevel":"all"},"timestamp":"2025-03-06T19:04:44.337Z"}
XML format result: Hello, World!
stdout | api/resolution-debug.test.ts > Variable Resolution Debug Tests > should handle simple text variables
[32minfo[39m: LLMXML instance created {"options":{"defaultFuzzyThreshold":0.7,"includeHlevel":false,"includeTitle":false,"tagFormat":"PascalCase","verbose":false,"warningLevel":"all"},"timestamp":"2025-03-06T19:04:44.340Z"}
stdout | services/resolution/CircularityService/CircularityService.test.ts > CircularityService > Circular import detection > should detect direct circular imports
stdout | services/resolution/CircularityService/CircularityService.test.ts > CircularityService > Circular import detection > should detect indirect circular imports
stdout | services/resolution/CircularityService/CircularityService.test.ts > CircularityService > Circular import detection > should include import chain in error
 ✓ services/resolution/CircularityService/CircularityService.test.ts (10 tests) 6ms
stdout | api/resolution-debug.test.ts > Variable Resolution Debug Tests > should handle basic array access with dot notation
[32minfo[39m: LLMXML instance created {"options":{"defaultFuzzyThreshold":0.7,"includeHlevel":false,"includeTitle":false,"tagFormat":"PascalCase","verbose":false,"warningLevel":"all"},"timestamp":"2025-03-06T19:04:44.381Z"}
stdout | api/resolution-debug.test.ts > Variable Resolution Debug Tests > should handle object array access with dot notation
[32minfo[39m: LLMXML instance created {"options":{"defaultFuzzyThreshold":0.7,"includeHlevel":false,"includeTitle":false,"tagFormat":"PascalCase","verbose":false,"warningLevel":"all"},"timestamp":"2025-03-06T19:04:44.397Z"}
stdout | api/resolution-debug.test.ts > Variable Resolution Debug Tests > should handle complex nested arrays
[32minfo[39m: LLMXML instance created {"options":{"defaultFuzzyThreshold":0.7,"includeHlevel":false,"includeTitle":false,"tagFormat":"PascalCase","verbose":false,"warningLevel":"all"},"timestamp":"2025-03-06T19:04:44.415Z"}
 ✓ api/resolution-debug.test.ts (4 tests) 199ms
stdout | tests/embed-line-number-fix.test.ts > Embed Directive Line Number Mismatch Fix > should replace embed directive with content even if line numbers shift
[32minfo[39m: LLMXML instance created {"options":{"defaultFuzzyThreshold":0.7,"includeHlevel":false,"includeTitle":false,"tagFormat":"PascalCase","verbose":false,"warningLevel":"none"},"timestamp":"2025-03-06T19:04:44.416Z"}
 ✓ tests/comment-handling-fix.test.ts (3 tests) 52ms
 ✓ api/run-meld.test.ts (8 tests) 250ms
 ✓ tests/embed-line-number-fix.test.ts (2 tests) 232ms
 ↓ tests/utils/examples/RunDirectiveCommandMock.test.ts (3 tests | 3 skipped)
stdout | tests/sourcemap/sourcemap-integration.test.ts > Source Mapping Integration > Errors in imported files are reported with correct source location
Error type: MeldParseError
Error properties: [
  'name',
  'code',
  'errorCause',
  'filePath',
  'severity',
  'context',
  'location'
]
Error message: Parse error: Parse error: Expected "$", "[", "{{", or whitespace but "p" found. at line 4, column 9
Got expected error when processing invalid file: Parse error: Parse error: Expected "$", "[", "{{", or whitespace but "p" found. at line 4, column 9
 ✓ tests/sourcemap/sourcemap-integration.test.ts (2 tests) 28ms
 ✓ tests/embed-transformation-variable-fix.test.ts (1 test) 54ms
stdout | tests/embed-transformation-e2e.test.ts > Embed Directive Transformation E2E > should replace embed directive with section content in transformation mode
[32minfo[39m: LLMXML instance created {"options":{"defaultFuzzyThreshold":0.7,"includeHlevel":false,"includeTitle":false,"tagFormat":"PascalCase","verbose":false,"warningLevel":"none"},"timestamp":"2025-03-06T19:04:44.900Z"}
 ✓ tests/embed-transformation-e2e.test.ts (3 tests) 132ms
 ✓ services/fs/FileSystemService/PathOperationsService.test.ts (8 tests) 4ms
 ✓ _dev/scripts/debug/debug-parser.test.ts (1 test) 26ms
stdout | tests/transformation-debug.test.ts > Transformation Debug Tests > should transform simple text variables without newlines
[32minfo[39m: LLMXML instance created {"options":{"defaultFuzzyThreshold":0.7,"includeHlevel":false,"includeTitle":false,"tagFormat":"PascalCase","verbose":false,"warningLevel":"all"},"timestamp":"2025-03-06T19:04:44.997Z"}
stdout | tests/transformation-debug.test.ts > Transformation Debug Tests > should transform array access with dot notation
[32minfo[39m: LLMXML instance created {"options":{"defaultFuzzyThreshold":0.7,"includeHlevel":false,"includeTitle":false,"tagFormat":"PascalCase","verbose":false,"warningLevel":"all"},"timestamp":"2025-03-06T19:04:45.034Z"}
 ✓ tests/transformation-debug.test.ts (2 tests) 132ms
stdout | api/nested-array.test.ts > Nested Array Access Tests > should handle nested array access with dot notation
[32minfo[39m: LLMXML instance created {"options":{"defaultFuzzyThreshold":0.7,"includeHlevel":false,"includeTitle":false,"tagFormat":"PascalCase","verbose":false,"warningLevel":"all"},"timestamp":"2025-03-06T19:04:45.047Z"}
 ✓ api/nested-array.test.ts (1 test) 114ms
stdout | tests/specific-nested-array.test.ts > Nested Arrays Specific Test > should handle nested array access correctly
[32minfo[39m: LLMXML instance created {"options":{"defaultFuzzyThreshold":0.7,"includeHlevel":false,"includeTitle":false,"tagFormat":"PascalCase","verbose":false,"warningLevel":"all"},"timestamp":"2025-03-06T19:04:45.079Z"}
 ✓ tests/specific-nested-array.test.ts (1 test) 111ms
stdout | api/array-access.test.ts > Array Access Tests > should handle direct array access with dot notation
[32minfo[39m: LLMXML instance created {"options":{"defaultFuzzyThreshold":0.7,"includeHlevel":false,"includeTitle":false,"tagFormat":"PascalCase","verbose":false,"warningLevel":"all"},"timestamp":"2025-03-06T19:04:45.145Z"}
 ✓ api/array-access.test.ts (1 test) 102ms
 Test Files  84 passed | 1 skipped (85)
      Tests  880 passed | 13 skipped | 8 todo (901)
   Start at  11:04:39
   Duration  5.58s (transform 1.57s, setup 21.35s, collect 3.27s, tests 5.16s, environment 10ms, prepare 5.29s)
(node:15655) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 warning listeners added to [EventEmitter]. MaxListeners is 10. Use emitter.setMaxListeners() to increase limit
(Use `node --trace-warnings ...` to show where the warning was created)
stderr | services/resolution/ResolutionService/resolvers/StringConcatenationHandler.test.ts > StringConcatenationHandler > hasConcatenation > should fall back to regex detection when AST parsing fails
Failed to check concatenation with AST, falling back to regex: Error: Parse error
    at /Users/adam/dev/meld/services/resolution/ResolutionService/resolvers/StringConcatenationHandler.test.ts:54:60
    at file:///Users/adam/dev/meld/node_modules/@vitest/runner/dist/index.js:146:14
    at file:///Users/adam/dev/meld/node_modules/@vitest/runner/dist/index.js:533:11
    at runWithTimeout (file:///Users/adam/dev/meld/node_modules/@vitest/runner/dist/index.js:39:7)
    at runTest (file:///Users/adam/dev/meld/node_modules/@vitest/runner/dist/index.js:1056:17)
    at processTicksAndRejections (node:internal/process/task_queues:105:5)
    at runSuite (file:///Users/adam/dev/meld/node_modules/@vitest/runner/dist/index.js:1205:15)
    at runSuite (file:///Users/adam/dev/meld/node_modules/@vitest/runner/dist/index.js:1205:15)
    at runSuite (file:///Users/adam/dev/meld/node_modules/@vitest/runner/dist/index.js:1205:15)
    at runFiles (file:///Users/adam/dev/meld/node_modules/@vitest/runner/dist/index.js:1262:5)
Failed to check concatenation with AST, falling back to regex: Error: Parse error
    at /Users/adam/dev/meld/services/resolution/ResolutionService/resolvers/StringConcatenationHandler.test.ts:54:60
    at file:///Users/adam/dev/meld/node_modules/@vitest/runner/dist/index.js:146:14
    at file:///Users/adam/dev/meld/node_modules/@vitest/runner/dist/index.js:533:11
    at runWithTimeout (file:///Users/adam/dev/meld/node_modules/@vitest/runner/dist/index.js:39:7)
    at runTest (file:///Users/adam/dev/meld/node_modules/@vitest/runner/dist/index.js:1056:17)
    at processTicksAndRejections (node:internal/process/task_queues:105:5)
    at runSuite (file:///Users/adam/dev/meld/node_modules/@vitest/runner/dist/index.js:1205:15)
    at runSuite (file:///Users/adam/dev/meld/node_modules/@vitest/runner/dist/index.js:1205:15)
    at runSuite (file:///Users/adam/dev/meld/node_modules/@vitest/runner/dist/index.js:1205:15)
    at runFiles (file:///Users/adam/dev/meld/node_modules/@vitest/runner/dist/index.js:1262:5)
stderr | services/resolution/ResolutionService/resolvers/StringConcatenationHandler.test.ts > StringConcatenationHandler > resolveConcatenation > should fall back to regex-based splitting when AST parsing fails
Failed to parse concatenation with AST, falling back to manual parsing: Error: Parse error
    at /Users/adam/dev/meld/services/resolution/ResolutionService/resolvers/StringConcatenationHandler.test.ts:103:60
    at file:///Users/adam/dev/meld/node_modules/@vitest/runner/dist/index.js:146:14
    at file:///Users/adam/dev/meld/node_modules/@vitest/runner/dist/index.js:533:11
    at runWithTimeout (file:///Users/adam/dev/meld/node_modules/@vitest/runner/dist/index.js:39:7)
    at runTest (file:///Users/adam/dev/meld/node_modules/@vitest/runner/dist/index.js:1056:17)
    at processTicksAndRejections (node:internal/process/task_queues:105:5)
    at runSuite (file:///Users/adam/dev/meld/node_modules/@vitest/runner/dist/index.js:1205:15)
    at runSuite (file:///Users/adam/dev/meld/node_modules/@vitest/runner/dist/index.js:1205:15)
    at runSuite (file:///Users/adam/dev/meld/node_modules/@vitest/runner/dist/index.js:1205:15)
    at runFiles (file:///Users/adam/dev/meld/node_modules/@vitest/runner/dist/index.js:1262:5)
stderr | services/resolution/ResolutionService/resolvers/StringConcatenationHandler.test.ts > StringConcatenationHandler > resolveConcatenation > should reject empty parts
Failed to parse concatenation with AST, falling back to manual parsing: Error: Parse error
    at /Users/adam/dev/meld/services/resolution/ResolutionService/resolvers/StringConcatenationHandler.test.ts:212:60
    at file:///Users/adam/dev/meld/node_modules/@vitest/runner/dist/index.js:146:14
    at file:///Users/adam/dev/meld/node_modules/@vitest/runner/dist/index.js:533:11
    at runWithTimeout (file:///Users/adam/dev/meld/node_modules/@vitest/runner/dist/index.js:39:7)
    at runTest (file:///Users/adam/dev/meld/node_modules/@vitest/runner/dist/index.js:1056:17)
    at processTicksAndRejections (node:internal/process/task_queues:105:5)
    at runSuite (file:///Users/adam/dev/meld/node_modules/@vitest/runner/dist/index.js:1205:15)
    at runSuite (file:///Users/adam/dev/meld/node_modules/@vitest/runner/dist/index.js:1205:15)
    at runSuite (file:///Users/adam/dev/meld/node_modules/@vitest/runner/dist/index.js:1205:15)
    at runFiles (file:///Users/adam/dev/meld/node_modules/@vitest/runner/dist/index.js:1262:5)
(node:15705) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 warning listeners added to [EventEmitter]. MaxListeners is 10. Use emitter.setMaxListeners() to increase limit
(Use `node --trace-warnings ...` to show where the warning was created)
stderr | services/resolution/ResolutionService/resolvers/StringLiteralHandler.test.ts > StringLiteralHandler > isStringLiteral > should fall back to regex when AST parsing fails
Failed to check string literal with AST, falling back to manual check: Error: Parse error
    at /Users/adam/dev/meld/services/resolution/ResolutionService/resolvers/StringLiteralHandler.test.ts:35:56
    at file:///Users/adam/dev/meld/node_modules/@vitest/runner/dist/index.js:146:14
    at file:///Users/adam/dev/meld/node_modules/@vitest/runner/dist/index.js:533:11
    at runWithTimeout (file:///Users/adam/dev/meld/node_modules/@vitest/runner/dist/index.js:39:7)
    at runTest (file:///Users/adam/dev/meld/node_modules/@vitest/runner/dist/index.js:1056:17)
    at processTicksAndRejections (node:internal/process/task_queues:105:5)
    at runSuite (file:///Users/adam/dev/meld/node_modules/@vitest/runner/dist/index.js:1205:15)
    at runSuite (file:///Users/adam/dev/meld/node_modules/@vitest/runner/dist/index.js:1205:15)
    at runSuite (file:///Users/adam/dev/meld/node_modules/@vitest/runner/dist/index.js:1205:15)
    at runFiles (file:///Users/adam/dev/meld/node_modules/@vitest/runner/dist/index.js:1262:5)
stderr | services/resolution/ResolutionService/resolvers/StringLiteralHandler.test.ts > StringLiteralHandler > isStringLiteral > should reject unmatched quotes
Failed to check string literal with AST, falling back to manual check: Error: Parse error
    at /Users/adam/dev/meld/services/resolution/ResolutionService/resolvers/StringLiteralHandler.test.ts:94:56
    at file:///Users/adam/dev/meld/node_modules/@vitest/runner/dist/index.js:146:14
    at file:///Users/adam/dev/meld/node_modules/@vitest/runner/dist/index.js:533:11
    at runWithTimeout (file:///Users/adam/dev/meld/node_modules/@vitest/runner/dist/index.js:39:7)
    at runTest (file:///Users/adam/dev/meld/node_modules/@vitest/runner/dist/index.js:1056:17)
    at processTicksAndRejections (node:internal/process/task_queues:105:5)
    at runSuite (file:///Users/adam/dev/meld/node_modules/@vitest/runner/dist/index.js:1205:15)
    at runSuite (file:///Users/adam/dev/meld/node_modules/@vitest/runner/dist/index.js:1205:15)
    at runSuite (file:///Users/adam/dev/meld/node_modules/@vitest/runner/dist/index.js:1205:15)
    at runFiles (file:///Users/adam/dev/meld/node_modules/@vitest/runner/dist/index.js:1262:5)
stderr | services/resolution/ResolutionService/resolvers/StringLiteralHandler.test.ts > StringLiteralHandler > validateLiteral > should fall back to manual validation when AST parsing fails
Failed to validate string literal with AST, falling back to manual validation: Error: Parse error
    at /Users/adam/dev/meld/services/resolution/ResolutionService/resolvers/StringLiteralHandler.test.ts:121:56
    at file:///Users/adam/dev/meld/node_modules/@vitest/runner/dist/index.js:146:14
    at file:///Users/adam/dev/meld/node_modules/@vitest/runner/dist/index.js:533:11
    at runWithTimeout (file:///Users/adam/dev/meld/node_modules/@vitest/runner/dist/index.js:39:7)
    at runTest (file:///Users/adam/dev/meld/node_modules/@vitest/runner/dist/index.js:1056:17)
    at processTicksAndRejections (node:internal/process/task_queues:105:5)
    at runSuite (file:///Users/adam/dev/meld/node_modules/@vitest/runner/dist/index.js:1205:15)
    at runSuite (file:///Users/adam/dev/meld/node_modules/@vitest/runner/dist/index.js:1205:15)
    at runSuite (file:///Users/adam/dev/meld/node_modules/@vitest/runner/dist/index.js:1205:15)
    at runFiles (file:///Users/adam/dev/meld/node_modules/@vitest/runner/dist/index.js:1262:5)
stderr | services/resolution/ResolutionService/resolvers/StringLiteralHandler.test.ts > StringLiteralHandler > validateLiteral > should reject empty strings with AST
Failed to validate string literal with AST, falling back to manual validation: Error: Parse error
    at /Users/adam/dev/meld/services/resolution/ResolutionService/resolvers/StringLiteralHandler.test.ts:131:56
    at file:///Users/adam/dev/meld/node_modules/@vitest/runner/dist/index.js:146:14
    at file:///Users/adam/dev/meld/node_modules/@vitest/runner/dist/index.js:533:11
    at runWithTimeout (file:///Users/adam/dev/meld/node_modules/@vitest/runner/dist/index.js:39:7)
    at runTest (file:///Users/adam/dev/meld/node_modules/@vitest/runner/dist/index.js:1056:17)
    at processTicksAndRejections (node:internal/process/task_queues:105:5)
    at runSuite (file:///Users/adam/dev/meld/node_modules/@vitest/runner/dist/index.js:1205:15)
    at runSuite (file:///Users/adam/dev/meld/node_modules/@vitest/runner/dist/index.js:1205:15)
    at runSuite (file:///Users/adam/dev/meld/node_modules/@vitest/runner/dist/index.js:1205:15)
    at runFiles (file:///Users/adam/dev/meld/node_modules/@vitest/runner/dist/index.js:1262:5)
stderr | services/resolution/ResolutionService/resolvers/StringLiteralHandler.test.ts > StringLiteralHandler > validateLiteral > should reject strings without quotes with AST
Failed to validate string literal with AST, falling back to manual validation: Error: Parse error
    at /Users/adam/dev/meld/services/resolution/ResolutionService/resolvers/StringLiteralHandler.test.ts:141:56
    at file:///Users/adam/dev/meld/node_modules/@vitest/runner/dist/index.js:146:14
    at file:///Users/adam/dev/meld/node_modules/@vitest/runner/dist/index.js:533:11
    at runWithTimeout (file:///Users/adam/dev/meld/node_modules/@vitest/runner/dist/index.js:39:7)
    at runTest (file:///Users/adam/dev/meld/node_modules/@vitest/runner/dist/index.js:1056:17)
    at processTicksAndRejections (node:internal/process/task_queues:105:5)
    at runSuite (file:///Users/adam/dev/meld/node_modules/@vitest/runner/dist/index.js:1205:15)
    at runSuite (file:///Users/adam/dev/meld/node_modules/@vitest/runner/dist/index.js:1205:15)
    at runSuite (file:///Users/adam/dev/meld/node_modules/@vitest/runner/dist/index.js:1205:15)
    at runFiles (file:///Users/adam/dev/meld/node_modules/@vitest/runner/dist/index.js:1262:5)
stderr | services/resolution/ResolutionService/resolvers/StringLiteralHandler.test.ts > StringLiteralHandler > parseLiteral > should parse string literals using AST when available
Failed to validate string literal with AST, falling back to manual validation: ResolutionError: Resolution error ([object Object]): String literal must start with a quote (', ", or `)
    at StringLiteralHandler.validateLiteral (/Users/adam/dev/meld/services/resolution/ResolutionService/resolvers/StringLiteralHandler.ts:162:13)
    at StringLiteralHandler.validateLiteralWithAst (/Users/adam/dev/meld/services/resolution/ResolutionService/resolvers/StringLiteralHandler.ts:131:21)
    at processTicksAndRejections (node:internal/process/task_queues:105:5)
    at StringLiteralHandler.parseLiteralWithAst (/Users/adam/dev/meld/services/resolution/ResolutionService/resolvers/StringLiteralHandler.ts:217:7)
    at /Users/adam/dev/meld/services/resolution/ResolutionService/resolvers/StringLiteralHandler.test.ts:161:22
    at file:///Users/adam/dev/meld/node_modules/@vitest/runner/dist/index.js:533:5
    at runTest (file:///Users/adam/dev/meld/node_modules/@vitest/runner/dist/index.js:1056:11)
    at runSuite (file:///Users/adam/dev/meld/node_modules/@vitest/runner/dist/index.js:1205:15)
    at runSuite (file:///Users/adam/dev/meld/node_modules/@vitest/runner/dist/index.js:1205:15)
    at runSuite (file:///Users/adam/dev/meld/node_modules/@vitest/runner/dist/index.js:1205:15) {
  code: { value: 'hello world' },
  details: undefined
}
Failed to parse string literal with AST, falling back to manual parsing: ResolutionError: Resolution error ([object Object]): String literal must start with a quote (', ", or `)
    at StringLiteralHandler.validateLiteral (/Users/adam/dev/meld/services/resolution/ResolutionService/resolvers/StringLiteralHandler.ts:162:13)
    at StringLiteralHandler.parseLiteral (/Users/adam/dev/meld/services/resolution/ResolutionService/resolvers/StringLiteralHandler.ts:261:10)
    at StringLiteralHandler.parseLiteralWithAst (/Users/adam/dev/meld/services/resolution/ResolutionService/resolvers/StringLiteralHandler.ts:242:23)
    at processTicksAndRejections (node:internal/process/task_queues:105:5)
    at /Users/adam/dev/meld/services/resolution/ResolutionService/resolvers/StringLiteralHandler.test.ts:161:22
    at file:///Users/adam/dev/meld/node_modules/@vitest/runner/dist/index.js:533:5
    at runTest (file:///Users/adam/dev/meld/node_modules/@vitest/runner/dist/index.js:1056:11)
    at runSuite (file:///Users/adam/dev/meld/node_modules/@vitest/runner/dist/index.js:1205:15)
    at runSuite (file:///Users/adam/dev/meld/node_modules/@vitest/runner/dist/index.js:1205:15)
    at runSuite (file:///Users/adam/dev/meld/node_modules/@vitest/runner/dist/index.js:1205:15) {
  code: { value: 'hello world' },
  details: undefined
}
stderr | services/resolution/ResolutionService/resolvers/StringLiteralHandler.test.ts > StringLiteralHandler > parseLiteral > should fall back to manual parsing when AST parsing fails
Failed to validate string literal with AST, falling back to manual validation: Error: Parse error
    at /Users/adam/dev/meld/services/resolution/ResolutionService/resolvers/StringLiteralHandler.test.ts:168:56
    at file:///Users/adam/dev/meld/node_modules/@vitest/runner/dist/index.js:146:14
    at file:///Users/adam/dev/meld/node_modules/@vitest/runner/dist/index.js:533:11
    at runWithTimeout (file:///Users/adam/dev/meld/node_modules/@vitest/runner/dist/index.js:39:7)
    at runTest (file:///Users/adam/dev/meld/node_modules/@vitest/runner/dist/index.js:1056:17)
    at processTicksAndRejections (node:internal/process/task_queues:105:5)
    at runSuite (file:///Users/adam/dev/meld/node_modules/@vitest/runner/dist/index.js:1205:15)
    at runSuite (file:///Users/adam/dev/meld/node_modules/@vitest/runner/dist/index.js:1205:15)
    at runSuite (file:///Users/adam/dev/meld/node_modules/@vitest/runner/dist/index.js:1205:15)
    at runFiles (file:///Users/adam/dev/meld/node_modules/@vitest/runner/dist/index.js:1262:5)
Failed to parse string literal with AST, falling back to manual parsing: Error: Parse error
    at /Users/adam/dev/meld/services/resolution/ResolutionService/resolvers/StringLiteralHandler.test.ts:168:56
    at file:///Users/adam/dev/meld/node_modules/@vitest/runner/dist/index.js:146:14
    at file:///Users/adam/dev/meld/node_modules/@vitest/runner/dist/index.js:533:11
    at runWithTimeout (file:///Users/adam/dev/meld/node_modules/@vitest/runner/dist/index.js:39:7)
    at runTest (file:///Users/adam/dev/meld/node_modules/@vitest/runner/dist/index.js:1056:17)
    at processTicksAndRejections (node:internal/process/task_queues:105:5)
    at runSuite (file:///Users/adam/dev/meld/node_modules/@vitest/runner/dist/index.js:1205:15)
    at runSuite (file:///Users/adam/dev/meld/node_modules/@vitest/runner/dist/index.js:1205:15)
    at runSuite (file:///Users/adam/dev/meld/node_modules/@vitest/runner/dist/index.js:1205:15)
    at runFiles (file:///Users/adam/dev/meld/node_modules/@vitest/runner/dist/index.js:1262:5)
stderr | services/resolution/ResolutionService/resolvers/StringLiteralHandler.test.ts > StringLiteralHandler > parseLiteral > should remove matching single quotes with AST
Failed to validate string literal with AST, falling back to manual validation: ResolutionError: Resolution error ([object Object]): String literal must start with a quote (', ", or `)
    at StringLiteralHandler.validateLiteral (/Users/adam/dev/meld/services/resolution/ResolutionService/resolvers/StringLiteralHandler.ts:162:13)
    at StringLiteralHandler.validateLiteralWithAst (/Users/adam/dev/meld/services/resolution/ResolutionService/resolvers/StringLiteralHandler.ts:131:21)
    at processTicksAndRejections (node:internal/process/task_queues:105:5)
    at StringLiteralHandler.parseLiteralWithAst (/Users/adam/dev/meld/services/resolution/ResolutionService/resolvers/StringLiteralHandler.ts:217:7)
    at /Users/adam/dev/meld/services/resolution/ResolutionService/resolvers/StringLiteralHandler.test.ts:187:22
    at file:///Users/adam/dev/meld/node_modules/@vitest/runner/dist/index.js:533:5
    at runTest (file:///Users/adam/dev/meld/node_modules/@vitest/runner/dist/index.js:1056:11)
    at runSuite (file:///Users/adam/dev/meld/node_modules/@vitest/runner/dist/index.js:1205:15)
    at runSuite (file:///Users/adam/dev/meld/node_modules/@vitest/runner/dist/index.js:1205:15)
    at runSuite (file:///Users/adam/dev/meld/node_modules/@vitest/runner/dist/index.js:1205:15) {
  code: { value: 'hello world' },
  details: undefined
}
Failed to parse string literal with AST, falling back to manual parsing: ResolutionError: Resolution error ([object Object]): String literal must start with a quote (', ", or `)
    at StringLiteralHandler.validateLiteral (/Users/adam/dev/meld/services/resolution/ResolutionService/resolvers/StringLiteralHandler.ts:162:13)
    at StringLiteralHandler.parseLiteral (/Users/adam/dev/meld/services/resolution/ResolutionService/resolvers/StringLiteralHandler.ts:261:10)
    at StringLiteralHandler.parseLiteralWithAst (/Users/adam/dev/meld/services/resolution/ResolutionService/resolvers/StringLiteralHandler.ts:242:23)
    at processTicksAndRejections (node:internal/process/task_queues:105:5)
    at /Users/adam/dev/meld/services/resolution/ResolutionService/resolvers/StringLiteralHandler.test.ts:187:22
    at file:///Users/adam/dev/meld/node_modules/@vitest/runner/dist/index.js:533:5
    at runTest (file:///Users/adam/dev/meld/node_modules/@vitest/runner/dist/index.js:1056:11)
    at runSuite (file:///Users/adam/dev/meld/node_modules/@vitest/runner/dist/index.js:1205:15)
    at runSuite (file:///Users/adam/dev/meld/node_modules/@vitest/runner/dist/index.js:1205:15)
    at runSuite (file:///Users/adam/dev/meld/node_modules/@vitest/runner/dist/index.js:1205:15) {
  code: { value: 'hello world' },
  details: undefined
}
stderr | services/resolution/ResolutionService/resolvers/StringLiteralHandler.test.ts > StringLiteralHandler > parseLiteral > should remove matching double quotes with AST
Failed to validate string literal with AST, falling back to manual validation: ResolutionError: Resolution error ([object Object]): String literal must start with a quote (', ", or `)
    at StringLiteralHandler.validateLiteral (/Users/adam/dev/meld/services/resolution/ResolutionService/resolvers/StringLiteralHandler.ts:162:13)
    at StringLiteralHandler.validateLiteralWithAst (/Users/adam/dev/meld/services/resolution/ResolutionService/resolvers/StringLiteralHandler.ts:131:21)
    at processTicksAndRejections (node:internal/process/task_queues:105:5)
    at StringLiteralHandler.parseLiteralWithAst (/Users/adam/dev/meld/services/resolution/ResolutionService/resolvers/StringLiteralHandler.ts:217:7)
    at /Users/adam/dev/meld/services/resolution/ResolutionService/resolvers/StringLiteralHandler.test.ts:204:22
    at file:///Users/adam/dev/meld/node_modules/@vitest/runner/dist/index.js:533:5
    at runTest (file:///Users/adam/dev/meld/node_modules/@vitest/runner/dist/index.js:1056:11)
    at runSuite (file:///Users/adam/dev/meld/node_modules/@vitest/runner/dist/index.js:1205:15)
    at runSuite (file:///Users/adam/dev/meld/node_modules/@vitest/runner/dist/index.js:1205:15)
    at runSuite (file:///Users/adam/dev/meld/node_modules/@vitest/runner/dist/index.js:1205:15) {
  code: { value: 'hello world' },
  details: undefined
}
Failed to parse string literal with AST, falling back to manual parsing: ResolutionError: Resolution error ([object Object]): String literal must start with a quote (', ", or `)
    at StringLiteralHandler.validateLiteral (/Users/adam/dev/meld/services/resolution/ResolutionService/resolvers/StringLiteralHandler.ts:162:13)
    at StringLiteralHandler.parseLiteral (/Users/adam/dev/meld/services/resolution/ResolutionService/resolvers/StringLiteralHandler.ts:261:10)
    at StringLiteralHandler.parseLiteralWithAst (/Users/adam/dev/meld/services/resolution/ResolutionService/resolvers/StringLiteralHandler.ts:242:23)
    at processTicksAndRejections (node:internal/process/task_queues:105:5)
    at /Users/adam/dev/meld/services/resolution/ResolutionService/resolvers/StringLiteralHandler.test.ts:204:22
    at file:///Users/adam/dev/meld/node_modules/@vitest/runner/dist/index.js:533:5
    at runTest (file:///Users/adam/dev/meld/node_modules/@vitest/runner/dist/index.js:1056:11)
    at runSuite (file:///Users/adam/dev/meld/node_modules/@vitest/runner/dist/index.js:1205:15)
    at runSuite (file:///Users/adam/dev/meld/node_modules/@vitest/runner/dist/index.js:1205:15)
    at runSuite (file:///Users/adam/dev/meld/node_modules/@vitest/runner/dist/index.js:1205:15) {
  code: { value: 'hello world' },
  details: undefined
}
stderr | services/resolution/ResolutionService/resolvers/StringLiteralHandler.test.ts > StringLiteralHandler > parseLiteral > should remove matching backticks with AST
Failed to validate string literal with AST, falling back to manual validation: ResolutionError: Resolution error ([object Object]): String literal must start with a quote (', ", or `)
    at StringLiteralHandler.validateLiteral (/Users/adam/dev/meld/services/resolution/ResolutionService/resolvers/StringLiteralHandler.ts:162:13)
    at StringLiteralHandler.validateLiteralWithAst (/Users/adam/dev/meld/services/resolution/ResolutionService/resolvers/StringLiteralHandler.ts:131:21)
    at processTicksAndRejections (node:internal/process/task_queues:105:5)
    at StringLiteralHandler.parseLiteralWithAst (/Users/adam/dev/meld/services/resolution/ResolutionService/resolvers/StringLiteralHandler.ts:217:7)
    at /Users/adam/dev/meld/services/resolution/ResolutionService/resolvers/StringLiteralHandler.test.ts:221:22
    at file:///Users/adam/dev/meld/node_modules/@vitest/runner/dist/index.js:533:5
    at runTest (file:///Users/adam/dev/meld/node_modules/@vitest/runner/dist/index.js:1056:11)
    at runSuite (file:///Users/adam/dev/meld/node_modules/@vitest/runner/dist/index.js:1205:15)
    at runSuite (file:///Users/adam/dev/meld/node_modules/@vitest/runner/dist/index.js:1205:15)
    at runSuite (file:///Users/adam/dev/meld/node_modules/@vitest/runner/dist/index.js:1205:15) {
  code: { value: 'hello world' },
  details: undefined
}
Failed to parse string literal with AST, falling back to manual parsing: ResolutionError: Resolution error ([object Object]): String literal must start with a quote (', ", or `)
    at StringLiteralHandler.validateLiteral (/Users/adam/dev/meld/services/resolution/ResolutionService/resolvers/StringLiteralHandler.ts:162:13)
    at StringLiteralHandler.parseLiteral (/Users/adam/dev/meld/services/resolution/ResolutionService/resolvers/StringLiteralHandler.ts:261:10)
    at StringLiteralHandler.parseLiteralWithAst (/Users/adam/dev/meld/services/resolution/ResolutionService/resolvers/StringLiteralHandler.ts:242:23)
    at processTicksAndRejections (node:internal/process/task_queues:105:5)
    at /Users/adam/dev/meld/services/resolution/ResolutionService/resolvers/StringLiteralHandler.test.ts:221:22
    at file:///Users/adam/dev/meld/node_modules/@vitest/runner/dist/index.js:533:5
    at runTest (file:///Users/adam/dev/meld/node_modules/@vitest/runner/dist/index.js:1056:11)
    at runSuite (file:///Users/adam/dev/meld/node_modules/@vitest/runner/dist/index.js:1205:15)
    at runSuite (file:///Users/adam/dev/meld/node_modules/@vitest/runner/dist/index.js:1205:15)
    at runSuite (file:///Users/adam/dev/meld/node_modules/@vitest/runner/dist/index.js:1205:15) {
  code: { value: 'hello world' },
  details: undefined
}
stderr | services/resolution/ResolutionService/resolvers/StringLiteralHandler.test.ts > StringLiteralHandler > parseLiteral > should preserve internal quotes with AST
Failed to validate string literal with AST, falling back to manual validation: ResolutionError: Resolution error ([object Object]): String literal must start with a quote (', ", or `)
    at StringLiteralHandler.validateLiteral (/Users/adam/dev/meld/services/resolution/ResolutionService/resolvers/StringLiteralHandler.ts:162:13)
    at StringLiteralHandler.validateLiteralWithAst (/Users/adam/dev/meld/services/resolution/ResolutionService/resolvers/StringLiteralHandler.ts:131:21)
    at processTicksAndRejections (node:internal/process/task_queues:105:5)
    at StringLiteralHandler.parseLiteralWithAst (/Users/adam/dev/meld/services/resolution/ResolutionService/resolvers/StringLiteralHandler.ts:217:7)
    at /Users/adam/dev/meld/services/resolution/ResolutionService/resolvers/StringLiteralHandler.test.ts:238:22
    at file:///Users/adam/dev/meld/node_modules/@vitest/runner/dist/index.js:533:5
    at runTest (file:///Users/adam/dev/meld/node_modules/@vitest/runner/dist/index.js:1056:11)
    at runSuite (file:///Users/adam/dev/meld/node_modules/@vitest/runner/dist/index.js:1205:15)
    at runSuite (file:///Users/adam/dev/meld/node_modules/@vitest/runner/dist/index.js:1205:15)
    at runSuite (file:///Users/adam/dev/meld/node_modules/@vitest/runner/dist/index.js:1205:15) {
  code: { value: "It's a test" },
  details: undefined
}
Failed to parse string literal with AST, falling back to manual parsing: ResolutionError: Resolution error ([object Object]): String literal must start with a quote (', ", or `)
    at StringLiteralHandler.validateLiteral (/Users/adam/dev/meld/services/resolution/ResolutionService/resolvers/StringLiteralHandler.ts:162:13)
    at StringLiteralHandler.parseLiteral (/Users/adam/dev/meld/services/resolution/ResolutionService/resolvers/StringLiteralHandler.ts:261:10)
    at StringLiteralHandler.parseLiteralWithAst (/Users/adam/dev/meld/services/resolution/ResolutionService/resolvers/StringLiteralHandler.ts:242:23)
    at processTicksAndRejections (node:internal/process/task_queues:105:5)
    at /Users/adam/dev/meld/services/resolution/ResolutionService/resolvers/StringLiteralHandler.test.ts:238:22
    at file:///Users/adam/dev/meld/node_modules/@vitest/runner/dist/index.js:533:5
    at runTest (file:///Users/adam/dev/meld/node_modules/@vitest/runner/dist/index.js:1056:11)
    at runSuite (file:///Users/adam/dev/meld/node_modules/@vitest/runner/dist/index.js:1205:15)
    at runSuite (file:///Users/adam/dev/meld/node_modules/@vitest/runner/dist/index.js:1205:15)
    at runSuite (file:///Users/adam/dev/meld/node_modules/@vitest/runner/dist/index.js:1205:15) {
  code: { value: "It's a test" },
  details: undefined
}
stderr | services/resolution/ResolutionService/resolvers/StringLiteralHandler.test.ts > StringLiteralHandler > parseLiteral > should throw on invalid input with AST
Failed to validate string literal with AST, falling back to manual validation: Error: Parse error
    at /Users/adam/dev/meld/services/resolution/ResolutionService/resolvers/StringLiteralHandler.test.ts:247:56
    at file:///Users/adam/dev/meld/node_modules/@vitest/runner/dist/index.js:146:14
    at file:///Users/adam/dev/meld/node_modules/@vitest/runner/dist/index.js:533:11
    at runWithTimeout (file:///Users/adam/dev/meld/node_modules/@vitest/runner/dist/index.js:39:7)
    at runTest (file:///Users/adam/dev/meld/node_modules/@vitest/runner/dist/index.js:1056:17)
    at processTicksAndRejections (node:internal/process/task_queues:105:5)
    at runSuite (file:///Users/adam/dev/meld/node_modules/@vitest/runner/dist/index.js:1205:15)
    at runSuite (file:///Users/adam/dev/meld/node_modules/@vitest/runner/dist/index.js:1205:15)
    at runSuite (file:///Users/adam/dev/meld/node_modules/@vitest/runner/dist/index.js:1205:15)
    at runFiles (file:///Users/adam/dev/meld/node_modules/@vitest/runner/dist/index.js:1262:5)
Failed to parse string literal with AST, falling back to manual parsing: ResolutionError: Resolution error ([object Object]): String literal must start with a quote (', ", or `)
    at StringLiteralHandler.validateLiteral (/Users/adam/dev/meld/services/resolution/ResolutionService/resolvers/StringLiteralHandler.ts:162:13)
    at StringLiteralHandler.validateLiteralWithAst (/Users/adam/dev/meld/services/resolution/ResolutionService/resolvers/StringLiteralHandler.ts:141:19)
    at processTicksAndRejections (node:internal/process/task_queues:105:5)
    at StringLiteralHandler.parseLiteralWithAst (/Users/adam/dev/meld/services/resolution/ResolutionService/resolvers/StringLiteralHandler.ts:217:7) {
  code: { value: 'invalid' },
  details: undefined
}
stderr | services/resolution/ResolutionService/resolvers/VariableReferenceResolver.test.ts > VariableReferenceResolver > extractReferencesAsync > should fall back to regex when parser fails
*** Error during variable reference extraction: Error: Parser error
    at /Users/adam/dev/meld/services/resolution/ResolutionService/resolvers/VariableReferenceResolver.test.ts:185:56
    at file:///Users/adam/dev/meld/node_modules/@vitest/runner/dist/index.js:146:14
    at file:///Users/adam/dev/meld/node_modules/@vitest/runner/dist/index.js:533:11
    at runWithTimeout (file:///Users/adam/dev/meld/node_modules/@vitest/runner/dist/index.js:39:7)
    at runTest (file:///Users/adam/dev/meld/node_modules/@vitest/runner/dist/index.js:1056:17)
    at processTicksAndRejections (node:internal/process/task_queues:105:5)
    at runSuite (file:///Users/adam/dev/meld/node_modules/@vitest/runner/dist/index.js:1205:15)
    at runSuite (file:///Users/adam/dev/meld/node_modules/@vitest/runner/dist/index.js:1205:15)
    at runSuite (file:///Users/adam/dev/meld/node_modules/@vitest/runner/dist/index.js:1205:15)
    at runFiles (file:///Users/adam/dev/meld/node_modules/@vitest/runner/dist/index.js:1262:5)
stderr | cli/commands/init.test.ts > initCommand > should reject invalid project root paths
Error: Project root must be "." or a valid subdirectory.
## Your task
Carefully review the code and test results and advise on the quality of the code and areas of improvement.
