Reuse the tool/after preflight ping instead of a second daemon query - #140
Merged
Merged
Conversation
🦋 Changeset detectedLatest commit: f5ad9d0 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
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.
Why
#107 follow-up: agent-bundle#664 (
d94223a66, onmain≥72a035a3f) lets an event preflight return{ outcome: 'execute', data }and hands that value to the route asprops.preflight. cargo-hauler'stool/aftergate already had the daemon's session-completed answer and then asked again inafter-shell.ts.What
tool/afterpreflight returns the finished-ticket ping asdatawhen that is why the route loads, including anasOfMswatermark sampled before the ping.'execute'without a ping (same as today); that path still uses the existingcompletedSincequery.agent-bundleand@agent-bundle/runtimeto the pkg.pr.new preview of currentmain9197015b9.Closes the #107 comment 5556824771 for this follow-up.
Test plan
pnpm run check(validate, build, typecheck, diagnostics,rstest1073 passed / 2 skipped,test:routes37 passed / 3 skipped)afterPreflightassertion now expects{ outcome: 'execute', data }with tickets +asOfMstests/notify.test.tsasserts preflight tickets skipcompletedSinceand write the ping watermarkkache-statusevent-loop timing assertion flaked once (54.6 < 50) then passed on retry; unrelated to this diffDeslop: Cursor Grok 4.6, 1 edit (dropped a restating field comment).
Self-review
Reviewer:
gpt-5.6-sol-medium(generalPurpose; TraceDecay MCP/daemon was down, so the firstchange-risk-reviewerdispatch was blocked).Findings:
Date.now()after route start could skip tickets that finished between ping and write. Fixed: preflight carriesasOfMs.finishedTicketsskips the daemon query. Fixed:tests/notify.test.ts.asOfMssampled after the ping could still skip an in-flight finish. Fixed: sampleasOfMsbefore the request.Re-reviewed after (1)+(2); (3) applied after the second pass. No remaining critical/warning merge risks.