Add a rework league to Delivery and Review prompts - #101
Merged
Merged
Conversation
Rework runs now see ReworkCount, the selected escalation stage, the latest Delivery and Review attempts, and open review findings without prior run logs. Co-authored-by: Ralph Schuler <ralphschuler@users.noreply.github.com>
Delivery rework prompts now include a size-capped excerpt of the durable run protocol for the latest failed Review and the latest Delivery attempts, preferring findings and gate or test failures over routine log noise. Co-authored-by: Ralph Schuler <ralphschuler@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Rework Delivery prompts already received a compact attempt index, but not the durable run protocol. Delivery therefore still could not see exactly which review finding or gate failure the previous attempt hit.
The rework section stays informational and now has two parts:
agent_run_logs: the latest Review that did not pass, plus the two newest Delivery attempts. Each block is labeled with role, model/effort, status, time, and run id.Log selection prefers error and warning lines and text that looks like Befunde, test failures, panics, or gate/apply errors. Routine startup lines and long low-signal blobs are dropped. Hard caps: 24 lines per run, 320 characters per line, and 12 KB for the whole protocol. Truncation is marked in the prompt. The store read itself is bounded (tail plus signal rows, messages cut to 2000 characters) so a large protocol is not loaded only to be thrown away.
Review still sees the index. It does not receive the log excerpt.
Tests
go test -count=1 ./internal/automation/ ./internal/store/ ./internal/domain/covers log inclusion (findings and gate errors kept, noise and an older Delivery log dropped) and truncation (byte budget, per-line cut, omission marker). Integration tests that needSHIPYARD_TEST_DATABASE_URLwere skipped in this environment.