Skip to content

docs: design conflict-free results sync without force push#1503

Merged
christso merged 3 commits into
mainfrom
conflict-free-results-sync
Jun 24, 2026
Merged

docs: design conflict-free results sync without force push#1503
christso merged 3 commits into
mainfrom
conflict-free-results-sync

Conversation

@christso

Copy link
Copy Markdown
Collaborator

Summary

Design artifact (docs-only) for a no-force-push results-sync workflow for AgentV Dashboard/API. Evaluates the operator's timestamped-branch + merge + delete-to-resync idea, hardens it, and recommends a hybrid:

  • Auto-merge the common case. Result writes are append-mostly and line-orthogonal (immutable run bundles under runs/<exp>/<ts>/, append-only index JSONL). Replace the backup_and_force_push escape hatch with a bounded fetch → merge → push loop using artifact-aware merge drivers (merge=union for index, a JSON set/field-union driver for the small mutable overlay). A non-fast-forward becomes a real merge commit — no force push.
  • Human-in-the-loop fallback only on true conflict. Push local work to a new sync-<ts>-<rand6> branch (never canonical), surface a compare/PR link, and resume canonical sync only when the contributed run bundles actually reach canonical (tree-equality / ancestor check, squash-safe) — not on branch deletion (which is unreliable and risks silent data loss).

Doc: docs/plans/2026-06-24-001-feat-conflict-free-results-sync-plan.md.

Key points

  • No force push / no shared-history rewrite anywhere.
  • Critiques branch-deletion-as-merge-signal; proposes robust merged-detection.
  • Per-artifact-family merge strategy; concurrency handling; polling-vs-webhook (local-git, zero-infra; optional gh enrichment).
  • Alternatives compared: always-PR, rebase/replay, append-only/CRDT overlay.
  • Phased non-breaking plan + explicit non-goals.
  • Reuses the prior metadata-conflict UX design (PR docs: design remote metadata conflict resolution #1491 / av-xwm) minus its force_push_local action.

Tracker

  • Epic av-raf with phase children av-raf.1–4; related to av-xwm.

Notes

Design only; no implementation. No screenshots committed (would go to agentv-private). Relative paths in the doc are inline code, not markdown links, so the lychee link check is unaffected.

Design doc for a no-force-push results-sync workflow: auto-merge the
append-mostly common case via artifact-aware merge drivers
(fetch->merge->push), with a hardened human-in-the-loop temporary
timestamped-branch fallback only on true overlay conflicts. Resume
canonical sync on confirmed merge (tree-equality/ancestor, squash-safe),
never on branch deletion. Supersedes backup_and_force_push.

Tracked by bead av-raf (epic) with phase children av-raf.1..4.
Related to av-xwm.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jun 23, 2026

Copy link
Copy Markdown

Deploying agentv with  Cloudflare Pages  Cloudflare Pages

Latest commit: 7e1ba22
Status: ✅  Deploy successful!
Preview URL: https://edccc6a7.agentv.pages.dev
Branch Preview URL: https://conflict-free-results-sync.agentv.pages.dev

View logs

Resume is now an explicit user OK button, not auto-detection. Drop the
squash-safe tree-equality/ancestor machinery and the per-file merge-UI
dependency (av-xwm): GitHub's PR is the conflict-resolution surface.

Layer 1 auto-merges the append-only common case (union/JSON drivers).
Layer 2: on true conflict push a timestamped temp branch, surface a
GitHub compare/PR link, user merges on GitHub, clicks OK, AgentV pulls
the target branch to resume. Premature OK re-diverges without data loss.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Entire-Checkpoint: b45ebb0fe0c0
@christso

Copy link
Copy Markdown
Collaborator Author

Updated the design to be much simpler:

  • Resume is an explicit user OK button, not auto-detection. Dropped all squash-safe tree-equality/ancestor machinery.
  • GitHub's PR is the conflict-resolution surface — AgentV builds no merge/diff/accept-incoming UI. Dropped the dependency on the av-xwm per-file conflict editor.
  • Layer 1 still auto-merges the append-only common case via git union/JSON-union drivers (silent, no UI).
  • Layer 2 (true conflict only): push a timestamped temp branch → surface a GitHub compare/PR link → user merges on GitHub → clicks OK → AgentV pulls the target branch and resumes. A premature OK just re-diverges with no data loss and no force push.

Still docs-only; tracked by epic av-raf.

The user owns the GitHub merge, so deleting the merged sync-* branch
belongs to that same GitHub flow (auto-delete-on-merge or manual). AgentV
only creates the temp branch and reads the target on OK; it does not
delete or track temp branches for cleanup.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Entire-Checkpoint: d88be769afd1
@christso christso marked this pull request as ready for review June 24, 2026 23:47
@christso christso merged commit 6fb5d7b into main Jun 24, 2026
8 checks passed
@christso christso deleted the conflict-free-results-sync branch June 24, 2026 23:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant