Skip to content

Test the Absolute-Path Translation in the Unread-Diff-File Check #2862

Closed

Description

@ptr727

Found while reviewing the fix for #2830. unread_diff_files in .github/actions/prose-gate/prose_lint.py translates each requested path into a repository-relative key with repo_key. Replacing that translation with the cwd-relative rel(Path(p)) survives every test in the seven diff-related classes, although that is the bug the helper's docstring says it prevents: an absolute path argument empties the unread list.

Failure scenario: prose_lint.py --diff BASE /abs/repo/scripts, where the change sits under scripts/ and discovery matches nothing. Under the mutant this exits 0 where it should exit 2.

Fix shape: add a companion test in TestDiffScopeFloor that passes str(self.tmp / "scripts") (absolute, covering the changed file) and asserts exit 2, then confirm it fails with the mutant.

🤖 Generated with Claude Code

Activity

  1. added a commit that references this issue on Oct 12, 2026
    f39d182
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