Commit 7ee16b9
fix(server): let the review write its own opening, and read as one message
A review comment opened with one of a small set of server-authored lines —
"Nice work …" for a clean change, "Worth keeping: …" for a strength beside a
problem — chosen from a curated slug-to-phrase map. The same sentence opened
every review that fell in the same bucket, and a change with a critical finding
could still open on praise.
The opening now comes from the review itself. A report_summary tool carries one
or two sentences out in the feedback envelope as `lead`, and the note opens on
them. Nothing stands in for a missing one: with no lead the note opens on its
first finding. Three constraints that the fixed phrasing satisfied by
construction move into the composer prompt, which is where that judgement now
happens: the opening implies no verdict on merging, does not lead with praise
above a CRITICAL or MAJOR finding, and does not restate what follows.
The note also stops working against itself. It no longer states its issue count
twice, a strength and its next step no longer run together unpunctuated, the
footer no longer carries the run's duration, and a defect found by opening a
file is quoted from the diff so the note lands beside the code.
Nothing on the comment now quotes the practice catalogue. The workspace's own
paragraph about why a practice matters used to follow every note, identical on
every review that touched that practice and written about the practice rather
than about the change. It is gone from findings, from the notes on the diff and
from the all-strengths note, and the prompt says plainly that a practice decides
what is raised and never appears in the wording. The "On the diff:" label goes
with it; the review's opening already says so in its own words.
The lead is model-authored text on a public comment, so it is bounded rather
than trusted: the runner sends an over-long lead back to be rewritten instead of
cutting it mid-word, the parser takes it only when it is a string, the composer
re-applies the budget at a sentence boundary and scrubs it, and an unbalanced
code fence anywhere in an assembled note is closed so one bad fence cannot
render the whole review as a code block. A lead is given to the note that posts
first, so an approved proposal and an auto-posted summary cannot open two
comments on one change with the same sentence. report_summary is admitted on the
same gate as report_feedback, so the detection stage cannot write the opening.
Approved proposals now go through the same egress sanitizer as every other
comment this posts, which they were bypassing.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LK2yxSEfNL5Q5xwbAqAMWr1 parent dd328ec commit 7ee16b9
36 files changed
Lines changed: 1055 additions & 1228 deletions
File tree
- .changeset
- server/src
- main
- java/de/tum/cit/aet/hephaestus
- agent
- context/providers/mentor
- handler
- composition
- conversation
- practices/feedback
- resources
- agent
- practices
- test/java/de/tum/cit/aet/hephaestus
- agent
- context/providers/mentor
- handler
- composition
- conversation
- runtime
- practices/feedback
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
146 | 146 | | |
147 | 147 | | |
148 | 148 | | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
149 | 154 | | |
150 | 155 | | |
151 | 156 | | |
| |||
server/src/main/java/de/tum/cit/aet/hephaestus/agent/handler/ApprovedFeedbackDeliveryListener.java
Lines changed: 12 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
95 | 95 | | |
96 | 96 | | |
97 | 97 | | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
98 | 109 | | |
99 | | - | |
| 110 | + | |
100 | 111 | | |
101 | 112 | | |
102 | 113 | | |
| |||
Lines changed: 183 additions & 296 deletions
Large diffs are not rendered by default.
0 commit comments