# `ActorSimulation.GeneratorMetadata`
[🔗](https://github.com/d-led/gen_server_virtual_time/blob/v1.1.1/packages/actor_simulation/lib/actor_simulation/generator_metadata.ex#L1)

Utilities for tracking which test file/function generated an HTML report.

This helps maintain traceability between generated reports and their source code.

# `from_stacktrace`

Extracts generator metadata from the current stack trace.

Returns a map with `:test_file`, `:test_name`, and `:generator_function` keys,
or `nil` if not called from a test.

## Example

    metadata = GeneratorMetadata.from_stacktrace()
    # => %{
    #   test_file: "test/mermaid_report_test.exs",
    #   test_name: "generates pipeline report",
    #   generator_function: "ActorSimulation.MermaidReportGenerator.generate_report/2"
    # }

# `to_html_comment`

Generates an HTML comment with generator metadata.

## Example

    comment = GeneratorMetadata.to_html_comment(metadata)
    # => "<!--\n  Generated by: test/mermaid_report_test.exs\n  Test: generates pipeline report\n  Generator: ActorSimulation.MermaidReportGenerator.generate_report/2\n-->\n"

---

*Consult [api-reference.md](api-reference.md) for complete listing*
