Skip to content

Match Rules from successful Apply Patch observations #55

Closed

Description

@frap129

Parent

#38

What to build

Allow Rules to match each file successfully handled by Apply Patch while preserving file ownership across additions, updates, moves, deletions, and multi-file patches.

Acceptance criteria

  • A successful patch produces one File observation per touched file.
  • Added files contribute full patch content; updated files contribute added, removed, and context hunk text without patch syntax.
  • Moved files use the destination path and deleted files are path-only.
  • Multi-file patches cannot combine one file path with another file content.
  • A successful unparseable patch degrades to path-only observations derived from its model-visible result summary.
  • Failed patches contribute no File observations, and acceptance coverage includes syntax exclusion and literal metacharacters.

Blocked by

Activity

  1. frap129 commented on Aug 30, 2026

    @frap129
    OwnerAuthor

    Implemented in 1d4504d.

    • One File observation per touched file: src/file-observation-patch.test.ts:92
    • Added files contribute full content: src/file-observation-patch.test.ts:14
    • Updates contribute added+removed+context text without patch syntax: src/file-observation-patch.test.ts:35
    • Moves use the destination path; deletes are path-only even with content-like lines: src/file-observation-patch.test.ts:58,77
    • Multi-file patches never cross file paths/content: src/file-observation-patch.test.ts:92
    • Successful unparseable patch degrades to path-only via model-visible A/D/M summary: src/file-observation-patch.test.ts:113; upstream v1.18.23 apply-patch emits exactly those lines
    • Failed patches contribute nothing (after-hook fires only on successful executions); syntax exclusion and literal-metacharacter coverage in the same file and src/rule-filter.test.ts.
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

    ready-for-agentFully specified, ready for an AFK agent

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions