-
Notifications
You must be signed in to change notification settings - Fork 2
fix(server): compose the feedback a review measured #1514
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| --- | ||
| "hephaestus": minor | ||
| --- | ||
|
|
||
| Practice reviews deliver feedback again. A review measured a pull request, recorded what it found, and then stopped: the step that turns those findings into something a developer reads was never switched on, so every review ended with its results stored and nothing said. Reviews now compose feedback for each lane the occasion can reach — the note on the work, the developer's own practice pages, and an ongoing conversation — and issue reviews compose for the two longitudinal lanes, since an issue is not the work a note belongs on. | ||
|
|
||
| **Operators:** feedback now appears where it previously did not, so a workspace with review switched on begins posting again. Nothing new is required of you, and the instance-wide Silent Mode brake still holds everything back while it is engaged — but if you upgraded during the window where reviews were silent, this is the change that ends it. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -72,7 +72,10 @@ class PracticeRunnerLiveLlmTest { | |
| ).toAbsolutePath(); | ||
|
|
||
| /** The runner reads/writes here verbatim; we own the directory for the duration of one test. */ | ||
| private static final Path WORKSPACE = Path.of("/workspace").toAbsolutePath(); | ||
| // Somewhere writable, rather than a root-owned /workspace this harness may not be able to create. | ||
| private static final Path WORKSPACE = Path.of( | ||
| System.getenv().getOrDefault("PI_RUNNER_CWD", "/workspace") | ||
| ).toAbsolutePath(); | ||
|
Comment on lines
+75
to
+78
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🩺 Stability & Availability | 🟠 Major | ⚡ Quick win Restrict If the parent process sets 🤖 Prompt for AI Agents |
||
|
|
||
| /** Wall-clock cap for the whole runner — initial + retry budgets are derived from this. */ | ||
| private static final long AGENT_BUDGET_MS = 240_000L; | ||
|
|
@@ -333,6 +336,8 @@ private void stageWorkspace(LiveLlmCredentials creds) throws IOException { | |
| // PullRequestContentSource materialises in production. | ||
| Path contextDir = WORKSPACE.resolve(SandboxLayout.CONTEXT_PREFIX); | ||
| Files.createDirectories(contextDir); | ||
| // Every citation is checked against this; the runner refuses to start without it. | ||
| copyFixture("manifest.json", WORKSPACE.resolve("inputs").resolve("manifest.json")); | ||
| copyFixture("diff.patch", contextDir.resolve("diff.patch")); | ||
| copyFixture("metadata.json", contextDir.resolve("metadata.json")); | ||
| copyFixture("comments.json", contextDir.resolve("comments.json")); | ||
|
|
@@ -411,6 +416,8 @@ private static Process spawnRunner(LiveLlmCredentials creds) throws IOException | |
| env.put("PATH", path); | ||
| env.put("HOME", WORKSPACE.resolve(".home").toString()); | ||
| env.put("LANG", "C.UTF-8"); | ||
| // The only name carried through the clear() above. | ||
| env.put("PI_RUNNER_CWD", WORKSPACE.toString()); | ||
| env.put("LLM_PROXY_URL", creds.baseUrl()); | ||
| env.put("LLM_PROXY_TOKEN", creds.apiKey()); | ||
| // PI_CODING_AGENT_DIR points Pi at our staged extension + settings, away from ~/.pi. | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,47 @@ | ||
| { | ||
| "contractVersion": "1.0.0", | ||
| "catalogDigest": "978097f57047bb716457e8b3c44115ef0bb55602dbce4f1a15900a40d70a39b8", | ||
| "artifactKind": "scm.pull_request", | ||
| "capturedAt": "2026-01-01T00:00:00Z", | ||
| "sources": [ | ||
| { | ||
| "kind": "scm.pull-request.diff", | ||
| "state": { | ||
| "availability": "AVAILABLE", | ||
| "content": "NON_EMPTY" | ||
| }, | ||
| "artifacts": [ | ||
| { | ||
| "path": "inputs/context/diff.patch" | ||
| } | ||
| ] | ||
| }, | ||
| { | ||
| "kind": "scm.pull-request.core", | ||
| "state": { | ||
| "availability": "AVAILABLE", | ||
| "content": "NON_EMPTY" | ||
| }, | ||
| "artifacts": [ | ||
| { | ||
| "path": "inputs/context/metadata.json" | ||
| }, | ||
| { | ||
| "path": "inputs/context/diff_summary.md" | ||
| } | ||
| ] | ||
| }, | ||
| { | ||
| "kind": "scm.pull-request.comments", | ||
| "state": { | ||
| "availability": "AVAILABLE", | ||
| "content": "EMPTY" | ||
| }, | ||
| "artifacts": [ | ||
| { | ||
| "path": "inputs/context/comments.json" | ||
| } | ||
| ] | ||
| } | ||
| ] | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
Use the required test naming convention in both new tests.
Both methods omit the required
should[ExpectedBehavior]When[Condition]structure.server/src/test/java/de/tum/cit/aet/hephaestus/agent/handler/PullRequestReviewHandlerTest.java#L304-L310: rename the test and add@Tag("unit").server/src/test/java/de/tum/cit/aet/hephaestus/agent/practice/live/PracticeRunnerLiveLlmTest.java#L291-L298: rename the test toshouldComposeFeedbackWhenRequestIsStaged.📍 Affects 2 files
server/src/test/java/de/tum/cit/aet/hephaestus/agent/handler/PullRequestReviewHandlerTest.java#L304-L310(this comment)server/src/test/java/de/tum/cit/aet/hephaestus/agent/practice/live/PracticeRunnerLiveLlmTest.java#L291-L298🤖 Prompt for AI Agents
Source: Coding guidelines