Skip to content

TypeScript specs promise exposed for two examples whose runtime truth cannot discriminate (RIPR-SPEC-0246 #3, RIPR-SPEC-0248 #10) #7732

Closed

Description

@EffortlessSteven

Problem

Two TypeScript acceptance examples require ripr to report exposed, but their tests cannot catch the edit at runtime. Corpus cases built to the letter of the spec therefore record a false exposed, and the spec's own grade locks it in.

Example Edit and test Spec grade Runtime truth
RIPR-SPEC-0246 #3 The spread copy drops a field, and the test asserts toEqual(cfg) exposed Not discriminated. For toEqual(cfg) to pass on the stored package, cfg must already hold the field, so dropping it never changes the compared value.
RIPR-SPEC-0248 #10 "limit " + max becomes "limit ", and the test asserts toThrow("limit ") "the ladder's exposed stands" Not discriminated. toThrow(string) is a substring match, so both "limit 5" and "limit " pass.

Repro: #7731 adds these two cases:

  • fixtures/typescript-verdict-corpus/cases/jest-spec0246-ex03-spread-drops-field
  • fixtures/typescript-verdict-corpus/cases/jest-spec0248-throw-message-term

Both record truth.state = not_discriminated. Their expected rows read exposed with outcome: false_exposed, and runtime truth was taken with jest 30.5.2 in a scratch copy.

Goal it hurts

Trustworthy verdicts. A wrong exposed tells a developer the change is guarded when it is not, which is worse than a missed advisory. These two are among the TypeScript corpus's false verdicts and cannot be fixed without first changing the specs.

Proposed direction

These are proposals for the spec owner, not decisions:

  • RIPR-SPEC-0248 report: mark actionable packet badge readiness #10: a toThrow("<literal>") whose literal is a prefix of both the old and new message should not count as a strong exact-error pin. The edit is within the same error seam, so it should read weakly_exposed, or this should be stated as a known limit.
  • RIPR-SPEC-0246 chore(repo): configure ripr-swarm repository contract #3: a toEqual(variable) whose expected value is built from the same source as the owner's input does not pin the dropped field. Either reword the example so its test can discriminate, or grade it not exposed.

Owner

The TypeScript analyzer specs (RIPR-SPEC-0246 and 0248). The corpus rows follow whichever grade the specs settle on.

Activity

  1. EffortlessSteven commented on Oct 17, 2026

    @EffortlessSteven
    MemberAuthor

    Both examples are fixed on main. RIPR-SPEC-0248 #10 now reads weakly_exposed (PR #7933, RIPR-SPEC-0243 rule 4, message-only change), and RIPR-SPEC-0246 #3 now reads weakly_exposed (PR #7963, rule 3, dropped spread override read against the tested input). Both spec texts (docs/specs/RIPR-SPEC-0248-...md #10, RIPR-SPEC-0246-...md #3) say so, and the corpus cases jest-spec0248-throw-message-term and jest-spec0246-ex03-spread-drops-field now have ideal_verdict: gap.


    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

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions