Repository navigation
fix(update): typed holds, one ownership rule and one checkbox reader - #207
Merged
Merged
Conversation
- Why a plan waits was free text, last write wins, and the dashboard, receipts and lockfile refresh matched exact strings. Plans now carry a typed Hold, set only through Plan::hold: a hold no tick can lift beats one a tick can, so ticking "Create it now anyway" can no longer write a plan that is also blocked, and a blocked plan is listed as blocked. - Writing and cleanup decide branch ownership with one recorded_base and one all_ours predicate; they disagreed on the base's form. - Dashboard, PR and batch checkboxes go through one fence-aware reader. - Release-age permits are pruned to the versions still held back, unless a lookup failed this run. - An advisory fixed by a batched update names the batch PR; one whose PR its owner closed says so instead of "fixed by the update". - A batched PR is closed before the note saying so, so a failed close cannot post the note twice. - Pinned manifests are restored on drop, an error path included. - A merged PR's cached merged_at is a timestamp, not "merged by patchula". - A repository's first error names its reason; later ones don't replace it.
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
count-patchula | e947a24 | Commit Preview URL Branch Preview URL |
Nov 08 2026, 08:46 PM |
…ilure Review findings on #207: - With the shared alphanumeric base rule, any branch whose tip carries a `Patchula-Base:` GitHub cannot compare made cleanup error and failed the whole repository every run. A 404 or 422 compare now means the branch is not the Count's: cleanup skips it, and writing leaves it Protected. - Pinned::restore forgot every original before writing them back, so a failure partway left the rest pinned; each is now forgotten only once written, and Drop retries the remainder. - Among blockers of one kind a plan names the last again, as before typed holds, so multi-problem plans keep their reason text.
Second-pass review findings on #207: - A blocked plan whose PR the batch carries closed as batched but was shown as blocked; Batched now outranks every other hold, as its reason did before typed holds. - Plan::hold and keep broke ties in opposite directions; both keep the later of equal holds. - An advisory is credited to the batch PR only when that PR carries the update, and reads "whose PR was closed" only when every matching plan was closed. - A test covers the write path's uncomparable recorded base.
Merged
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.
Fourth PR that replaces implicit state machines with explicit ones (after #204, #205 and #206).
Changes
reason: every check inplan::buildoverwrote the previous one, and the dashboard, receipts and lockfile refresh matched exact strings.Plan.hold: Option<Hold>(Window,Concurrent,PerHour,WaitingForBatch,Batched,ClosedByOwner,LockfilesCurrent,MaintenanceWindow,MaintenanceDone,Blocked(text)) is set only throughPlan::hold, which keeps status and reason in step. When several apply, a hold no tick can lift wins. Before, a plan outside its window whose target digest was missing could be lifted toPlannedby a "Create it now anyway" tick, or listed under the wrong row. The reason text is unchanged, so PR and dashboard output stay byte-identical.BATCHED_REASONandCLOSED_BY_OWNERare gone.Patchula-Baseof up to 64 letters and digits; cleanup accepted only 40 hex digits. Both now userecorded_baseandall_ours. Writing's form won: the base only bounds the history inspected, and ownership comes from every commit since it being authored, verified and marked by the Count. The test fixtures also depend on non-hex fake SHAs.pull_requests::checkboxes) for dashboard actions, PR re-checks and batch add/remove, which had three copies of the fence tracking.Drop, so an error path can't leave a pin behind.merged_atis now an RFC 3339 timestamp instead of the string "merged by patchula".fail, so the first error names the reason and later ones (the dashboard, PR actions) don't replace it.Looked at, no change
Native::AlreadyMergeablecollapsing to a bool: the "waiting for a later run" label is accurate, because the Count merges those PRs itself.prs.*before lockfile generation. That is also deliberate, so held plans never run tools.Follow-up
The
ActionStatussplit (branch vs PR statuses), a typed "stale, rerun" status for the server's requeue decision, and anImageStateenum all change the report JSON. They come next, together with a schema bump.Tests
New tests cover hold precedence (a tick never lifts a blocked plan, in either order). The fixtures were moved to
Plan::hold. Thepatchula-update,patchula-engine,patchula-serverandpatchula-clisuites pass (407 tests), and Clippy is clean.