Skip to content

fix: preserve annotations across type boundaries and duplicate positions #2

Description

@masonkatz

Annotations store absolute row indexes, but text rendering splits rows into type-specific table groups whose indexes restart at zero. As a result, annotations placed at a type boundary can disappear. Additionally, flush consumes at most one annotation at a row index, so consecutive Annotate calls at the same position discard all but the first annotation.

Acceptance criteria

  1. Add regression tests for annotations immediately before a struct type change and for multiple annotations at the same row position.
  2. Verify each annotation is emitted in insertion order at its intended location.
  3. Fix annotation tracking/rendering so grouping by struct type cannot invalidate annotation positions.
  4. Keep annotations intentionally excluded from JSON and YAML output.
  5. Run the relevant test suite.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions