Skip to content

test(runtime-core): give the command-lease wait-out tests poll slack (HACK-2741) - #1286

Merged
roodboi merged 2 commits into
nextfrom
claude-lead/authored-exec-lease-test-slack
Nov 27, 2026
Merged

roodboi merged 2 commits into
nextfrom
claude-lead/authored-exec-lease-test-slack

Conversation

@roodboi

@roodboi roodboi commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

Part of HACK-2741. Same fix as #1280, for the tests #1278 added (and one #1276 test in the same file). #1280's dependency_refresh::owner_lease_tests test is not touched.

Problem

next is red: hosted Candidate core (macos-latest) (nextest) fails provider::engine::command_lease_tests::the_authored_exec_request_waits_out_a_project_stop_and_releases_the_lease with provider_busy after about 0.75 s, at cd2e21f.

Root cause

The test holds the lease for 600 ms against a 700 ms bound, so it has about 100 ms of slack. The shared retry loop (state::wait_quietly) sleeps up to 50 ms between attempts, and it checks the deadline before each attempt. On a loaded hosted runner the holder thread's unlock, plus the last sleep, can land past the deadline, and the waiter gives up just as the lock is freed. The bound was scaled from the 35 s wait; the 50 ms backoff cap was not.

a_requested_command_waits_out_a_project_stop_that_the_owner_bound_refuses (#1276), in the same file, has the same 600 ms against 700 ms shape.

Change

  • Both positive cases keep the 600 ms hold. Their deadline becomes started + hold + 500 ms: ten capped poll intervals for the holder to run, unlock, and be seen.
  • The expiry case the_authored_exec_request_refuses_a_stop_past_its_bound_naming_it asserts that the deadline has passed before it checks the exact refusal.
  • Test code only. No product change.

Evidence

On the M5 (macOS arm64), under the native-bench lock, with --features native-config-plan, filtered to command_lease:

  • cargo nextest run (0.9.151), 20 runs: 0 failures (14 tests each run).
  • cargo test, 20 runs: 0 failures.
  • cargo +1.97.1 fmt --check, and clippy --all-targets -D warnings with default features and with --all-features.
  • privacy:check after staging, and gitleaks.

Labelled ci:mac so hosted macOS Candidate core runs on this PR.

🤖 Generated with Claude Code


Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

…(HACK-2741)

The authored exec requester test (HACK-2739) and its compose sibling in
command_lease_tests held the lease for 600 ms against a 700 ms bound. The
retry loop sleeps up to 50 ms and checks the deadline before each attempt,
so on a hosted macOS runner the caller could give up just as the lock was
freed (provider_busy after about 0.75 s on next). As in #1280, the hold
stays and the positive case gets 500 ms of slack, ten capped poll
intervals; the expiry case asserts its exact refusal only after its
deadline has passed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@roodboi roodboi added the ci:mac Run macOS checks for this pull request label Nov 26, 2026
@vercel

vercel Bot commented Nov 26, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
hack-docs Ready Ready Preview Nov 27, 2026 12:41am UTC

Request Review

@linear-code

linear-code Bot commented Nov 26, 2026

Copy link
Copy Markdown

HACK-2741

@roodboi

roodboi commented Nov 26, 2026

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 26, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-26T23:55:25.702098Z 91a6a1b Manual request
🔒 Security Review ✅ Completed 2026-11-26T23:56:53.521419Z 91a6a1b 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. Bravo.

Reviewed commit: 91a6a1b2e4

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

@chatgpt-codex-connector

Copy link
Copy Markdown

🛡️ Codex Security Review · Automatically triggered

Security review completed. No security issues were found in this pull request.

Reviewed commit: 91a6a1b2e4

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

roodboi added a commit that referenced this pull request Nov 27, 2026
…dline (HACK-2742)

As in #1280 and #1286: the expiry cases this branch added (the interactive
requester's checked wait and the owner's wait per command) now assert that
their deadline passed before they check the exact refusal.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Resolved to the tree tested in batch run m3:z495 (lead train sync).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@roodboi
roodboi merged commit eeea55c into next Nov 27, 2026
3 of 4 checks passed
@roodboi
roodboi deleted the claude-lead/authored-exec-lease-test-slack branch November 27, 2026 00:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci:mac Run macOS checks for this pull request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant