germinate: daughters fork their parent's mitosis — repo-migrate, 3 tiers (#70) #72

Merged
plat merged 3 commits from feat/fork-on-germinate into main 2026-07-02 15:16:11 +00:00
Owner

Implements #70 per the design contract on the issue: after the postgres-backed Forgejo is healthy, the daughter's mitosis repo is created by Forgejo repo-migrate (full parent history + forge-recorded source = genealogy) instead of the squashed bundle push. THREE tiers, never aborting germination: (1) seed manifest createdFrom (the parent), (2) MITOSIS_FORK_ROOT default git.open-platform.sh/plat/mitosis (removed-parent case), (3) the existing bundle push (air-gapped seeds unchanged). One-time migrate — downstream maintainer edits are never clobbered. ORIGIN lineage still appends; public flag + metadata replay preserved.

Validation: the coldstart gate (merged via #71) runs automatically on this PR (bin/** path filter) and proves tier-flow germination end-to-end; tier-specific assertions (parent-history depth, migration metadata, forced tier-3) follow as a gate extension before merge.

🤖 Generated with Claude Code

Implements #70 per the design contract on the issue: after the postgres-backed Forgejo is healthy, the daughter's mitosis repo is created by Forgejo repo-migrate (full parent history + forge-recorded source = genealogy) instead of the squashed bundle push. THREE tiers, never aborting germination: (1) seed manifest createdFrom (the parent), (2) MITOSIS_FORK_ROOT default git.open-platform.sh/plat/mitosis (removed-parent case), (3) the existing bundle push (air-gapped seeds unchanged). One-time migrate — downstream maintainer edits are never clobbered. ORIGIN lineage still appends; public flag + metadata replay preserved. Validation: the coldstart gate (merged via #71) runs automatically on this PR (bin/** path filter) and proves tier-flow germination end-to-end; tier-specific assertions (parent-history depth, migration metadata, forced tier-3) follow as a gate extension before merge. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
A daughter's plat/mitosis is now a Forgejo repo-migrate of its parent's —
FULL history + forge-recorded source (original_url) — instead of the
squashed seed bundle. Three tiers, never aborting germination:
  tier-1  the seed manifest's createdFrom (the actual parent)
  tier-2  MITOSIS_FORK_ROOT (default https://git.open-platform.sh/plat/mitosis)
  tier-3  the existing bundle push — air-gapped seeds keep germinating,
          byte-for-byte today's behavior
Each tier logs its attempt and the winner is logged + shown on the card.
When a migrate wins, the migrated repo is adopted as $WORK/r-mitosis, so
the ORIGIN lineage commit lands ON TOP of the parent history and the
re-push loop fast-forwards it; mkrepo's public flag + description/website/
topics replay, REGISTRY_TOKEN and protect_workflows apply unchanged.

Forgejo's default migration policy only allows external (public-IP)
sources, so local-network parents (git.<parent>.local) would silently
land on the bundle tier: germinate shims [migrations]
ALLOW_LOCALNETWORKS=true into the forged gitops forgejo helmrelease
(mtu-shim precedent — no-ops once the seed's gitops carries it;
canonical gitops change rides alongside).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
plat force-pushed feat/fork-on-germinate from e6f7d9117e to 13e278106b
All checks were successful
coldstart / coldstart (pull_request) Successful in 18m3s
2026-07-02 14:16:57 +00:00
Compare
gate: A7 fork-genealogy assertion (#70)
Some checks failed
coldstart / coldstart (pull_request) Failing after 18m13s
539046d77d
Asserts the daughter's plat/mitosis shape: migrated repos must record their
source (original_url) AND carry parent history; bundle-shape repos pass as
tier-3/pre-#70. Strict cross-check when the workflow exports FORK_TIER from
the germination log. Uses the gate's existing port-forward+admin-auth
pattern.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
gate/workflow: host-persisted run logs + definitive fork-tier RESULT line
All checks were successful
coldstart / coldstart (pull_request) Successful in 17m44s
d883cffd99
Workspaces are scrubbed post-run and this Forgejo's job-log API 404s, so a
red gate run was undebuggable — tee the germination and gate output to
~/ci-gate-logs/run<N>-{up,gate}.log on the runner host. germinate now logs
ONE definitive 'mitosis fork RESULT: tier-N' line (attempt lines also fire
on failed tiers), and the workflow exports FORK_TIER from it so A7 asserts
strictly: log-said-migrate must match repo-records-migration.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
plat merged commit 8a7dc0e013 into main 2026-07-02 15:16:11 +00:00
Sign in to join this conversation.
No description provided.