fix(amp): preserve feedback with structured decision delivery - #1476
Merged
backnotprop merged 2 commits intoSep 7, 2026
Merged
Conversation
Resolve plan and history paths from the active data-directory configuration instead of capturing a temporary test override at import time. This reproduces and fixes the four order-dependent annotate CI failures reported in backnotprop#1464; keep both successful persistence and failed-write draft recovery assertions intact.
Fixes backnotprop#1456. Add review --json with a decision and CLI-rendered message, preserving plaintext output and customized prompts. Route Amp review and annotation delivery solely by structured outcomes so reviewer text cannot become a no-op sentinel. Cover actual registered-command delivery and recover legacy output visibly.
Owner
|
Deep review complete before merge, since this adds a CLI output contract every integration shares. Verified: the plaintext path is byte-identical for all existing consumers (framing, newline boundaries, exit codes - revert-verification proved the byte-compat test genuinely guards the seam); both version-skew directions fail closed with the recoverable update notice, tested across nine malformed-output shapes; nothing the old Amp routing delivered is dropped, and the #1456 class of feedback is now delivered instead of silently swallowed. 270/0 tests, typecheck clean, docs match the implementation exactly. Two style-only nits left as-is (duplicated return null in parseReviewDecision; ReviewOutcome as a local structural type). Merging. |
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.
Fixes #1456.
Problem
Amp classified rendered feedback by substring, so a real comment such as
This path has no feedback loop, add one.was treated as no action and never appended to the agent thread. The same classifier also swallowed annotate feedback and approval notes.Change
plannotator review --json: one{ decision, message }record.messageis the CLI-rendered agent instruction; this deliberately differs from raw annotate/OpenCodefeedback.Verification
JSON.message + "\n"byte-for-byte.bun run typecheckpassed.Includes the same previously reviewed storage data-directory lifetime correction carried by #1473–#1475, keeping the known #1464 import-order CI failures fixed until that prerequisite lands. The Amp-specific commit is separate.
No competing pending PR addressing #1456 was found in open PR descriptions or issue timeline references; rechecked immediately before publication.