Repository navigation
Planning that runs out of time continues at the plan gate, and the plan checks re-plan once - #368
Merged
Merged
Conversation
…an checks re-plan once A data fix run planned, switched repository, planned again, was sent back by a release check that read a column it writes as removed and by a demand for production and staging proof, then re-planned for one file tag and ran out of time: "no work is committed to continue from". - steps: a new Gate::Plan with a PlanState on the checkpoint (repository, base branch, plan revisions, re-plans, switch, checked, open gaps). A step that runs out of time while planning hands off to a fresh step that resumes from the run's own plan or triage in the settled repository. A new plan revision or fewer open gaps is progress; two planning steps in a row without it stop the run, saying where. - Re-plans are bounded to one in all (MAX_PLAN_REPLANS): a switch plans once, a file mismatch re-plans only when no switch did, and a plan made in a settled repository checks its file tags in its one send-back. What each check still finds after that send-back goes on the decision's open gaps (the plan check no longer overwrites the others'). - release_plan: only real removals or renames are split. A field counts as removed when the plan's words or statements remove, drop, rename or unset it, or its contract migration is planned; a migration that writes values needs no release. Reads dropColumn and renameColumn calls. - plan_judge: env_unproven applies only to environments the plan's claims (cause, data, scope, lookups) rest on. - Incident case k_plan_time and its row in docs/incidents.md.
nambok
force-pushed
the
plan-continues-and-bounded-replans
branch
from
October 29, 2026 20:15
b954169 to
97480d0
Compare
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.
Summary
A data fix run failed in planning after about 14 minutes with "no work is committed to continue from". It planned, switched repository and planned again there. A release check then read a column the fix writes (
updated_at) as removed, and the plan check asked for production and staging proof the plan's claims never needed. A third full plan for one file tag ran out of time. Planning now continues in a fresh step from how far it got, the checks re-plan once in all, and both false positives are fixed.Changes
steps.rs,mod.rs). NewGate::Planwith aPlanStatesaved on the checkpoint at the start of planning and after every plan, switch and re-plan. It holds the repository and base branch, plan revisions, re-plans, whether a switch happened, whether the checks are done, and the open gaps. On a timeout while planning, the run hands off to a new queue message, which resumes in the settled repository from the run's own plan, or from its own triage when no plan was made yet. Checks it had not finished run then. A new plan revision or fewer open gaps counts as progress. Two planning steps in a row without either stop the run and say where.MAX_PLAN_REPLANS = 1). A repository switch plans once and never switches again. A file mismatch re-plans only when no switch did. It counts once that plan finishes, so a step that times out during it does the re-plan again rather than skipping it. A plan made in a settled repository puts its file tag check into its one batched send-back, together with the trace, plan judge, feature, outside-work and release gaps. Files that still don't match after that stop the run before any code, as they did before.plan.rs). After the one send-back, what each check still finds goes on the decision's open gaps. That includes the new-feature gaps. The plan judge used to overwrite the outside-work and release gaps; it now adds to them.release_plan.rs). A field counts as removed in only two cases: the plan's words or statements remove, drop, rename or unset it, or the plan already has its contract migration. A field listed as both old and new is written, not removed. A migration that only writes values or adds a field needs norelease.touchesnow also readsdropColumnandrenameColumncalls. Tests show thatUPDATE ... SET updated_at = now(),DELETE FROM ... WHERE updated_atanddeleted_atare not removals, and that real drops and renames are still split.plan_judge.rs). An unproven environment counts as a gap only when the decision's cause, data, scope or lookups name it (prod,productionandlivematch each other, as dostagingandstage). The judge prompt says the same.k_plan_time, with its row indocs/incidents.md. It covers a timed-out planning step continuing at the plan gate in the switched repository, stall stops, the bounded re-plans in the pipeline, and a schedule data fix that triggers neither the release split nor environment proof.Verification
cargo fmt --all --check: cleancargo clippy --workspace --all-targets -- -D warnings: cleancargo test --workspace: worker 1281 passed, gateway 605, common 1089, plus 2 integration tests; 0 failedsteps::planning_resumes_while_it_makes_progress,steps::plan_state_round_trips_and_bounds_replans,release_plan::writing_a_column_is_not_a_removal,release_plan::a_real_removal_or_rename_is_still_split,plan_judge::an_environment_the_claims_dont_rest_on_needs_no_proof, and the fourincidents::k_plan_timecases.