Skip to content

ci: run the minimal core profile under nextest - #474

Merged
lg2m merged 1 commit into
mainfrom
fix/goal-check-recovery-flake
Oct 25, 2026
Merged

lg2m merged 1 commit into
mainfrom
fix/goal-check-recovery-flake

Conversation

@lg2m

@lg2m lg2m commented Oct 25, 2026

Copy link
Copy Markdown
Collaborator

Main CI has failed the "Minimal core profile" step on every push since Oct 22, almost always on sessions::tests::goal_check_recovery::native_check_recovery_bounds_stalled_workspace_validation.

Cause

qq-core bounds blocking filesystem work with one process-wide semaphore, workspace::blocking_permits() (8 permits). Several tests check that work stays bounded while that capacity is gone, so they take all of it with acquire_many_owned(available_permits()).

This step was the only test gate still on cargo test, which runs every test as a thread of one process. When another test held some permits at that moment, the capacity test took fewer than 8. The other test then released its permits, the work under test got one, and the run finished Completed instead of Interrupted. With debug prints I saw the test hold only 1 or 6 permits, followed by RunFinished: Completed. The same sharing also causes intermittent task_git Busy failures and native_check_reopen_* timeouts under cargo test, and sometimes a hang.

Every other test gate (cargo xtask check and the main CI job) runs tests under nextest, one process each, which is what these tests assume.

Change

The step now runs cargo nextest run --locked --profile ci -p qq-core --no-default-features. nextest does not run doctests, and qq-core has none (cargo test --doc runs 0 tests).

I tried fixing it in the tests instead, with a helper that waits for all 8 permits and serializes the tests that use it, and dropped it. The fix holds the reported test, but Tokio's semaphore serves waiters in order: a waiting helper queues every later permit request in the process behind it, so one stuck holder freezes the whole cargo test run instead of failing one test.

Verification

  • On main, cargo test --locked -p qq-core --no-default-features failed or hung in 2 of 2 local runs.
  • cargo nextest run --locked --profile ci -p qq-core --no-default-features passed 1554/1554 with no flaky retries in 4 of 4 runs: 3 on the previous main and 1 on this branch.
  • cargo xtask check passes.

@lg2m

lg2m commented Oct 25, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 25, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-25T21:58:46.221713Z 6743fc4 Manual request
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Keep them coming!

Reviewed commit: 6743fc4b9d

ℹ️ 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".

@lg2m
lg2m merged commit 3f508c1 into main Oct 25, 2026
13 of 15 checks passed
@lg2m
lg2m deleted the fix/goal-check-recovery-flake branch October 25, 2026 22:19
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.

1 participant