Skip to content

analysis(rust): discover a bounded producer-backed test candidate set for the first v2 requirement seam #1680

Open

Description

@EffortlessSteven

Parents

Dependencies

Purpose

Implement the smallest requirement-aware seam-to-test discovery path needed by the walking skeleton:

current requirement/evidence edge
+ canonical runtime-promotion validator seam and owner
+ configured RIPR test roots
→ finite producer-backed candidate selectors
→ stable candidate-set artifact
→ requirement-targeted preflight

The design skill and builder should receive exact selectors and relation evidence rather than a prompt to broadly search for a related test.

Relation vocabulary

Support the minimal closed relation set needed by the fixtures while preserving strength and basis separately:

DirectOwnerCall
EstablishedEntrypointRelation
EstablishedOneHopHelperChain
ExistingRequirementEvidenceEdge
ConfiguredFixtureOrCheckerOwner
NameOnly
FileProximityOnly
TokenCoincidenceOnly
OpaqueHelperOrMacro
Unknown

Default eligible candidates require a producer-backed relation. Name, path, token, opaque, and unknown relations may be returned as bounded context but cannot silently become preferred or mapped evidence.

Input identity

Bind:

repository/root and current source/head identity
requirement and evidence-edge identity
implementation-slice and seam identity
owner/operation/expected sink
required input/boundary and alternate/failure class when known
language/test registry profile
RIPR analyzer/config/schema generation
candidate/context budget

Missing or ambiguous requirement/seam/owner identity is a limitation and recovery route, not permission to search by title or test name.

Candidate output

For each selected or context-only candidate, include:

structured Rust selector and source range
candidate kind
owner/entrypoint relation and confidence basis
operation/seam match
known input/boundary facts
known observable/sink facts
current TestGripSummary reference when available
existing requirement/evidence ownership
limitations and semantic fingerprint
why selected or context-only
next preflight route
claims supported and not supported

The envelope carries:

selected / omitted / total counts
complete / partial / stale / not-evaluated state
stable candidate-set identity
overflow retrieval
one next route: run_preflight | inspect_weak | add_new_focused_test |
                resolve_seam | refresh | manual_or_unsupported

Bounded implementation

  • Reuse current Rust test index, related-test, owner/relation, seam inventory, source-fact, and cache identities where semantically compatible.
  • Query only the selected seam/owner and configured test roots.
  • Do not run Cargo, project tests, mutation testing, provider calls, network access, or full no-ledger exposure scans.
  • Cap candidates and evidence deterministically.
  • Timeout/deferred/partial analysis cannot become an empty clean set.
  • Equivalent unchanged inputs produce byte-stable normalized candidate identities across checkout roots.

Walking-skeleton cases

The candidate set should distinguish:

  • exact strong test(s) with direct or established relation;
  • deliberately weak test with a real relation but broad/missing oracle;
  • same-name or nearby wrong-owner test as context-only/rejected;
  • opaque helper/macro candidate as limited;
  • no trustworthy candidate as add_new_focused_test.

Discovery does not call the strong test discriminating; #1681-style preflight still inspects assertion/observable facts.

Acceptance

  • Direct-owner and established-helper fixtures return exact structured selectors with distinct relation bases.
  • Existing requirement-edge ownership is preserved and does not get duplicated or silently reassigned.
  • Same-name wrong-owner, file proximity, and token coincidence alone cannot create an eligible candidate.
  • The weak related test remains eligible for inspection but is clearly not credited as satisfying evidence.
  • Opaque/incomparable candidates remain limited or unordered rather than receiving an invented score winner.
  • No credible candidate returns add_new_focused_test with exact inspected scope.
  • Changed seam, owner, test source, graph, registry, config, or head invalidates the candidate set.
  • Large/overflow fixtures expose counts and complete retrieval routes.
  • Candidate generation reuses bounded indexes/caches and invokes no build/test/network/provider path.
  • Output can be consumed by workflow(codex): require multi-pass vision, seam, failure, verification, and challenge receipts before saving RIPR specs #1654 design receipts, integration(ripr): add requirement-aware targeted test-grip preflight and before/after evidence delta #1660 preflight, cargo-allow worklists, and agent/IDE references without semantic re-parsing.

Non-goals

  • no assertion/oracle sufficiency decision;
  • no whole-repository test ranking;
  • no automatic test creation or edit;
  • no requirement-policy decision;
  • no runtime proof;
  • no blocking posture for weak/opaque legacy candidates.

Claim boundary

This slice cheaply produces a finite set of tests/fixtures with producer-backed relationships to one RIPR-SPEC v2 seam. It reduces search guesswork but does not prove any candidate contains the required discriminator.

Activity

  1. coderabbitai commented on Jul 14, 2026

    @coderabbitai
    ⚠️ Possible Duplicate Issue(s)
    🔗 Related PRs

    #1612 - fix(lsp): reject ambiguous workspace roots [merged]
    #1616 - test(architecture): keep causal fixture parsing out of domain [merged]
    #1642 - feat(lsp): model analysis input identity [merged]
    #1668 - fix(analysis): normalize error variant discriminators [merged]
    #1671 - fix(lsp): retain full analysis input identity [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. EffortlessSteven commented on Jul 15, 2026

    @EffortlessSteven
    MemberAuthor

    Issue update — 2026-07-14

    Title: analysis(rust): discover a bounded producer-backed test candidate set for the fi

    Status

    This issue is part of the spec-v2 / cargo-allow / walking-skeleton wave. Based on codebase research:

    • The spec system (docs/specs/) uses RIPR-SPEC-NNNN format. Spec-v2 would introduce requirement-to-test traceability.
    • The cargo-allow adoption wave maps RIPR authorities into a cargo plugin.
    • The walking-skeleton proves the first issue-to-requirement-to-test-to-receipt loop.
    • No spec-v2 or cargo-allow code exists yet. These are new feature areas.

    Recommendations

    1. Priority: low. These are future-program issues, not current blockers.
    2. The walking-skeleton (program(spec-v2): land the first RIPR issue-to-requirement-to-test-to-receipt walking skeleton #1672) is the right starting point — it proves the full loop before scaling.
    3. Adversarial review: Spec-v2 must not become a parallel authority to the existing spec system. It should extend, not replace.
  3. EffortlessSteven commented on Jul 17, 2026

    @EffortlessSteven
    MemberAuthor

    Codebase Context & Plan Review

    Reviewed: 2026-07-17

    Current Implementation State

    Greenfield implementation for cargo-allow integration / spec-v2 skeleton.

    Relevant Files

    • xtask/src/policy/
    • docs/specs/

    Plan Review

    Greenfield issue, plan makes sense.

    Blockers

    None identified.

    Readiness Assessment

    ready-to-implement

    Next Action

    Proceed with drafting the implementation PR.

  4. EffortlessSteven commented on Jul 17, 2026

    @EffortlessSteven
    MemberAuthor

    Codebase Context & Plan Review

    Reviewed: 2026-07-17

    Current Implementation State

    Greenfield implementation for cargo-allow integration / spec-v2 skeleton.

    Relevant Files

    • xtask/src/policy/
    • docs/specs/

    Plan Review

    Greenfield issue, plan makes sense.

    Blockers

    None identified.

    Readiness Assessment

    ready-to-implement

    Next Action

    Proceed with drafting the implementation PR.

  5. EffortlessSteven commented on Jul 18, 2026

    @EffortlessSteven
    MemberAuthor

    Deep Research Follow-up

    Reviewed: 2026-07-17

    Current Implementation State

    The existing discovery paths (like in \crates/ripr/src/analysis/test_grip_evidence.rs) use \RelationReason\ (defined in \crates/ripr/src/domain/evidence.rs) which includes variants like \DirectOwnerCall, \HelperOwnerCall, \AssertionTargetAffinity, \SameTestFile, \WeakTokenSubstring. The issue proposes a refined or extended relation vocabulary (\EstablishedEntrypointRelation, \ExistingRequirementEvidenceEdge, \ConfiguredFixtureOrCheckerOwner, etc.) for the bounded producer-backed test candidate set.

    Relevant Files

    • \crates/ripr/src/domain/evidence.rs\ — defines current \RelationReason\ which differs slightly from the proposed vocabulary.
    • \crates/ripr/src/analysis/test_grip_evidence.rs\ — current candidate/evidence mapping logic.
    • \crates/ripr/src/analysis/classifier.rs\ /
      ust_index.rs\ — existing indexing and test associations.

    Plan Review

    The plan is highly coherent. Generating a bounded, relation-based candidate set directly limits guesswork and scopes tests down effectively. Refining the relation vocabulary to distinguish explicitly mapped/established links from mere file-proximity or token coincidence is crucial for deterministic preflight targeting.

    Blockers

    Requires #1678 (graph) and #1679 (TestGripSummaryV1).

    Readiness Assessment

    blocked

    Next Action

    Clarify if the new relation vocabulary in this issue completely replaces the existing \RelationReason\ enum, or if it will be a distinct type (\CandidateRelation) for the preflight candidate envelope. Blocked on #1678 and #1679.

  6. EffortlessSteven commented on Jul 18, 2026

    @EffortlessSteven
    MemberAuthor

    Status review (2026-07-17)

    Codebase review against current main (be4a33d1). Read-only; no code changed.

    Current status: not-started. No candidate-set code. The existing RelationReason enum (crates/ripr/src/domain/evidence.rs:144, variants at :328-337: DirectOwnerCall, HelperOwnerCall, AssertionTargetAffinity, SameTestFile, SameModule, OwnerNamedTest, ImportPathAffinity, WeakTokenSubstring) overlaps but does NOT match the proposed vocabulary (missing EstablishedEntrypointRelation, EstablishedOneHopHelperChain, ExistingRequirementEvidenceEdge, ConfiguredFixtureOrCheckerOwner, FileProximityOnly, TokenCoincidenceOnly, OpaqueHelperOrMacro).

    Recommended next step

    Blocked on #1678/#1679. Resolve the open question: is the proposed vocabulary a replacement for RelationReason or a distinct CandidateRelation type for the preflight envelope? Likely the latter, to avoid regressing existing evidence classification. NameOnly/FileProximityOnly/TokenCoincidenceOnly may be returned as context-only, never preferred.

  7. added
    status/needs-work
    on Jul 18, 2026
  8. EffortlessSteven commented on Aug 2, 2026

    @EffortlessSteven
    MemberAuthor

    Earnest review (2026-08-02)

    Analysis(rust): discover bounded producer-backed test candidate set for the first v2 requirement seam. Producer work feeding the spec-v2 walking skeleton; pairs with #1664.

    Action: keep open; this is the analysis-side input to #1672. Track against the first seam.

  9. EffortlessSteven commented on Aug 3, 2026

    @EffortlessSteven
    MemberAuthor

    Deep re-review (2026-08-02)

    STATUS: open
    EVIDENCE: (Analysis rust: discover bounded producer-backed test candidate set for first v2 requirement seam.) grep -rniE 'test.candidate|requirement.seam|candidate.discovery' crates/ripr/src/analysis/ -> 0 hits; no candidate-discovery module. This is the analysis-side producer of #1681's input. Depends on #1679 (TestGripSummaryV1) for the producer backing. Correctly sequenced as the first analysis step of the v2 seam.
    PLAN QUALITY: good
    ACTION: keep

  10. added
    status/blocked-upstream
    on Sep 28, 2026
  11. EffortlessSteven commented on Sep 28, 2026

    @EffortlessSteven
    MemberAuthor

    Parked per #1672 / IMPLEMENTATION_PLAN.md Campaign 32: the spec dialect is blocked on external cargo-allow work. The plan-cited dependency cargo-allow#2119 was closed as not-planned on 2026-08-25 (superseded by the explicit dialect/source-adapter architecture); the live dialect blockers, EffortlessMetrics/cargo-allow#2260 (RIPR-SPEC v2 dialect adapter) and EffortlessMetrics/cargo-allow#2196 (repository-dialect adapter API), were verified open on 2026-09-27. The spec-system remains advisory until then. Re-opens when the upstream dialect support lands.

  12. removed
    status/needs-work
    on Sep 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    status/blocked-upstream

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions