Skip to content

Soundness: sorryInDeclaration returns false when codeText is none #5

@astefano

Description

@astefano

Description

In ProbeLean/Verify.lean, the sorryInDeclaration function returns false when an atom has codeText = none (no line range information):

match atom.codeText with
| none => false
| some range => warning.line >= range.linesStart && warning.line <= range.linesEnd

This means any declaration where the analysis couldn't extract line numbers will never have sorries attributed to it, and will always appear as "verified" -- even if it actually contains sorry.

Impact

False "verified" verdicts for atoms without line-range information. This is a soundness issue.

Suggested Fix

When codeText is none and the file path matches, consider returning true (conservatively assume the sorry belongs to this atom), or at minimum flag the atom as "unknown" verification status rather than "verified".

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