Case study — FlashyOS
Reconciling a branch that drifted 179 commits from main
- Scale
- A single reconciliation merge across the mesh platform’s API, packages and marketing site — testnets only.
- Commits main advanced since last reconciliation
- 179 (123 non-bot)
- Files carrying a real conflict
- 3 — all generated, none hand-merged
- Branch-only paths ported
- 196
- Schema migration
- 1, applied to a fresh database, zero drift
The challenge
A wallet plane that lets an AI agent hold and spend value needs an authorization layer a general-purpose SDK does not provide on its own: a manifest declaring what the agent may do, and a signer that re-derives the real operation and refuses on any mismatch before it reaches a chain. That plane was built on a long-lived branch. By the time it was ready, main had advanced 179 commits (123 of them non-bot) — new formats, new packages, a masked-failover fix in the LLM gateway, consent gating for joint initiatives — none of which the branch had ever built against.
The approach
Count the real distance before resolving anything
The reconciliation merge’s own commit message states the distance in the same breath as naming what moved: voice/1, artifact/1, devlog/1, the llm-gateway masked-failover fix, licence-scanner fixes, joint-initiative consent gating. 179 commits is not a diff size — it is 179 commits’ worth of decisions the branch’s design had to be checked against, one at a time.
Regenerate the generated files, never hand-merge them
Only three files carried a real conflict, and all three were generated: two copies of directory.fragment.json and package-lock.json. Per the estate’s own rule — a generated file is regenerated, never hand-edited — the resolution was to take main’s copy as the starting point and re-run the emitters, rather than resolve conflict markers inside JSON nobody should be reading, let alone editing by hand.
Rebuild every gitignored dist and let typecheck find what a stale build hid
Two of the packages the branch depended on — @flashyos/countersign and @flashyos/llm-gateway — had shipped real interface changes on main while the branch was away: countersign’s badge.ts gained a claimUrl export, llm-gateway’s types.ts gained an onFallback field on GatewayConfig. Both packages ship a gitignored dist/, and a locally stale build of either would typecheck clean against old types while silently missing the new surface. The fix was mechanical rather than clever: rebuild every gitignored dist from the merged source and run typecheck against that, not against whatever was sitting in node_modules from before the merge.
The outcome
The merge went in as a two-pass reconcile — an initial merge into the branch, then a second pass against main’s tip — followed by a full verification chain: typecheck and lint across every workspace, the complete per-workspace test suite, and one Prisma migration (the union of both sides’ schema changes) applied to a fresh database with zero drift. 196 branch-only paths were ported across; main won every conflict outside the three generated files. What remained after — nine test failures — were confirmed to also fail on main in the same environment, each one a read of a sibling checkout not present beside this clone, and were left alone rather than papered over. The wallet plane stayed testnet-only throughout; nothing in the merge names a mainnet or a flag for one.
The platforms this evidences
Considering something similar?
The capability above is licensable independent of this engagement — see the platform page for what is and is not white-labelled.