Repository navigation
Closed
4 / 44 of 4 issues completedLabels
complexity-highComplexity: high (board points 13)priority-p1Critical paththeme-reliabilityTheme: Reliabilitytype-epicParent epic issue (groups child sub-issues)type-featureNew functionality
Description
Summary
Comprehensive improvements to Trinity's git sync system to address silent data loss, conflict deadlocks, and observability gaps. Based on real incidents from 2026-04-17 where three agents hit multiple failure modes.
Context
Trinity's git-sync design (trinity/* working branch per instance, auto-commits, pull redirected to origin/main) is architecturally sound. However, the conflict-handling, branch-ownership, and observability layers have 7 verified failure modes:
| ID | Problem | Severity |
|---|---|---|
| P1 | Silent desync accumulation (no sync health signal) | High |
| P2 | Parallel-history deadlock (both UI options wrong) | High |
| P3 | No "reset template, preserve state" primitive | Medium |
| P4 | Git internals leak into error modal | Medium |
| P5 | No branch-ownership enforcement (silent clobber) | Critical |
| P6 | Working-branch divergence hidden by ahead/behind | High |
| P7 | Three generate_instance_id() call sites, no cross-check | Medium |
Proposed Solutions
| Solution | Description | Priority | Issue |
|---|---|---|---|
| S7 | Branch ownership enforcement | P1 | #382 |
| S4 | Persistent state allowlist | P1 | #383 |
| S3 | Reset-preserve-state operation | P1 | #384 |
| S2 | Parallel-history detection | P2 | #385 |
| S5 | Operator-readable diagnosis | P2 | #386 |
| S0 | Self-hosted git URL support | P2 | #387 |
| S1 | Sync health observability | P2 | #389 |
| S6 | Fleet sync audit endpoint | P3 | #390 |
Rollout Phases
| Phase | Ships | Unblocks |
|---|---|---|
| 0 | S0 (#387) + S4 (#383) | Local repro harness, reset-preserve-state |
| 1 | S2 (#385) + S3 (#384) + S5 (#386) + S7 (#382) | UI recovery from conflicts, branch safety |
| 2 | S1 (#389) | Silent desync prevention |
| 3 | S6 (#390) | Ops playbooks, bulk health checks |
Evidence
Full proposal with code citations: ability-trinity-git-improvements-proposal.md
Real incident: 2026-04-17, three agents (polygon-vybe, alpaca-vybe-live, alpaca-vybe-live-2) hit P1-P7. One lost 50KB of trading data from silent branch clobber.
Child Issues
- Branch ownership enforcement (S7) #382 Branch ownership enforcement (S7) — P1
- Persistent state allowlist (S4) #383 Persistent state allowlist (S4) — P1
- Reset-preserve-state operation (S3) #384 Reset-preserve-state operation (S3) — P1
- Parallel-history detection at modal open (S2) #385 Parallel-history detection (S2) — P2
- Operator-readable diagnosis modal (S5) #386 Operator-readable diagnosis modal (S5) — P2
- Self-hosted git URL support (S0) #387 Self-hosted git URL support (S0) — P2
- Sync health observability (S1) #389 Sync health observability (S1) — P2
- Fleet sync audit endpoint (S6) #390 Fleet sync audit endpoint (S6) — P3
Sub-issues
Collapse Sub-issuesSub-issues
Loading 4 sub-issues
Metadata
Metadata
Assignees
Labels
complexity-highComplexity: high (board points 13)priority-p1Critical paththeme-reliabilityTheme: Reliabilitytype-epicParent epic issue (groups child sub-issues)type-featureNew functionality
Activity
feat(git): self-hosted git URL support via env overrides (Abilityai#387)
feat(git): self-hosted git URL support via env overrides (Abilityai#387)
test(git): cover TRINITY_GIT_BASE_URL / TRINITY_GIT_API_BASE overrides (
feat(git): persistent-state allowlist primitive (S4, Abilityai#383)
feat(agent-server/git): surface common_ancestor_sha + pull_branch in …
feat(frontend/git): parallel-history modal variant + detection
AndriiPasternak31 commentedon Apr 18, 2026
Phase-1 PR tracking
Each PR lands a Tier-1 regression under
tests/git-sync/adapted from/tmp/trinity-repro/repros.Reviewer rebase ordering
src/frontend/src/components/GitConflictModal.vue. Changes are disjoint (newv-ifbranch vs. presentational edits on existing branches). Whichever lands second rebases — mechanical.src/backend/services/git_service.pyanddocker/base-image/agent_server/routers/git.py. Reset-preserve-state operation (S3) #384 will rebase on feat: branch ownership enforcement (S7, #382) #396 since it's gated on feat(git): persistent-state allowlist primitive (S4, #383) #394 anyway.S3 (#384) will be dispatched once #394 merges.
feat(git): sync health observability + auto-sync heartbeat (Abilityai…
feat(fleet): GET /api/fleet/sync-audit with duplicate-binding flag (A…
feat(agent-server): snapshot + restore primitives (S3, Abilityai#384)
feat(agent-server): reset-to-main-preserve-state routine (S3, Ability…
feat(backend): reset-to-main-preserve-state endpoint + agent-busy gua…
test(git-sync): pure-git S3 regression script (Abilityai#384)
41 remaining items
feat(git): sync health observability + auto-sync heartbeat (#389 S1 +…
feat(fleet): GET /api/fleet/sync-audit with duplicate-binding flag (A…
feat(fleet): GET /api/fleet/sync-audit with duplicate-binding flag (#390
vybe commentedon Jul 3, 2026
Groom 2026-07-03: closing as complete — the git-sync reliability scope (S1–S6: auto-sync heartbeat, sync-state persistence, operator alerts, reset-to-main-preserve-state recovery, fleet sync-audit, duplicate-binding detection) shipped via #384/#389/#390 and is documented in architecture.md. The one remaining child (#253) was an aged parked idea, closed separately.