Repository navigation
Conversation
Retain a duplicate through successful preflight preparation to expose a lock surviving into resource sampling and final admission. Keep a separate control for the final worker lease until its retained duplicate closes. Co-Authored-By: Codex <noreply@openai.com>
Explicitly release the successful preflight lock before closing its file descriptor, so retained references cannot block final admission. Refuse admission if unlocking fails. Preserve the worker lease lifetime. Co-Authored-By: Codex <noreply@openai.com>
Owner
Author
|
Consolidated in #88 (explicit LOCK_UN release on completed preflight admission leases before resource sampling). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Successful admission preflight previously closed its descriptor before resource sampling. A retained duplicate could keep that lock held, so final admission returned concurrency instead of reaching the configured resource verdict.
This draft is stacked on #86. It explicitly unlocks only a successfully prepared preflight lease before closing it and sampling; an unlock failure refuses admission. The final worker lease remains close-only, so its retained descriptor continues to block another admission for its lifetime.
The first commit adds a deterministic regression with product code unchanged. The existing clock callback runs under the preflight lock; the fixture matches the unique lock descriptor by device/inode among currently open descriptors and retains a close-on-exec duplicate. It expects the resource-unavailable verdict with no launch or timestamp. A separate control pins the final worker lease until its duplicate closes. No fork, sleep, arbitrary descriptor number or product injection seam is used.
Linux at test-only
54532659f, attempt 1, compiled and failed exactly the preflight control with three issues: one clock read instead of two, no final pressure read, and concurrency instead of resource-unavailable. The final-worker control and the other 99 declarations passed. The test file is byte-identical in the fix commit.All original checks finished at
e4a585656761d31bba91c88a0e8bcb76de3c7367:Native's broad summary counts 813 declarations in 82 suites, including its 14 skips. Four benchmark declarations counted as passes returned early because fixture inputs were absent. The six serial invocations pass 10, 1, 1, 1, 1 and 1 declarations; these are separate invocations, not additional unique tests. Source, lockfile, SDK mirror and all 43 dependency checkout pins are unchanged in the native receipt. Warm-multistore's optional read-visibility check remains unverified. Visualizer does not qualify an iOS build.
Scope: post-flock refusals inside preparation (invalid clock/policy, cooldown and state-read errors) retain their existing close-only cleanup. This does not claim complete preflight-exit coverage. The previous failure did not identify its unexpected holder; the deterministic control proves this descriptor-lifetime defect, not that historical attribution.
Syntax and whitespace checks pass. No workflow, resource policy, timeout threshold or final-worker lease behavior changed. No manual rerun was performed.