Repository navigation
fix(typescript): prune reference-output trees from the workspace walk - #12285
Conversation
|
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 3 minutes. View limit details
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Define TypeScript path exclusions crates/ripr/src/config/typescript.rs, changelog.d/11984-ts-walk-prune-reference-output.md |
The shared path predicate recognizes __snapshots__, baselines/reference, and baselines/local. Bare baselines, reference, and local paths remain eligible. The changelog describes these exclusions and the existing limitation for skipped changed files. |
Apply exclusions during workspace discovery crates/ripr/src/analysis/language/typescript/discovery.rs |
The walker checks root-relative paths before descending. A declared handwritten file beneath an excluded path keeps that path reachable. Tests cover the excluded paths, ordinary baselines sources, and candidate limits. |
Verify capped discovery results crates/ripr/tests/typescript_truncated_discovery.rs |
The integration fixture supports documentation and baseline-reference workspace shapes. A capped walk over baseline-reference files completes with no_static_path, no static-limit kind, and a complete analysis outcome. |
Estimated code review effort: 3 (Moderate) | ~20 minutes
Merge Risk: 
Minimal · previous review 9b4ee
-
The change prunes TypeScript output trees; changed files under them retain the existing exclusion limitation. No merge-blocking risk is established.
Pre-merge checks: 
4 · 
1
-
Failed checks: 1 warning Passed checks: 4 passed-
Full details: Description check
-
Explanation
The description is comprehensive and follows the required template. It documents scope, source boundary, acceptance criteria, tests, proof results, non-goals, rollback, policy impact, and claim boundaries. Some repository-wide gates remain unchecked or pending, but this does not make the description incomplete.
-
Full details: Docstring Coverage
-
Explanation
Docstring coverage is 75.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 12 functions across 3 files. (1 skipped: 1 unsupported.)
Resolution
Write docstrings for the functions missing them to satisfy the coverage threshold.
-
Finishing Touches
-
Generate docstrings
-
- Commit to this branch
- Create a new PR
Generate unit tests (beta)
-
- Commit to this branch
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
A rabbit checks the paths at dawn,
And skips the trees marked for exclusion.
Bare baselines stay in view,
Handwritten leaves still make it through.
Tests count each hop along the way,
Then twitch their noses: paths behave today.
EffortlessSteven
left a comment
There was a problem hiding this comment.
Author COMMENT review of exact head after merging origin/main (REVIEW_INCOMPLETE for hosted checks).
Inspected: is_detectable_excluded_typescript_path (shared walk + diff-loop authority), visit_workspace_with_handwritten directory prune, handwritten ancestor keep, and the new discovery/config/producer tests.
Disposition: no blocking source or oracle defect on this head. Path-shaped baselines/reference and baselines/local plus name-table __snapshots__ are the intended rule; a bare baselines directory stays source. Existing generated/excluded-path limitation names skipped changed files; no schema field added. #11767 truncated-walk producer still trips on the docs tree.
This is not approval. Hosted Ripr Rust Small Result and bot threads remain missing until merge-ready.
|
Merged |
|
Merged |
|
Merged |
There was a problem hiding this comment.
Reporter summary
No independently validated blocking defect was found, but approval is unsupported: the only scheduled cargo-test receipt timed out after 900 seconds, ripr failed with exit code 2, and the author-reported passing tests are not independently linked to the exact current HEAD. The main unresolved product risk is that the shared path predicate excludes any consecutive baselines/reference or baselines/local components, plus any __snapshots__, so it may hide legitimate source or changed files in unrelated layouts; symlink traversal semantics are also unverified. Evidence therefore supports retaining the prior no-blocking-defect observation only as lower-confidence, with trust-affecting validation and path-policy gaps remaining.
|
Reply to ub-review on Path predicate: this is the #11984 item 2 rule. Consecutive The scheduled cargo-test 900s timeout and Symlink following is unchanged: discovery still counts skipped links without following them. The path-shaped prune runs on directory relative paths after Waiting for the in-progress ub-review job to go terminal, then Ready + |
|
Merged |
There was a problem hiding this comment.
Decision
- Needs verification checks before upstream.
Verification questions
- Confirm the candidate cap test does not prove that pruning occurs before the source cap, because the fixture has only 80 baseline files while the cap is 5 and traversal order is unspecified.
- Confirm the integration fixture proves a completed walk for the baseline shape, but its expected source set is not asserted.
- Confirm the shared route excludes
baselines/reference,baselines/local, and__snapshots__before candidate counting, while preserving ordinarybaselinespaths.
Parked follow-ups
- The tests do not directly prove the changelog claim that both reference and local trees are pruned at production scale; scale remains inferred from unit and one reference-only producer fixture.
Evidence gaps
- Exact-head execution proof is unavailable in the cached evidence.
- Model proof intent was rejected by deterministic validation.
- The unit and producer tests discriminate the intended old/new behavior, but their actual red/green execution is supported only by author comments.
- Focused unit and producer-path tests exercise the changed exclusion behavior, but the scheduled cargo-test receipt is absent and ripr exited 2.
- The late cargo-test receipt remains absent and the ripr sensor failed, so the PR's focused passing-test claims are not independently established by this review packet.
- Current-HEAD executable test evidence is not independently available in the review packet.
|
Reply to ub-review on Verification:
Parked scale: the optional 50k-entry tree was not materialized. The unit fixture uses 80 baseline files and the entry bound. ub-review cargo-test timeout / Waiting for the in-progress ub-review job to go terminal, then Ready + |
|
Merged |
There was a problem hiding this comment.
Decision
- Needs one verification check before upstream.
Verification questions
- Confirm the producer integration test proves completion for the reference-tree shape but does not directly prove that the intended source files were indexed.
Parked follow-ups
- The path rule intentionally hides any legitimate source nested under a consecutive baselines/reference or baselines/local pair, regardless of whether it is generated output.
Evidence gaps
- Exact-head executable evidence is not available in the cached review packet, although the author reports focused tests passing.
- Model proof intent was rejected by deterministic validation.
- Independent execution proof for the current HEAD is unavailable.
- Exact-head executable cargo-test evidence is unavailable because the scheduled receipt is absent and the ripr sensor failed.
- The changelog and tests align with the intended behavior, but exact-head independent cargo-test evidence is absent from the cached receipts.
- The cap test discriminates old from new behavior rather than merely relying on traversal order: 80 baseline candidates exceed cap 5, and the asserted file set plus entry bound require pruning.
|
Reply to ub-review on Producer integration: Parked path rule: hiding nested source under a consecutive Waiting for the in-progress ub-review job to go terminal, then Ready + |
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
|
merge-ready @ cfb4e9b |
There was a problem hiding this comment.
Parked follow-ups
- The producer integration case establishes completed analysis for the reference-tree shape, but the unit test—not the producer case—asserts the indexed source set.
- The changed rule excludes any source nested beneath consecutive baselines/reference or baselines/local components, not only compiler-generated output.
- TypeScript source-presence detection still uses only the name table, so a tree containing only baselines/reference TypeScript can activate the adapter and then produce an empty scan.
Evidence gaps
- Model proof intent was rejected by deterministic validation.
- Exact-head executable validation is unavailable in the cached review packet.
- The focused unit and producer tests discriminate the intended prune, but exact-HEAD executable evidence is unavailable because cargo-test has no receipt and ripr exited 2.
- Exact-head executable validation is not independently available: cargo-test is receipt-absent and ripr failed with exit code 2.
|
Shard 1 and the rust-only feature lane both fail That catalog row is
|
TypeScript workspace discovery and the diff loop now skip baselines/reference, baselines/local, and __snapshots__ through the shared excluded-path helper, so a large compiler clone does not spend the candidate cap on reference output before src/ is indexed. A bare baselines directory stays ordinary source. Declared handwritten files under a pruned tree stay reachable. The #11767 truncated-walk refusal is unchanged. Advances #11984. Co-authored-by: Steven Zimmerman, CPA <EffortlessSteven@users.noreply.github.com>
cfb4e9b to
ee5e88c
Compare
|
Process finisher (blocked on label ACL) Rebased onto current This agent token cannot remove/add labels ( Needed: remove Review: sole inline thread (Devin detection-alignment) already refuted + resolved; out of scope for #11984 item 2. |
|
merge-ready @ ee5e88c |
There was a problem hiding this comment.
Parked follow-ups
- The path rule intentionally excludes any consecutive baselines/reference or baselines/local components, including unrelated layouts; this is a documented policy risk rather than an implementation mismatch.
- No-config TypeScript detection can still activate from a TypeScript file located solely beneath baselines/reference, although the workspace scan then contains no admissible TypeScript files; this is outside the changed walk/diff contract.
- The path-pair rule intentionally excludes any consecutive baselines/reference or baselines/local components, including unrelated layouts, while preserving bare baselines directories and explicit reference.ts/local.ts files.
- The path-shaped exclusion is intentionally broader than compiler-generated output and can hide legitimate nested source under any consecutive baselines/reference or baselines/local pair.
- The new producer case proves completion for the baseline shape, while source membership is asserted separately by the unit test.
Evidence gaps
- Independent exact-head executable validation remains unavailable.
- Model proof intent was rejected by deterministic validation.
- The changed unit and producer fixtures exercise the intended discrimination, but the cached packet lacks independent exact-head cargo-test execution.
…#12285) Exact-head review (opencode, head ee5e88c): REVIEW_READY. Result+gates SUCCESS on exact head; mergeable CLEAN; 1/1 threads resolved. Walk/diff-loop prune parity via shared helper (baselines/reference+local path-shaped prune, #11984 item 2), #7386 hand-written escape preserved, regression test pins cap premise. Scope matches title.
Summary
Advances #11984
Prune TypeScript compiler reference-output trees (
baselines/reference,baselines/local) and Jest__snapshots__directories from the sharedworkspace walk and diff-loop refusal, so a microsoft/TypeScript-scale clone
does not spend the candidate cap or the 5× entry backstop on those trees
before
src/is indexed.Swarm / Source Boundary
This PR targets
EffortlessMetrics/ripr-swarm, the normal development trunk fortrusted same-repo
riprwork. Confirm the change belongs here:dependency, or repo-ops development for
ripr-swarmsurface
If this PR moves crates.io publishing, VS Marketplace publishing, Open VSX
publishing, GitHub Release assets, signing, release environments, or release
secrets, close or retarget it. Those surfaces belong in
EffortlessMetrics/riprunless a dedicated release-boundary change has already been approved.
Source-of-truth Links
Proposal: none
Spec: none (issue #11984 item 2)
ADR: none
Plan item: none
Governing issue or accepted claim: #11984
Acceptance delta (one sentence): TypeScript workspace discovery and the TypeScript/JavaScript diff loop prune
baselines/reference,baselines/local, and__snapshots__trees so large compiler clones reachsrc/under the existing cap.Candidate Relationships
Candidate branch (GitHub PR head is authoritative after publication): cursor/ts-walk-prune-reference-output-de84
Stack parent or prerequisite PR (if any): none
Proposed replacement of PR (if any; not yet accepted): none
Acceptance retained from a replaced candidate (if any): none
Accepted winner and losing candidate disposition (when decided): none
Name a stack or proposed replacement explicitly. A proposed replacement does
not make its predecessor superseded. Shared files or a shared parent issue
alone do not establish duplication. If the relationship is unknown, record it
as needing reconciliation before disposing of either PR.
Scope
visit_workspace_with_handwrittenstill walked into compilertests/baselines/reference(and
local) and Jest__snapshots__trees. After item 1 (#12031), baseline.jsfiles still counted as candidate sources and spent
RIPR_TS_MAX_WORKSPACE_FILESbefore
src/was indexed.Scope Classification
This PR is scoped by:
Production delta:
__snapshots__joinsTYPESCRIPT_EXCLUDED_DIRS(name-table prune, shared with the diff loop).baselines/referenceandbaselines/localare refused byis_detectable_excluded_typescript_pathand pruned as directories in the walk.A bare
baselinesdirectory,src/baselines/foo.ts, andsrc/baselines/reference.tsstay ordinary source.
[languages.typescript] handwritten_fileskeep a pruned ancestor reachable;siblings under that tree stay skipped.
limitation (RIPR-SPEC-0082). No new schema field.
Evidence/support delta:
discovery.rsandconfig/typescript.rs.typescript_truncated_discovery.rs.changelog.d/11984-ts-walk-prune-reference-output.md.Single acceptance criterion:
tests/baselines/reference/*.jsfiles plussrc/a.tsandsrc/a.test.tsunder a tiny cap indexessrcand is not truncated.Non-goals:
Support-tier Impact
docs/status/SUPPORT_TIERS.mdClaim/proof notes:
limitation wording. This PR does not add a schema field.
Policy Impact
Ledger or exception notes:
Command::newhelper so theprocess-policy count for this file stays at 1.
Proof
Result, failures, or skipped proof:
workspace_walk_prunes_baselines_reference_before_the_source_captruncated after indexing baseline.jsfiles;__snapshots__consumed the cap;is_detectable_excluded_typescript_pathdid not matchtests/baselines/reference/case.js.typescript_truncated_discoverytests passed (including the new producer case),cargo clippy -p ripr --all-targets -- -D warningspassed,cargo xtask precommitexit 0.main; headee5e88c3c6ee7ec9ddc6f086d99e5c6f112e346c;cargo xtask precommitexit 0 on that SHA..jsfiles under cap 5 and asserts the walk visits fewer than 40 entries.Claim Boundary
What may be claimed after this PR? What must not be claimed yet?
baselines/reference,baselines/local, and__snapshots__through the shared excluded-path helper.Rollback
How can this PR be reverted safely?
Spec-Test-Code Traceability
crates/ripr/src/analysis/language/typescript/discovery.rsmod tests;crates/ripr/src/config/typescript.rsmod tests;crates/ripr/tests/typescript_truncated_discovery.rsis_detectable_excluded_typescript_path,visit_workspace_with_handwrittenStatic Language Check
killed,survived,untested,proven, andadequate.CI Economics
Complete this section when the PR changes workflows, policy gates, branch
protection expectations, CI artifacts, report uploads, release checks, or the
cost/posture of existing lanes. Use
n/afor ordinary PRs that do not affectCI behavior.
If rollback requires branch-protection or workflow-file changes, say so here
and split the PR unless the workflow change itself is the narrow reviewed
surface. If a CI-breaking rollback would need emergency procedures because
normal CI cannot validate the revert, document that explicitly.
Engineering Check
panic,unwrap,expect,todo, orunimplementedin production code.panic,unwrap,expect,todo, orunimplementedin tests.Gates
cargo fmt --checkcargo check --workspace --all-targetscargo test --workspacecargo clippy --workspace --all-targets -- -D warnings(package-scoped:cargo clippy -p ripr --all-targets -- -D warnings)cargo doc --workspace --no-depscargo package -p ripr --listcargo publish -p ripr --dry-runcargo xtask check-static-languagecargo xtask check-doc-artifactscargo xtask check-support-tierscargo xtask check-no-panic-familycargo xtask check-allow-attributescargo xtask check-local-contextcargo xtask check-file-policycargo xtask check-covered-bycargo xtask check-executable-filescargo xtask check-workflowscargo xtask check-spec-formatcargo xtask check-spec-numberingcargo xtask check-fixture-contractscargo xtask check-generatedcargo xtask check-badge-diff-policycargo xtask check-generated-cleancargo xtask check-dependenciescargo xtask check-process-policycargo xtask check-network-policyExtension changes:
cd editors/vscode && npm cicd editors/vscode && npm run compilecd editors/vscode && npm run packageContinuation
Owner / governing claim: #11984 item 2
Candidate: branch
cursor/ts-walk-prune-reference-output-de84headee5e88c3c6ee7ec9ddc6f086d99e5c6f112e346cReview: Devin detection-alignment thread refuted + resolved; hosted Admit/Small Result pending
merge-readyre-toggle on this head (agent token lacks label ACL)Validation:
cargo xtask precommitexit 0 onee5e88c3c6Dependency: human or maintainer must remove and re-add
merge-readyto qualify rebased headNext: after green Admit + Ripr Rust Small Result on exact head, post
merge-ready @ ee5e88c3c6…; do not merge from this lane.