Repository navigation
fix(dispatch): preserve pre-existing last_error on annotation failure (#10087) - #10792
Conversation
…#10087) annotateLaunch's noteFailure PATCHed last_error from a fresh local array, overwriting a lane-ledger note recorded earlier in the same launch. Read the task's existing last_error lazily on the first failure (no extra GET on the happy path) and prepend it, so the final note names both failures. A missing reader or failed read degrades to the previous behavior; the launch stays best-effort. Regression tests: pre-existing note + failing comment, pre-existing + both failing, failed read, and no-read on the happy path.
Codex Review Summary: ❌ FailedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 18 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Follow-on from triage task 16966 (lane code-d) on issue #10087 — PR #4231 residual.
Problem: in
launchSession, the lane-ledger catch PATCHes a failure note onto the tasklast_error(server.ts), thenannotateLaunchnoteFailurePATCHedlast_errorfrom a fresh local array via the field-setpatchTask— overwriting the lane note. Finallast_errornamed only the annotation failure.Fix (
pm-stack/dispatch/src/launch_annotations.ts):annotateLaunchnow reads the task existinglast_errorlazily on the first annotation failure (no extra GET on the happy path) and prepends it, so the final note names both failures. OptionalgetTask?onLaunchAnnotationQueuekeeps older stubs compatible; a missing reader or failed read degrades to the previous behavior. No launch-behavior change: annotations and lane ledger stay best-effort, launch never rejected, wait:true warnings shape unchanged.Tests: 4 new regression cases in
test/launch_annotations.test.ts(pre-existing + failing comment, pre-existing + both failing, failed read, no-read on happy path).bun test test/launch_annotations.test.ts: 9 pass / 0 fail. Fullbun test: 214 pass, 2 fail — bothtest/github.test.tsresponse-shape timeouts, proven pre-existing on clean main (fail identically with this change stashed).Closes #10087.
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.