Bound worktree freshness fetch (#927)#929
Merged
Merged
Conversation
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.
Closes #927
Summary
WorktreeStalenessProbe::fetch()the existing five-second bounded git-probe budget throughGitRunner/ProcessRunner.git_command_timeoutas unverified freshness, preserving the existing fail-closedworktree_freshness_unverifiedgate andallow_unverified_freshnessbypass.Source Evidence
git fetch --quiet origininWorktreeStalenessProbe; nearby lifecycle freshness probes already use the five-second generic git timeout contract.Verification
composer install --no-interaction --prefer-distphp tests/process-runner-command-spec.phpvalidates a controlled hanging child is terminated and returns the configured generic timeout envelope.php tests/worktree-staleness-fetch-timeout.phpverifies the probe passes its five-second budget to its runner and returns actionable structured timeout data without network access.php tests/worktree-add-lifecycle.phpverifies successful fetch and ordinary fetch-failure/allow_unverified_freshnesslifecycle behavior.for test in tests/*.php; do php "$test" || exit 1; donewas attempted: tests throughworkspace-safe-cleanup-orchestratorpassed, then the unrelatedtests/worktree-active-no-signal-scope.phpfailed because it does not requireWorktreeCleanupCandidateClassifier.Verification capability: Focused deterministic coverage and the lifecycle integration test pass. PHPStan is not installed by this repository lockfile (
vendor/bin/phpstanis absent).Compatibility
No input contract changes. Existing successful and ordinary fetch-failure behavior is retained. Callers opting into unverified freshness additionally receive optional
fetch_timed_outandfetch_timeout_secondsfields when the bounded fetch expires.AI Disclosure
Implemented with OpenAI gpt-5.6-terra through Homeboy/OpenCode.