58 lines
2.2 KiB
Markdown
58 lines
2.2 KiB
Markdown
# PR#80: A Plus in the Text Is No Added Line
|
|
|
|
> **WARNING:** This document describes only the change applied in this PR.
|
|
> It may already be outdated once the next PR is merged.
|
|
> Historic PR documentation is not maintained along with new PRs; treat it as a snapshot.
|
|
|
|
## Related Links
|
|
|
|
- [werkregie PR#15](https://git.javagil.de/mi/werkregie/pulls/15): three rounds lost to this false alarm.
|
|
|
|
## Problem
|
|
|
|
PR-Agent shows the model each diff line as its line number and its text;
|
|
an added line has `+` right after the number, an unchanged line has only spaces there.
|
|
A Werkbaum file marks an optional node with a `+` at the start of its text, e.g. `+ [?] #dash.notify`.
|
|
The model took such unchanged lines for added ones and reported in three rounds of werkregie PR#15
|
|
that the PR document left out nodes that were on `main` for long.
|
|
A Markdown list item with `-` or `+` can mislead it the same way.
|
|
|
|
## Non-Goals
|
|
|
|
- No change of PR-Agent's diff format.
|
|
|
|
## Specification
|
|
|
|
### Feature: the model tells the text from the marker
|
|
|
|
#### Scenario#80.01: an unchanged line whose text starts with a plus or a minus gets a note
|
|
|
|
So that the model does not report an unchanged optional node or list item as changed.
|
|
|
|
- **Given** a diff with an unchanged line whose text starts with `+` or `-`
|
|
- **When** werkrevisor builds the instructions for the model
|
|
- **Then** they explain that only a marker right after the line number marks a changed line
|
|
|
|
##### Verified by
|
|
|
|
- [test_diff_marker_note.DiffMarkerNoteTest.test_an_unchanged_line_with_a_plus_gets_the_note](../../tests/test_diff_marker_note.py)
|
|
- [test_diff_marker_note.DiffMarkerNoteTest.test_an_unchanged_markdown_item_gets_the_note](../../tests/test_diff_marker_note.py)
|
|
|
|
#### Scenario#80.02: a diff without such a line gets no note
|
|
|
|
So that the prompt stays as short as before.
|
|
|
|
- **Given** a diff whose unchanged lines start with no `+` or `-`
|
|
- **When** werkrevisor builds the instructions for the model
|
|
- **Then** they hold no such note
|
|
|
|
##### Verified by
|
|
|
|
- [test_diff_marker_note.DiffMarkerNoteTest.test_a_plain_diff_gets_no_note](../../tests/test_diff_marker_note.py)
|
|
|
|
## Solution
|
|
|
|
- werkrevisor adds the note to the instructions when an unchanged line of the diff starts with `+` or `-`
|
|
after its indentation.
|
|
- Version 0.32.7.
|