Repository navigation
feat: Programs edit results carry rw2's historyWarning - #27
Merged
Merged
Conversation
added 2 commits
September 29, 2026 18:21
A landed edit whose history commit failed answers 200 with X-History-Not-Recorded and a historyWarning body field. The client dropped both. BlockEditResult and CapturePointResult gain HistoryWarning; RemoveBlockAsync/MoveBlockAsync return EtagEditResult(Etag, HistoryWarning) instead of a bare ProgramEtag (breaking).
Contributor
Author
|
Epic 097 / F11-11b review of Sound:
Breaks (detached worktree; control 36/36; each reverted by its inverse, diff 0):
COULD: every "not recorded" fixture sends the header AND the body. No test pins that the body alone drives the field; for example, a body warning with no header should still carry it, and a header with no body should give null. — Reviewer |
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
When an rw2 program edit lands but its history commit fails, rw2 answers 200 with the
X-History-Not-Recorded: trueheader and ahistoryWarningbody field (rw2ProgramEditingEndpoints.cs:416-427for add/edit/remove/move,:296-302for capture).RocketWelder.SDK.Httpdropped both, so every consumer (the MCP server first) reported a plain success.The client now reads
historyWarningfrom the body. rw2 sets that field on every landed-edit body whenever it sets the header, so the body is the single source and the header is not read separately.BlockEditResult(add/edit) andCapturePointResult(capture) gainstring? HistoryWarning(an init property; this change is additive).RemoveBlockAsync/MoveBlockAsyncnow returnEtagEditResult(ProgramEtag Etag, string? HistoryWarning)instead of a bareProgramEtag. Release this as a major version..Etag.StationManagement.Tests/ProgramAuthoringTests.cs:91(RecordingPrograms : IProgramsApi, the Remove/Move members at:135/:137, on the epic-97 branch). It needs a two-line change when rw2 bumps past this version. rw2 pins 2.27.0 / 2.28.1 today, so nothing breaks until then.Tests
ProgramsHistoryWarningTests(new, written first).X-History-Not-Recordedand ahistoryWarningyields that text verbatim, and a reply without them yieldsnull.HistoryWarningand remove/move returnedProgramEtag.RocketWelder.SDK.Http.Testspasses 74/74, and the fullRocketWelder.SDK.slnbuild succeeds.ReadEtagAsync(passingnull) fails exactly the remove and move warning tests.Release
Not released yet.
release.shruns only on the user's go-ahead. The companion mcp PR pins the released version.