Skip to content

Add a rework league to Delivery and Review prompts - #101

Merged
ralphschuler merged 2 commits into
masterfrom
cursor/rework-league-context-6ff1
Sep 21, 2026
Merged

ralphschuler merged 2 commits into
masterfrom
cursor/rework-league-context-6ff1

Conversation

@ralphschuler

@ralphschuler ralphschuler commented Sep 21, 2026

Copy link
Copy Markdown
Owner

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:

  • The compact index: ReworkCount, the selected escalation stage, and up to 10 finished attempts (role, model/effort, status, gate, applied, short summary).
  • A log excerpt for Delivery only, taken from 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 need SHIPYARD_TEST_DATABASE_URL were skipped in this environment.

Open in Web Open in Cursor 

cursoragent and others added 2 commits September 21, 2026 17:04
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>
@ralphschuler
ralphschuler marked this pull request as ready for review September 21, 2026 17:23
@ralphschuler
ralphschuler merged commit 99c5bde into master Sep 21, 2026
8 checks passed
@ralphschuler
ralphschuler deleted the cursor/rework-league-context-6ff1 branch September 21, 2026 17:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants