Skip to content

rust-hybrid doctor reports degraded fallback for Vue/YAML TypeScript fallback despite usable index #681

Description

@jununfly

Summary

Running zcodegraph init on a private Vue 3 + TypeScript monorepo produced a usable rust-hybrid index, but fallback health was reported as degraded.

The diagnostic bundle indicates that the degraded state is caused by language-level TypeScript fallback for Vue/YAML files, and many Vue file diagnostics report:

Failed to get parser for language: typescript

No source code or plaintext file paths are included here.

Commands run

zcodegraph init
zcodegraph doctor --engine rust-hybrid --bundle --last-run

Observed result

zcodegraph init completed successfully:

Indexed 542 files
11,262 nodes, 22,406 edges
Indexed with rust-hybrid
Fallback health: degraded
Top fallback reasons:
  140 TypeScript fallback files

The doctor bundle summary reported:

Graph: 542 files, 11262 nodes, 22406 edges
Fallback health: degraded
Top fallback reasons:
  140 TypeScript fallback files

status.json / per-file-diagnostics.json aggregate fields:

{
  "filesByLanguage": {
    "javascript": 1,
    "typescript": 401,
    "vue": 136,
    "yaml": 4
  },
  "index": {
    "engine": "rust-hybrid",
    "engineVersion": "0.1.0",
    "hybrid": {
      "fallbackByLanguage": {
        "yaml": 4,
        "vue": 136
      },
      "fallbackFileCount": 140,
      "missingFallbackFileCount": 0,
      "fallbackState": "degraded",
      "fallbackReasonTaxonomy": {
        "language-level-typescript-fallback": 140
      },
      "pendingFallbacks": [
        "rust-owned-parse-gap"
      ]
    }
  }
}

Per-file diagnostics are replay-safe and path-hash-only. The Vue diagnostics repeatedly contain:

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

Why this is confusing

The index is explicitly described as usable, and missingFallbackFileCount is 0, but the final health is still degraded.

From a user perspective, it is unclear whether this is:

  • expected because Vue/YAML are intentionally handled by the TypeScript fallback path,
  • a real parser availability/configuration problem,
  • or a rust-hybrid coverage gap that should eventually become healthy once Vue/YAML handling is improved.

The repeated parser_error message also sounds more severe than the aggregate outcome, because fallback successfully appended the files and the graph is usable.

Expected behavior

One of these would make the result easier to act on:

  • If Vue/YAML TypeScript fallback is expected and complete, report it as fallback health: usable or partial, not degraded.
  • If this is a known rust-hybrid coverage gap, keep degraded but make the summary say the index is usable and the degradation is due to non-Rust-owned Vue/YAML fallback.
  • If Failed to get parser for language: typescript means a real environment/parser installation issue, surface the fix or diagnostic command that can confirm it.

Suggested improvements

  • Distinguish expected language-level fallback from parser failure fallback in the health taxonomy.
  • Add a short explanation for language-level-typescript-fallback in the doctor output.
  • Consider grouping repeated Vue parser diagnostics so users see one aggregate Vue parser/fallback finding instead of many identical per-file errors.
  • Include a clear "action required / no action required" field in the bundle summary.

Acceptance criteria

  • zcodegraph doctor --engine rust-hybrid --bundle --last-run explains whether language-level-typescript-fallback requires user action.
  • Vue/YAML fallback does not look like a parser failure when fallback succeeds and missingFallbackFileCount is 0.
  • The health state makes a clear distinction between usable fallback coverage and actual missing/unindexed files.
  • Repeated same-message Vue parser diagnostics are summarized or linked to an aggregate finding.

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