Repository navigation
fix: accept HITL resume while the paused run unwinds; deflake flaky Windows CI tests - #3602
Merged
Merged
Conversation
…TransportTest agent-protocol: a paused HITL run persists the awaiting_confirm record before its future completes, and resume() rejected calls landing in that window with "task is already running" (HTTP 409). The persisted record is now the authoritative pause signal: resume() re-validates it under a per-task lock (concurrent double-resume is still rejected), and the in-memory future check is removed. futures.remove(taskId, f) in submit/resume keeps a late-unwinding run from removing a newer run's future. Adds a deterministic regression test that pins the window with a latch; it fails on the old code with the exact CI stack trace. core: JdkHttpTransportTest self-imposed 2s read/response deadlines were punched through by Windows CI parallel builds (mvn -T1C): 3/52 tests timed out during connect/first signal. setUp deadlines are relaxed to 10s read/response and 15s connect (idle stays 1s); the two tests that assert timeout behavior now build their own 2s-deadline transports (existing pattern) so the guards keep their strength; 8 status-code assertions become null-safe so a timeout reports the real error instead of an NPE.
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
…g tests - ChatSessionsTest: extend await timeouts to 60s; two durable turns with streamed output can exceed 15s on Windows runners - JevSupervisionMiddlewareTest: widen the supervision schedule interval so a preempted subscribing thread cannot emit a superseded mid-run observation before the synchronous terminal assessment - SubagentPendingToolRecoveryTest: bump timeout 10s -> 30s; ~30 SQLite journal fsyncs per child call can stall past 10s under CI parallel builds and real-time AV scans - WorkspaceTaskRepositoryRemoteStreamingTest: await the completion callback instead of asserting it already ran in the persistence gap
xzxiaoshan
added a commit
that referenced
this pull request
Oct 16, 2026
…oken presence (#3610) Follow-up to #3608, covering the remaining failures from the parallel -T1C CI batch. No timeout values were changed — both fixes remove failure mechanisms rather than budgeting more time for them. **JevTraceManagedAgentTest block timeout** (job 115705826734): the default workspace journal is one SQLite file written per event with full sync, connection-per-op, busy timeout 10 s — equal to the test's entire block budget, i.e. zero headroom by construction. Under -T1C on Windows runners, per-commit fsyncs plus AV scans of the fresh -journal files can stall a run past 10 s; this is the same mechanism documented for SubagentPendingToolRecoveryTest in #3602. The test validates JEV middleware wiring on an all-stub pipeline (mocked JevClient, Flux.just model, Mono.just sources) and never reopens state from disk, so an InMemorySessionLogStore removes the IO mechanism outright — the pattern applied to SharedWorkspaceSkillStagingE2ETest in #3519. **Codecov upload failing the build** (job 114655326210): fork PRs cannot see CODECOV_TOKEN, and Codecov rejects tokenless uploads to a protected branch with HTTP 400, which failed the whole job. The step is now skipped when the token is absent, and fail_ci_if_error is off so codecov-side outages never mask the build result.
3 tasks done
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
Fixes one product bug plus five flaky-test fixes, all surfaced by Windows CI runs; each item below cites the run where the failure was observed.
agent-protocol — HITL resume race (product bug, from the #3593 CI run). A paused run persists the
awaiting_confirmrecord before itsCompletableFuturecompletes. A client reacting to the record (fast poll or theREQUIRE_CONFIRMSSE event) callingresumeinside that window was rejected withIllegalStateException: task is already running→ HTTP 409.resume()now treats the persisted record as the authoritative pause signal; the in-memory future check is removedfutures.remove(taskId, f)insubmit/resumeso a late-unwinding run cannot drop a newer run's futurecore — JdkHttpTransportTest flaky 2s deadlines (test stability, from the #3593 CI run). Under Windows CI parallel builds (
mvn -T1C), the self-imposed 2s read/response deadlines were exceeded during connect: 3/52 tests failed as timeouts with no behavioral assertion failures (class runtime 21s on Windows vs 9s on Linux).Integer.valueOf(n).equals(...)) so timeouts report the real error instead of an NPEexamples / harness — four more Windows CI flakes (test stability, follow-up commit). All four adjust timing budgets or await points only; what each test verifies is unchanged.
queuedTasksAreDistinctAndSteeringStaysInCurrentExecution, fix(core): read pending interactions in a single scan #3582 CI run): timed out in theawait(...)helper's 15s default budget — two durable turns with streamed output can exceed 15s on GitHub's Windows runners. The two affected call sites now pass an explicit 60s budget.remoteTask_togglesAwaitingConfirm_thenFiresCompletionOnSuccess, fix(service): project managed chat turns into the session event log #3583 CI run): the poller persists the terminal record before firing the completion callback, so the terminal state could be observed in the gap between those two steps. The test now awaits the completion callback instead of asserting it has already run.concurrentCallsKeepScopesEvidenceAndCountersSeparate, feat(a2a)!: upgrade to A2A protocol 1.0 with a2a-java-sdk 1.4.0.Final #3590 CI run): this test's worker completes synchronously, so only the terminal assessment should fire, but the shared helper's 10ms tick could sneak in a superseded mid-run observation before that synchronous emission when a loaded runner preempts the subscribing thread. The test now constructs its middleware with a wide schedule interval (250ms/750ms) so the terminal-only assumption stays safe under-T1Ccontention.rebuiltChildRespectsRecoveryAfterPersistedActingFailure, this PR's own CI run): hitTimeout on blocking read for 10000000000 NANOSECONDSwith SQLite-journalfile-lock symptoms in the logs. One child call serializes ~30 journal commits (connection-per-op, DELETE journal,synchronous=EXTRA), and Windows CI parallel builds plus real-time AV scans of fresh-journalfiles can stall those fsyncs past the old 10s budget — the same budget as SQLite's own busy timeout, with no headroom. Raised to 30s, keeping the guards intact.