Skip to content

docs(platform): design the Cotal fork-sync + branch-model reset - #14

Open
seal-agent wants to merge 2 commits into
mainfrom
upstream-cotal-fork-sync-design
Open

docs(platform): design the Cotal fork-sync + branch-model reset#14
seal-agent wants to merge 2 commits into
mainfrom
upstream-cotal-fork-sync-design

Conversation

@seal-agent

@seal-agent seal-agent commented Aug 7, 2026

Copy link
Copy Markdown

sealedsecurity/Cotal has drifted too far to keep building on: origin/main (d55c6adb) is 815 commits behind upstream/main (8571c1bb) with 7 sealed commits, and origin/sealed-fork (0106d35c) is 33 ahead / 723 behind. This record designs the branch-model reset Matt decided: main becomes a clean upstream mirror, sealed-fork becomes the integration branch (new main + sealed changes reapplied via reviewed PRs).

What this is

A design record (the plan, not the implementation) at docs/designs/platform/cotal-fork-sync.md. Its merge freezes the contract executing agents read. The frozen intent — sync-then-reapply — is Matt's; the record designs the HOW: migration sequence, curated reapply inventory, coordination with in-flight branches, per-feature verification.

Approach

Hard reset + curated cherry-pick reapply, human-gated at the two shared-branch moves (Matt force-moves main to upstream and resets sealed-fork to it; archive tags pin the old tips first so no history is lost). The ~40 sealed commits collapse into 4 reapply lanes (oh-my-pi connector, zellij runtime, KV-watch-leak port, mint identity-reuse port), each its own PR with its own build+smoke gate, plus an explicit drop list (@cotal-ai/pi superseded by upstream's parallel extensions/pi; yaml workarounds dead now that upstream declares yaml ^2.9.0; upstream-cotal-reconnect-logger subsumed by fe6d3ec1).

Reviewed + ruled

Draft was adversarially red-teamed (design-critic), the sole review agent passed it (high 0, medium 3, low 2 — all folded), and every load-bearing forensic claim was verified at source against both remotes. The decisive correction: the connector lane (T4) is not the cheap tree-copy it first looked — loop.ts value-imports InboxTurn from @cotal-ai/connector-core, a seam upstream deleted and re-landed in extensions/pi with a tombstone-ledger contract, so T4 is a semantic port.

Matt has ruled all 7 open forks; they are now frozen Decisions (D1–D8) in the record:

Merging this PR freezes the record; execution (T1–T9) starts from the merged contract.

Spec-impact: none. This is a process/branch-model design record under docs/designs/, not a change to docs/specs/.

Co-authored-by: Matt Wilkinson matt@sealedsecurity.com

seal-agent and others added 2 commits August 7, 2026 14:29
`sealedsecurity/Cotal` has drifted too far to keep building on: `origin/main` (`d55c6adb`) is **815 commits behind** `upstream/main` (`8571c1bb`) with 7 sealed commits, and `origin/sealed-fork` (`0106d35c`) is **33 ahead / 723 behind**. This record designs the branch-model reset Matt decided: `main` becomes a clean upstream mirror, `sealed-fork` becomes the integration branch (new `main` + sealed changes reapplied via reviewed PRs).

## What this is

A design record (the plan, not the implementation) at `docs/designs/platform/cotal-fork-sync.md`. Its merge freezes the contract executing agents read. The frozen intent — sync-then-reapply — is Matt's and is not relitigated here; the record designs the HOW: migration sequence, curated reapply inventory, coordination with in-flight branches, and per-feature verification.

## Approach

Hard reset + curated cherry-pick reapply, human-gated at the two shared-branch moves (Matt force-moves `main` to upstream and resets `sealed-fork` to it; archive tags pin the old tips first so no history is lost). The ~40 sealed commits collapse into 4 reapply lanes (oh-my-pi connector, zellij runtime, KV-watch-leak port, mint identity-reuse port), each its own PR with its own build+smoke gate, plus an explicit drop list (`@cotal-ai/pi` superseded by upstream's parallel `extensions/pi`; `yaml` workarounds dead now that upstream declares `yaml ^2.9.0`; `upstream-cotal-reconnect-logger` subsumed by `fe6d3ec1`).

## Red-team applied

Draft was adversarially reviewed (design-critic) and every load-bearing finding verified at source before folding. The decisive correction: the connector lane (T4) is **not** the cheap tree-copy it first looked — its `loop.ts` imports `InboxTurn` from `@cotal-ai/connector-core`, a seam upstream **deleted** and re-landed in `extensions/pi` with a different contract (tombstone ledger). T4 is a semantic port on par with the others. This is surfaced as **OQ-7** (resurrect the old seam vs migrate onto upstream pi's exported ledger — recommend the latter).

## Open Questions (Matt rules before freeze)

7 load-bearing forks, each with a stated assumption + recommendation: PR #13 disposition, reapply-set curation, connector reconciliation with zheng's parallel branch, main-move execution ownership, where sealed-only artifacts live across the reset, hard-reset-vs-rename-cutover, and the connector InboxTurn strategy (OQ-7).

Spec-impact: none. This is a process/branch-model design record under `docs/designs/`, not a change to `docs/specs/`.

Co-authored-by: Matt Wilkinson <matt@sealedsecurity.com>
Converts the 7 Open Questions to frozen Decisions (D1-D8) per Matt's rulings on PR #14, and fixes the review agent's findings (high 0, medium 3, low 2).

**Decisions:** D1 close PR #13 (superseded duplicate); D2 curated reapply set (4 groups, 3 drops); D3 hardened connector lineage, service-owner owns T4; D4 agent runs the human-gated main-move; D5 sealed artifacts land on post-reset sealed-fork (never main); D6 hard reset + archive tags; D7 connector InboxTurn migrates onto upstream pi's exported ledger (option b); D8 reapply PRs base on sealed-fork via trunk().

**Review fixes:** M1 mint git range `dca37915^..d55c6ad` (two-dot was exclusive, dropped the foundational commit, 6 not 7); M2 T6 sources fix content via `archive/pre-sync-sealed-fork` (bare SHAs orphaned post-T3); M3 PR #14 disposition (review vehicle on main, closed/retargeted at T9, never merges to main); L1 loop.ts value-import vs type-import precision; L2 path-qualified `connector-core/src/agent.ts:462` cite.

Spec-impact: none. Refs Cotal-AI#181

Co-authored-by: Matt Wilkinson <matt@sealedsecurity.com>
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