Commit graph

2 commits

Author SHA1 Message Date
fa6cceb9cd docs(external-contrib): v2 — sweep-only Phase 1 (Ship Msg 2 simplification)
Phase 1 simplified per Ship's architectural review:
- Drop the one-shot backfill script — the self-healing sweep IS the backfill.
  First cron tick post-deploy picks up FwazB PR 4066 automatically via the
  same SELECT/UPDATE path that handles all future races.
- Specify sweep placement as Step 0: runs as the very first action after
  initial Forgejo+GitHub fetch, ahead of branch-mirror loop AND auto-create-PR
  block (line ~250). Same-cycle convergence on fresh-cycle races.
- Replace `.fork-pr-map` design with branch-name-encoded sweep — branch name
  carries the GitHub PR number deterministically (gh-pr-{N}/...), no API
  call required, no map file, no flag plumbing.

Phase 1 final scope: ~10-line sweep block in sync-mirror.sh, idempotent,
zero-cost when clean.

Phase 2 architecture unchanged. Ship's open questions for Phase 2 (backout
flag, rebase-after-fix scope, merge commit message format) remain open.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-28 12:57:35 +01:00
e6206766dd docs(external-contrib): merge flow design — Option 2 with gh-pr-* scoping
Two-bug analysis (cherry-pick breaks GitHub merge badge + sync-mirror's
head=living-ip filter misses fork PRs leaving prs.github_pr NULL).

Empirical verification baked in: PR #87 vs #90 contrast (own-repo merge-no-ff
worked end-to-end, fork PR cherry-pick failed both bugs). 10/10 historical
Forgejo merge commits propagated to GitHub with identical SHAs — answers Ship's
added-scope concern with production data, not theory.

Phased implementation:
- Phase 1: sync-mirror github_pr backfill via .fork-pr-map (Bug #2, ~30 lines)
- Phase 2: _merge_no_ff_external for gh-pr-* branches (Bug #1, ~120 lines)
- Phase 3: FwazB PR #90 cleanup (Cory-approved option b)

Discovered scope shrink during drafting: existing fixer is already append-only
(verified against PR 4066 branch state). No fixer module changes needed —
cherry-pick at merge time was the only thing rewriting SHAs. merge --no-ff
preserves the existing fix-on-top-of-contributor-commit topology.

Open questions for Ship:
1. Backout flag (EXTERNAL_PR_NO_FF_MERGE) overkill or prudent?
2. .fork-pr-map location (bare repo vs /opt/teleo-eval/state/)
3. Phase 1+2 separate deploys or single branch?
4. Rebase-after-fix structured-alert scope vs documented-silent-ignore
5. Merge commit message format

Awaiting Ship's architecture sign-off before any code. Ganymede gets line-level
once design lands.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-28 12:37:42 +01:00