Repository navigation
feat(milestone-gates): revisions of a milestone, each with its own gates - #920
Open
kaihackney-scale wants to merge 3 commits into
Open
kaihackney-scale wants to merge 3 commits into
kaihackney-scale wants to merge 3 commits into
Conversation
A milestone entry can now name the milestone it revises (`group`), for a long task that asks for the same work again, changed. Revisions follow their milestone one after another and are checked at load; each is opened, nudged and given up on like any milestone, and by default never skipped as done. `carry_gates: true` re-checks the previous revision's gates (and keeps its artifacts), a gate with the same id overriding the carried one. The summary nests revisions under their milestone with a roll-up (furthest revision reached, its status, nudges, revisions done); a task without revisions keeps its summary's shape. After the wrap-up the hook also re-checks the latest revision of every earlier milestone on its state gates, so one the agent broke later is `undone`. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…i/milestone-revisions
…ion's row shows its own gate types A carrying revision could write two gates with one inherited id: both counted as overrides and only the last ran. An entry's own gate ids must now be unique. The summary looked gate types up by gate id alone, so an override with another check showed its type on the earlier revision too; types are now per entry. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
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.
What
The milestone-gates post-turn hook ran a flat list of milestones. A long task often asks for the same work again, changed ("make it tables", "it's going public now, take out the internal numbers"), and each of those asks should have its own gates. This adds revisions as a first-class part of a milestone.
groupon a milestone entry names the milestone it revises (or an earlier revision of it).check_paramsrefuses agroupthat names no earlier milestone, and a revision that doesn't come right after its milestone or that milestone's last revision.carry_gates: truere-checks the previous revision's gates and keeps its artifacts, merged when the spec loads. A gate the revision writes with a carried gate's id replaces it in place. Any other repeated gate id is still refused.line,max_nudgesandblocking. Giving up stays per revision: a revision that's let go opens the next entry. Revisions are never skipped as already done unless they setskip_if_done: true, since a revision asks for a change.revisions. Each is the usual row, with itsrevisionnumber and its carried gates markedcarried: true. The milestone's row rolls them up: the status of the furthest revision reached,reached_revision, total nudges andrevisions_done. The top level addsreached_revision,revisions_doneandrevisions_total. A task without revisions gets the same summary as before.call,artifactand judge checks).no_newandtrajectory_judgegates are skipped there because they describe the turns that milestone was open. A milestone found broken becomesundone. A pass in this check doesn't upgrade a let-go revision to passed, because its other gates weren't re-run.Nudges,
max_nudges/blocking, skip-if-done, the final check of the last milestone and the load-timecheck_paramsall work as before. All 66 existing tests pass unchanged.The README has a new Revisions section with an example. A one-off check confirms the example loads through
_spec.Tests
tst/unit/task_step/test_milestone_gates_hook.py: 11 new tests (77 in all) covering:groupandcarry_gatesundone, itsno_newgate not run)tst/unit/task_stepsuite: 4619 passed, 3 skipped. The 6 failures are the knowncomputer_exec_test.py(4) andtest_mcp_cli_builder.py(2) ones; this change touches only the hook, its README and its tests.ruff check .is clean.🤖 Generated with Claude Code


Confidence Score: 5/5
The PR appears safe to merge; both previous findings are fixed and no new actionable issues were found.Summary
Adds milestone revisions with optional carried gates, nested summaries, and final state checks across milestones.
Diagram
%%{init: {'theme': 'neutral'}}%% flowchart TD A[Open milestone or revision] --> B[Check its gates] B -->|Pass or nonblocking give-up| C[Open next entry] B -->|Retry available| A C -->|More entries| A C -->|No entries left| D[Ask for wrap-up] D --> E[Recheck last entry and earlier milestones' latest state gates] E --> F[Save summary and end]Reviews (2) · Last reviewed commit: "fix(milestone-gates): refuse a gate id t..." · Reviewed by Greptile