Skip to content

land: inspect-lease-retry-test - #572

Merged
ualtinok merged 2 commits into
mainfrom
land/inspect-lease-retry-test
Oct 19, 2026
Merged

ualtinok merged 2 commits into
mainfrom
land/inspect-lease-retry-test

Conversation

@aft-alfonso

@aft-alfonso aft-alfonso Bot commented Oct 18, 2026 •

Copy link
Copy Markdown

Accepted agent delivery; branch-keyed search descriptor included.


Summary by cubic

Fixes a race in writer_lease_timeout_completion_waits_for_resource_not_input_change where the serial worker frees its cold-build limiter permit after publishing completion, so a resubmitted same-root category could be deferred instead of queued. The test now waits for the earlier permit to be returned before asserting, and prints the submission on failure. Adds a search descriptor for the inspect-lease-retry-test slice.

Written for commit c0ffa0e. Summary will update on new commits.

View guided diff Turn on auto-fix

RetriggerView in GreptileConfidence Score: 5/5

The PR appears safe to merge.

Summary

Makes the writer-lease retry test wait for the earlier worker’s cold-build permit before submitting its retry.

  • The lease-retry test waits for the limiter slot before checking its retry.

Reviews (1) · Last reviewed commit: "release notes and search-quality descrip..." · Reviewed by Greptile

ualtinok and others added 2 commits October 18, 2026 23:41
…-retry test

writer_lease_timeout_completion_waits_for_resource_not_input_change read an
empty `in_flight` map as "the first attempt has fully retired". It has not:
the serial background worker publishes its completion (removing the category
from `in_flight` and notifying) inside route_tier2_reuse_completion, but its
cold-build permit lives in the worker closure's `permit_slot` and is dropped
only when the closure returns. While that permit is being torn down, a
same-root ColdBuildLimiter::try_acquire_classified sees a holder whose weak
permit no longer upgrades and returns None by design, so the resumed
submission is deferred (deferred_categories: [Complexity]) instead of queued,
and the assertion sees newly_queued_categories == [].

Reproduced on Linux by delaying ColdBuildPermitLease::drop by 300 ms
(emulating the worker being preempted mid-teardown): the unchanged test
fails at the same line with the same left [] / right [Complexity] seen in
the Windows merge-queue shard. Product behaviour is correct: a deferred
automatic dispatch is retried by the Tier-2 scheduler's deferral backoff.

The test now waits (30 s hang guard) until a probe permit can be taken from
its limiter, which is only possible once every earlier permit has been
returned, then makes the same assertion. The resumed-admission assertion now
prints the whole submission on failure.

Co-authored-by: alfonso-aft <289616620+alfonso-aft@users.noreply.github.com>
Co-authored-by: alfonso-aft <289616620+alfonso-aft@users.noreply.github.com>
@ualtinok
ualtinok added this pull request to the merge queue Oct 18, 2026
Merged via the queue into main with commit 4ce9563 Oct 19, 2026
49 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.

1 participant