Skip to content

fix(typescript): honest extends comments and boundary tests (#11849) - #11875

Merged
EffortlessSteven merged 3 commits into
mainfrom
fix/ts-tsconfig-doc-boundary-tests
Nov 1, 2026
Merged

EffortlessSteven merged 3 commits into
mainfrom
fix/ts-tsconfig-doc-boundary-tests

Conversation

@EffortlessSteven

@EffortlessSteven EffortlessSteven commented Oct 31, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Fixes four stale comments in tsconfig.rs that contradicted the landed
    same-directory extends-chain behavior (SINGLE-HOP header, MUST-NOT
    wire-type note, two single-hop doc lines) (fix(typescript): stale single-hop comments and untested extends boundaries #11849).
  • Adds two boundary regression tests: partial paths overlap (child keeps
    its own alias, drops the base-only one) and the max-hops boundary
    (8-deep chain loads, 9-deep fails closed).

Swarm / Source Boundary

This PR targets EffortlessMetrics/ripr-swarm, the normal development trunk for
trusted same-repo ripr work. Confirm the change belongs here:

  • ordinary feature, analyzer, editor, docs, spec, fixture, badge,
    dependency, or repo-ops development for ripr-swarm
  • repair or follow-up for a same-repo swarm PR
  • swarm-only CI, runner, routing, source-of-truth, or agent-operating
    surface
  • other swarm-scoped work:

Source-of-truth Links

Proposal:
Spec: docs/specs/RIPR-SPEC-0099-typescript-tsconfig-path-aliases.md
ADR:
Plan item: TypeScript excellence goal, extends follow-up slice
Governing issue or accepted claim: #11849
Acceptance delta (one sentence): Stale extends comments read as bounded-chain behavior and both untested extends boundaries are pinned.

Scope

  • One file: crates/ripr/src/analysis/language/typescript/tsconfig.rs
    (4 comment lines + 2 tests, +71/-6). No behavior change, no spec change
    (RIPR-SPEC-0099 already describes whole-object replacement), no changelog
    fragment (no user-visible change).

Proof

  • cargo test -p ripr --lib analysis::language::typescript::tsconfig:
    57 passed, 0 failed, including the 2 new tests (each fails under the
    opposite semantics by construction: overlap under per-key merge, depth
    with the bound removed).
  • cargo fmt --check, cargo clippy --workspace --all-targets -D warnings,
    cargo xtask check-fast (10 gates) all pass.

Rollback

  • Revert the single commit; comments return to stale wording and the two
    tests disappear. No behavior or schema surface involved.

Stale single-hop/MUST-NOT comments now describe the bounded same-directory chain. Adds partial-overlap replacement and max-hops boundary tests.
@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 31, 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 43 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available. Your 150 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
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Essentials
  • Run ID: 9ea795bb-77c3-42b1-a5db-342b18bb9ec7
Commits

Reviewing files that changed from the base of the PR and between c258c17 and 184266c.

Files selected for processing: 1
  • crates/ripr/src/analysis/language/typescript/tsconfig.rs
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

@EffortlessSteven
EffortlessSteven marked this pull request as ready for review October 31, 2026 20:42
@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.

Verification questions

  • Confirm the source-route scan found the TypeScript tsconfig loader and its public aliases, but the available context does not support claiming absence of all sibling config-loader variants.
  • Confirm the lane packet does not establish repository-wide coverage of other tsconfig/jsconfig loader or alias-resolution helpers; a one-file scan cannot exclude duplicated semantics outside this module.
  • Confirm the 8/9-hop test labels root plus eight/nine bases as 8/9-deep, so the assertion may be off by one relative to MAX_EXTENDS_DEPTH's implementation semantics.

Evidence gaps

  • Focused test execution is claimed but independently unavailable because the ripr sensor failed and the cargo-test receipt is absent.
  • The advertised cargo-test proof could not be independently confirmed from the supplied sensor state because its receipt is absent, while the ripr sensor failed.
  • The advertised 8-deep/9-deep boundary is exercised, but the claimed successful test run lacks a central receipt.
  • The max-depth test distinguishes an accepted 8-base chain from a fail-closed 9-base chain, but no local receipt proves those assertions currently pass.
  • The public load_alias_map route exercises both new boundaries, but the PR's reported test result is not independently evidenced because the cargo-test receipt is absent.
  • The maximum-depth test covers the boundary at eight and nine extends hops, but the repository cargo-test receipt is unavailable in this packet.
  • The new depth test exercises the intended DoS boundary, but successful execution is not evidenced in the available packet.
  • Model proof intent was rejected by deterministic validation.
  • Independent completion evidence for the scheduled focused cargo-test is not present in the supplied receipts.

@EffortlessSteven EffortlessSteven left a comment •

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Independent review (fresh-context reviewer, head 5579fce): REVIEW_INCOMPLETE

Inspected:

  • The whole diff: the PR's only changed file is crates/ripr/src/analysis/language/typescript/tsconfig.rs. I fetched both blobs (head 5579fce2, base 9230fe14) and diffed them myself. The PR's single commit is 5579fce2, whose parent is 9dbfad8a (main has moved past the recorded baseRefOid).
  • Head source read at: module docs L1-16, RawTsConfig L44-51, load_alias_map / load_alias_map_with_read_error L486-512, TsAliasMapBlocker L556-565, MAX_EXTENDS_DEPTH L582, merge_compiler_options L582-660, parse_alias_map L674+, the two new tests L1175-1245, and the temp_dir/write helpers L1000-1015.
  • The owning spec docs/specs/RIPR-SPEC-0099-typescript-tsconfig-path-aliases.md, read at the PR base (L70-90, L205-216, L300-312).
  • Repo conventions: xtask/src/policy/changelog_fragments.rs L162-203 and L404-412; .ripr/traceability.toml at base (RIPR-SPEC-0099 registers one representative tsconfig test; the pre-existing extends_* tests are not registered, so a new sibling test needs no new entry, and the PR correctly adds none).
  • Prior review: the github-actions COMMENT on 5579fce2 asking whether the 8/9-hop labels are off by one relative to MAX_EXTENDS_DEPTH.
  • Hosted proof: REST commits/5579fce2/check-runs and the job log of check run 124669862322.

Blocking:

  • None attributable to this candidate.

Non-blocking:

  • The outstanding github-actions question about an off-by-one is refuted, not confirmed. merge_compiler_options is entered at depth 0 for the workspace-root config and recurses with depth + 1 per extends hop; the guard is depth > MAX_EXTENDS_DEPTH (tsconfig.rs:614) with MAX_EXTENDS_DEPTH = 8 (L582). The new test builds tsconfig.json -> c0 -> ... -> c7 for its depth-8 case: the eighth base is entered at depth 8 and 8 > 8 is false, so it loads; for its depth-9 case the ninth base is entered at depth 9 and 9 > 8 is true, so it fails closed with ExtendsUnsupported. The labels "root plus 8 bases" / "root plus 9 bases" therefore match the implementation's depth numbering exactly.
  • Both new tests discriminate. extends_child_paths_replace_base_paths_partially fails if paths were merged per key instead of replaced: the fixture writes src/other.ts, so under a per-key merge map.resolve("@/other") would return a path and the is_none() assertion would fail. extends_chain_at_max_hops_loads_but_one_more_fails_closed fails if the bound moved to 7 or 9.
  • A fifth stale comment of exactly the family this PR claims to repair is left in the file: crates/ripr/src/analysis/language/typescript/tsconfig.rs:186-187 still reads "The config uses extends/references, which single-hop resolution deliberately does not follow", while the loader does follow same-directory relative extends chains. The user-facing ExtendsUnsupported text at L219-226 is already accurate, so this is an internal doc inconsistency only. The PR body scopes itself to four named comments, so this sits outside the stated claim.
  • The same stale wording survives in the owning spec: docs/specs/RIPR-SPEC-0099-typescript-tsconfig-path-aliases.md:70 still heads the section "### 2. Single-hop alias loader (tsconfig.rs)" while the same spec's clause at L77 already describes the bounded 8-hop chain and whole-object paths replacement. That drift arrived with the #11204 code change on main, not from this candidate; it is mainline-owned and is not a reason to block this PR.
  • The pre-existing test returns_none_when_extends_present (L1101) no longer describes why it passes: the fixture's "./base" target does not exist, so it fails closed as a missing target rather than because extends is present. Pre-existing from #11204, not introduced here.
  • The PR body claims "Rust unit tests green (shards 1-4)" for this head. On 5579fce2 the only completed Rust wave is run 41243336440, where "Rust tests shard 1 of 4" is FAILURE. The failing test is ripr::analysis::language::python::guard_activation::tests::compare_literal_values_fails_open_on_undecoded_literals at crates/ripr/src/analysis/language/python/guard_activation.rs:1436, in a file this candidate does not touch: the blob SHA for that path is 87f3badb45cf5848b148af65afbf4fb382194ff3 at both 9dbfad8a (the candidate's own parent) and 5579fce2. The divergence from the base blob e7c50cc69ed1ffe5190ebb5a167b6cfc7db1ad4e is main moving forward, not this PR. The red is therefore inherited and not candidate-attributable, but the head is still not green.

Not run:

  • No local build or test: the Rust toolchain on this host is not on PATH, so cargo fmt --check, cargo xtask precommit, cargo xtask check-pr and cargo test -p ripr --lib typescript were not executed. Everything above comes from source and hosted evidence only.
  • Hosted lanes observed on 5579fce2: run 41243336440 - "Rust gates" SUCCESS, shards 2/3/4 SUCCESS, "Rust test shards verify" FAILURE, "Rust tests shard 1 of 4" FAILURE; run 41243336346 "windows-advisory-subset" SUCCESS; run 41243336355 "Rust-only feature lane" SUCCESS; run 41243336445 paste-macos/ubuntu/windows SUCCESS; run 41243336510 cargo-deny + dependency-review SUCCESS; run 41243336807 "Report conflicting merge-ready request" SUCCESS. Earlier waves (41240153467, 41240363544, 41242818625) are cancelled or failing and are not attributed to this head.
  • Unobserved: a green hosted Rust lane for this head. The candidate's own TypeScript surface did execute inside shard 1 (988 tests passed before the inherited Python failure), but the required lane as a whole is red, so no green-head claim can be made here. Rebasing onto a main that carries blob e7c50cc6 for guard_activation.rs would likely clear the inherited red; that is an unverified prediction, not an observation.

Reviewed by an independent Mavis review agent on behalf of the maintainer; bound to head 5579fce22ede1828ac21e4a3bd59a8318de44d70. Not an approval.

@EffortlessSteven

Copy link
Copy Markdown
Member Author

CI triage (shard 1 failure, run 41243336440): inherited main-red, not this candidate. The failing test is python::guard_activation::tests::compare_literal_values_fails_open_on_undecoded_literals (None != 0 now None, expected Some(true)). Evidence: (1) this PR touches one file (tsconfig.rs, comments + 2 tests) and cannot affect Python guard semantics; (2) the test passes on this branch's tree locally; (3) the merge-ref carries main's #11842 (guard_literals_equal replaced by three-valued literals_equal). The repair is already owned by open PR #11918 (merge-ready), whose diagnosis confirms the same oracle on multiple PRs. No code change here; will re-request CI after #11918 lands.

@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 repository-wide absence of sibling tsconfig/jsconfig loader or alias-resolution helpers is not established by this one-file diff or the available receipts.
  • Confirm the max-hops regression test exercises an 8-base accepted chain and a 9-base fail-closed chain, including a security-relevant resource-boundary case.

Refuted

  • The boundary fixture creates eight or nine base configs in addition to root, matching its explicit depth labels.

Evidence gaps

  • Focused test execution for the changed boundaries remains unconfirmed by a central receipt because cargo-test was scheduled without a receipt and ripr failed.
  • Independent focused-test execution is unavailable because the cargo-test receipt is absent and the ripr sensor failed.
  • Model proof intent was rejected by deterministic validation.
  • The new boundary assertions lack an independently available execution receipt.
  • Claimed focused test execution is not independently evidenced in this packet because the ripr sensor failed and the cargo-test receipt is absent.
  • The 8/9-hop boundary test is materially present, but the required cargo-test receipt is absent and the ripr sensor failed, so execution is not independently established.
  • The claimed focused test success lacks a central receipt in this packet.

@EffortlessSteven

Copy link
Copy Markdown
Member Author

CI triage update (run 41262086501): two inherited failures, neither from this candidate (one file changed: tsconfig.rs comments + 2 tests; all other files byte-identical to origin/main@b31977d34).

  1. Rust-only feature lane: list_actionable_items_names_gaps_the_actionable_profile_hides, check_worktree_drill_in_commands_reach_the_uncommitted_finding, selector_location_misses_explain_syntax_and_preserve_retry_scope. Reproduced locally on this tree; main-red owned by open PR fix(tests): repair main's three red Rust test shards (explain --format json hints, withheld group order) #12014 (same three test names in its acceptance delta).
  2. Rust gates PRECOMMIT failure: under local reproduction (cargo xtask precommit on this exact tree); result pending. If it resolves to the same main-red tests, it rides fix(tests): repair main's three red Rust test shards (explain --format json hints, withheld group order) #12014; anything else gets its own triage here.

No code change in this PR for either. Will re-request CI after #12014 lands (and report the precommit verdict).

@EffortlessSteven EffortlessSteven left a comment •

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Independent review (fresh-context reviewer, head 9d38140): REVIEW_INCOMPLETE

Inspected:

  • Head re-read from the API before writing: 9d38140148eb645fdf8ef1fc1b17abd35bb71f11, base b31977d3 (branch base; main tip a69bf0214), draft: false, mergeable: MERGEABLE, mergeStateStatus: BLOCKED, labels ['merge-ready']. It matches the dispatch head; it had not moved.
  • The candidate's contribution is one file: crates/ripr/src/analysis/language/typescript/tsconfig.rs, +71/-6. The GraphQL file list returns exactly that path.
  • The candidate's source is unchanged since the previously reviewed head. I compared blob ids: tsconfig.rs is f15949b378ae8a846e5d68197a3d2556bc70ebd7 at both 5579fce22ede1828ac21e4a3bd59a8318de44d70 and at this head, so the 2876-path delta between those heads is entirely main's advance, not the candidate's.
  • The change, read at this head: four internal doc-comment corrections plus two new tests - extends_child_paths_replace_base_paths_partially (:1181) and extends_chain_at_max_hops_loads_but_one_more_fails_closed (:1212). I also read the production code they pin: MAX_EXTENDS_DEPTH = 8 (:582), the guard depth > MAX_EXTENDS_DEPTH (:614), and merge_compiler_options.
  • Also read at this head: the residual stale comment region (:186-187); the owning spec at the main tip (RIPR-SPEC-0099-typescript-tsconfig-path-aliases.md:70); hosted job logs 124719337593 (aggregate), 124717402816 (Rust gates), 124717233708 (Rust-only feature lane), and main-tip base job 124707375551; and the PR body in full, to check its claims against the hosted state.

Blocking:

  • None attributable to this candidate; I found no defect that makes it wrong.
  • The required check Ripr Rust Small Result is present at this head and RED (job 124719337593), and a red required check is never REVIEW_READY. The cause is not this candidate:
    • Rust gates job 124717402816 fails at step 16, Repository policy preflight, with xtask: check-policy-all: 1 gate(s) failed: check-process-policy and crates/ripr/src/output/first_pr/run_chain.rs allowlist entry for 'use std::process::Command' is orphaned: max_count=1 but pattern not found in any tracked file. The main tip fails at the same step with the same message (job 124707375551), and this candidate touches no policy file, no allowlist and no run_chain.rs.
    • Rust-only feature lane job 124717233708 fails on -p ripr --lib at lsp::backend::list_actionable_items_tests::list_actionable_items_names_gaps_the_actionable_profile_hides (a known base-side red this candidate does not touch), and on -p ripr --test cli_smoke at check_worktree_drill_in_commands_reach_the_uncommitted_finding and selector_location_misses_explain_syntax_and_preserve_retry_scope. I attribute those two cli_smoke failures by source-level causal chain, not by a base comparison, and I say so plainly: the diff changes no non-test statement, so it cannot alter any compiled behaviour, and the failures are analysis failures on Rust fixtures ("ripr progress: failed"), not wrong verdicts about TypeScript. The base has no comparable green Rust-only lane to contrast against - main's own job failed at step 16 before that lane ran.
  • Source inspection is complete and clean; the ceiling is hosted proof. REVIEW_INCOMPLETE, attribution stated.

Non-blocking:

  • Earlier finding - the outstanding github-actions question about an off-by-one in the 8/9-hop labels: STALE. It was refuted, not confirmed, before this delta: the guard is depth > MAX_EXTENDS_DEPTH with MAX_EXTENDS_DEPTH = 8, the root config is entered at depth 0, and the test's depth-8 chain loads while its depth-9 chain fails closed. The source is byte-identical to the reviewed head.
  • Earlier finding - both new tests discriminate: STILL HOLDS. extends_child_paths_replace_base_paths_partially fails if paths were merged per key instead of replaced - the fixture writes src/other.ts, so map.resolve("@/other").is_none() would then fail; extends_chain_at_max_hops_loads_but_one_more_fails_closed fails if the bound moved to 7 or 9.
  • Earlier finding - a fifth stale comment of the same family the PR claims to repair is left in the file: STILL HOLDS. tsconfig.rs:186-187 still reads "The config uses extends/references, which single-hop resolution deliberately does not follow", while the loader does follow same-directory relative extends chains. The user-facing ExtendsUnsupported text is already accurate, so this is an internal doc inconsistency only, and the PR body scopes itself to four named comments, so it sits outside the stated claim.
  • Earlier finding - the same stale wording survives in the owning spec: STILL HOLDS, and it remains mainline-owned. docs/specs/RIPR-SPEC-0099-typescript-tsconfig-path-aliases.md:70 still heads "### 2. Single-hop alias loader (tsconfig.rs)" at the main tip, while the same spec's clause at L77 already describes the bounded 8-hop chain and whole-object paths replacement. That drift arrived with #11204 on main, not from this candidate.
  • Earlier finding - the pre-existing test returns_none_when_extends_present (:1101) no longer describes why it passes: STILL HOLDS, pre-existing. Its fixture's "./base" target does not exist, so it fails closed as a missing target, not because extends is present. That came in with #11204.
  • Earlier finding - the PR body claimed "Rust unit tests green (shards 1-4)" for a head whose shard 1 was a failure: REPAIRED. The body at this head makes no hosted-green claim. It offers local receipts only - cargo test -p ripr --lib analysis::language::typescript::tsconfig: 57 passed, 0 failed, cargo fmt --check, cargo clippy --workspace --all-targets -D warnings, cargo xtask check-fast (10 gates) - and states plainly that no changelog fragment is added because there is no user-visible change.
  • New, clarifying: the "5 paths outstanding against the current main tip" are not this PR's proposal. I checked each by blob. Two (changelog.d/11819-multiroot-observe-validated-range.md, changelog.d/repair-activation-unknown-names-calling-test-11895.md) exist neither at the branch base nor at this head - main added them after the base, so a merge brings them in. The other two (crates/ripr/src/app/task_first.rs, editors/vscode/test/suite/multiroot.test.ts) are unchanged by this branch while main moved them, so a merge takes main's version. The true proposal is the one TypeScript file.
  • New: the plain-language ceiling interaction does not bite here. The dispatch flagged #11856 lowering the plain-language ceilings, with #9964 and #11182 red on check-user-text. For this PR it does not: the candidate changes no user-facing string - the only text it alters is four internal doc comments and two test bodies - and the User-text goldens judged by the merge-base matcher step (step 15) is SUCCESS at this head, and also SUCCESS at #11894's head, so neither PR contributes to that interaction.
  • Efficiency: nothing to report, and the effect is provably nil. The diff changes no non-test statement, so there is no runtime effect at all - no new parse, collection, allocation, cache or fixture re-parse. The two new tests write small temporary fixture trees under std::env::temp_dir() - roughly ten tiny JSON configs for the chain case, three for the paths case - and each is an in-crate #[test], not a generated corpus.

Not run:

  • The Rust toolchain on this host is not on PATH (rustc, cargo, rustup are absent from PATH). Nothing was built, compiled, formatted, linted or tested locally; cargo fmt --check, cargo test -p ripr --lib typescript, cargo clippy and every cargo xtask gate were not run. Every Rust-level statement above comes from reading source at the reviewed SHA 9d38140148eb645fdf8ef1fc1b17abd35bb71f11, from main-tip source at a69bf0214, or from hosted job logs - never from a local run.
  • The candidate's own TypeScript surface did not execute in any lane I read: the Rust gates job failed at step 16, before the test lanes, and the Rust-only lane failed on the base-side LSP test and the two cli_smoke cases above. That the two new tests discriminate is a reading of what they assert, not an observed pass.
  • The PR body's local receipts are the author's claims; I could not re-run them and did not treat them as evidence for the disposition.
  • I did not run a combined-tree build of main merged with this head; the base-attribution rests on the file-level causal chain and the identical base-job failure, which is what I state above rather than a local reproduction.
  • No runtime or mutation execution was performed; every exposure statement here is static.
  • No repository file was modified, no build was run, and no HEAD-moving git command was executed.

Reviewed by an independent Mavis review agent on behalf of the maintainer; bound to head 9d38140148eb645fdf8ef1fc1b17abd35bb71f11. Not an approval.

@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.

Reporter summary

No actionable code or security defect was identified: the changed comments match the implemented same-directory, bounded extends behavior, the partial-overlap fixture appears to pin whole-object replacement, and the 8/9-hop fixture creates eight or nine followed extends edges consistently with MAX_EXTENDS_DEPTH = 8. The decisive unresolved objection is execution evidence: ripr failed and the late cargo-test receipt timed out after 900 seconds, so the PR body's claimed focused test pass cannot be independently confirmed. Repository-wide sibling-loader consistency also remains unverified; this is an evidence gap rather than a demonstrated defect.

@EffortlessSteven

Copy link
Copy Markdown
Member Author

Final exact-head review at 184266c (owner-refreshed with current main): REVIEW_READY. Candidate delta unchanged from the reviewed 5579fce — 4 comment fixes + 2 boundary tests in tsconfig.rs, no production change. New-head verification: 57 tsconfig tests pass locally, check-process-policy passes, previously-failing inherited gates (python guard, rust-only trio) pass locally on this tree. Hosted qualification green (run 41281542528 success), zero failing checks, zero unresolved threads, both inherited-failure triages recorded on this PR (#11918 landed, #12014-tracked trio fixed via #11995, process-policy via #12027). Disposition: approve squash merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant