Skip to content

rust, python, typescript: a test in another package that reaches the changed function transitively reads no_static_path (ws-test-other-crate) #12955

Open

Description

@EffortlessSteven

Requested by Steven Zimmerman · project thread

Version

ripr 0.11.0 (b80ce950e7526dd8bc98139f04f8a265256f3b06) (origin/main). Source: parity case ws-test-other-crate (generator: /mnt/project-files/parity/parity_harness.py, build()).

Minimal repro

Python (TypeScript is the same shape with wscore/src/index.ts, app/src/index.ts, app/test/t.test.ts):

  • wscore/core.py: def discount(price): if price > 100: return price - 10; return price
  • app/app.py: from wscore.core import discount and def checkout(price): return discount(price)
  • app/tests/test_t.py: assert checkout(100) == 90
  • No test under wscore/. Committed edit: price > 100 -> price >= 100 in wscore/core.py.
ripr check --base HEAD~1 --format json

Rust control: the equivalent two-crate workspace (library crate changed, the only test in a dependent crate calling it through a wrapper).

Observed vs expected

  • Rust: no_static_path 0.48. Python: no_static_path 0.4. TypeScript: no_static_path 0.4. Truth: the dependent package's test calls checkout(100), which pins the boundary, so the change is reached and exposed.
  • Expected: reach resolved across the package boundary (workspace members / import edges), result exposed (or at worst static_unknown that says the cross-package edge was not resolved). no_static_path here falsely says "no test reaches this".
  • The same-package variant (workspace case) reads exposed in Python/TS, so only the cross-package reach is missing.

Why it matters

In monorepos with a core library tested from consumer packages, every change in the core reads "no test path", which sends users to add tests that exist. A missed or false-negative gap signal, not a false exposed, but all three languages share it.

Acceptance

  • Reach follows direct import/dependency edges from a test's package into the changed package within the configured workspace.
  • Fail-closed: an unresolved cross-package edge yields static_unknown/reach unknown, never no_static_path; the class is corrected only when the edge is resolved.
  • No loosening of validate_agent_gap_record_packet.
  • Negative control: a package that does not import the changed one still reads no_static_path.

Activity

  1. coderabbitai commented on Nov 4, 2026

    @coderabbitai
    🔗 Related PRs

    #12570 - fix(analysis): withhold no_static_path when dependent crates host tests (Advances #5395) [open]


    📝 Issue Planner

    Check the box below or use the @coderabbitai plan command to generate an implementation plan and prompts that you can use with your favorite coding assistant.

    • Create Plan

    🧪 Issue enrichment is currently in open beta.

    You can configure auto-planning by selecting labels in the issue_enrichment configuration.

    To disable automatic issue enrichment, add the following to your .coderabbit.yaml:

    issue_enrichment:
      auto_enrich:
        enabled: false

    💬 Have feedback or questions? Drop into our discord!

  2. added
    status/needs-work
    on Nov 4, 2026
  3. EffortlessSteven commented on Nov 8, 2026

    @EffortlessSteven
    MemberAuthor

    Claim (TypeScript part only): the "Support TypeScript monorepos" thread is taking the TS cross-package transitive-reach case (ws-test-other-crate). It starts after #11204's slice in the same thread. Rust and Python parts are not claimed. The closed #12570 looked at the Rust side.


    Generated by Claude Code

  4. EffortlessSteven commented on Nov 8, 2026

    @EffortlessSteven
    MemberAuthor

    TypeScript part: delivered on main by #13669 (45c1544, "continue the bounded caller chain across imported modules"). I'm releasing my claim and not opening a duplicate PR.

    How I verified it on current main (with the unrelated MissedTxt compile break patched locally): I ran the ws-test-other-crate shape through the production analyze_diff path. The shape is wscore/src/index.ts owner, app/src/index.ts wrapper importing '../../wscore/src/index', and app/test/t.test.ts calling checkout(100).

    The Rust and Python parts of this issue are not claimed by this thread and remain open.


    Generated by Claude Code

  5. EffortlessSteven commented on Nov 8, 2026

    @EffortlessSteven
    MemberAuthor

    Claim (Python part): the "Support TypeScript monorepos" thread is taking the Python ws-test-other-crate case. The target is the same fail-closed shape #13669 gave TypeScript: a test in another package that reaches the changed function through an imported wrapper reads static_unknown with the wrapper named, never no_static_path. Negative controls stay no_static_path.

    Rust part: I'm not claiming it, because #13059 (open, merge-ready) already delivers the Rust fail-closed reading (static_unknown under rust_dependent_crate_reach_unresolved when dependent crates host tests). I'll check the Rust repro against #13059 once it lands rather than build a parallel mechanism.


    Generated by Claude Code

  6. EffortlessSteven commented on Nov 11, 2026

    @EffortlessSteven
    MemberAuthor

    Reconciled against main cb95c5b0: partly delivered. Label moved from status/needs-work to status/partial.

    Landed

    • TypeScript, fail-closed reading: PR fix(typescript): continue the bounded caller chain across imported modules (#13592 B1) #13669, squash 45c15446. Read on main now: crates/ripr/src/analysis/language/typescript/tests/cross_module_entry_tests.rs asserts the "only through cross-module callers" line. As the 2026-11-08 comment records, the result is static_unknown naming the wrapper, not exposed; a namespace-import wrapper (core.discount(...)) still reads no_static_path.

    Residual

    Claim
    The Python claim of 2026-11-08T19:19Z is more than two days old and its PR has been idle since 2026-11-09T11:08Z, so PR #13890 is eligible to be joined and finished at the head above. The Rust part is free to take. Preserved Rust work: closed PR #13059 at the head above (join or revive it rather than restart).


    Generated by Claude Code

  7. added and removed
    status/needs-work
    on Nov 11, 2026
  8. EffortlessSteven commented on Nov 17, 2026

    @EffortlessSteven
    MemberAuthor

    Reconciliation after #13890 landed as bef2d25:

    This issue stays open for the Rust part, which follows #13974.


    Generated by Claude Code

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions