Repository navigation
Description
What happened
On PR #55:
- The fix agent (run 42790585191, agents@87a43fcb8495) started at 09:25 against main
cacc0b3. - It pinned
@types/nodeto 20.11.25 because the project's TypeScript was 4.6.3. It validated that withtsc, tests, lint and build. - While it ran, main advanced twice. The second advance was
88038f5(fix(scripts): pre-commit tool auto-install silently skipped on runner #57, TypeScript 4.6.3 → 7.0.2), which changedpackage.jsonandpackage-lock.json, the same files the fix edited. - At push time,
post-fix.shfetched and loggedcacc0b3..88038f5 main -> origin/main, then loggedForge mergeability: state=MERGEABLE conflict=false. - It skipped any update and pushed. The fix comment said 'tsc, tests, lint, and build pass' and recorded the conflict update as skipped.
- The agent itself never fetched or compared
origin/main, althoughgit branch -aalready listed the pendingdependabot/npm_and_yarn/typescript-7.0.2branch. - Ten minutes later, the next review (run 42791384665, $3.47) requested changes because the pin's rationale no longer held on main.
- The owner then fixed the PR by hand.
What could go better
agents#1518 deliberately limited target-branch reconciliation to forge-reported CONFLICTING states. That is sound for avoiding noisy rebases, but it means a clean push can carry validation results that no longer describe what would merge.
Here the result was:
- one wasted fix iteration ($0.70),
- one review run spent rediscovering the drift ($3.47),
- manual human rework.
I am confident about the mechanism, which is visible in the logs. I am less sure how often it happens. It needs concurrent merges that touch the same files during a roughly 5-minute fix window. On this repo, though, Dependabot bursts make that common: 4 major bumps were merged within minutes on the same day (per the retro on #57).
The cheapest useful version is disclosure. Full re-validation is better, but it costs more runtime.
Proposed change
In post-fix.sh (and its GitLab counterpart), after the existing fetch of the target branch:
- Compute
git diff --name-only <pre-agent merge-base>..origin/<target>. - Intersect it with the files the agent changed (
PRE_AGENT_HEAD..HEAD). - If the intersection is non-empty, or includes dependency manifests and lockfiles even when the files differ:
- Preferred: merge the target into the branch using the existing
FIX_CONFLICT_UPDATE_STRATEGYmachinery, and re-run the harness's test/validation command before pushing. - Minimum: append a line to the fix summary comment and the result JSON naming the stale base, the new target SHA, and the overlapping files, for example: 'validated against cacc0b3; target advanced to 88038f5 with changes to package.json, package-lock.json — re-validation needed'.
- Preferred: merge the target into the branch using the existing
- Separately, add a step to the fix agent definition or skill: when a fix's rationale rests on another dependency's version, check remote branches and open PRs for pending changes to that dependency, and mention them in the decision points.
Cross-link agents#1934, which covers the PR head moving mid-run (where this proposal covers the base moving), and agents#1163.
Validation criteria
- Replay the fix(docs-review): check related docs by name and directory, not just identifier grep #55 scenario: the target branch advances during a fix run with changes to the same manifest.
- With the change, the fix comment either shows re-validated results on the merged tree, or carries the explicit stale-base warning naming the overlapping files.
- Over the next 10 fix runs where the target advanced mid-run, no review requests changes solely because the fix rested on a pre-merge base.
Related issues checked
Searched: post-fix target branch advanced behind main revalidate repo:fullsend-ai/agents; stale base semantic conflict mergeable BEHIND fix agent across fullsend-ai/fullsend, fullsend-ai/agents, shairevivo/react-shopping-cart; FIX_CONFLICT_UPDATE_STRATEGY CONFLICTING only 1518
Considered: #1518, #1934, #1797, #1163, #765, #235, #409, #1666, fullsend-ai/fullsend#1653
#1518 (closed/completed) added conflict reconciliation and intentionally excluded stale or BEHIND branches; this proposal refines it for the case where the drift overlaps files the fix changed. #1934 covers the PR head being force-pushed mid-run, not the target advancing cleanly. #1797 covers preserving history on a concurrent PR-branch advance. #1163 re-checks the PR head, not the base. #765 covers CI after a rebase, which only applies when a rebase happens. #235 and fullsend#1653 are about the review side. #409 covers fetching before the force-with-lease retry. #1666 covers semantic overlap on the CONFLICTING path only.
Generated by retro agent from fullsend-ai/react-shopping-cart#55
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsTodo
Activity