Skip to content

fix(ci): retry queued admission and stabilize native fixtures - #6777

Merged
M4n5ter merged 2 commits into
apache:rust-previewfrom
MicroGery:codex/rust-ci-recovery
Nov 11, 2026
Merged

M4n5ter merged 2 commits into
apache:rust-previewfrom
MicroGery:codex/rust-ci-recovery

Conversation

@MicroGery

@MicroGery MicroGery commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Finish the remaining CI repairs on rust-preview@2af62d5d0, after #6779 supplied the continuation, recovery, Goal catalog, Stop, desktop and macOS window fixes. Those upstream implementations and the updated Goal recovery contract are retained.

  • Retry queued admission when a contended Goal or Session ordering lock is released. A producer can publish and notify while still holding these locks; skipping the entry can leave durable pending work without another wakeup. The scheduler owns cancellable lock waits, avoids duplicate/busy Session admissions, and still admits unrelated Sessions.
  • Add a regression covering both admission locks and unrelated Session progress, and include the last Goal state/request counts in cumulative-budget timeout diagnostics. Make the delegated-notification failure fixture observe the caller's durable failure before raising attention; otherwise the new upstream interruption contract can legitimately continue the original Run before the length failure is observed. Keep distinct-Run and exactly-once notification assertions.
  • Separate Windows child startup from the bounded pipe-drain check. Pin the live child and its cleanup handle, release the parent shell explicitly, and retain the five-second completion deadline and child-survival assertions. Cancel outstanding fixture work on failure.
  • Make the TUI wrapping/selection fixture explicitly one terminal row tall (160×16 points). Its original 48-point height displayed three rows, so the expected vertical scroll did not occur. Document that geometry.

Refs #6748. No CI workflow, new skip, or timeout-duration changes.

Verification

All Rust builds/tests ran on a separate macOS arm64 Mac mini, with sequential jobs. Final head: 0da76052b, based on 2af62d5d0.

  • 43/43 Agent native library tests passed, including lock-contention and both delegated-notification cases.
  • 12/12 Host/CLI acceptance cases passed on the rebased production code: all codemode/external-job/producer reopen cases and the affected desktop Continue/Goal/steering cases. The only subsequent source edit was the native test fixture described above; production and CLI acceptance sources are unchanged.
  • 31/31 NSH cases passed: all 13 macOS terminal-native cases and 18 TUI text-input cases, including the one-row caret-scroll assertion.
  • Changed-file Rust formatting, ASF headers, and git diff --check passed. The final PR/integrated source hashes match the remote validation checkout (102 files).

The first rebased joint run was 54/55: the notification fixture raced caller failure against notification-driven interruption. After making that order explicit, the entire 43-case native suite was rerun and passed. No failing assertion was removed.

Windows-specific runtime validation requires hosted Windows CI. The previous Windows log reported only an aggregate five-second deadline, without separating startup from drain; the readiness handshake preserves a bounded post-startup check and will expose either phase explicitly. Linux CI must also confirm whether the admission-lock fix resolves the earlier Goal timeouts.

AI use

  • No generative tool made a substantive contribution
  • Generative tooling made a substantive contribution

Tool(s) and scope: Codex investigated failures, implemented fixes, integrated upstream changes, ran remote validation and prepared this PR under the contributor's direction.

Checklist

  • Tests cover the changed behavior
  • Final-base formatting and affected macOS suites confirmed
  • Updated Linux and Windows hosted CI confirmed

Does this PR entail a change in behavior?

  • Yes — queued admission retries after lock release
  • No

@MicroGery
MicroGery force-pushed the codex/rust-ci-recovery branch from 31aaa96 to 02a3eb4 Compare November 11, 2026 05:04
@MicroGery
MicroGery requested review from Astro-Han, M4n5ter and me2seeks and removed request for Astro-Han and M4n5ter November 11, 2026 06:13
Retry pending work after Goal or Session admission locks are released without blocking unrelated Sessions. Add a lock-contention regression and cumulative Goal-budget diagnostics. Separate Windows child readiness from the pipe-drain deadline and make the TUI scrolling fixture exactly one row tall. Preserve the recovery and macOS fixes already merged in apache#6779.

Generated-by: Codex
@MicroGery
MicroGery force-pushed the codex/rust-ci-recovery branch from fcef289 to ebf15b9 Compare November 11, 2026 06:57
@MicroGery MicroGery changed the title fix(ci): repair Rust recovery and desktop acceptance fix(ci): retry queued admission and stabilize native fixtures Nov 11, 2026

@me2seeks me2seeks left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed exact head ebf15b9 against rust-preview@2af62d5d0e. Automated code review performed with Codex under maintainer direction.

No blocking findings in the remaining six-file diff. The rebase removes the overlapping #6779 implementations and retains upstream's updated Goal recovery and Stop contracts. The remaining changes have independent value, so this PR should be retained rather than closed as superseded.

The admission repair addresses a real lost-wakeup window: queue publication can notify the scheduler before the Goal/Session ordering lock is released. Returning lock-wait futures to the scheduler gives it an unlock-driven retry without holding admission guards across the wait or blocking unrelated Sessions; per-Session deduplication and busy checks avoid duplicate admissions. The Windows fixture now separates bounded child readiness from the existing five-second post-exit drain check and retains child-survival/cleanup assertions. The TUI fixture explicitly uses the one-row geometry needed to exercise vertical caret scrolling. Neither change removes the relevant behavioral assertions.

Independent Linux validation on this exact head:

  • queued_admission_wakes_when_goal_or_session_lock_releases: passed.
  • source_consumed_while_authority_probe_is_busy_is_retried_after_retirement: passed.
  • Changed Rust files: rustfmt check passed; git diff --check passed.

Limits: I did not complete the full native or TUI suites on this rebased head, and the Windows-specific fixture cannot execute on this Linux machine. Earlier-head suite results are not treated as validation of this merge result. Hosted checks were still running at submission; this scoped code approval does not establish cross-platform CI success.

Make the failure fixture observe its durable terminal fact before the worker requests attention. The current interruption contract may otherwise consume the notification in the original Run before the model length failure is observed. Retain the distinct Run, exactly-once attention and completion assertions.

Generated-by: Codex

@me2seeks me2seeks left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Follow-up review of 0da7605, added while the approval of ebf15b9 was being submitted.

No new blocking findings. This delta changes only the delegated-notification failure fixture. Subscribing before sending the length-limited reply, then observing the caller's durable Failed terminal before establishing the worker question, makes the intended failure-before-notification ordering explicit. It retains the distinct-Run, exactly-once attention, and eventual completion assertions; the normal completion/interruption case keeps its original ordering. There are no production-code changes relative to the approved head, so the existing code approval stands and the PR remains worth retaining.

This incremental test change was source-reviewed and was not independently re-executed locally. The two Linux admission regressions and formatting checks reported in the approval were executed on ebf15b9, not on this new commit.

Automated follow-up review performed with Codex under maintainer direction.

@M4n5ter
M4n5ter merged commit dde1e0e into apache:rust-preview Nov 11, 2026
33 of 35 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants