Fix stale Crane completion recovery#109
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.
fix(crane): recover stale completed-label migrations
TL;DR
This fixes the scheduler path that let issue #78 stay marked complete even after the new deterministic Go cutover gate landed. The scheduler now treats
crane-completedplusCompleted: trueas trustworthy only when it can positively confirm the current PR-head gate; no open migration PR, pending checks, failing checks, or unavailable check evidence makes the completion stale and selects the migration again.Problem
crane-completedand repo-memoryCompleted: true, but there was no open migration PR to validate.check_skip_conditionscould still skip it as completed.## [*] Machine State; the parser treated[*]as a regex character class and could parse that file as empty in local reproduction.Approach
## [*] Machine Stateheading and skip markdown separator rows.evaluate_completed_label_recoveryso completed-label issues require an affirmative PR-head gate.stale_completed_state, and keep it due.Validation
Production-shaped local simulation against issue #78 and the current
memory/cranestate now emits:{ "selected": "crane-migration-python-to-go-full-apm-cli-rewrite", "selected_issue": 78, "stale_completed_state": [ "crane-migration-python-to-go-full-apm-cli-rewrite" ], "skipped": [], "existing_pr": null }How to test
pytest tests/unit/test_crane_scheduler.py -q.crane-completedand no open migration PR, run the scheduler withGITHUB_REPOSITORY=githubnext/apm./tmp/gh-aw/crane.jsoncontains the migration instale_completed_stateand does not list it underskipped.Trade-offs
gh aw compileis not required for this PR.