fix: clarify rust-hybrid fallback messaging for non-Rust-owned files (Issue #680)#684
Merged
Merged
Conversation
…(Issue #680) CLI said '30 TypeScript fallback files' but actual is 30 YAML files indexed via the TypeScript fallback path. The label conflated the fallback implementation (TypeScript) with the source file language. Fix: distinguish 'non-Rust-owned files via TypeScript fallback' (reason) from source language breakdown (yaml: 30, css: 3, ...) in all three CLI print locations. Changes: - FALLBACK_REASON_LABELS: 'TypeScript fallback files' -> 'non-Rust-owned files via TypeScript fallback' - formatRustHybridFallbackHealthLines: append 'Fallback by source language' line - RustHybridFallbackSummary + Profile: add fallbackByLanguage field - fallbackSummaryFromHybridMetadata: extract fallbackByLanguage from DB metadata - typescriptFallbackAppend profile: pass fallbackByLanguage from plan (3 construction sites) - clack.log.warn: 'TypeScript fallback files' -> 'non-Rust-owned files via TypeScript fallback' - buildDiagnosticBundleSummary: pass fallbackByLanguage from aggregateTaxonomy - Update existing test assertions to new label TDD: 4 new tests (issue-680-fallback-messaging.test.ts), 8/8 pass. TypeScript: zero errors. Storage message (fallbackMessage) unchanged per Q4 decision.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue
Fixes #680 — CLI says '30 TypeScript fallback files' but actual is 30 YAML files indexed via the TypeScript fallback path. The label conflated fallback implementation (TypeScript) with source file language.
Root Cause
FALLBACK_REASON_LABELS['language-level-typescript-fallback']was set to'TypeScript fallback files', which reads as '30 TypeScript source files' instead of '30 non-Rust-owned files handled by the TypeScript fallback path'.Fix: Distinguish reason from source language (Q1=B, Q2=B)
Three CLI print locations updated:
zcodegraph indexsummary —clack.log.warnreworded to'non-Rust-owned files via TypeScript fallback'zcodegraph status—fallbackSummaryFromHybridMetadata()now extractsfallbackByLanguagefrom DB metadatazcodegraph doctor—buildDiagnosticBundleSummary()now passesfallbackByLanguagefromaggregateTaxonomyNew output format:
Data pipeline (Q3=A):
fallbackByLanguageflows fromplanRustHybridAssignments()→typescriptFallbackAppendprofile →RustHybridFallbackSummary→ format layer.Storage message unchanged (Q4=A):
fallbackMessage()inrust-hybrid-contract.tskept as-is for backward compatibility. Diagnostic bundle already has structuredfallbackByLanguagefield.TDD Vertical Slices
fallback-summary.tszcodegraph.ts—fallbackSummaryFromHybridMetadatazcodegraph.ts— profile construction (3 sites)zcodegraph.ts—clack.log.warndiagnostics/index.ts—buildDiagnosticBundleSummaryFiles Changed
src/diagnostics/fallback-summary.ts— label, type, format functionsrc/bin/zcodegraph.ts— metadata extraction, profile (3 sites), warn messagesrc/diagnostics/index.ts— diagnostic bundle summary__tests__/issue-680-fallback-messaging.test.ts— 4 new TDD tests__tests__/rust-hybrid-fallback-summary.test.ts— update label assertion__tests__/rust-index-engine-cli-fallback.test.ts— update label assertionsTests
npx vitest run __tests__/issue-680-fallback-messaging.test.ts __tests__/rust-hybrid-fallback-summary.test.ts— 8/8 passnpx tsc --noEmit— zero errors