Skip to content

doctor bundle: aggregate repeated identical per-file parser diagnostics (Vue/YAML fallback) #686

Description

@jununfly

Summary

Follow-up to #681 (closed via 38e3657). The three-tier fallback health state (ZJ-0007) resolved the degraded misreporting for Vue/YAML TypeScript fallback, but one acceptance criterion from #681 remains unimplemented: repeated identical per-file parser diagnostics are still emitted one-by-one in the doctor bundle instead of being summarized into an aggregate finding.

Current behavior

Running zcodegraph doctor --engine rust-hybrid --bundle --last-run on a Vue 3 + TypeScript monorepo where fallback succeeds produces per-file-diagnostics.json containing many identical entries, e.g.:

{
  "extension": ".vue",
  "language": "vue",
  "code": "parser_error",
  "severity": "error",
  "message": "Failed to get parser for language: typescript"
}

One entry per affected file (136 in the original report), even though the aggregate fallback health correctly reports partial and no user action is required.

Expected behavior

  • Repeated same-code/same-message per-file diagnostics for the same language are collapsed into one aggregate finding with a count (e.g. vue: 136 files — "Failed to get parser for language: typescript" (parser_error)).
  • The per-file detail remains available (replay-safe, path-hash-only) but is referenced from the aggregate finding rather than listed ungrouped.
  • The bundle summary includes the aggregate findings when fallbackState is partial, so the diagnostics that do exist do not read as more severe than the aggregate outcome.

Acceptance criteria

  • per-file-diagnostics.json (or a sibling aggregate file) groups identical code + message diagnostics per language with counts.
  • doctor --bundle summary output surfaces aggregate findings for partial runs.
  • Grouping preserves the replay-safe, path-hash-only contract (no source code or plaintext paths).
  • Existing fallback-summary and diagnostics tests updated/extended to cover the grouping.

Context

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions