Skip to content

fix(typescript): omit runner-unresolved when the runner is already known - #8058

Merged
EffortlessSteven merged 1 commit into
mainfrom
cursor/ts-runner-unresolved-no-related-test-899c
Oct 15, 2026
Merged

EffortlessSteven merged 1 commit into
mainfrom
cursor/ts-runner-unresolved-no-related-test-899c

Conversation

@EffortlessSteven

@EffortlessSteven EffortlessSteven commented Oct 15, 2026 •

Copy link
Copy Markdown
Member

Summary

Closes #7646.

When a TypeScript finding has no related test, the preview adapter used to stamp typescript_package_limitation: typescript_test_runner_unresolved even if discovery had already emitted typescript_test_runner: vitest. Explain and JSON then contradicted each other: the runner was both detected and "unresolved."

Contract change (explicit): typescript_test_runner_unresolved is no longer emitted whenever verify_command_for_discovery returns None. That name is reserved for a truly unknown runner (neither framework_hint nor runner_hint resolved). For the no-related-test case, the limitation is omitted rather than inventing a new code such as typescript_verify_command_unresolved. The same omission applies when mocha is detected but has no file-target command mapping: the runner is known, so the unresolved name must not sit beside typescript_test_runner: mocha. This supersedes the #4096 mocha "emit whenever command is None" adapter rule for known runners. docs/OUTPUT_SCHEMA.md is intentionally not updated in this PR (fenced); the code comment at the injection site is the in-tree statement of the new rule.

The issue suggested a new limitation code plus an evidence-promotion-honesty corpus pin. This PR takes the narrower owning-user direction: leave the no-related-test case silent, keep unit tests, and do not move goldens or corpus.json.

Owner / governing claim: #7646
Candidate: PR #8058 / 5b8b8a9d7 / reviewed basis 5a14b977 / GitHub merge subject 4090f78d (parents 5a14b977 + 5b8b8a9d, tree bca8d4ab)
Review: published-head REVIEW_READY COMMENT on 5b8b8a9d7; CodeRabbit OUTPUT_SCHEMA thread resolved; github-actions comment nit classified non-blocking
Validation: focused adapter tests pass; cargo xtask precommit pass; hosted Rust-only feature lane / source-of-truth / paste / cargo-deny / ub-review / wheel success. Skipped-by-policy lanes named, not counted as pass. Gemini review quota missing.
Dependency: none
Next: Ready then protected squash merge of exact head 5b8b8a9d7

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-0085-typescript-evidence-adapter-contract.md (verify-command / runner-unresolved)
ADR:
Plan item:
Governing issue or accepted claim: #7646
Acceptance delta (one sentence): known typescript_test_runner: <name> findings no longer also carry typescript_test_runner_unresolved; that limitation remains only when the runner is actually unknown.

Candidate Relationships

Candidate branch (GitHub PR head is authoritative after publication): cursor/ts-runner-unresolved-no-related-test-899c
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): n/a
Accepted winner and losing candidate disposition (when decided): n/a

Scope

TypeScript preview adapter evidence injection in crates/ripr/src/analysis/language/typescript/mod.rs: emit typescript_test_runner_unresolved only when both framework and package-manager runner are unknown.

Scope Classification

This PR is scoped by:

  • One production behavior
  • One public contract
  • One architectural seam
  • Docs/spec/test-only evidence package
  • Other:

Production delta:

  • Adapter no longer labels a known runner as unresolved when the inferred verify command is None because there is no related test (or mocha has no file-target command mapping).

Evidence/support delta:

  • Unit tests for vitest + no related test (omit), unknown runner (still emit), and mocha detected (omit). Traceability entries under RIPR-SPEC-0085.

Single acceptance criterion:

  • A vitest-detected finding with empty related_tests carries typescript_test_runner: vitest and does not carry typescript_test_runner_unresolved or typescript_verify_command.

Non-goals:

Support-tier Impact

  • none
  • updates docs/status/SUPPORT_TIERS.md
  • changes a README, release, docs, CLI, JSON, editor, CI, or package claim

Claim/proof notes:

  • TypeScript remains preview. This is an honesty fix for one named limitation, not a support-tier change. OUTPUT_SCHEMA is fenced and still describes the older "emitted when verify_command_for_discovery returns None" wording; this PR's code comment and body are the current contract.

Policy Impact

  • none
  • doc artifacts
  • CI lane
  • package boundary
  • lint / Clippy
  • no-panic
  • file policy
  • generated artifact
  • dependency
  • process/network

Ledger or exception notes:

  • Traceability only: three RIPR-SPEC-0085 test pointers added.

Proof

cargo test -p ripr --lib --features lang-typescript -- \
  vitest_without_related_test_omits_runner_unresolved_limitation \
  unknown_runner_emits_runner_unresolved_limitation \
  mocha_no_lockfile_omits_runner_unresolved_when_mocha_detected \
  delta5_verify_command_stays_in_missing_list_when_runner_unresolved
cargo xtask precommit

Result, failures, or skipped proof:

  • Focused tests: 4 passed on candidate 5b8b8a9d7.
  • cargo xtask precommit: pass (exit 0) on the same head. Goldens were not regenerated; no TypeScript golden or corpus.json moved.
  • Hosted: Rust-only feature lane, source-of-truth, paste-ubuntu/macos/windows, cargo-deny, ub-review, dependency-review, wheel inspect, spec-maintenance-digest succeeded on 5b8b8a9d7. Skipped-by-policy (not passed): droid, future-clippy, Perl and release proof, msrv, vscode, rust-coverage, rust-tests-junit, windows-advisory (full), pinned MCP advisory.

Claim Boundary

What may be claimed after this PR? What must not be claimed yet?

  • May claim: known TypeScript runner names no longer co-appear with typescript_test_runner_unresolved on adapter-injected findings; unknown runners still get the limitation; no verify command is invented.
  • Must not claim: a new named "no related test" limitation; OUTPUT_SCHEMA already rewritten; golden/corpus coverage of this case; mocha now has a file-target verify command; TypeScript support-tier promotion.

Rollback

Revert this PR. The change is confined to adapter evidence injection plus unit tests and traceability pointers.

Spec-Test-Code Traceability

  • Spec: RIPR-SPEC-0085
  • Tests: vitest_without_related_test_omits_runner_unresolved_limitation, unknown_runner_emits_runner_unresolved_limitation, mocha_no_lockfile_omits_runner_unresolved_when_mocha_detected
  • Code: crates/ripr/src/analysis/language/typescript/mod.rs, package.rs
  • Golden outputs: none (intentionally unchanged)
  • Metrics: n/a
  • ADR/learning: n/a

Static Language Check

  • Static output avoids killed, survived, untested, proven, and adequate.
  • Unknowns include stop reasons where applicable.

CI Economics

  • LEM impact: n/a
  • Workflows touched: n/a
  • Branch protection impact: n/a
  • Failure mode caught: n/a
  • Cheaper signal considered: adapter unit tests
  • Required lanes affected: ordinary PR CI
  • Advisory lanes affected: n/a
  • On-demand/release lanes affected: n/a
  • Labels that alter behavior: n/a
  • Artifact families affected: n/a
  • Rollback path: revert PR

Engineering Check

  • No new panic, unwrap, expect, todo, or unimplemented in production code.
  • No new panic, unwrap, expect, todo, or unimplemented in tests.
  • New non-Rust programming files are allowlisted with owner, surface, and reason.
  • New generated, dependency, process-spawn, or network surfaces are allowlisted with owner and reason.
  • Errors are reported with actionable context.
  • Public JSON/schema changes are documented.

Public JSON/schema: behavior of an existing limitation kind narrowed; OUTPUT_SCHEMA fenced and not edited in this PR.

Gates

  • local cargo xtask precommit (pass)
  • hosted Rust-only feature lane and other succeeded jobs on 5b8b8a9d7
  • Skipped-by-policy lanes listed in Proof, not claimed as pass
Open in Web Open in Cursor 

Reserve typescript_test_runner_unresolved for a truly unknown runner.
When vitest (or mocha) is already detected but no verify command can be
built, leave the limitation out instead of contradicting
typescript_test_runner: <name>. Closes #7646.

Co-authored-by: Steven Zimmerman, CPA <EffortlessSteven@users.noreply.github.com>
@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 15, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Summary by CodeRabbit

  • Bug Fixes
    • TypeScript analysis no longer reports an unresolved test-runner limitation when it detects a framework or package-manager runner, even if it cannot infer a verification command. The limitation remains reported when the runner is unknown.
  • Documentation
    • Clarified the distinction between an unknown runner and a known runner with no related test available to target.

Walkthrough

The TypeScript adapter now reports an unresolved test runner only when it cannot detect a framework or package-manager runner. Tests cover detected and unknown runners when no verify command is available.

Changes

TypeScript runner disclosure

Layer / File(s) Summary
Runner limitation condition
crates/ripr/src/analysis/language/typescript/mod.rs, crates/ripr/src/analysis/language/typescript/package.rs
The adapter now requires both framework and runner hints to be absent before it adds typescript_test_runner_unresolved. The documentation distinguishes an unknown runner from a missing related test target.
Runner limitation tests
crates/ripr/src/analysis/language/typescript/tests.rs, .ripr/traceability.toml
Tests check that detected Mocha and Vitest runners do not produce the limitation when no verify command is available. A test with an unknown runner checks that the limitation remains. The traceability entry lists the three tests.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~12 minutes

Change: Bug fix · Severity of issue fixed: Low

Merge Risk: 🔵 Low · up to 5b8b8

The adapter’s public documentation should be corrected to describe the new behavior. This mismatch is bounded and does not appear to block merging.

Security architecture risk: 🔵 Low · up to 5b8b8

The change narrows an advisory diagnostic without granting execution authority. Published output guidance still describes the older behavior, and the full comparison against the PR base could not be verified.

Retained concerns
No architecture-level concerns identified.

Security review details

Security Blast Radius

  • inferred — For the inspected change, repository-controlled discovery signals can alter advisory output, but omission of this limitation does not confer additional execution or packet-promotion authority. The demonstrated effect is on consumers of TypeScript finding evidence, not a new privileged entrypoint.

Trust Boundaries and Controls

  • observed — Missing verify-command evidence prevents TypeScript GapRecord projection. Preview actionability consequently remains not ready; successful projection and shared packet validation, rather than absence of this package limitation, govern readiness. This independently blocks the hypothesized omission-to-promotion bypass.

Resilience and Maintainability Implications

  • observed — The added Vitest case checks that a known runner without related tests produces neither a verify command nor the unresolved-runner limitation. The unknown-runner control checks that no command is fabricated and the limitation remains present. These assertions preserve the distinction between runner recognition and executable verification evidence; they were inspected, not executed.
Pre-merge checks: Passed 5
Passed Passed checks: 5 passed
Check name Status Explanation
Linked Issues check Passed Issue #7646 requires that known TypeScript runners do not co-occur with typescript_test_runner_unresolved, and that the limitation remains for an unknown runner. The supplied change summary reports …
Out of Scope Changes check Passed The reported changes are limited to TypeScript adapter evidence injection, related unit tests, documentation comments, and three traceability entries. These changes directly support #7646. The summary…
Docstring Coverage Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 2 files. (2 skipped: 1 …
Title check Passed The title clearly and concisely describes the main TypeScript behavior change: omit the unresolved-runner limitation when the runner is already known.
Description check Passed The description is complete and follows the repository template. It documents the scope, contract change, tests, proof, claim boundary, rollback, traceability, policy impact, and intentionally skipped…
✨ 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

I’m a rabbit, checking runners in the code,
Mocha and Vitest show a known road.
No test target? No command appears.
Unknown runner still raises its flag,
I hop through tests and leave things clear.

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

coderabbitai[bot]

This comment was marked as resolved.

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

Author self-review of exact head 5b8b8a9d7d8bba1ee888d4abf17baf49a593ff30 (GitHub cannot request changes from the author; COMMENT is not approval).

reviewed_head_sha: 5b8b8a9d7d8bba1ee888d4abf17baf49a593ff30
integration_basis: origin/main at branch time b4b2bcbbc; GitHub PR base currently 5a14b977 (behind-only; no restack)
claim_boundary: typescript_test_runner_unresolved only when framework_hint and runner_hint are both absent; no new limitation code for empty related_tests; OUTPUT_SCHEMA/goldens/corpus fenced
changed_surfaces_and_semantic_owners_inspected: TypeScript preview adapter evidence injection (mod.rs), verify_command_for_discovery comment (package.rs), adapter unit tests (tests.rs), RIPR-SPEC-0085 traceability pointers. Consumers: finding.evidence / explain / JSON. Did not inspect classify/*, owner_pin, check.rs, probes/diff.rs, oracles/scan.rs, output/pilot/*.
blocking_findings: none on source/oracle for this claim
non_blocking_suggestions: mocha test still duplicates AnalysisOptions instead of using analyze_ts_probe_at_threshold; OUTPUT_SCHEMA still has the older "emitted when verify_command_for_discovery returns None" sentence (explicit fence; tracked as residual)
refuted_or_stale_findings: CodeRabbit #discussion_r4278981189 asking to edit OUTPUT_SCHEMA in this PR — out of scope by the #7646 fence; reply posted
proof_and_ci_observed: local focused tests 4 passed; cargo xtask precommit exit 0; hosted required checks still in flight (Rust-only feature lane, windows-advisory-subset, ub-review, Linux x64 wheel in progress). Gemini review quota exhausted (missing for that provider, not a clean review).
proof_or_review_missing: hosted required-check completion for this exact head; OUTPUT_SCHEMA wording follow-up
affected_currentness_dimensions: production implementation, test stimulus, test oracle, public claim (PR body + code comment), generated relationships (traceability only)
residual_assumptions_and_non_claims: no golden/corpus lock of this honesty case; mocha still has no file-target command; TypeScript stays preview; deleted-line findings still skip verify-command injection (pre-existing)
disposition: REVIEW_INCOMPLETE until hosted required checks on this exact head are current; source and oracle inspection found no blocker. Not REVIEW_READY for merge convergence yet.

Oracle challenge: unknown_runner_emits_runner_unresolved_limitation rejects a no-op that always omits the limitation. vitest_without_related_test_omits_runner_unresolved_limitation rejects the old always-on-None behavior. mocha_no_lockfile_omits_runner_unresolved_when_mocha_detected rejects “omit only when related_tests is empty.” All three go through TypeScriptAdapter::analyze_diff.

@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

  • crates/ripr/src/analysis/language/typescript/mod.rs:604 — New block comment names '#7646' and lists example runners (vitest, mocha, npm lockfile) but does not enumerate the full runner_hint set. If runner_hint later resolves to a value without a known evidence-name mapping, the gate framework_hint.is_none() && runner_hint.is_none() still fires correctly, but the comment should note that the omission rule is keyed on hint presence, not on evidence-name availability.

Verification questions

  • Confirm traceability pointer for #7646 limited to three additions in tests.rs; no production-gate test for mocha+known-runner negative is duplicated under a new name — mocha_no_lockfile_omits_runner_unresolved_when_mocha_detected replaces the old positive test rather than adding a parallel case.

Refuted

  • Renaming mocha_no_lockfile_emits_runner_unresolved_limitation to ..._omits_..._when_mocha_detected could leave a dead test name in traceability; refuted because: .ripr/traceability.toml under RIPR-SPEC-0085 only adds the three new test pointers; the old mocha_no_lockfile_emits_runner_unresolved_limitation is not listed in the visible TOML fragment. Need to confirm old name was not pinned anywhere else (corpus.json, goldens, or other spec entries) to avoid orphan reference.
  • The new tests could pass as a no-op by always omitting the limitation.; refuted because: unknown_runner_emits_runner_unresolved_limitation explicitly asserts the limitation is present when neither framework_hint nor runner_hint resolves; a blanket omit would fail that test. vitest test additionally asserts typescript_test_runner: vitest must appear.
  • Helper helper would need to grow a tri-state or split into two functions to express runner-unknown vs target-missing.; refuted because: Rejected: the empty-iterator path still returns None, and the adapter is the right place to distinguish the two cases via pkg_discovery hints; no helper expansion needed.
  • The new else-if condition is asymmetric and may incorrectly suppress typescript_test_runner_unresolved when framework_hint is None but runner_hint is Some (e.g., yarn detected via lockfile with no framework).; refuted because: verify_command_for_discovery returns None iff both framework_hint.is_none() and runner_hint.is_none(); the adapter's identical conjunction is equivalent by construction, so the known-runner+no-related-test case still omits the limitation as intended.

Parked follow-ups

  • OUTPUT_SCHEMA.md drift is explicit and fenced: schema still describes old rule but PR body + in-tree code comment are the new contract.

Evidence gaps

  • Model proof intent was rejected by deterministic validation.

@EffortlessSteven

Copy link
Copy Markdown
Member Author

Reply to the github-actions review on 5b8b8a9d7 (#discussion none; review 5528054839).

mod.rs:604 comment vs hint-presence gate — non-blocking. The gate is framework_hint.is_none() && runner_hint.is_none(); vitest/mocha/npm in the comment are examples, not the enumerated authority. I am not pushing a comment-only tweak while required checks run.

Verification: mocha_no_lockfile_omits_runner_unresolved_when_mocha_detected replaced the old positive test. Repo-wide search finds no remaining mocha_no_lockfile_emits_runner_unresolved_limitation in traceability, goldens, or corpus.json. RIPR-SPEC-0085 gained the three new pointers only.

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

Published-head review-pr re-entry on exact head 5b8b8a9d7d8bba1ee888d4abf17baf49a593ff30 after hosted evidence completed. Author self-review uses COMMENT; that is not approval.

reviewed_head_sha: 5b8b8a9d7d8bba1ee888d4abf17baf49a593ff30
integration_basis: GitHub PR base 5a14b977; merge ref 4090f78d parents [5a14b977, 5b8b8a9d] tree bca8d4ab (clean two-parent subject; behind-only vs original branch base, no restack)
claim_boundary: typescript_test_runner_unresolved only when both framework_hint and runner_hint are absent; no new limitation code; OUTPUT_SCHEMA/goldens/corpus fenced
changed_surfaces_and_semantic_owners_inspected: TypeScript adapter evidence injection, package.rs comment, adapter unit tests, RIPR-SPEC-0085 traceability. Consumers: finding.evidence / explain / JSON.
blocking_findings: none
non_blocking_suggestions: OUTPUT_SCHEMA still has the older None-means-unresolved sentence (fenced residual); github-actions comment-example nit classified non-blocking
refuted_or_stale_findings: CodeRabbit OUTPUT_SCHEMA in-PR edit — replied, thread resolved (is_resolved=true)
proof_and_ci_observed: local focused tests + precommit pass; hosted success includes Rust-only feature lane, source-of-truth, paste-ubuntu/macos/windows, cargo-deny, ub-review, dependency-review, wheel inspect, spec-maintenance-digest. Skipped-by-policy (not passed): droid, future-clippy, Perl and release proof, msrv, vscode, rust-coverage, rust-tests-junit, windows-advisory (full), pinned MCP advisory. Gemini review quota exhausted = missing for that provider.
proof_or_review_missing: classic branch-protection JSON 403 (evidence gap, not absence of protection); OUTPUT_SCHEMA wording follow-up
affected_currentness_dimensions: exact-head CI/receipts refreshed; implementation/oracle/public-claim unchanged
residual_assumptions_and_non_claims: TypeScript stays preview; no golden/corpus lock; mocha still has no file-target command
disposition: REVIEW_READY

@EffortlessSteven
EffortlessSteven marked this pull request as ready for review October 15, 2026 04:38
@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!

@devin-ai-integration devin-ai-integration 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.

Devin Review found 2 potential issues.

Devin Review

@EffortlessSteven

Copy link
Copy Markdown
Member Author

Devin Review (commit 5b8b8a9d7): two threads, both treated as non-blocking for this head.

  1. Schema/spec wording — same residual as the resolved CodeRabbit OUTPUT_SCHEMA thread. SPEC-0085 still describes unresolved/ambiguous runners; OUTPUT_SCHEMA remains fenced. Replied on #discussion_r4279068941.
  2. Missing changelog.d fragment — notable JSON/output honesty change, deferred to the next release-cut Unreleased Fixed inventory as ux(evidence): typescript_test_runner_unresolved fires alongside typescript_test_runner: vitest when the runner resolved but no related test exists #7646 / fix(typescript): omit runner-unresolved when the runner is already known #8058 per docs/PR_AUTOMATION.md (presence is reviewer-owned; check-changelog-fragments does not require it). Not pushing a new head while Ready-triggered Ripr Rust Small is in flight. Replied on #discussion_r4279069001.

Waiting on Ripr Rust Small on GitHub Hosted / Rust gates (run 38682545268) before squash-merge of exact head 5b8b8a9d7.

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

reviewed_head_sha: 5b8b8a9
integration_basis: 77107f1
claim_boundary: typescript_test_runner_unresolved only when both framework_hint and runner_hint are absent; no new limitation code; OUTPUT_SCHEMA/goldens/corpus fenced (#7646)
changed_surfaces_and_semantic_owners_inspected:

  • crates/ripr/src/analysis/language/typescript/mod.rs: adapter evidence injection
  • crates/ripr/src/analysis/language/typescript/package.rs: package detection comment
  • crates/ripr/src/analysis/language/typescript/tests.rs: adapter unit tests
  • .ripr/traceability.toml: RIPR-SPEC-0085 traceability
    blocking_findings: []
    non_blocking_suggestions:
  • OUTPUT_SCHEMA wording update follow-up
    refuted_or_stale_findings: []
    proof_and_ci_observed:
  • Devin Review: pass
  • CodeRabbit: pass
  • Ripr Rust Small Result: pass (run 38682545268)
    proof_or_review_missing: []
    affected_currentness_dimensions:
  • merge_tree: clean merge with origin/main (tree 3561d1eceb0cd51413cf691fae384efc0740df7e)
  • review_threads: all resolved
    residual_assumptions_and_non_claims:
  • TypeScript stays preview; mocha still has no file-target command
    disposition: REVIEW_READY

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.

ux(evidence): typescript_test_runner_unresolved fires alongside typescript_test_runner: vitest when the runner resolved but no related test exists

2 participants