fix: bug-fixing sprint follow-ups (CD-104, CD-105, CD-101, CD-93)#85
Open
TAJD wants to merge 4 commits into
Open
fix: bug-fixing sprint follow-ups (CD-104, CD-105, CD-101, CD-93)#85TAJD wants to merge 4 commits into
TAJD wants to merge 4 commits into
Conversation
…iles (CD-104) TypeScript's NodeNext/ESM convention writes `.js` in an import specifier (`import "./foo.js"`) even when only `foo.ts` exists on disk. The shared oxc_resolver instance had no extension_alias mapping for this, so every such import failed to resolve and Design.OrphanExport treated the target as unimported. Co-Authored-By: Claude Sonnet 5 <[email protected]> Claude-Session: https://claude.ai/code/session_012sAEyzKZLM1Z4YUcDZxZsh
normalize_path compared the freshly-discovered issue path against the project root with a plain Path::strip_prefix on whatever raw form each side happened to be in. On Windows, Path::strip_prefix compares path components byte-for-byte, so a root path with different directory-name casing than the file's own absolutized path (both naming the identical on-disk file, since Windows filesystems are case-preserving but case-insensitive) silently failed to strip. That fell back to the full absolute form, which never matched the stored (relative) baseline entry, so every finding looked new immediately after baseline write. Canonicalizing both sides first makes the comparison form-independent; falls back to the prior raw-strip behavior when either path doesn't exist on disk (synthetic paths in unit tests). Co-Authored-By: Claude Sonnet 5 <[email protected]> Claude-Session: https://claude.ai/code/session_012sAEyzKZLM1Z4YUcDZxZsh
…ty (CD-101)
Real-repo validation against ERB/EJS/Jinja template directories (Flask
templates/, Rails app/views/) found the HTML adapter's recovered-parse
path fires routinely on legitimate template idioms tree-sitter-html has
no grammar for: an ERB/EJS <% %> scriptlet, or a Jinja
{{ url_for("x") }} nested inside a double-quoted attribute. Neither is
malformed HTML in its rendered form, only in unrendered template source.
Downgraded from Critical to Low so it stays visible without failing CI
at the default --fail-on=medium. html_load_error_issue (tree-sitter
produced no tree at all) is unaffected and stays Critical, since that's
a genuine hard failure regardless of source language. Documented the
caveat and the disabled-override workaround in docs/languages.md.
Co-Authored-By: Claude Sonnet 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_012sAEyzKZLM1Z4YUcDZxZsh
…D-93) The plugin wire's per-language dispatch gave .rs files (Vec::new(), None) for lineViews/ast while file.text remained populated, so a Pattern-A line-scan plugin check (file.lines()) scoped to .rs silently iterated zero lines instead of erroring or being skipped. Astro already got Lines::plain-built (unclassified) line views for the identical reason; Rust gets the same treatment here. No plugin-facing AST wire builder exists for Rust yet, so ast stays None — only lineViews changes. Co-Authored-By: Claude Sonnet 5 <[email protected]> Claude-Session: https://claude.ai/code/session_012sAEyzKZLM1Z4YUcDZxZsh
Criterion benchmark comparison (PR head vs base branch) |
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.
Summary
.js-extension imports against sibling.ts/.tsxfiles inDesign.OrphanExport's resolver, fixing false-positive orphan findingsbaseline writeWarning.ParseErrorfrom Critical to Low (fires routinely on legitimate ERB/EJS/Jinja template idioms), plus document the caveat indocs/languages.md.rsfiles reallineViewson the plugin wire (matching the.astrofix already shipped), so a.rs-scopedfile.lines()plugin check no longer silently iterates zeroCD-88 was investigated as part of the same sprint but turned out to already be fixed and covered by an existing regression test — closed with no code change, not included in this PR.
Test plan
cargo build --workspacecargo test --workspace(full suite green; each new regression test independently confirmed to fail pre-fix and pass post-fix)cargo clippy --workspace --all-targets -- -D warningscargo fmt --all -- --checkorphan_js_extension_resolution.rs,baseline_workspace_subdir.rs+ Windows-only unit test,html_template_parse_error_severity.rs,plugin_rust_line_views.rs🤖 Generated with Claude Code
https://claude.ai/code/session_012sAEyzKZLM1Z4YUcDZxZsh