Skip to content

fix(pilot): name JavaScript files as JavaScript in pilot routes and limitations (#4908) - #8311

Merged
EffortlessSteven merged 7 commits into
mainfrom
claude/focused-feynman-y32fpy
Oct 17, 2026
Merged

EffortlessSteven merged 7 commits into
mainfrom
claude/focused-feynman-y32fpy

Conversation

@EffortlessSteven

Copy link
Copy Markdown
Member

Summary

Closes the acceptance of #4908.

  • ripr pilot splits JS-family files out of discovery's TypeScript tag, so a JS-only repository gets the documented javascript route (language: "javascript", same JSON keys).
  • language_adapter_unavailable and language_scope_unsupported limitations name JavaScript / the TypeScript/JavaScript adapter when JS files are present. TypeScript-only and other-language text is unchanged.
  • The prose-naming rule now has one owner (analysis::preview_family_names); the human/GitHub advisory renderers delegate to it.

Proof

  • New tests: pilot route split (JS-only, mixed, TS-only controls), limitation wording (js-only, mixed, ts-only byte-identical), naming helper.
  • cargo build -p ripr passes. Not yet established locally: the focused test run and cargo xtask precommit were 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

…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
@gemini-code-assist

Copy link
Copy Markdown

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@coderabbitai

coderabbitai Bot commented Oct 17, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

  • Ask an admin to enable usage-based reviews

Open in CodeRabbit

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.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available. Your 62 included PR review attempts over the past 7 days set your current allowance at 1 review per hour.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Essentials
  • Run ID: c44f8f4e-1d85-40a0-8ef0-2d8ee606a6ff
📥 Commits

Reviewing files that changed from the base of the PR and between 0a4aec9 and fd998ca.

📒 Files selected for processing: 6
  • changelog.d/4908-javascript-named-as-javascript.md
  • crates/ripr/src/analysis/mod.rs
  • crates/ripr/src/analysis/pipeline.rs
  • crates/ripr/src/output/human.rs
  • crates/ripr/src/output/pilot/language_routes.rs
  • crates/ripr/src/output/pilot/tests.rs
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

Copy link
Copy Markdown
Member Author

Local evidence at the pushed head (083a0eb), which closes the gap noted in the PR description:

  • cargo test -p ripr --lib focused run: 85 passed, 0 failed (pilot route split, advisory/preview-disclosure tests).
  • New pipeline tests, run explicitly: not_enabled_limitation_names_javascript_only_when_javascript_files_are_present and preview_family_names_split_javascript_from_typescript — 2 passed. The TS-only case asserts the exact old recovery and detail wording, so TypeScript-only text is byte-identical.
  • cargo xtask precommit: exit 0, every gate shown passes.

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

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Member Author

Reply to the github-actions review (review 5555588010), verified against source:

  • Missing language_scope_unsupported test (valid): fixed in 972f86a. skipped_scope_limitation_names_javascript_only_when_javascript_files_are_skipped covers JS-only, mixed and TS-only skips (TS-only asserts the existing wording); it passes locally.
  • .jsx/.tsx classification (not a defect): the split uses ts_js_source_kind, the router's own exact extension lists (ts/tsx/mts/cts = TypeScript, js/jsx/mjs/cjs = JavaScript). That is the same authority the existing diff advisory (ux(human): JavaScript-only diffs are described as "N TypeScript file(s)" in the preview notes #4555) uses, so the surfaces agree; a .tsx file stays TypeScript. Content-based classification would need configuration the router does not read and is out of scope.
  • Extension vs discovered LanguageId: the split only reclassifies files discovery already tagged TypeScript, so a file discovery did not route to the TS family cannot land in the JS route.
  • Sensor exit 2 / no receipt: I have not diagnosed this; I'm treating it as missing evidence, not a clean result, and will check the hosted job logs next.

Generated by Claude Code

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Member Author

Claiming this PR for review and merge convergence (newest-first backlog lane). Backlog-oldest-first thread: please skip #8311.


Generated by Claude Code

Copy link
Copy Markdown
Member Author

Independent Sonnet review of 972f86a: code sound (the preview_family_names owner is shared with human.rs, ts_js_source_kind is the single extension authority, no new schema keys since javascript is already a documented language value). One policy finding: the entry was added to CHANGELOG.md directly instead of a changelog.d/ fragment. Fixed in cb37d6d: moved to changelog.d/4908-javascript-named-as-javascript.md (Changed), CHANGELOG.md diff vs main is now empty.

Local proof: cargo test -p ripr --lib analysis::pipeline 86 pass, preview/pilot route tests pass (one unrelated unwritable_out_dir_names_out_not_out_dir failure is the known run-as-root environment artifact), cargo xtask precommit exit 0. Pushed with current main merged. Marking Ready + merge-ready.


Generated by Claude Code

@EffortlessSteven
EffortlessSteven marked this pull request as ready for review October 17, 2026 06:02
@gemini-code-assist

Copy link
Copy Markdown

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Decision

  • Needs verification checks before upstream.

Verification questions

  • Confirm the TS-only not_enabled_limitation_names_javascript_only_when_javascript_files_are_present test asserts the EXACT string 'typescript changed 1 file(s)'. That detail uses {} interpolation with advisory.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-test receipt 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. Test pilot_language_routes_split_real_discovery_javascript_files proves 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.

Copy link
Copy Markdown
Member Author

CI note on head cb37d6d (Ripr Rust Small Result red, goldens step): not caused by this PR.

  • The drift was 8 fixtures' human.txt Summary: line wording (e.g. one_hop_field_projection, rust_map_overwrite_count), from the plain-language verdict change in ux(output): plain-language default verdict (#8165) #8275. This PR does not touch that line.
  • Main fixed it in test(fixtures): bless 8 goldens missed by plain-language verdict (#8165) #8351 (e6b8a56), which merged after this branch's base. Fix here: merged origin/main into the branch (143c185, plain merge commit, no history rewrite).
  • Reproduced locally: cargo xtask goldens check showed that exact drift on cb37d6d, and shows no golden drift on the merged tree. The only remaining local error is the sandbox being offline for the anyhow fixture download, which is an environment limit, not a drift.
  • Other gates on cb37d6d were green (precommit, clippy, rust-tests); hosted re-run on the new head is the evidence for the rest.

Generated by Claude Code

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 with advisory.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: Test not_enabled_limitation_names_javascript_only_when_javascript_files_are_present asserts starts_with("typescript changed 1 file(s)") for the TS-only case AND asserts recovery == "Enable the typescript preview adapter and re-run the analysis." exactly. The skipped-scope test similarly asserts starts_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 --lib receipt is scheduled but unlanded at gate time; until it does, the focused-test oracle witness is on author self-run rather than CI.

@EffortlessSteven
EffortlessSteven marked this pull request as draft October 17, 2026 07:10
@EffortlessSteven
EffortlessSteven marked this pull request as ready for review October 17, 2026 07:11
@settings settings Bot removed the merge-ready label Oct 17, 2026
@EffortlessSteven
EffortlessSteven merged commit 0f209dc into main Oct 17, 2026
40 checks passed
@EffortlessSteven
EffortlessSteven deleted the claude/focused-feynman-y32fpy branch October 17, 2026 11:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants