Repository navigation
fix(typescript): omit runner-unresolved when the runner is already known - #8058
Conversation
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>
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
EffortlessSteven
left a comment
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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_hintset. Ifrunner_hintlater resolves to a value without a known evidence-name mapping, the gateframework_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_detectedreplaces the old positive test rather than adding a parallel case.
Refuted
- Renaming
mocha_no_lockfile_emits_runner_unresolved_limitationto..._omits_..._when_mocha_detectedcould leave a dead test name in traceability; refuted because: .ripr/traceability.toml under RIPR-SPEC-0085 only adds the three new test pointers; the oldmocha_no_lockfile_emits_runner_unresolved_limitationis 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.
|
Reply to the github-actions review on mod.rs:604 comment vs hint-presence gate — non-blocking. The gate is Verification: |
EffortlessSteven
left a comment
There was a problem hiding this comment.
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
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
|
Devin Review (commit
Waiting on |
EffortlessSteven
left a comment
There was a problem hiding this comment.
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
Summary
Closes #7646.
When a TypeScript finding has no related test, the preview adapter used to stamp
typescript_package_limitation: typescript_test_runner_unresolvedeven if discovery had already emittedtypescript_test_runner: vitest. Explain and JSON then contradicted each other: the runner was both detected and "unresolved."Contract change (explicit):
typescript_test_runner_unresolvedis no longer emitted wheneververify_command_for_discoveryreturnsNone. That name is reserved for a truly unknown runner (neitherframework_hintnorrunner_hintresolved). For the no-related-test case, the limitation is omitted rather than inventing a new code such astypescript_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 besidetypescript_test_runner: mocha. This supersedes the #4096 mocha "emit whenever command isNone" adapter rule for known runners.docs/OUTPUT_SCHEMA.mdis 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.Swarm / Source Boundary
This PR targets
EffortlessMetrics/ripr-swarm, the normal development trunk for trusted same-reporiprwork. Confirm the change belongs here:ripr-swarmSource-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 carrytypescript_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-899cStack 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: emittypescript_test_runner_unresolvedonly when both framework and package-manager runner are unknown.Scope Classification
This PR is scoped by:
Production delta:
Nonebecause there is no related test (or mocha has no file-target command mapping).Evidence/support delta:
Single acceptance criterion:
related_testscarriestypescript_test_runner: vitestand does not carrytypescript_test_runner_unresolvedortypescript_verify_command.Non-goals:
corpus.jsonedits.docs/OUTPUT_SCHEMA.md,classify/*,owner_pin,cli/commands/check.rs,probes/diff.rs,oracles/scan.rs, oroutput/pilot/*edits.Support-tier Impact
docs/status/SUPPORT_TIERS.mdClaim/proof notes:
verify_command_for_discoveryreturnsNone" wording; this PR's code comment and body are the current contract.Policy Impact
Ledger or exception notes:
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 precommitResult, failures, or skipped proof:
5b8b8a9d7.cargo xtask precommit: pass (exit 0) on the same head. Goldens were not regenerated; no TypeScript golden orcorpus.jsonmoved.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?
typescript_test_runner_unresolvedon adapter-injected findings; unknown runners still get the limitation; no verify command is invented.Rollback
Revert this PR. The change is confined to adapter evidence injection plus unit tests and traceability pointers.
Spec-Test-Code Traceability
vitest_without_related_test_omits_runner_unresolved_limitation,unknown_runner_emits_runner_unresolved_limitation,mocha_no_lockfile_omits_runner_unresolved_when_mocha_detectedcrates/ripr/src/analysis/language/typescript/mod.rs,package.rsStatic Language Check
killed,survived,untested,proven, andadequate.CI Economics
Engineering Check
panic,unwrap,expect,todo, orunimplementedin production code.panic,unwrap,expect,todo, orunimplementedin tests.Public JSON/schema: behavior of an existing limitation kind narrowed; OUTPUT_SCHEMA fenced and not edited in this PR.
Gates
cargo xtask precommit(pass)5b8b8a9d7