Repository navigation
fix(pilot): name JavaScript files as JavaScript in pilot routes and limitations (#4908) - #8311
Conversation
…imitations (#4908) Pilot splits JS-family files out of discovery's TypeScript tag so a JS-only repository gets the documented javascript route. The adapter-unavailable and scope-unsupported limitations name JavaScript / the TypeScript/JavaScript adapter when JS files are present; TypeScript-only text is unchanged. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LfD7MGdHYUYRDiN3VgJTgD
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
|
Warning Review limit reachedEnable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing. Next included review available in 20 minutes. View limit details
Comment |
|
Local evidence at the pushed head (083a0eb), which closes the gap noted in the PR description:
Not run locally: full-workspace Clippy/tests, goldens and dogfood (left to hosted CI). External review providers (Gemini, CodeRabbit) are quota-limited, so no external review exists yet. This is a self-review only. Generated by Claude Code |
There was a problem hiding this comment.
Decision
- Needs reviewer attention before upstream: findings remain.
Confirmed findings
- ripr self-analysis sensor exited 2 with no receipt; cannot tell whether it flagged anything in the JS-split logic. Trust-affecting missing evidence for a PR that closes an acceptance bug.
Verification questions
- Confirm jSX (and TSX) classification by extension is hardcoded as JavaScript via ts_js_source_kind; this means a .tsx file with JSX contents routes to JavaScript and a pure .jsx with TSX-style typing routes to JavaScript too. JSX is unusual in that its semantics depend on configuration, not just extension.
- Confirm pilot route split keys off file extension via ts_js_source_kind rather than the discovered LanguageId, so a misclassified extension would silently land in the JS route even if discovery said TS.
- Confirm no test exercises language_scope_unsupported with JavaScript files to confirm the new naming reaches that limitation kind.
- Confirm late-phase cargo-test receipt covers the proof gap; no actionable test-oracle weakness remains in this diff for the lane to surface.
Refuted
- scope creep: TS/JS split should have been applied to discovery itself rather than only the pilot renderer; refuted because: the PR is explicitly bounded to pilot routes and limitations naming; discovery routes the whole family to TypeScript by design (single adapter). Splitting at discovery would force downstream consumers to handle two routes for the same adapter, contradicting the PR's non-goal and existing architecture. The pilot split is the smallest complete fix.
- Pilot route split double-counts a .js file that also matches the TypeScript route; refuted because: from_discovered now filters by pilot_route_language and the mixed-case test asserts [(TS,3),(JS,1)] for 4 total files, proving each file is counted exactly once across routes.
Evidence gaps
- Model proof intent was rejected by deterministic validation.
- cargo-test receipt absent; PR author flags focused test run and precommit as not yet established locally, so green/red is currently unconfirmed by receipt.
- rippr sensor failed with exit code Some(2); this is the project's own analysis tool judging the diff.
…#4908) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LfD7MGdHYUYRDiN3VgJTgD
|
Reply to the github-actions review (review 5555588010), verified against source:
Generated by Claude Code |
There was a problem hiding this comment.
Decision
- Needs verification checks before upstream.
Verification questions
- Confirm opposition: pilot_route_language chooses JS-route solely by ts_js_source_kind(classification by extension) for files already tagged LanguageId::TypeScript. Discovery may misclassify via extension; no parallel test exercises a misclassified .ts-as-JS edge to prove the JS extension list is exhaustive.
- Confirm opposition: ts-only control asserts EXACT 'typescript' wire string for the file-count phrase ('typescript changed 1 file(s)'). The detail format uses {} interpolation. If any future change normalizes LanguageId display or recovers via unreachable paths, the byte-identical guarantee may silently regress without test catching it.
- Confirm late-phase cargo-test receipt is scheduled but not yet landed; until it does, the proof gap for the new pilot + pipeline tests cannot be confirmed by the lane.
Refuted
- Discovery-side rather than pilot-side split is required for correctness (scope creep flag); refuted because: Scope of #4908 is the pilot route + advisory naming; discovery change is out of scope and the pilot-side split is sufficient because discovery already funnels JS-family into TypeScript.
- helper placement in analysis:: is wrong; prose naming belongs near the human/output renderers.; refuted because: Pipeline limitations (not-enabled, skipped-scope) also need the names, and advisory_language_names delegates there; analysis:: is the producer of the advisory and is the natural shared owner. Boundary is correct.
- Non-typescript language detail copy may have been silently changed, breaking other-language tests/goldens; refuted because: Refuted: preview_family_names short-circuits on wire != 'typescript' || javascript_file_count == 0, returning (language.clone(), language). Detail format for non-TS branch uses advisory.language unchanged. Not_enabled test asserts the exact 'typescript changed 1 file(s)' wording on the TS-only branch; mixed branch does not introduce 'JavaScript' into the non-TS path. Other-language surfaces left to hosted CI.
Evidence gaps
- Model proof intent was rejected by deterministic validation.
|
Claiming this PR for review and merge convergence (newest-first backlog lane). Backlog-oldest-first thread: please skip #8311. Generated by Claude Code |
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XJQ3eTmHZCPmLwyb77Hexw
|
Independent Sonnet review of 972f86a: code sound (the Local proof: Generated by Claude Code |
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
There was a problem hiding this comment.
Decision
- Needs verification checks before upstream.
Verification questions
- Confirm the TS-only
not_enabled_limitation_names_javascript_only_when_javascript_files_are_presenttest asserts the EXACT string 'typescript changed 1 file(s)'. That detail uses{}interpolation withadvisory.language. Any future normalization via display_name_for_wire or recovery branch would silently break the byte-identical guarantee without a test catching it. - Confirm late-phase cargo-test receipt is scheduled but not landed; until it does, the focused-test proof gap cannot be confirmed by this lane.
- Confirm sensor ripr exit 2 with no receipt means this PR which closes an acceptance bug lacks its own-tool end-to-end JS-split witness in the review packet; treat as missing trust-affecting evidence, not a proof of defect.
- Confirm late
cargo-testreceipt is scheduled but unlanded at gate time. The new not-enabled + skipped-scope + split tests are the only oracle for the JS-splitting correctness claim; until receipt lands, opposition cannot confirm the test claim holds at the merged head (rebase vs main after cb37d6d).
Refuted
- TS/JS split should have been applied at discovery, not pilot (scope creep / wrong layer).; refuted because: Refuted: PR is scoped to pilot route + advisory naming per #4908; discovery already funnels JS-family under TypeScript, pilot reclassifies only those entries via ts_js_source_kind (router authority), and #4555 advisory already uses extension-only classification — surfaces stay consistent.
- In the mixed-JS case (file_count > javascript_file_count > 0), recovery text says 'TypeScript/JavaScript preview adapter' but the original RecoveryKind::EnableLanguage label is built from
advisory.language('typescript'), so the rendered recovery kind/key and the prose adapter name disagree, and downstream consumers keying on the language wire string may show a stale name. - Pilot should have split at discovery, not at pilot, so the language_routes split is a scope-defect workaround.; refuted because: Refuted: PR scope per #4908 is the pilot route + advisory naming. Author 02:37:01Z shows pilot-side split is sufficient because discovery already funnels JS-family into
TypeScript. Testpilot_language_routes_split_real_discovery_javascript_filesproves the split captures every JS-family extension.
Evidence gaps
- cargo-test receipt is scheduled-late and has not landed; the lane cannot independently confirm the new pilot/pipeline tests pass on the published head.
- Model proof intent was rejected by deterministic validation.
|
CI note on head cb37d6d (Ripr Rust Small Result red,
Generated by Claude Code |
There was a problem hiding this comment.
Decision
- Needs one verification check before upstream.
Verification questions
- Confirm pilot route split keys off extension via ts_js_source_kind, not the discovered LanguageId; a JS-extension file tagged by discovery as anything other than TypeScript cannot enter the JS route.
Refuted
- Discovery-side split is required for correctness (scope creep refuted flag); refuted because: Author scope is the pilot route + advisory naming (#4908); discovery already funnels JS-family files to TypeScript, so the pilot-side split is sufficient and the smallest-complete fix. Out-of-scope discovery change would expand blast radius without acceptance benefit.
- The TS-only detail format string uses
{}interpolation withadvisory.language, so a future normalization via display_name_for_wire or recovery branch could silently regress the byte-identical guarantee without a test catching it.; refuted because: Testnot_enabled_limitation_names_javascript_only_when_javascript_files_are_presentassertsstarts_with("typescript changed 1 file(s)")for the TS-only case AND assertsrecovery == "Enable the typescript preview adapter and re-run the analysis."exactly. The skipped-scope test similarly assertsstarts_with(expected_detail)for TS-only. Any normalization that altered either surface would fail these assertions. - Discovery-side split scope creep: pilot-only split is insufficient. Refuted by #4908 acceptance being scoped to pilot + advisory naming; discovery already funnels TS/JS family under one tag, so pilot-side reclassification is sufficient.
- Discovery must split JS/TS for the pilot route to be correct, so a pilot-only split is a scope-creep shortcut.; refuted because: Scope of #4908 is documented as pilot route + advisory naming; pilot_route_language works on the already-tagged TypeScript set via ts_js_source_kind and the new test asserts the javascript route exists for JS-only input.
Evidence gaps
- Model proof intent was rejected by deterministic validation.
- Late-phase
cargo test -p ripr --libreceipt is scheduled but unlanded at gate time; until it does, the focused-test oracle witness is on author self-run rather than CI.
Summary
Closes the acceptance of #4908.
ripr pilotsplits JS-family files out of discovery'sTypeScripttag, so a JS-only repository gets the documentedjavascriptroute (language: "javascript", same JSON keys).language_adapter_unavailableandlanguage_scope_unsupportedlimitations name JavaScript / the TypeScript/JavaScript adapter when JS files are present. TypeScript-only and other-language text is unchanged.analysis::preview_family_names); the human/GitHub advisory renderers delegate to it.Proof
cargo build -p riprpasses. Not yet established locally: the focused test run andcargo xtask precommitwere still compiling when this was published; hosted CI is the evidence for those.Non-goals
No change to discovery, other languages, workflows or release.
Generated by Claude Code