Repository navigation
Conversation
thenom
requested review from
JWThewes,
eipasteur and
jeromevdl
as code owners
November 13, 2026 13:50
|
Automatically computed PR review signals (deterministic) Complexity and branch coverage help focus review on functions and their tests; these signals are advisory. Complexity and test coverage14 changed JS/TS files analyzed · 5 flagged functions.
🟢 Improving · 🟠 Needs attention · 🔴 High risk · 🟣 Highest risk — = unavailable · n/a = not applicable · * = incomplete tests Isobar repository mapThis fixed repository map locates changed files and their possible reach through static links. Signals
Legend
|
Contributor
|
Thanks for this one. Could we add a Space setting for this? I mean it might be cool to select that on a per Space level and not for the whole instance? |
…before each stage A unit lane keeps the intent head it was cut from until merge-back or reconciliation, and the agent never runs git. A lane still in flight therefore can't see units merged since it started, or a fix merged into the intent branch directly. With lane_sync_policy = "before-stage" (default "none", unchanged), run-stage merges origin/<intent branch> into the unit branch before each fresh lane stage, with the same no-ff merge reconciliation uses, and pushes it: - A repo already up to date is a no-op; one with uncommitted or unpushed work is skipped; a conflict is aborted and the lane left as it was, for merge-back or reconciliation to resolve as before. It never throws. - A resumed conversation keeps the tree it parked on. - v2.lane.synced, v2.lane.sync_conflict and v2.lane.sync_failed record what happened; nothing is recorded when the lane is up to date. No orchestrator steps are added: the work is inside run-stage.
…verride Move lane_sync_policy from a runtime environment variable to the same three-tier shape as stage skipping and PR strategy: - Platform default in SSM (<prefix>/lane-sync-policy), managed in Admin settings. The lane_sync_policy Terraform variable seeds it when the parameter is created. - Per-space override on the Project vertex (lane_sync_policy: default | none | before-stage), set in Space settings. - The effective value is resolved at intent create and snapshotted onto META (laneSyncPolicy); the orchestrator forwards it in the existing run-stage-start payload, so no orchestrator steps change and a setting change never affects an intent already running.
thenom
force-pushed
the
feat/lane-sync-before-stage-759
branch
from
November 18, 2026 17:13
ea5da46 to
c7693ee
Compare
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.

Summary
Closes #759
Problem
A unit lane keeps the intent branch head it was cut from until merge-back or reconciliation, and the agent never runs git. A lane still in flight can't see units merged into the intent branch after it started, or a change merged into the intent branch directly, and nothing in the platform can bring them in.
Solution
An opt-in lane sync policy,
none(the default, which leaves behaviour unchanged) orbefore-stage, set in the same three tiers as stage skipping and PR strategy:<prefix>/lane-sync-policy), managed in Admin settings (Source control). The new Terraform variablelane_sync_policyseeds it when the parameter is created. If the parameter can't be read, intents getnoneand a warning is logged.lane_sync_policy:default,noneorbefore-stage), set in Space settings (General).laneSyncPolicy). The orchestrator forwards it in the existingrun-stage-startpayload, so no orchestrator steps are added or reordered, and a setting change never affects an intent already running.The sync itself:
lambda/agentcore/lane-sync.js:syncLaneWithIntentreusesmergeBranchNoFfwith the branch roles reversed, the same merge asreconcileLane. Per repo it fetches, resets the local unit branch onto its remote, mergesorigin/<intent branch>with--no-ffand pushes the unit branch.commands/run-stage.jscalls it after the source self-heal and before the CLI starts, only for a fresh stage of a unit lane (not a resumed conversation, which keeps the tree it parked on).v2.lane.synced,v2.lane.sync_conflictandv2.lane.sync_failed(actionagent.workspace). Nothing is recorded when the lane is already up to date. The merge commit uses thereconcilekind.docs/concepts/execution.md,docs/using-the-platform/platform-settings.mdanddocs/using-the-platform/projects.md.Known limits: the sync happens at stage start only, so a change merged mid-stage arrives at the lane's next fresh stage. A conflicting lane carries on stale until merge-back. Each sync adds a merge commit to the unit branch, the same shape reconciliation already makes.
This and #766 both add a block to
run-stage.jsbefore the CLI starts, so whichever merges second needs a small rebase.User experience
A Lane sync card in Admin settings (Source control) sets the platform default, and Space settings (General) can override it per space. With sync on, a lane's timeline shows "lane synced" (or a conflict) when the intent branch had moved, and the lane's next stage starts from the current intent branch.
Testing
lane-sync.test.js(real git: up to date, merged, conflict aborted, dirty and unpushed repos skipped) andlane-sync-broker.test.js;run-stage.test.js"lane sync" (policy off, fresh lane stage, resumed stage, non-lane runs);lane-sync-policy.test.js(resolution across the tiers); settings, projects and intents handler tests (platform setting, space override, snapshot at create, unreadable parameter); the orchestrator forwards the snapshot; the frontend card, space setting and service.maina0c36835:npm run lint(warnings only, at baseline),npm run format:check,npx tsc -b --noEmitinfrontend/, and the agentcore, agents, intents, projects, shared and v2-orchestrator vitest projects plus the affected frontend suites (2,110 backend and 335 frontend tests). One projects test timed out under load in the full run and passes on its own, as on cleanmain.fmt -checkandvalidate.