feat(engine): implementation runs follow the session binding - #19
Merged
Merged
Conversation
The implementation procedure holds one branch fact, baseBranch; the work branch lives only in the session binding, pushed on entering it and popped on returning to base, so landing after the merge reads base. workBranch and the workTarget step leave the procedure and the target precedence, the landing unit states the order (merge, return to base, clear the binding, report landed), the work junction gains an abandon path that removes the marker on base, and a graph read a state field sends to an unavailable branch names the read and the field. Implements 20260914-180822-d-cpt-9kv; regression for landing after the sole checkout returns to base (20260902-160151-s-tac-mtv). Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Replay resolved procedure specs on the session's bound branch, so a session bound to a branch whose checkout is gone could neither be resumed nor have its binding cleared, although the error told the agent to clear it. Spec resolution now falls back to the project's default branch when the bound branch cannot be acquired; replay's entry-identity check still guards the procedure. Refs 20260914-180822-d-cpt-9kv. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Runs recorded before the work branch moved into the session binding logged a transition through workTarget and reports of workBranch; replay refuses an unknown step and an undeclared field. The procedure keeps the step as a pass-through to work and the field declared and optional, guarded by a test, while such sessions may still be resumed. The stale-binding fallback for procedure specs resolves the project's configured default branch rather than the ambient current graph. Review follow-up for PR #19; refs 20260914-180822-d-cpt-9kv. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
SDD-Mutation: v1:28dd451c4c2f356f900ac33290def79b47ac9c6404b0e48b2133c769778e57e3
SDD-Mutation: v1:2067969c08a855669f3a5effca69dea3feb1acdc723bf277306d37aa42ef9a13
SDD-Mutation: v1:64e5ee294633a94912fe700d9aed78474f48231cc7d4b1be8d544bed3ba3849c
SDD-Mutation: v1:7d9b22e8307ae88b52d14eff86e2e3f091f5a17c640309eb20ae453e7cba0d8f
SDD-Mutation: v1:b7cd637595d043cc44a1e12148bda8f0bd7c415700a1484611ef01dfa82ec3dd
SDD-Mutation: v1:7de8cb002b385c0345680604db803da4254a0ef582c23abc2e9db500bd811d45
SDD-Mutation: v1:bee2b06ed038b997a9759cf4633d26e5633e775fe9c7b07dea5a7521495d0391
SDD-Mutation: v1:858ad440dabdc4ce4c92f4ba26ab211e987bd8893f8b87c04f5a46c34f28c1ad
SDD-Mutation: v1:3e17165c2ab771f223d447080cc8f148e205e8750790b70f7cf19600c28c1033
Replay drops fields the procedure no longer declares and passes through steps it no longer has (20260923-230855-d-cpt-34w). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
… step The WIP marker is written and removed on the session's current branch; the marker goes right after the closing done, so the merge carries both to base. The base-target, work-target and landing steps and the baseBranch, workBranch and worktreeMode fields leave the procedure (20260923-230855-d-cpt-34w). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
A local server takes the branch its serving checkout has checked out at each read or write, a composition without a resolver takes the configured default, and a checkout without a branch falls back to it. The session framing names the base, the session shell tells the agent when to declare a different branch, and a write whose branch has no checkout names the remedies (20260923-233057-d-cpt-ekd). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…on main Branch mode follows the derived base, worktree mode declares the work branch; both merge and find the marker gone from main (20260923-230855-d-cpt-34w). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
SDD-Mutation: v1:164a644258366cfbff535e2f8e047f3db84156132c2b8e09edc60ed75b315e90
SDD-Mutation: v1:b64fbbf0cae2347470da133a4084764b9d9ae1119ab7513dc7b62f4a1151a608
SDD-Mutation: v1:e5e386cf480e19c32a4a7962bbcecad3451c5c588b8689bccd64257fb33a8e96
SDD-Mutation: v1:35bd20598f8095a1d148b8e4ba81642ef46e047a05941b57bfe3061124c1de72
SDD-Mutation: v1:ab1255bbd410cc582c66218c9b5ec3521ffb245de9998dc62218505f501b2392
|
Want your agent to iterate on Greptile's feedback? Try greploops. |
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.
Implements the first slice of
20260914-180822-d-cpt-9kv: the implementation procedure holds one branch fact,baseBranch; the work branch lives only in the session binding.What changes
d-prc-imp):workBranchand theworkTargetstep are gone; setup routes straight to the working junction and tells the agent to declare the session binding once the host is on the work branch. Dispatch seeds carry no branch, so captures during work and the closing done follow the binding. The landing unit states the order: merge, return to base, clear the binding, then reportlanded. The closeout no longer speaks of the binding. The work junction gains an abandon path that removes the marker on base (unwind→unmarkwhen a marker exists).workBranchleaves the branch-field precedence registry, so the binding is the only branch fact after base; a stale value in an old session's store is ignored. A graph read that a state field sends to an unavailable branch now says so:reading the graph on branch "x", chosen by the captureBranch state field, failed: …instead of the bare mutation-target message.proctestworlds can drop a branch (World.DropBranch) the way the local runtime loses a checkout. New regressions: landing after the sole checkout returns to base (TestImplementation_LandsAfterTheSoleCheckoutReturnsToBase), the abandon path, and clearing a stale binding. The remaining implementation tests follow the new flow.Already covered before this PR: the engine acquires no graph for a command that declares none (
GraphIndependent, since 65aeca3).Left for later slices
Both stay open under
d-cpt-9kvand will be named in the closing done.🤖 Generated with Claude Code
The PR appears safe to merge; no outstanding previous finding or new actionable defect was identified.
Summary
This PR makes implementation runs follow the session’s effective branch rather than storing procedure-owned branch fields.
Reviews (3) · Last reviewed commit: "sdd: summarize 20260924-091500-s-tac-ien..."