Skip to content

fix: consolidate updater, desktop UX, runtime bounds, and CI reliability - #1140

Merged
benclawbot merged 21 commits into
mainfrom
codex/consolidated-product-quality
Sep 7, 2026
Merged

benclawbot merged 21 commits into
mainfrom
codex/consolidated-product-quality

Conversation

@benclawbot

Copy link
Copy Markdown
Owner

Problem

Medusa's updater, desktop/TUI lifecycle, provider streaming, daemon shutdown, and PR validation path still had reliability and usability gaps. Separate issue work was also leaving slow or ambiguous CI feedback.

What changed

  • Make desktop and CLI update outcomes identity-aware and observable, including same-revision handling, artifact publication checks, Windows helper swap/stop/readiness/rollback evidence, and health acknowledgement.
  • Improve desktop/TUI input and session UX: IME-safe submission, stale async response guards, resume intent scoping, failed-send draft/attachment recovery, retry affordances, session search/pagination race safety, and accessibility metadata.
  • Bound provider streaming lines/events/text/tool arguments and add cancellation/backpressure; make durable session identity lookup bounded.
  • Fix daemon cancellation/shutdown ordering and Windows job termination latency; extend monitor synchronization for concurrent writers.
  • Optimize reliability CI: shared Cargo target, bounded warmup/timeouts, prebuilt acceptance binary, label-gated expensive coding-harness PR validation, and diagnostics.
  • Make Windows composable-sandbox identities unique per launch, use a valid null stdin handle, and fail closed as Unsupported when the host rejects Medusa's isolated environment block instead of inheriting secrets or silently downgrading. Document the host capability requirement.

Issue mapping

The parent tracking issue #1123 and foundation issue #1128 are already closed. #1129 remains the integrated-validation tracker until merged-branch checks are observed.

Validation

  • cargo fmt --all -- --check
  • cargo clippy --workspace --all-targets --all-features --locked -- -D warnings
  • cargo test --workspace --all-features --locked (observed EXIT=0)
  • RUSTDOCFLAGS="-D warnings" cargo doc --workspace --all-features --locked --no-deps
  • cargo deny check advisories sources (pass; existing yanked chacha20 0.10.1 warning)
  • cargo audit (pass; same yanked warning)
  • git diff --check
  • Focused containment/runtime, updater, provider, daemon, desktop Tauri, frontend test/typecheck/build, Python contract/smoke, and benchmark checks from the consolidated implementation

Review notes

The installed-binary/package restart path still needs release-artifact acceptance on a clean installed environment. Broader profiling/journal architecture and complete TUI corpus/accessibility audit remain tracked in their issue threads. The Windows host used for local validation does not accept the explicit SBOX environment block; the implementation now reports that limitation as a fail-closed unsupported backend, while the authoritative Windows matrix remains the platform proof for successful sandbox execution.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 5bed10a3dd

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +633 to +634
match lock_scheduler(&scheduler) {
Ok(scheduler) => cancel_all_jobs(&paths, &jobs, &processes, &scheduler),

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Close scheduler admission before the cancellation sweep

When a Submit connection has been accepted but has not reached dispatch when ShutdownNow is observed, this one-shot sweep runs before connections.shutdown() drains that request. Because dispatch does not reject submissions after shutdown, the request can register and enqueue a job after cancel_all_jobs returns; JobScheduler::shutdown then drains queued work, allowing an arbitrary child process to run and immediate shutdown to block indefinitely. Disable scheduler admission before draining connections, or repeat cancellation after the drain.

AGENTS.md reference: AGENTS.md:L65-L69

Useful? React with 👍 / 👎.

Comment on lines 139 to +140
} finally {
setDetailLoading(false);
if (generation === requestGeneration.current) setDetailLoading(false);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Clear detail loading when invalidating a session request

When the user closes the dock while readRuntimeSessionPage is pending, the close effect increments requestGeneration, so this stale finally branch skips setDetailLoading(false). Reopening the dock does not otherwise reset that flag, leaving every session button disabled and the detail-loading UI permanently stuck for the component's lifetime. Reset the loading state when invalidating requests, or ensure the request that set it always releases it.

Useful? React with 👍 / 👎.


fn main() {
println!("cargo:rerun-if-env-changed=MEDUSA_BUILD_COMMIT");
println!("cargo:rerun-if-changed=../../../.git/HEAD");

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Track the branch ref before embedding the desktop revision

When MEDUSA_BUILD_COMMIT is unset and another commit is made on the same checked-out branch, .git/HEAD still contains the same ref: text, so Cargo does not rerun this build script and reuses the previous cargo:rustc-env value. The rebuilt desktop then reports an old currentRevision, causing same-revision detection to fail and offering/reinstalling an update that is already present. Track the resolved ref file as well, including linked-worktree git directories.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant