Repository navigation
Description
Problem Description
The final push of the implement Job does not fetch and rebase right before the push. So the pushed head can miss commits that main got during the scoped checks. This breaks the owner rule of 2026-11-11: each push to GitHub holds the current origin/main and merges cleanly (docs/SDLC.md, "Current Branch at Every Push").
In ImplementRun._push (src/devops_cli/roadmap/implement/implement_run.py, at f55a20b9):
self._sync()fetchesmainand rebases.self._scoped_checks()runs thepre-pushstage,devops ci --check --only constructs,docs,openspecanddevops ci test. A failed check starts a fix step of the model, up toroadmap.implement.repair_roundstimes.self._publish()orself._push_with_lease()pushesself._head(). No fetch and no rebase run between step 2 and this push.
The Job installs no git hook (install_hook_environments runs pre-commit install-hooks only), so the pre-push hook branch-current of #4670 does not catch this push.
#4670 named this problem ("main gets 2.5 merges an hour, so the pushed head often does not hold main"). Its acceptance criteria said: "main moves with no conflict during the scoped checks. The Job pushes a head that holds the new main". #4670 is closed, and no open issue covers the final push. #4713 covers only the wip: and checkpoint pushes.
The design of #4670 (openspec/changes/archive/2026-11-12-4670-push-gate/design.md) rejected a second rebase in _push, because "the Job would push a head that its checks did not see". But docs/ROADMAP_WORKFLOW.md says that the required checks of the pull request are the gate, and that the scoped checks only filter what the Job pushes. The pull_request checks test the merge with main.
docs/SDLC.md now says that the Job "rebases before each push". For the final push, this statement is not correct.
Reproduction Steps
- Start an implement run of a Ready item.
- While
devops ci testof the scoped checks runs, merge a pull request intomainthat does not conflict with the branch. - Let the run finish and push.
- Run
git merge-base --is-ancestor origin/main <pushed head>.
Expected vs Actual Behavior
Expected: the pushed head holds the main of the time of the push. A rebase conflict at that time stops the item with nothing pushed, as the other push sites do since #4670.
Actual: the pushed head holds the main of the start of _push. Step 4 exits 1.
The Time section of docs/ROADMAP_WORKFLOW.md gives about 35 s for the first two scoped checks and at most about 3.5 minutes for the tests, so about 4 minutes with no fix step. At 2.5 merges an hour, main moves in that window in about 15 % of the runs (1 - e^(-2.5 x 4 / 60)). Each fix step makes the window longer.
Environment Diagnostics
devops-cli at origin/main 1260bb51 (2026-11-12). Found by review of PR #4879.
Logs, Traces, or Terminal Output
_push: _sync() -> _scoped_checks() [minutes, fix steps] -> _publish() / _push_with_lease() # no fetch or rebase here
Proposed fix
In _push, after the scoped checks and before _publish or _push_with_lease, take the tip with self._current_tip(in_step=False). It fetches, rebases, and on a conflict stops with push=False. Push that tip and set published_sha to it. A clean rebase that changed the head pushes a head that the scoped checks did not see; the required checks of the pull request stay the gate. An option: run the scoped checks again, at most once, only when the rebase changed the head.
Test first: main gains a commit with no conflict during the devops ci test call of the scoped checks (a program answer that calls advance_main of tests/support/roadmap_implement.py). Assert that the pushed head holds the new commit of main and that the item does not stop. A second test with move_main_when (a conflict) asserts that the Job pushes nothing.
Related: #4670, #4667, #4713, #4380.
Owner decision 2026-11-13
The approved pipeline split (tracker #5482) makes this item the push module of every producer unit. Stage pushes each checked plan revision as a checkpoint through it. Fix units push with --force-with-lease on the head that they read. It goes in Phase 1, before #5020 and #4559.
- Live proof: after the merge and the release, the implement Job and the stage row push as the App. A comment gives two pushes where the head holds the latest
origin/main.
Alternatives check of 2026-11-15: none.
Tool: none found.
Activity
devops-cli-service commentedon Nov 12, 2026
Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones.
fixprefix of the title gives the type.(roadmap)scope of the title gives the scope.The pushed head can miss main in about 15 % of runs, but the pull request checks still gate the merge.The change keeps each pushed head current and stops the item on a conflict, which prevents stale branches.The fix adds one tip call in '_push' and two focused tests.Both add a rebase before a push of the implement Job, but #4380 covers the first push and the candidate covers the final push after the scoped checks.dan-petty commentedon Nov 12, 2026
Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones.
fixprefix of the title gives the type.(roadmap)scope of the title gives the scope.It breaks the owner rule of 2026-11-11 in about 15% of runs but the PR checks still gate the merge.The pushed head misses main in a non-trivial share of runs, causing later merge friction.The fix is one rebase call in _push plus two test cases.Both concern the final push of the implement Job, but #4713 changes when the PR opens while this candidate adds a rebase before that push.dan-petty commentedon Nov 12, 2026
Scope update from the Service step jobs plan (#5014).
The owner asked on 2026-11-12 for a separate job for each step that the Service jobs run the same way every time. This issue is the
push-stepitem of that plan. The plan is extract-first: each repeated step becomes one module and one command (devops roadmap step <name>) that every caller uses, and then the steps that cost most move to their own Jobs.Proposed title:
fix(roadmap): one push step holds main at every pushProblem (plan evidence)
Five copies rebase or push a roadmap branch, each with its own abort code: stage.py:2411 and :2425; implement_run.py:789, :795, :1153, :1187, :1258, :1342, :1356, :1377, the push part of :1398 and :1909; and the inline shell of the pre-push hook branch-current (.pre-commit-config.yaml:102, #4879). The runner Job runs no git hook, so its pushes skip the predicate, and its final push can miss the latest main (#4957). Stage pushes with no lease and records nothing at a conflict.
Added scope
Widen #4957 to one push step for every caller, and add the step contract with it.
git merge-base --is-ancestor origin/<default> HEADandgit merge-tree --write-tree; refuse a push that only catches up; skip when the remote head equals the local head; push with --force-with-lease on the tip that the caller saw; set push.pending before the push, and push.sha and push.base after it. Results: pushed, same_head, refused_behind, refused_catch_up, conflict, failed.devops roadmap step push(arguments only, --check, --dry-run, --json) in its own command module, added with one add_typer line.devops roadmap step push --checkonly when that takes 2 s or less warm (lane plan W2 limit). Else the hook keeps its two git commands, and a test holds that the hook and the step run the same predicate.Open tool: git (--force-with-lease, merge-base --is-ancestor, merge-tree --write-tree; git 2.47 is in both images). Edit stage.py only at :2396-:2452, away from the hunks of PR #4966 and PR #4983. Timeouts: fetch 30 s < rebase 120 s < merge-tree 30 s < push 60 s < step 300 s, inside the limit of the caller.
Cost: about 1.5M tokens and 1.5 agent-days.
Added acceptance
uv run devops ci fail-to-pass --base origin/mainshows that the fix(roadmap): the final push of the implement Job can miss the latest main #4957 test fails before the change and passes after it.git push.Merge first
Coordination
#4076 (rebase the staged branch before implement) can call
steps/rebase.pywhen it is built. #4969 (the branch-current hook refuses a push on a slow fetch) changes the hook; the parity test of this item then holds the hook and the step to the same predicate. Coordinate with #4845 (PR #4966) and do not take it over.devops-cli-service commentedon Nov 15, 2026
Alternatives check: none
Reason: The searches turned up only Git Town (a standalone developer CLI that syncs a branch with its parent) and git itself; neither is an embeddable push step. The need is an in-process change to
ImplementRun._pushthat fetches and rebases ontoorigin/mainafter the scoped checks, stops with nothing pushed on a conflict, records the published SHA, and (per the scope update) returns one typed step result with--check,--dry-runand metrics — git only supplies the primitives (fetch,rebase,merge-base --is-ancestor,merge-tree,push --force-with-lease) that the issue already plans to call, so no open tool covers it.Tool: none found
Lacks:
Tools considered:
Searches run:
Sources:
Checked on 2026-11-15. A person decides what this means for the item. The check changes no label and closes no issue.
devops-cli-service commentedon Nov 15, 2026
Released in v0.154.0: https://github.com/dan-petty/devops-cli/releases/tag/v0.154.0
devops-cli-service commentedon Nov 15, 2026
Live since 2026-11-15 15:09 UTC