@teambit/ci 1.0.486 → 1.0.488
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ci.main.runtime.d.ts +8 -1
- package/dist/ci.main.runtime.js +36 -7
- package/dist/ci.main.runtime.js.map +1 -1
- package/dist/{preview-1785864931304.js → preview-1785951580001.js} +1 -1
- package/dist/sync/adopt-lane-new-components.d.ts +36 -0
- package/dist/sync/adopt-lane-new-components.js +146 -0
- package/dist/sync/adopt-lane-new-components.js.map +1 -0
- package/dist/sync/lane-sync-executor.js +2 -1
- package/dist/sync/lane-sync-executor.js.map +1 -1
- package/package.json +13 -13
- package/sync/adopt-lane-new-components.ts +128 -0
- package/sync/lane-sync-executor.ts +5 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_chalk","data","_interopRequireDefault","require","_cli","_legacy","_componentModules","_git","_syncConfig","_syncState","_workspaceLane","_syncPlanner","_gitOps","e","__esModule","default","_defineProperty","r","t","_toPropertyKey","Object","defineProperty","value","enumerable","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","TypeError","String","Number","HALT_SUMMARY_PREFIX","exports","REFUSED_SUMMARY_PREFIX","laneHeadFingerprint","components","fingerprintIdVersions","map","comp","id","toStringWithoutVersion","head","laneComponentIds","foreignLaneComponents","defaultScope","filter","scope","MAX_LISTED_FOREIGN_COMPONENTS","MAX_LISTED_COMPONENTS","capEntries","entries","overflowPrefix","max","length","slice","crossScopeDescription","foreignIds","scopes","Set","split","sort","sample","join","crossScopeSkipSummary","laneName","crossScopeRefusal","existingBranch","outcome","branchMirrorsOtherLaneReason","branch","mirroredLaneIdStr","laneIdStr","branchMirrorsOtherLaneNote","crossScopeMidFlightHaltReason","isProtectedBranch","defaultBranch","mainSyncBranch","dryRunSummaryLine","action","type","reason","KEPT_BECAUSE","LaneSyncExecutor","constructor","deps","syncLane","target","opts","cfg","logger","name","hostScope","laneNameToBranch","reconcileLane","dryRun","explicitTarget","message","undefined","console","formatWarningSummary","haltOrReport","executeHalt","pr","findPr","haltError","error","consoleWarning","fetchOnce","ci","getDefaultBranchName","summary","remoteLane","getRemoteLane","laneHead","branchExists","branchExistsOnRemote","branchState","readBranchSyncState","stateCommit","bitmap","hasDevCommits","tipMessage","hasSyncMarker","conflictLabelPresent","labels","includes","CONFLICT_LABEL","suppressedByLabel","mirroredLane","claim","assessBranchOwnership","commentNote","foreign","crossScopeOutcome","midFlight","explicit","Boolean","laneIsGone","ownership","lastSyncedHead","branchStateFingerprint","tipIsSyncCommit","isSyncAuthoredMessage","planLaneSync","chalk","blue","line","executeImportLane","executeExportBranch","executeMergeDiverged","executeClosePr","deleteBranch","keepReason","expectedTipSha","tipSha","unhandled","Error","JSON","stringify","startPoint","checkoutFromRemote","switchErr","materializeLane","commitAllAndPush","buildSyncCommitMessage","prUrl","htmlUrl","openPrForLane","restoreWorkspace","lastNonSyncCommitMessage","exportErr","snapAndExportOntoLane","recordLaneHeadOnBranch","halt","merge","mergeLaneIntoBranchWorkingTree","policyClause","conflicts","onConflict","strategy","resolved","conflictedFileCount","green","SYNC_COMMIT_MARKER","ensureCurrentLaneObject","lanes","snapPrCommit","build","strict","keepLane","skipCleanup","noDestructiveRecovery","mergeStrategy","parseLaneId","current","currentLaneIdStr","toString","results","checkout","checkoutByCLIValues","promptMergeOptions","skipNpmInstall","workspaceOnly","forEach","conflictedFiles","values","filesStatus","isConflictFileStatus","push","leftUnresolvedConflicts","checkoutPristine","reloadWorkspaceFromDisk","isAncestor","gitHost","prClause","number","keep","deleteAt","currentTip","currentBranchTip","keptBecause","closeComment","closePr","branchDeleted","leaseRefused","pushBranchDeletion","isStaleLeaseRejection","refetchBranchTip","git","deleteBranchArgs","addLabel","comment","haltCommentBody","laneId","note","isOnTarget","toMainErr","switchToLaneForSync","forceOurs","forceTheirs","fetched","fetchRemoteHeads","getLanes","remote","catch","findPrByBranch","log","entry","all","find","item","body","addAllExceptScopeAndModules","commitWithIdentity","extraArgs","laneUrl","getCloudDomain","replace","laneSyncPrBody","created","createPr","base","title","checkoutPristineRestore","status","FileStatus","manual","binaryConflict","deletedConflict","listed","shellQuote","resolution"],"sources":["lane-sync-executor.ts"],"sourcesContent":["import chalk from 'chalk';\nimport { formatWarningSummary } from '@teambit/cli';\nimport type { Logger } from '@teambit/logger';\nimport type { LanesMain } from '@teambit/lanes';\nimport type { LaneData } from '@teambit/legacy.scope';\nimport { getCloudDomain } from '@teambit/legacy.constants';\nimport { FileStatus, type MergeStrategy } from '@teambit/component.modules.merge-helper';\nimport { git } from '../git';\nimport type { CiMain } from '../ci.main.runtime';\nimport type { CiSyncConfig, LaneTarget } from './sync-config';\nimport { laneNameToBranch } from './sync-config';\nimport type { BranchSyncState } from './sync-state';\nimport {\n CONFLICT_LABEL,\n SYNC_COMMIT_MARKER,\n branchStateFingerprint,\n buildSyncCommitMessage,\n fingerprintIdVersions,\n readBranchSyncState,\n hasSyncMarker,\n isSyncAuthoredMessage,\n} from './sync-state';\nimport { currentLaneIdStr, ensureCurrentLaneObject } from './workspace-lane';\nimport type { GitHostProvider, PrInfo } from './git-host-provider';\nimport type { BranchKeepReason, LaneOwnershipEvidence, LaneSyncAction } from './sync-planner';\nimport { planLaneSync } from './sync-planner';\nimport {\n addAllExceptScopeAndModules,\n branchExistsOnRemote,\n checkoutPristine,\n checkoutPristineRestore,\n commitWithIdentity,\n deleteBranchArgs,\n fetchRemoteHeads,\n isAncestor,\n isStaleLeaseRejection,\n refetchBranchTip,\n} from './git-ops';\n\n/**\n * Prefix of the summary line for a lane that could not be reconciled. `syncLane` deliberately does\n * NOT throw on halt — one unreconcilable lane must not abort the rest of the run; the command layer\n * scans for this prefix to decide the exit code.\n */\nexport const HALT_SUMMARY_PREFIX = 'HALTED';\n\n/**\n * Prefix for a target the reconciler refuses. Unlike a halt, nothing is mid-flight and no PR is\n * annotated — the run exits non-zero, but the command layer reports a plain refusal rather than a\n * sync conflict.\n */\nexport const REFUSED_SUMMARY_PREFIX = 'REFUSED';\n\nexport type LaneSyncDeps = {\n lanes: LanesMain;\n /** for snapPrCommit + getDefaultBranchName + switchToLaneForSync */\n ci: CiMain;\n logger: Logger;\n /** undefined => PR operations are logged and skipped; the git half of the sync still runs. */\n gitHost?: GitHostProvider;\n cfg: Required<CiSyncConfig>;\n defaultScope: string;\n};\n\n/**\n * Fingerprint of a lane's content — same primitive as `branchStateFingerprint`, so \"equal\" means\n * exactly \"the branch records every lane component at the lane's head\".\n *\n * We deliberately do NOT use `LaneData.hash`: that hash is minted randomly at lane-creation time\n * and does not change when the lane's components advance. This is derived from content instead.\n */\nexport function laneHeadFingerprint(components: LaneData['components']): string {\n return fingerprintIdVersions(components.map((comp) => `${comp.id.toStringWithoutVersion()}@${comp.head}`));\n}\n\n/** The lane's component ids, without versions — the id set `branchStateFingerprint` reads off the branch. */\nfunction laneComponentIds(components: LaneData['components']): string[] {\n return components.map((comp) => comp.id.toStringWithoutVersion());\n}\n\n/**\n * The lane's components that do not belong to `defaultScope`. A lane may span scopes, and the\n * reconciler acts on a lane whole (fingerprint, materialize, snap, export), so foreign content is\n * refused rather than written into this repository. Soft-deleted components and `updateDependents`\n * entries are deliberately not read — the reconciler never materializes or exports them either.\n */\nexport function foreignLaneComponents(components: LaneData['components'], defaultScope: string): string[] {\n return components.filter((comp) => comp.id.scope !== defaultScope).map((comp) => comp.id.toStringWithoutVersion());\n}\n\n/** How many foreign component ids a cross-scope message names before it summarizes the rest. */\nconst MAX_LISTED_FOREIGN_COMPONENTS = 5;\n\n/**\n * How many component ids a PR body or comment enumerates before summarizing the rest. GitHub caps a\n * PR body / issue comment at 65,536 characters and rejects the whole request over it.\n */\nconst MAX_LISTED_COMPONENTS = 20;\n\n/**\n * `entries`, capped at `max`, with a final \"…and K more\" entry. The bound is on entries, not rendered\n * length, so a markdown list is never cut mid-line. `overflowPrefix` carries the caller's list marker\n * onto the summary line.\n */\nexport function capEntries(entries: string[], overflowPrefix = '', max: number = MAX_LISTED_COMPONENTS): string[] {\n if (entries.length <= max) return entries;\n return [...entries.slice(0, max), `${overflowPrefix}…and ${entries.length - max} more`];\n}\n\n/** The shared clause describing why a lane is cross-scope, used by the skip/refusal/halt outcomes. */\nexport function crossScopeDescription(foreignIds: string[], defaultScope: string): string {\n // The scope is everything before the FIRST '/': a component id is `<scope>/<namespace…>/<name>`.\n const scopes = [...new Set(foreignIds.map((id) => id.split('/', 1)[0]))].sort();\n const sample = capEntries(foreignIds, '', MAX_LISTED_FOREIGN_COMPONENTS).join(', ');\n return (\n `components from scope(s) ${scopes.join(', ')} (this repo maps scope ${defaultScope}); ` +\n `foreign components: ${sample}`\n );\n}\n\n/**\n * A cross-scope lane that was merely enumerated: a skip, and the run stays green — a standing, valid\n * lane must not turn every scheduled run permanently red.\n */\nexport function crossScopeSkipSummary(laneName: string, foreignIds: string[], defaultScope: string): string {\n return (\n `${laneName} -> skipped (cross-scope lane: ${crossScopeDescription(foreignIds, defaultScope)} — ` +\n `no branch created; see the docs' Cross-scope lanes section)`\n );\n}\n\n/**\n * A cross-scope lane the user named explicitly: exits non-zero with the explanation. A refusal, not a\n * halt — no PR is labelled, no branch is written. `existingBranch` keeps the closing sentence truthful\n * when a branch of that name already exists.\n */\nexport function crossScopeRefusal(foreignIds: string[], defaultScope: string, existingBranch?: string): string {\n const outcome = existingBranch\n ? `Nothing was written; the existing branch ${existingBranch} was left untouched`\n : 'No branch was created and nothing was written';\n return (\n `cross-scope lane: ${crossScopeDescription(foreignIds, defaultScope)}; syncing cross-scope lanes is ` +\n `not supported yet — see the docs' Cross-scope lanes section. ${outcome}`\n );\n}\n\n/**\n * Halt reason for a branch that is the live mirror of a different lane — two lanes with the same name\n * in different scopes map to the same branch. Names both ids so the human can tell which owns it.\n */\nexport function branchMirrorsOtherLaneReason(branch: string, mirroredLaneIdStr: string, laneIdStr: string): string {\n return (\n `branch ${branch} mirrors lane ${mirroredLaneIdStr}; refusing to plan for ${laneIdStr} — two lanes ` +\n `with the same name in different scopes map to the same branch, and reconciling this one would ` +\n `overwrite the other lane's mirror`\n );\n}\n\n/**\n * PR comment for the branch-aliasing halt — the one halt whose PR belongs to a DIFFERENT lane. It must\n * not carry the default \"import the lane\" steps, which would perform the overwrite the halt prevented.\n */\nexport function branchMirrorsOtherLaneNote(mirroredLaneIdStr: string, laneIdStr: string): string {\n return `This pull request belongs to lane \\`${mirroredLaneIdStr}\\`, and nothing is wrong with it.\n\nLane \\`${laneIdStr}\\` has the same lane *name* in a different scope, so it maps to this same branch, and \\\n\\`bit ci sync\\` refused to reconcile it here rather than overwrite this branch with the other lane's content.\nBoth lanes stay unsynced until the collision is resolved: rename one of the two lanes, or map one of them to \\\na different branch via the \\`branches\\` option of the \\`teambit.git/ci\\` sync config.\n\nDo NOT run the usual \"bit lane import\" resolution steps on this branch — they would import \\\n\\`${laneIdStr}\\` over \\`${mirroredLaneIdStr}\\`'s mirror.`;\n}\n\n/**\n * A lane that became cross-scope after this repository had already mirrored it onto a branch — the one\n * cross-scope shape that is a genuine halt: the pair is mid-flight and can no longer converge.\n */\nexport function crossScopeMidFlightHaltReason(branch: string, foreignIds: string[], defaultScope: string): string {\n return (\n `lane became cross-scope after it was mirrored onto ${branch}: ${crossScopeDescription(foreignIds, defaultScope)}; ` +\n `the branch and the lane can no longer be reconciled automatically — see the docs' Cross-scope lanes section`\n );\n}\n\n/**\n * Branches `executeClosePr` refuses to delete whatever the ownership evidence concluded — an\n * unconditional guard at the one site that deletes remote branches.\n */\nexport function isProtectedBranch(branch: string, defaultBranch: string, mainSyncBranch: string): boolean {\n return branch === defaultBranch || branch === mainSyncBranch;\n}\n\n/**\n * The summary line a dry run reports for a planned action. A planned halt carries the same prefix the\n * real run would: `summarizeSync` recognizes that prefix and nothing else, so without it a `--dry-run`\n * exits 0 on a plan that needs a human. Refusals never reach here — they are returned before planning.\n */\nexport function dryRunSummaryLine(laneName: string, action: LaneSyncAction): string {\n return action.type === 'halt'\n ? `${HALT_SUMMARY_PREFIX} ${laneName} -> ${action.reason}`\n : `${laneName} -> ${action.type}`;\n}\n\n/** Why each `BranchKeepReason` withheld the deletion — one wording for the PR comment and the summary. */\nexport const KEPT_BECAUSE: Record<BranchKeepReason, string> = {\n 'unmerged-commits': `it carries commits that are not in the default branch`,\n 'tip-not-a-sync-commit': `its tip is not one of this reconciler's own commits, so the work in it may exist nowhere else`,\n 'tip-advanced-during-run': `its tip advanced after the ownership evidence was read, so it may carry work this run never saw`,\n};\n\nexport class LaneSyncExecutor {\n constructor(private deps: LaneSyncDeps) {}\n\n /** Every `origin/<ref>` read assumes current remote refs; fetch once per executor, not per lane. */\n private fetched = false;\n\n /**\n * Reconcile one lane with its git branch/PR. Returns a summary line (HALT/REFUSED prefixed on\n * failure) and NEVER throws — the contract the `--all` loop is written against, for every failure\n * mode: the steps route expected failures to `executeHalt`, this wrapper covers the unexpected ones.\n */\n async syncLane(\n target: LaneTarget,\n opts: {\n dryRun?: boolean;\n /** The user named this lane on the command line; decides how a cross-scope lane is reported. */\n explicitTarget?: boolean;\n } = {}\n ): Promise<string> {\n const { cfg, logger } = this.deps;\n const laneName = target.name;\n const laneIdStr = `${target.hostScope}/${laneName}`;\n // Declared outside the try so the catch can tell \"reconciling failed\" from \"the name never mapped\n // to a branch\". The mapping must run INSIDE the try: `laneNameToBranch` throws on a lane name git\n // cannot accept as a ref, and this method's contract is that it never throws.\n let branch: string | undefined;\n try {\n // The branch mapping is by lane NAME only; everything addressed to bit uses the lane's real id.\n branch = laneNameToBranch(laneName, cfg);\n return await this.reconcileLane({\n target,\n laneIdStr,\n branch,\n dryRun: opts.dryRun,\n explicitTarget: opts.explicitTarget,\n });\n } catch (e: any) {\n const reason = `unexpected error: ${e?.message || e}`;\n // No branch => nothing to annotate: report-only, but still HALT-prefixed so the run exits non-zero.\n if (branch === undefined) {\n logger.console(formatWarningSummary(`Cannot sync lane ${laneIdStr}: ${reason}`));\n return `${HALT_SUMMARY_PREFIX} ${laneName} -> ${reason}`;\n }\n // This catch fires for exceptions thrown before `reconcileLane`'s own dry-run handling gets a\n // say; without the guard an early crash would label a PR on a run that promised no writes.\n if (opts.dryRun) {\n return this.haltOrReport({ laneName, laneIdStr, branch, reason, dryRun: true });\n }\n try {\n return await this.executeHalt({ laneName, laneIdStr, branch, reason, pr: await this.findPr(branch) });\n } catch (haltError: any) {\n // The halt itself failed; throwing here would abort the remaining lanes, so report and move on.\n logger.error(`bit ci sync: failed to halt lane ${laneIdStr}`, haltError);\n logger.consoleWarning(`Could not record the halt of lane ${laneIdStr}: ${haltError?.message || haltError}`);\n return `${HALT_SUMMARY_PREFIX} ${laneName} -> ${reason}`;\n }\n }\n }\n\n private async reconcileLane({\n target,\n laneIdStr,\n branch,\n dryRun,\n explicitTarget,\n }: {\n target: LaneTarget;\n laneIdStr: string;\n branch: string;\n dryRun?: boolean;\n explicitTarget?: boolean;\n }): Promise<string> {\n const { logger, defaultScope, cfg } = this.deps;\n const laneName = target.name;\n\n await this.fetchOnce();\n\n const defaultBranch = await this.deps.ci.getDefaultBranchName();\n\n // RESERVED BRANCHES: a `branches` override can map a lane onto the default or main-sync branch,\n // and the lane path would then commit and push to a branch only the main-scope path may own. The\n // guard lives here because this is the single funnel every trigger passes through.\n if (isProtectedBranch(branch, defaultBranch, cfg.mainSyncBranch)) {\n const reason =\n `lane ${laneIdStr} maps to ${branch}, which is ` +\n `${branch === defaultBranch ? \"the repository's default branch\" : 'the main sync branch maintained by this command'}; ` +\n `the main scope is reconciled by \"bit ci sync --main\", never as a lane. Nothing was written`;\n if (explicitTarget) {\n logger.console(formatWarningSummary(`Cannot sync lane ${laneIdStr}: ${reason}`));\n return `${REFUSED_SUMMARY_PREFIX} ${laneName} -> ${reason}`;\n }\n const summary = `${laneName} -> skipped (${reason})`;\n logger.console(formatWarningSummary(summary));\n return summary;\n }\n\n const remoteLane = await this.getRemoteLane(target);\n\n const laneHead = remoteLane ? laneHeadFingerprint(remoteLane.components) : undefined;\n const branchExists = await branchExistsOnRemote(branch);\n const branchState: BranchSyncState = branchExists\n ? await readBranchSyncState(branch, defaultBranch, defaultScope)\n : { stateCommit: undefined, bitmap: undefined, hasDevCommits: false, tipMessage: '' };\n if (hasSyncMarker(branchState.tipMessage)) {\n logger.console('branch tip is a bit-sync commit; reconciler will no-op unless the lane moved');\n }\n\n // Read before any refusal below: every halt must be suppressible by the conflict label, or a\n // standing problem re-comments on the same PR on every scheduled run.\n const pr = await this.findPr(branch);\n const conflictLabelPresent = pr?.labels.includes(CONFLICT_LABEL) ?? false;\n const suppressedByLabel = `${laneName} -> noop (PR is labeled ${CONFLICT_LABEL}; resolve and remove the label to resume)`;\n\n // Which lane, if any, this branch is the LIVE mirror of. Attribution (the `.bitmap` lane pointer)\n // alone proves nothing: a merged sync PR's state is inherited by every branch cut from the default\n // branch afterwards. Only a state commit the default branch does not contain says \"mirror, now\".\n const mirroredLane = branchState.bitmap?.laneIdStr;\n const claim: LaneOwnershipEvidence =\n mirroredLane && branchState.stateCommit\n ? await this.assessBranchOwnership({ branch, defaultBranch, stateCommit: branchState.stateCommit })\n : 'inherited-or-none';\n const mirroredLaneIdStr = claim === 'own-live' ? mirroredLane : undefined;\n\n // TWO LANES, ONE BRANCH: the mapping is keyed on the lane NAME, so same-named lanes in different\n // scopes collide. Planning against another lane's live mirror would hijack it — halt instead.\n // Only when this lane exists: with no lane, `close-pr` already refuses without attribution, and\n // halting a branch this repository cannot resolve would leave a permanently red run with no PR.\n if (laneHead && mirroredLaneIdStr && mirroredLaneIdStr !== laneIdStr) {\n if (conflictLabelPresent) return suppressedByLabel;\n // The PR annotated here belongs to `mirroredLaneIdStr`, the lane that owns this branch;\n // `commentNote` tells its reviewers why a label appeared on a PR whose own lane is healthy.\n return this.haltOrReport({\n laneName,\n laneIdStr,\n branch,\n reason: branchMirrorsOtherLaneReason(branch, mirroredLaneIdStr, laneIdStr),\n pr,\n dryRun,\n commentNote: branchMirrorsOtherLaneNote(mirroredLaneIdStr, laneIdStr),\n });\n }\n\n // A cross-scope lane cannot be reconciled here — the reconciler acts on a lane whole, so mirroring\n // one would write another repository's components into this one. The check lives in the executor\n // because every trigger funnels through here, and it needs the lane's content.\n const foreign = remoteLane ? foreignLaneComponents(remoteLane.components, defaultScope) : [];\n if (foreign.length) {\n return this.crossScopeOutcome({\n laneName,\n laneIdStr,\n branch,\n branchExists,\n foreign,\n midFlight: mirroredLaneIdStr === laneIdStr,\n explicit: Boolean(explicitTarget),\n conflictLabelPresent,\n suppressedByLabel,\n pr,\n dryRun,\n });\n }\n // Attribution to THIS lane is required: the claim was computed for whichever lane the branch's\n // `.bitmap` names, and a claim on someone else's behalf licenses nothing here.\n const laneIsGone = branchExists && !laneHead;\n const ownership: LaneOwnershipEvidence = laneIsGone && mirroredLane === laneIdStr ? claim : 'inherited-or-none';\n\n // What the branch reflects, read off its own `.bitmap` — only when that `.bitmap` names THIS lane;\n // otherwise the planner's `!lastSyncedHead` rows handle \"no state of ours\".\n const lastSyncedHead =\n remoteLane && branchState.bitmap && mirroredLane === laneIdStr\n ? branchStateFingerprint(branchState.bitmap, laneComponentIds(remoteLane.components))\n : undefined;\n\n // `isSyncAuthoredMessage`, NOT `hasSyncMarker`: this feeds a branch deletion, and a message that\n // merely quotes the marker must not read as one we wrote.\n const tipIsSyncCommit = isSyncAuthoredMessage(branchState.tipMessage);\n\n const action = planLaneSync({\n laneHead,\n branchExists,\n lastSyncedHead,\n hasDevCommits: branchState.hasDevCommits,\n tipIsSyncCommit,\n conflictLabelPresent,\n ownership,\n });\n\n logger.console(\n chalk.blue(\n `${laneName} -> ${action.type} (branch: ${branch}, lane head: ${laneHead?.slice(0, 9) ?? 'none'}, ` +\n `branch state: ${lastSyncedHead?.slice(0, 9) ?? 'none'}, ` +\n `dev commits: ${branchState.hasDevCommits}${laneIsGone ? `, branch claim: ${ownership}` : ''})`\n )\n );\n\n if (dryRun) {\n const line = dryRunSummaryLine(laneName, action);\n logger.console(formatWarningSummary(`Dry-run: ${line}`));\n return line;\n }\n\n // A pair can be converged at the bit level while the tip still holds unsnapped source edits (a\n // single commit that rewrites `.bitmap` AND carries an edit is its own state commit) — say so.\n // `laneHead` must be checked explicitly: with no lane and no attribution both fingerprints are\n // undefined, and `undefined === undefined` would fire on every ordinary developer branch.\n if (\n action.type === 'noop' &&\n action.reason === 'converged' &&\n !tipIsSyncCommit &&\n laneHead &&\n lastSyncedHead === laneHead\n ) {\n logger.console(\n formatWarningSummary(\n `converged on bit state, but ${branch}'s tip is not a bit ci sync commit — any source edits it ` +\n `carries that were never snapped stay invisible until the next commit on the branch`\n )\n );\n }\n\n switch (action.type) {\n case 'noop':\n return `${laneName} -> noop (${action.reason})`;\n case 'import-lane':\n // The planner only emits import-lane when the lane exists, so both casts are safe.\n return this.executeImportLane({\n target,\n laneIdStr,\n branch,\n branchExists,\n defaultBranch,\n laneHead: laneHead as string,\n remoteLane: remoteLane as LaneData,\n pr,\n });\n case 'export-branch':\n return this.executeExportBranch({ target, laneIdStr, branch, defaultBranch });\n case 'merge-diverged':\n return this.executeMergeDiverged({ target, laneIdStr, branch, defaultBranch });\n case 'close-pr':\n return this.executeClosePr({\n laneName,\n laneIdStr,\n branch,\n defaultBranch,\n pr,\n deleteBranch: action.deleteBranch,\n keepReason: action.deleteBranch ? undefined : action.keepReason,\n expectedTipSha: branchState.tipSha,\n });\n case 'halt':\n return this.executeHalt({ laneName, laneIdStr, branch, reason: action.reason, pr });\n default: {\n // exhaustiveness guard\n const unhandled: never = action;\n throw new Error(`bit ci sync: unhandled lane sync action ${JSON.stringify(unhandled)}`);\n }\n }\n }\n\n /**\n * What a cross-scope lane means for this repository: a mid-flight halt when the branch is this\n * lane's live mirror (checked first — the problem is the state of the pair, not the phrasing of the\n * request); a refusal when the user named the lane explicitly; otherwise an enumerated skip that\n * stays green — one standing cross-scope lane must not fail every scheduled run forever.\n */\n private async crossScopeOutcome({\n laneName,\n laneIdStr,\n branch,\n branchExists,\n foreign,\n midFlight,\n explicit,\n conflictLabelPresent,\n suppressedByLabel,\n pr,\n dryRun,\n }: {\n laneName: string;\n laneIdStr: string;\n branch: string;\n branchExists: boolean;\n foreign: string[];\n midFlight: boolean;\n explicit: boolean;\n conflictLabelPresent: boolean;\n suppressedByLabel: string;\n pr?: PrInfo;\n dryRun?: boolean;\n }): Promise<string> {\n const { logger, defaultScope } = this.deps;\n\n if (midFlight) {\n // Self-suppression like every other halt — otherwise this would re-comment on every scheduled run.\n if (conflictLabelPresent) return suppressedByLabel;\n return this.haltOrReport({\n laneName,\n laneIdStr,\n branch,\n reason: crossScopeMidFlightHaltReason(branch, foreign, defaultScope),\n pr,\n dryRun,\n });\n }\n\n if (explicit) {\n const reason = crossScopeRefusal(foreign, defaultScope, branchExists ? branch : undefined);\n logger.console(formatWarningSummary(`Cannot sync lane ${laneIdStr}: ${reason}`));\n return `${REFUSED_SUMMARY_PREFIX} ${laneName} -> ${reason}`;\n }\n\n const summary = crossScopeSkipSummary(laneName, foreign, defaultScope);\n logger.console(formatWarningSummary(summary));\n return summary;\n }\n\n /**\n * Mirror the remote lane onto the branch: check the branch out, materialize the lane into the\n * workspace, and commit the result. The committed `.bitmap` IS the record of the branch's state.\n */\n private async executeImportLane({\n target,\n laneIdStr,\n branch,\n branchExists,\n defaultBranch,\n laneHead,\n remoteLane,\n pr,\n }: {\n target: LaneTarget;\n laneIdStr: string;\n branch: string;\n branchExists: boolean;\n defaultBranch: string;\n laneHead: string;\n remoteLane: LaneData;\n pr?: PrInfo;\n }): Promise<string> {\n const { logger } = this.deps;\n const laneName = target.name;\n logger.console(chalk.blue(`Importing lane ${laneIdStr} onto branch ${branch}`));\n\n // A brand-new lane branch forks from the default branch; an existing one is reset to whatever\n // the remote has, so a stale local copy of the branch can never leak into the sync commit.\n const startPoint = branchExists ? `origin/${branch}` : `origin/${defaultBranch}`;\n await this.checkoutFromRemote(branch, startPoint);\n\n try {\n // A switch that moved the pointer without materializing the files would make every later run\n // read the pair as converged over content the branch never received — see `materializeLane`.\n const switchErr = await this.materializeLane(laneIdStr);\n if (switchErr) {\n return await this.executeHalt({\n laneName,\n laneIdStr,\n branch,\n reason: `failed to switch to lane ${laneIdStr}: ${switchErr.message}`,\n pr,\n });\n }\n\n await this.commitAllAndPush(branch, buildSyncCommitMessage(laneIdStr, laneHead));\n\n let prUrl = pr?.htmlUrl;\n if (!pr) {\n prUrl = await this.openPrForLane({ target, laneIdStr, branch, defaultBranch, laneHead, remoteLane });\n }\n return (\n `${laneName} -> import-lane (pushed ${branch} @ lane ${laneHead.slice(0, 9)}` +\n `${prUrl ? `, PR ${prUrl}` : ''})`\n );\n } finally {\n await this.restoreWorkspace(defaultBranch);\n }\n }\n\n /**\n * Push the branch's dev commits back onto the lane: snap+export the branch's tree, then commit the\n * resulting `.bitmap` back onto the branch so the next run sees the two sides as converged.\n */\n private async executeExportBranch({\n target,\n laneIdStr,\n branch,\n defaultBranch,\n }: {\n target: LaneTarget;\n laneIdStr: string;\n branch: string;\n defaultBranch: string;\n }): Promise<string> {\n const { logger } = this.deps;\n const laneName = target.name;\n logger.console(chalk.blue(`Exporting branch ${branch} onto lane ${laneIdStr}`));\n\n const message = await this.lastNonSyncCommitMessage(branch, defaultBranch);\n await this.checkoutFromRemote(branch, `origin/${branch}`);\n\n try {\n const exportErr = await this.snapAndExportOntoLane(laneIdStr, message);\n if (exportErr) {\n // Halt rather than propagate: one lane's failed snap/export must not abort the lanes after it.\n return await this.executeHalt({\n laneName,\n laneIdStr,\n branch,\n reason: `failed to snap and export branch ${branch} onto lane ${laneIdStr}: ${exportErr.message}`,\n pr: await this.findPr(branch),\n });\n }\n\n const laneHead = await this.recordLaneHeadOnBranch(target, laneIdStr, branch);\n if (!laneHead) {\n return await this.executeHalt({\n laneName,\n laneIdStr,\n branch,\n reason: `lane ${laneIdStr} could not be read back from the remote after export`,\n pr: await this.findPr(branch),\n });\n }\n return `${laneName} -> export-branch (lane ${laneIdStr} @ ${laneHead.slice(0, 9)}, branch ${branch} updated)`;\n } finally {\n await this.restoreWorkspace(defaultBranch);\n }\n }\n\n /**\n * Both sides moved since the last sync. Order is load-bearing: (1) merge the lane into the branch's\n * working tree (`bit checkout head`; conflicts halt or auto-resolve per `sync.onConflict`), (2) snap\n * + export the merged tree — the snap IS the merge, (3) commit the resulting `.bitmap` back onto the\n * branch. The merge cannot be skipped: the export path's switch runs under `forceOurs`, which never\n * touches the filesystem, so a bare export would silently revert every lane-side file edit and then\n * assert convergence over the loss. Never throws; anything unexpected halts.\n */\n private async executeMergeDiverged({\n target,\n laneIdStr,\n branch,\n defaultBranch,\n }: {\n target: LaneTarget;\n laneIdStr: string;\n branch: string;\n defaultBranch: string;\n }): Promise<string> {\n const { logger } = this.deps;\n const laneName = target.name;\n logger.console(\n formatWarningSummary(\n `Diverged: lane ${laneIdStr} and branch ${branch} both moved since the last sync — attempting to converge`\n )\n );\n\n const halt = async (reason: string) =>\n this.executeHalt({ laneName, laneIdStr, branch, reason, pr: await this.findPr(branch) });\n\n try {\n // Force-checkout `origin/<branch>` and reload `.bitmap`: the merge depends on that file for the\n // lane pointer and the merge base, and a stale local branch must never leak into the result.\n await this.checkoutFromRemote(branch, `origin/${branch}`);\n\n // ---- step 1: merge the lane's snaps into the branch's working tree -----------------------\n const merge = await this.mergeLaneIntoBranchWorkingTree(laneIdStr);\n if (merge.error) {\n return await halt(`failed to merge lane ${laneIdStr} into branch ${branch}: ${merge.error.message}`);\n }\n let policyClause = '';\n if (merge.conflicts.length) {\n // Discard the conflict markers before ANY next step: a halt must not leave a half-merged tree,\n // and the policy re-merge would read markers on disk as the branch's own content.\n await this.checkoutFromRemote(branch, `origin/${branch}`);\n if (this.deps.cfg.onConflict === 'halt') {\n // Bounded: this reason is posted as the halt PR comment.\n return await halt(`merge conflicts in: ${capEntries(merge.conflicts).join(', ')}`);\n }\n // Side mapping per bit's checkout semantics: `checkout head` merges the lane's head INTO the\n // workspace, whose tree is the branch's — so 'ours' = the branch (git-wins) and 'theirs' = the\n // incoming lane head (lane-wins).\n const strategy: MergeStrategy = this.deps.cfg.onConflict === 'git-wins' ? 'ours' : 'theirs';\n logger.console(\n formatWarningSummary(\n `Merge conflicts in ${capEntries(merge.conflicts).join(', ')} — resolving by policy ` +\n `sync.onConflict \"${this.deps.cfg.onConflict}\" (bit merge strategy: ${strategy})`\n )\n );\n const resolved = await this.mergeLaneIntoBranchWorkingTree(laneIdStr, strategy);\n if (resolved.error) {\n return await halt(\n `failed to merge lane ${laneIdStr} into branch ${branch} under sync.onConflict ` +\n `\"${this.deps.cfg.onConflict}\": ${resolved.error.message}`\n );\n }\n if (resolved.conflicts.length) {\n // 'ours'/'theirs' cannot leave a conflict by construction; if bit reports one anyway,\n // exporting it as if resolved is the one unacceptable outcome — reset and halt.\n await this.checkoutFromRemote(branch, `origin/${branch}`);\n return await halt(\n `merge conflicts in ${capEntries(resolved.conflicts).join(', ')} survived the ` +\n `\"${this.deps.cfg.onConflict}\" auto-resolution`\n );\n }\n // The count comes from the manual pass; the policy pass no longer sees a conflict.\n policyClause = `conflicts auto-resolved: ${this.deps.cfg.onConflict} on ${merge.conflictedFileCount} file(s); `;\n logger.console(\n chalk.green(\n `Resolved ${merge.conflictedFileCount} conflicted file(s) by \"${this.deps.cfg.onConflict}\" — ` +\n `snapping the merged tree`\n )\n );\n } else {\n logger.console(\n chalk.green(`Merged lane ${laneIdStr} into ${branch} with no conflicts — snapping the merged tree`)\n );\n }\n\n // ---- step 2: snap + export the merged tree onto the lane ---------------------------------\n const exportErr = await this.snapAndExportOntoLane(\n laneIdStr,\n `merge remote lane ${laneIdStr} into ${branch} ${SYNC_COMMIT_MARKER}`\n );\n if (exportErr) {\n return await halt(\n `merged lane ${laneIdStr} into branch ${branch} cleanly, but snapping/exporting the merged ` +\n `result failed: ${exportErr.message}`\n );\n }\n\n // ---- step 3: record the new lane head on the branch --------------------------------------\n const laneHead = await this.recordLaneHeadOnBranch(target, laneIdStr, branch);\n if (!laneHead) {\n return await halt(`lane ${laneIdStr} could not be read back from the remote after the merge export`);\n }\n return (\n `${laneName} -> merge-diverged (${policyClause}merged lane into branch, then exported; lane ${laneIdStr} @ ` +\n `${laneHead.slice(0, 9)}, branch ${branch} updated)`\n );\n } catch (e: any) {\n // Something unforeseen — halt anyway: no single lane may abort the rest of the run.\n return await halt(\n `unexpected failure while reconciling diverged lane ${laneIdStr} with branch ${branch}: ${e?.message || e}`\n );\n } finally {\n await this.restoreWorkspace(defaultBranch);\n }\n }\n\n /**\n * Snap the workspace's current tree onto the lane and export it; returns the error so the caller can\n * halt. Snaps WHATEVER is in the workspace (the switch uses `forceOurs` and never merges files), so\n * a diverged tree must already hold the merged content. `keepLane` preserves the lane's history,\n * `skipCleanup` keeps the snap's `.bitmap` for the caller to commit, `noDestructiveRecovery` turns\n * stale-lane recovery (delete + re-fork the remote lane) into a throw. The lane object must be\n * imported BEFORE delegating: a switch onto the lane the workspace is already on no-ops before any\n * fetch, so it never warms a cold scope.\n */\n private async snapAndExportOntoLane(laneIdStr: string, message: string): Promise<Error | undefined> {\n try {\n await ensureCurrentLaneObject(this.deps.lanes);\n await this.deps.ci.snapPrCommit({\n laneIdStr,\n message,\n build: undefined,\n strict: undefined,\n keepLane: true,\n skipCleanup: true,\n noDestructiveRecovery: true,\n });\n return undefined;\n } catch (e: any) {\n return e instanceof Error ? e : new Error(String(e?.message ?? e));\n }\n }\n\n /**\n * Record on the branch which lane state it now mirrors: re-query the lane (the export just moved it,\n * so any earlier fingerprint is stale), commit — crucially the `.bitmap` the snap rewrote — and push.\n * Returns undefined when the lane can no longer be read, in which case the caller halts.\n */\n private async recordLaneHeadOnBranch(\n target: LaneTarget,\n laneIdStr: string,\n branch: string\n ): Promise<string | undefined> {\n const remoteLane = await this.getRemoteLane(target);\n if (!remoteLane) return undefined;\n const laneHead = laneHeadFingerprint(remoteLane.components);\n await this.commitAllAndPush(branch, buildSyncCommitMessage(laneIdStr, laneHead));\n return laneHead;\n }\n\n /**\n * Merge the lane's snaps into the branch's working tree via `bit checkout head` (three-way merge,\n * base = the branch's `.bitmap` version; `workspaceOnly` must stay false so lane-only components are\n * added). Returns conflicted ids + file count rather than throwing. Not `mergeLanes.mergeLane`: both\n * sides here are the same lane id, which `validateMergeFlags` rejects, and `mergeLane` refuses to\n * run with modified components — exactly the branch's state here.\n */\n private async mergeLaneIntoBranchWorkingTree(\n laneIdStr: string,\n mergeStrategy: MergeStrategy = 'manual'\n ): Promise<{ conflicts: string[]; conflictedFileCount: number; error?: Error }> {\n const { logger, lanes } = this.deps;\n try {\n // `checkout head` merges into the CURRENT lane; if the workspace is not on it, the merge would\n // silently resolve to main's heads and write main's content over the dev work — refuse instead.\n // `currentLaneIdStr`, NOT `lanes.getCurrentLane()`: the latter answers \"main\" on a cold runner.\n const target = await lanes.parseLaneId(laneIdStr);\n const current = currentLaneIdStr(lanes);\n if (current !== target.toString()) {\n return {\n conflicts: [],\n conflictedFileCount: 0,\n error: new Error(\n `the branch's .bitmap points at \"${current ?? 'main'}\" ` +\n `rather than ${laneIdStr}, so the lane's snaps cannot be merged into the branch's working tree`\n ),\n };\n }\n\n // Cold runner: the lane object may not be in this scope at all — import before the merge.\n await ensureCurrentLaneObject(lanes);\n\n logger.console(\n chalk.blue(\n `Merging lane ${laneIdStr} into the branch's working tree (bit checkout head ` +\n `${mergeStrategy === 'manual' ? '--manual' : `--auto-merge-resolve ${mergeStrategy}`})`\n )\n );\n // `checkoutByCLIValues` (rather than `checkout`) because it runs `importer.importCurrentObjects()`\n // first — without it, `head` would resolve to the stale lane heads this workspace already had.\n const results = await lanes.checkout.checkoutByCLIValues('', {\n head: true,\n mergeStrategy,\n promptMergeOptions: false,\n skipNpmInstall: true,\n workspaceOnly: false,\n });\n\n let conflictedFileCount = 0;\n const conflicts: string[] = [];\n (results.components || []).forEach((comp) => {\n const conflictedFiles = Object.values(comp.filesStatus || {}).filter(isConflictFileStatus);\n if (!conflictedFiles.length) return;\n conflictedFileCount += conflictedFiles.length;\n conflicts.push(comp.id.toStringWithoutVersion());\n });\n // If bit's own summary flag disagrees with the per-file scan, trust it — a missed conflict\n // would get exported as if it were resolved.\n if (!conflicts.length && results.leftUnresolvedConflicts) conflicts.push('(component not reported)');\n return { conflicts, conflictedFileCount };\n } catch (e: any) {\n return {\n conflicts: [],\n conflictedFileCount: 0,\n error: e instanceof Error ? e : new Error(String(e?.message ?? e)),\n };\n }\n }\n\n /**\n * Put the working tree on `branch` at a pristine copy of `startPoint` and reload the `.bitmap` it\n * brings (see `checkoutPristine`), so no leftover from a previous lane leaks into this lane's sync\n * commit and the following bit operation resolves against this branch's `.bitmap`. Also the recovery\n * after a merge attempt: resetting to `origin/<branch>` puts both sides back on the fetched tip.\n */\n private async checkoutFromRemote(branch: string, startPoint: string) {\n await checkoutPristine(branch, startPoint, () => this.deps.ci.reloadWorkspaceFromDisk());\n }\n\n /**\n * The reachability half of `LaneOwnershipEvidence`; the attribution half lives at the call site.\n * An unanswerable question resolves to `inherited-or-none` — every other answer permits deleting a\n * branch, and a failed `merge-base` is not evidence of anything. A foreign-hosted lane's branch\n * reached by branch name attributes as `inherited-or-none` (scope mismatch), which is the safe\n * direction: left alone, never retired.\n */\n private async assessBranchOwnership({\n branch,\n defaultBranch,\n stateCommit,\n }: {\n branch: string;\n defaultBranch: string;\n stateCommit: string;\n }): Promise<LaneOwnershipEvidence> {\n const { logger } = this.deps;\n try {\n if (!(await isAncestor(stateCommit, `origin/${defaultBranch}`))) return 'own-live';\n // The PR was merged. Deleting is only safe if the tip is in the default branch too; otherwise\n // work was pushed after the merge and lives nowhere else.\n if (await isAncestor(`origin/${branch}`, `origin/${defaultBranch}`)) return 'own-merged';\n return 'own-superseded';\n } catch (e: any) {\n logger.consoleWarning(\n `Could not establish whether ${branch} is already merged into ${defaultBranch}, so its ownership ` +\n `could not be determined; treating it as inherited-or-none (no branch is retired, and the branch ` +\n `is not treated as any lane's live mirror): ${e?.message || e}`\n );\n return 'inherited-or-none';\n }\n }\n\n /**\n * The lane is gone from bit.cloud — close its PR, and retire the branch if the claim on it allows.\n * Deleting the branch is the one irreversible thing this command does; `keepReason` distinguishes\n * \"work that exists nowhere else\" from \"we did not write the tip\".\n */\n private async executeClosePr({\n laneName,\n laneIdStr,\n branch,\n defaultBranch,\n pr,\n deleteBranch,\n keepReason,\n expectedTipSha,\n }: {\n laneName: string;\n laneIdStr: string;\n branch: string;\n defaultBranch: string;\n pr?: PrInfo;\n deleteBranch: boolean;\n keepReason?: BranchKeepReason;\n /** the tip every input to the deletion decision was read from; the delete leases on it */\n expectedTipSha?: string;\n }): Promise<string> {\n const { logger, gitHost } = this.deps;\n const prClause = pr ? `PR #${pr.number} closed` : 'no open PR';\n\n // Every input to the deletion decision — tip-is-sync-commit, dev commits, ownership — comes from refs\n // fetched once at the start of the run, and an `--all` run can spend minutes on earlier lanes. Re-read\n // this one branch first: the evidence licensed deleting THAT commit, not whatever the branch holds now.\n let keep = keepReason;\n let deleteAt: string | undefined;\n if (deleteBranch) {\n const currentTip = expectedTipSha ? await this.currentBranchTip(branch) : undefined;\n if (currentTip && currentTip === expectedTipSha) deleteAt = currentTip;\n else {\n keep = 'tip-advanced-during-run';\n logger.consoleWarning(\n `Not retiring branch ${branch}: its tip is now ${currentTip ?? 'unreadable'} rather than the ` +\n `${expectedTipSha ?? 'unknown'} its ownership evidence was read from — it advanced during this run`\n );\n }\n }\n\n const keptBecause = KEPT_BECAUSE[keep ?? 'unmerged-commits'];\n const closeComment = deleteAt\n ? `Lane ${laneIdStr} was removed/archived on bit.cloud.`\n : `Lane ${laneIdStr} was removed/archived on bit.cloud. The branch \\`${branch}\\` is being kept: ` +\n `${keptBecause}.`;\n if (gitHost && pr) {\n logger.console(chalk.blue(`Closing PR #${pr.number} for removed lane ${laneIdStr}`));\n await gitHost.closePr(pr.number, closeComment);\n } else if (gitHost) {\n // Not an error: the PR may have been merged or closed by hand already, or never existed.\n logger.console(\n formatWarningSummary(\n `No open PR found for ${branch} — ${deleteAt ? 'only retiring the branch' : 'nothing to close'}`\n )\n );\n } else {\n logger.console(formatWarningSummary(`No configured git host provider — skipping PR close for ${branch}`));\n }\n\n if (!deleteAt) {\n if (keep === 'tip-not-a-sync-commit') {\n logger.console(\n formatWarningSummary(\n `lane removed remotely, but ${branch}'s tip is not a bit ci sync commit — a developer wrote the ` +\n `branch's current bit state, so it is not safe to assume the branch is only our mirror; keeping it`\n )\n );\n return `${laneName} -> close-pr (${prClause}, branch ${branch} kept: its tip was not written by bit ci sync)`;\n }\n if (keep === 'tip-advanced-during-run') {\n return `${laneName} -> close-pr (${prClause}, branch ${branch} kept: ${keptBecause})`;\n }\n logger.console(\n formatWarningSummary(`lane removed remotely but branch carries unmerged commits; keeping branch ${branch}`)\n );\n return (\n `${laneName} -> close-pr (${prClause}, branch ${branch} kept: ` +\n `it carries commits missing from the default branch)`\n );\n }\n\n // Reaching this guard means something upstream is wrong; log it and keep the branch.\n if (isProtectedBranch(branch, defaultBranch, this.deps.cfg.mainSyncBranch)) {\n logger.consoleWarning(\n `Refusing to delete branch ${branch}: it is ${\n branch === defaultBranch ? 'the default branch' : 'the main sync branch'\n }, whatever the ownership evidence concluded`\n );\n return `${laneName} -> close-pr (${prClause}, branch ${branch} kept: deleting it is never allowed)`;\n }\n\n // Best-effort: the branch may be protected, or already removed by hand.\n let branchDeleted = true;\n let leaseRefused = false;\n try {\n await this.pushBranchDeletion(branch, deleteAt);\n } catch (e: any) {\n const message = String(e?.message || e);\n branchDeleted = false;\n // The second belt: the re-read above and this push are not atomic, so the server gets the last word.\n leaseRefused = isStaleLeaseRejection(message);\n logger.consoleWarning(\n leaseRefused\n ? `Not retiring branch ${branch}: the remote refused the lease on ${deleteAt} — it advanced ` +\n `between the re-read and the delete`\n : `Could not delete remote branch ${branch}: ${message}`\n );\n }\n if (leaseRefused) {\n return `${laneName} -> close-pr (${prClause}, branch ${branch} kept: ${KEPT_BECAUSE['tip-advanced-during-run']})`;\n }\n return `${laneName} -> close-pr (${prClause}, branch ${branch} ${branchDeleted ? 'deleted' : 'left in place'})`;\n }\n\n /** Seams for the retirement path, so the one irreversible outcome is unit-testable without a remote. */\n private currentBranchTip(branch: string): Promise<string | undefined> {\n return refetchBranchTip(branch);\n }\n\n private async pushBranchDeletion(branch: string, expectedTipSha: string): Promise<void> {\n await git.push(deleteBranchArgs(branch, expectedTipSha));\n }\n\n /**\n * Record a halt without touching the PR on a dry run — `--dry-run` promises no PR writes, and\n * labelling freezes a lane's syncs. The line stays HALT-prefixed either way. Every pre-planning halt\n * goes through here so the guard cannot be forgotten at one site.\n */\n private async haltOrReport({\n laneName,\n laneIdStr,\n branch,\n reason,\n pr,\n dryRun,\n commentNote,\n }: {\n laneName: string;\n laneIdStr: string;\n branch: string;\n reason: string;\n pr?: PrInfo;\n dryRun?: boolean;\n commentNote?: string;\n }): Promise<string> {\n if (dryRun) {\n const { logger } = this.deps;\n logger.console(formatWarningSummary(`Cannot sync lane ${laneIdStr} automatically: ${reason}`));\n logger.console(formatWarningSummary('Dry-run: the PR is not labelled or commented on'));\n return `${HALT_SUMMARY_PREFIX} ${laneName} -> ${reason}`;\n }\n return this.executeHalt({ laneName, laneIdStr, branch, reason, pr, commentNote });\n }\n\n /**\n * Hand the lane back to a human: label the PR so subsequent runs skip it, and comment the resolution\n * steps. `commentNote` replaces the default steps for halts where they would be wrong.\n */\n private async executeHalt({\n laneName,\n laneIdStr,\n branch,\n reason,\n pr,\n commentNote,\n }: {\n laneName: string;\n laneIdStr: string;\n branch: string;\n reason: string;\n pr?: PrInfo;\n commentNote?: string;\n }): Promise<string> {\n const { logger, gitHost } = this.deps;\n logger.console(formatWarningSummary(`Cannot sync lane ${laneIdStr} automatically: ${reason}`));\n if (gitHost && pr) {\n try {\n await gitHost.addLabel(pr.number, CONFLICT_LABEL);\n await gitHost.comment(pr.number, haltCommentBody({ reason, branch, laneId: laneIdStr, note: commentNote }));\n } catch (e: any) {\n // Failing to annotate the PR must not replace the real reason with a git-host API error.\n logger.consoleWarning(`Failed to annotate PR #${pr.number} with the sync conflict: ${e?.message || e}`);\n }\n } else if (gitHost) {\n logger.console(\n formatWarningSummary(`No open PR found for ${branch} — the halt is recorded in this run's summary only`)\n );\n } else {\n logger.console(\n formatWarningSummary(`No configured git host provider — skipping conflict label/comment for ${branch}`)\n );\n }\n return `${HALT_SUMMARY_PREFIX} ${laneName} -> ${reason}`;\n }\n\n /**\n * Drive the workspace's filesystem to the remote lane's content; returns the error so the caller can\n * halt. Two traps make a plain `switchToLane` insufficient: (1) it defaults to `forceOurs`, which\n * never touches the filesystem — the commit would claim the branch mirrors the lane over the default\n * branch's files — so `forceOurs` is cleared and `forceTheirs` set; (2) switching onto the lane the\n * workspace already sits on throws \"already checked out\", which `switchToLane` swallows as success\n * and nothing materializes — so step off to main first.\n */\n private async materializeLane(laneIdStr: string): Promise<Error | undefined> {\n const { logger } = this.deps;\n const target = await this.deps.lanes.parseLaneId(laneIdStr);\n // Compares name AND scope, and reads from `.bitmap`, not the scope's lane object — the object read\n // answers \"main\" on a cold runner and would skip the step-off to main (see `workspace-lane.ts`).\n const isOnTarget = () => currentLaneIdStr(this.deps.lanes) === target.toString();\n\n if (isOnTarget()) {\n logger.console(\n formatWarningSummary(\n `Workspace is already on ${laneIdStr} — stepping off to main so the re-import actually runs`\n )\n );\n const toMainErr = await this.deps.ci.switchToLaneForSync('main');\n if (toMainErr) return toMainErr;\n if (isOnTarget()) {\n return new Error(`unable to leave lane ${laneIdStr} before re-importing it; the workspace is still on it`);\n }\n }\n\n const switchErr = await this.deps.ci.switchToLaneForSync(laneIdStr, { forceOurs: false, forceTheirs: true });\n if (switchErr) return switchErr;\n\n // Verify before the caller commits a `.bitmap` asserting this lane's content.\n if (!isOnTarget()) {\n return new Error(\n `switching to lane ${laneIdStr} reported success but the workspace is on ` +\n `\"${currentLaneIdStr(this.deps.lanes) ?? 'main'}\"`\n );\n }\n return undefined;\n }\n\n private async fetchOnce() {\n if (this.fetched) return;\n await fetchRemoteHeads();\n this.fetched = true;\n }\n\n /**\n * The remote lane's data, or undefined when the lane no longer exists. The remote queried must be\n * the lane's HOSTING scope: asking `defaultScope` for a lane it does not host answers \"was not\n * found\" — the input that drives `close-pr`, which deletes branches.\n */\n private async getRemoteLane(target: LaneTarget): Promise<LaneData | undefined> {\n const { hostScope, name } = target;\n const lanes = await this.deps.lanes.getLanes({ remote: hostScope, name }).catch((e) => {\n // \"was not found\" = the lane is gone: a legitimate state (drives close-pr), not an error.\n if (e.toString().includes('was not found')) return [];\n throw new Error(`Failed to read lane ${hostScope}/${name} from the remote: ${e.toString()}`);\n });\n return lanes[0];\n }\n\n /**\n * The open PR for the branch, if any. A git-host API hiccup degrades to \"no PR known\" rather than\n * failing the lane — the git side of the sync is still correct and the next run re-reads the PR.\n */\n private async findPr(branch: string): Promise<PrInfo | undefined> {\n const { gitHost, logger } = this.deps;\n if (!gitHost) return undefined;\n try {\n return await gitHost.findPrByBranch(branch);\n } catch (e: any) {\n logger.consoleWarning(`Could not look up the PR for ${branch}: ${e?.message || e}`);\n return undefined;\n }\n }\n\n /**\n * The subject of the newest commit on the branch that isn't one of our own sync commits — it's\n * the developer's own description of the change, and becomes the snap message on the lane.\n */\n private async lastNonSyncCommitMessage(branch: string, defaultBranch: string): Promise<string> {\n const log = await git.log([`origin/${branch}`, '--max-count=200']);\n const entry = log.all.find((item) => {\n const message = item.body ? `${item.message}\\n\\n${item.body}` : item.message;\n return !hasSyncMarker(message);\n });\n return entry?.message || `chore: sync ${branch} into the lane (from ${defaultBranch})`;\n }\n\n /**\n * Stage everything, commit with the annotated sync message, and push. NEVER force-pushes: a rejected\n * push means someone pushed concurrently and the next run should re-plan rather than clobber.\n * `--allow-empty` is only insurance against `git commit` failing the lane outright.\n */\n private async commitAllAndPush(branch: string, message: string) {\n await addAllExceptScopeAndModules();\n await commitWithIdentity(message, { extraArgs: ['--allow-empty'] });\n // `HEAD:refs/heads/<branch>`: a full-ref destination cannot be resolved as a tag or reinterpreted —\n // the configured branch name is user input (see `sync-config.ts`).\n await git.push(['origin', `HEAD:refs/heads/${branch}`]);\n this.deps.logger.console(chalk.green(`Pushed ${branch}`));\n }\n\n private async openPrForLane({\n target,\n laneIdStr,\n branch,\n defaultBranch,\n laneHead,\n remoteLane,\n }: {\n target: LaneTarget;\n laneIdStr: string;\n branch: string;\n defaultBranch: string;\n laneHead: string;\n remoteLane: LaneData;\n }): Promise<string | undefined> {\n const { gitHost, logger } = this.deps;\n if (!gitHost) {\n logger.console(formatWarningSummary(`No configured git host provider — skipping PR creation for ${branch}`));\n return undefined;\n }\n // The lane page lives under the scope that HOSTS the lane, not necessarily `defaultScope`.\n // `replace('.', '/')` replaces only the first dot, which is correct: a scope id may contain at\n // most one dot (is-valid-scope-name.ts) — the same conversion `ScopeUrl.toPathname` does.\n const laneUrl = `https://${getCloudDomain()}/${target.hostScope.replace('.', '/')}/~lane/${target.name}`;\n const body = laneSyncPrBody({ laneIdStr, laneUrl, branch, laneHead, components: remoteLane.components });\n try {\n const created = await gitHost.createPr({\n head: branch,\n base: defaultBranch,\n title: `Lane sync: ${laneIdStr}`,\n body,\n });\n logger.console(chalk.green(`Opened PR ${created.htmlUrl} for lane ${laneIdStr}`));\n return created.htmlUrl;\n } catch (e: any) {\n // The branch is already pushed — the load-bearing half. A failed PR creation shouldn't fail the\n // lane; the next run retries.\n logger.consoleWarning(`Could not open a PR for ${branch}: ${e?.message || e}`);\n return undefined;\n }\n }\n\n /**\n * Put the workspace back on main with the default branch checked out. Best-effort, warn-only, so a\n * restore hiccup can't throw out of a `finally` and mask the real error. The checkout is forced\n * (switching back to main rewrites `.bitmap`); the scoped clean discards files a halted lane\n * materialized but never committed, which would otherwise be staged onto the NEXT lane's branch;\n * the reload makes the next lane resolve against the right checkout. This is a checkout, never a\n * push — and `MainSyncExecutor.restoreWorkspace` must not diverge from it.\n */\n private async restoreWorkspace(defaultBranch: string) {\n const { logger } = this.deps;\n try {\n if (currentLaneIdStr(this.deps.lanes)) {\n const switchErr = await this.deps.ci.switchToLaneForSync('main');\n if (switchErr) logger.consoleWarning(`Could not switch the workspace back to main: ${switchErr.message}`);\n }\n await checkoutPristineRestore(defaultBranch, () => this.deps.ci.reloadWorkspaceFromDisk());\n } catch (e: any) {\n logger.consoleWarning(`Could not restore the workspace after sync: ${e?.message || e}`);\n }\n }\n}\n\n/**\n * Whether a `filesStatus` entry represents a conflict. Compared against `FileStatus` rather than\n * string literals — its values are chalk-colored labels. `deletedConflict` counts too.\n */\nfunction isConflictFileStatus(status: string): boolean {\n return status === FileStatus.manual || status === FileStatus.binaryConflict || status === FileStatus.deletedConflict;\n}\n\n/**\n * The body of the pull request that mirrors a lane onto a branch. The component list is capped so the\n * body stays inside the git host's size limit however large the lane is; the total is not.\n */\nexport function laneSyncPrBody({\n laneIdStr,\n laneUrl,\n branch,\n laneHead,\n components,\n}: {\n laneIdStr: string;\n laneUrl: string;\n branch: string;\n laneHead: string;\n components: LaneData['components'];\n}): string {\n const listed = capEntries(\n components.map((comp) => `- \\`${comp.id.toStringWithoutVersion()}\\` @ \\`${comp.head.slice(0, 9)}\\``),\n '- '\n ).join('\\n');\n return [\n `Mirrors the Bit lane [\\`${laneIdStr}\\`](${laneUrl}) onto \\`${branch}\\`.`,\n '',\n `- lane: ${laneUrl}`,\n `- lane head: \\`${laneHead}\\``,\n '',\n `Components on the lane (${components.length}):`,\n listed || '_none_',\n '',\n 'This PR is maintained by `bit ci sync` — push to the branch to send changes back to the lane.',\n ].join('\\n');\n}\n\n/**\n * Single-quote a value interpolated into a copy-pasteable shell command. Lane names may contain `$` and\n * `!`, and a configured branch name may contain anything git accepts as a ref — including a quote.\n */\nfunction shellQuote(value: string): string {\n return `'${value.replace(/'/g, `'\\\\''`)}'`;\n}\n\n/**\n * Resolution instructions posted on a halted PR. `note` replaces the default steps for halts where\n * they do not apply (the branch-aliasing halt, whose PR belongs to a different lane).\n */\nexport function haltCommentBody({\n reason,\n branch,\n laneId,\n note,\n}: {\n reason: string;\n branch: string;\n laneId: string;\n note?: string;\n}): string {\n const resolution =\n note ??\n `To resolve locally:\n git fetch origin && git checkout ${shellQuote(branch)}\n bit lane import ${shellQuote(laneId)}\n # resolve conflicts, commit the result, then:\n git push origin ${shellQuote(branch)}`;\n return `bit-git-sync could not reconcile this branch automatically: ${reason}\n\n${resolution}\n\nRemove the \\`bit-sync-conflict\\` label to resume syncing.\n`;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA,SAAAA,OAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,MAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,KAAA;EAAA,MAAAH,IAAA,GAAAE,OAAA;EAAAC,IAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAIA,SAAAI,QAAA;EAAA,MAAAJ,IAAA,GAAAE,OAAA;EAAAE,OAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAK,kBAAA;EAAA,MAAAL,IAAA,GAAAE,OAAA;EAAAG,iBAAA,YAAAA,CAAA;IAAA,OAAAL,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAM,KAAA;EAAA,MAAAN,IAAA,GAAAE,OAAA;EAAAI,IAAA,YAAAA,CAAA;IAAA,OAAAN,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAGA,SAAAO,YAAA;EAAA,MAAAP,IAAA,GAAAE,OAAA;EAAAK,WAAA,YAAAA,CAAA;IAAA,OAAAP,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAQ,WAAA;EAAA,MAAAR,IAAA,GAAAE,OAAA;EAAAM,UAAA,YAAAA,CAAA;IAAA,OAAAR,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAUA,SAAAS,eAAA;EAAA,MAAAT,IAAA,GAAAE,OAAA;EAAAO,cAAA,YAAAA,CAAA;IAAA,OAAAT,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAGA,SAAAU,aAAA;EAAA,MAAAV,IAAA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AAW0L,OAAO,EAAE,EACpB,kBAAkB9I,QAAQ,IAAI,EAC9B,EAAE,EACF,2BAA2B9E,UAAU,CAACkB,MAAM,IAAI,EAChDwN,MAAM,IAAI,QAAQ,EAClB,EAAE,EACF,+FAA+F,CAChG,CAAC/M,IAAI,CAAC,IAAI,CAAC;AACd;;AAEA;AACA;AACA;AACA;AACA,SAASgN,UAAUA,CAAC3P,KAAa,EAAU;EACzC,OAAO,IAAIA,KAAK,CAAC8O,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG;AAC5C;;AAEA;AACA;AACA;AACA;AACO,SAASzB,eAAeA,CAAC;EAC9BxJ,MAAM;EACNX,MAAM;EACNoK,MAAM;EACNC;AAMF,CAAC,EAAU;EACT,MAAMqC,UAAU,GACdrC,IAAI,IACJ;AACJ,qCAAqCoC,UAAU,CAACzM,MAAM,CAAC;AACvD,oBAAoByM,UAAU,CAACrC,MAAM,CAAC;AACtC;AACA,oBAAoBqC,UAAU,CAACzM,MAAM,CAAC,EAAE;EACtC,OAAO,+DAA+DW,MAAM;AAC9E;AACA,EAAE+L,UAAU;AACZ;AACA;AACA,CAAC;AACD","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["_chalk","data","_interopRequireDefault","require","_cli","_legacy","_componentModules","_git","_syncConfig","_syncState","_workspaceLane","_syncPlanner","_gitOps","e","__esModule","default","_defineProperty","r","t","_toPropertyKey","Object","defineProperty","value","enumerable","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","TypeError","String","Number","HALT_SUMMARY_PREFIX","exports","REFUSED_SUMMARY_PREFIX","laneHeadFingerprint","components","fingerprintIdVersions","map","comp","id","toStringWithoutVersion","head","laneComponentIds","foreignLaneComponents","defaultScope","filter","scope","MAX_LISTED_FOREIGN_COMPONENTS","MAX_LISTED_COMPONENTS","capEntries","entries","overflowPrefix","max","length","slice","crossScopeDescription","foreignIds","scopes","Set","split","sort","sample","join","crossScopeSkipSummary","laneName","crossScopeRefusal","existingBranch","outcome","branchMirrorsOtherLaneReason","branch","mirroredLaneIdStr","laneIdStr","branchMirrorsOtherLaneNote","crossScopeMidFlightHaltReason","isProtectedBranch","defaultBranch","mainSyncBranch","dryRunSummaryLine","action","type","reason","KEPT_BECAUSE","LaneSyncExecutor","constructor","deps","syncLane","target","opts","cfg","logger","name","hostScope","laneNameToBranch","reconcileLane","dryRun","explicitTarget","message","undefined","console","formatWarningSummary","haltOrReport","executeHalt","pr","findPr","haltError","error","consoleWarning","fetchOnce","ci","getDefaultBranchName","summary","remoteLane","getRemoteLane","laneHead","branchExists","branchExistsOnRemote","branchState","readBranchSyncState","stateCommit","bitmap","hasDevCommits","tipMessage","hasSyncMarker","conflictLabelPresent","labels","includes","CONFLICT_LABEL","suppressedByLabel","mirroredLane","claim","assessBranchOwnership","commentNote","foreign","crossScopeOutcome","midFlight","explicit","Boolean","laneIsGone","ownership","lastSyncedHead","branchStateFingerprint","tipIsSyncCommit","isSyncAuthoredMessage","planLaneSync","chalk","blue","line","executeImportLane","executeExportBranch","executeMergeDiverged","executeClosePr","deleteBranch","keepReason","expectedTipSha","tipSha","unhandled","Error","JSON","stringify","startPoint","checkoutFromRemote","switchErr","materializeLane","commitAllAndPush","buildSyncCommitMessage","prUrl","htmlUrl","openPrForLane","restoreWorkspace","lastNonSyncCommitMessage","exportErr","snapAndExportOntoLane","recordLaneHeadOnBranch","halt","merge","mergeLaneIntoBranchWorkingTree","policyClause","conflicts","onConflict","strategy","resolved","conflictedFileCount","green","SYNC_COMMIT_MARKER","ensureCurrentLaneObject","lanes","snapPrCommit","build","strict","keepLane","skipCleanup","noDestructiveRecovery","mergeStrategy","parseLaneId","current","currentLaneIdStr","toString","results","checkout","checkoutByCLIValues","promptMergeOptions","skipNpmInstall","workspaceOnly","forEach","conflictedFiles","values","filesStatus","isConflictFileStatus","push","leftUnresolvedConflicts","checkoutPristine","reloadWorkspaceFromDisk","isAncestor","gitHost","prClause","number","keep","deleteAt","currentTip","currentBranchTip","keptBecause","closeComment","closePr","branchDeleted","leaseRefused","pushBranchDeletion","isStaleLeaseRejection","refetchBranchTip","git","deleteBranchArgs","addLabel","comment","haltCommentBody","laneId","note","isOnTarget","toMainErr","switchToLaneForSync","forceOurs","forceTheirs","writeAdoptedFiles","fetched","fetchRemoteHeads","getLanes","remote","catch","findPrByBranch","log","entry","all","find","item","body","addAllExceptScopeAndModules","commitWithIdentity","extraArgs","laneUrl","getCloudDomain","replace","laneSyncPrBody","created","createPr","base","title","checkoutPristineRestore","status","FileStatus","manual","binaryConflict","deletedConflict","listed","shellQuote","resolution"],"sources":["lane-sync-executor.ts"],"sourcesContent":["import chalk from 'chalk';\nimport { formatWarningSummary } from '@teambit/cli';\nimport type { Logger } from '@teambit/logger';\nimport type { LanesMain } from '@teambit/lanes';\nimport type { LaneData } from '@teambit/legacy.scope';\nimport { getCloudDomain } from '@teambit/legacy.constants';\nimport { FileStatus, type MergeStrategy } from '@teambit/component.modules.merge-helper';\nimport { git } from '../git';\nimport type { CiMain } from '../ci.main.runtime';\nimport type { CiSyncConfig, LaneTarget } from './sync-config';\nimport { laneNameToBranch } from './sync-config';\nimport type { BranchSyncState } from './sync-state';\nimport {\n CONFLICT_LABEL,\n SYNC_COMMIT_MARKER,\n branchStateFingerprint,\n buildSyncCommitMessage,\n fingerprintIdVersions,\n readBranchSyncState,\n hasSyncMarker,\n isSyncAuthoredMessage,\n} from './sync-state';\nimport { currentLaneIdStr, ensureCurrentLaneObject } from './workspace-lane';\nimport type { GitHostProvider, PrInfo } from './git-host-provider';\nimport type { BranchKeepReason, LaneOwnershipEvidence, LaneSyncAction } from './sync-planner';\nimport { planLaneSync } from './sync-planner';\nimport {\n addAllExceptScopeAndModules,\n branchExistsOnRemote,\n checkoutPristine,\n checkoutPristineRestore,\n commitWithIdentity,\n deleteBranchArgs,\n fetchRemoteHeads,\n isAncestor,\n isStaleLeaseRejection,\n refetchBranchTip,\n} from './git-ops';\n\n/**\n * Prefix of the summary line for a lane that could not be reconciled. `syncLane` deliberately does\n * NOT throw on halt — one unreconcilable lane must not abort the rest of the run; the command layer\n * scans for this prefix to decide the exit code.\n */\nexport const HALT_SUMMARY_PREFIX = 'HALTED';\n\n/**\n * Prefix for a target the reconciler refuses. Unlike a halt, nothing is mid-flight and no PR is\n * annotated — the run exits non-zero, but the command layer reports a plain refusal rather than a\n * sync conflict.\n */\nexport const REFUSED_SUMMARY_PREFIX = 'REFUSED';\n\nexport type LaneSyncDeps = {\n lanes: LanesMain;\n /** for snapPrCommit + getDefaultBranchName + switchToLaneForSync */\n ci: CiMain;\n logger: Logger;\n /** undefined => PR operations are logged and skipped; the git half of the sync still runs. */\n gitHost?: GitHostProvider;\n cfg: Required<CiSyncConfig>;\n defaultScope: string;\n};\n\n/**\n * Fingerprint of a lane's content — same primitive as `branchStateFingerprint`, so \"equal\" means\n * exactly \"the branch records every lane component at the lane's head\".\n *\n * We deliberately do NOT use `LaneData.hash`: that hash is minted randomly at lane-creation time\n * and does not change when the lane's components advance. This is derived from content instead.\n */\nexport function laneHeadFingerprint(components: LaneData['components']): string {\n return fingerprintIdVersions(components.map((comp) => `${comp.id.toStringWithoutVersion()}@${comp.head}`));\n}\n\n/** The lane's component ids, without versions — the id set `branchStateFingerprint` reads off the branch. */\nfunction laneComponentIds(components: LaneData['components']): string[] {\n return components.map((comp) => comp.id.toStringWithoutVersion());\n}\n\n/**\n * The lane's components that do not belong to `defaultScope`. A lane may span scopes, and the\n * reconciler acts on a lane whole (fingerprint, materialize, snap, export), so foreign content is\n * refused rather than written into this repository. Soft-deleted components and `updateDependents`\n * entries are deliberately not read — the reconciler never materializes or exports them either.\n */\nexport function foreignLaneComponents(components: LaneData['components'], defaultScope: string): string[] {\n return components.filter((comp) => comp.id.scope !== defaultScope).map((comp) => comp.id.toStringWithoutVersion());\n}\n\n/** How many foreign component ids a cross-scope message names before it summarizes the rest. */\nconst MAX_LISTED_FOREIGN_COMPONENTS = 5;\n\n/**\n * How many component ids a PR body or comment enumerates before summarizing the rest. GitHub caps a\n * PR body / issue comment at 65,536 characters and rejects the whole request over it.\n */\nconst MAX_LISTED_COMPONENTS = 20;\n\n/**\n * `entries`, capped at `max`, with a final \"…and K more\" entry. The bound is on entries, not rendered\n * length, so a markdown list is never cut mid-line. `overflowPrefix` carries the caller's list marker\n * onto the summary line.\n */\nexport function capEntries(entries: string[], overflowPrefix = '', max: number = MAX_LISTED_COMPONENTS): string[] {\n if (entries.length <= max) return entries;\n return [...entries.slice(0, max), `${overflowPrefix}…and ${entries.length - max} more`];\n}\n\n/** The shared clause describing why a lane is cross-scope, used by the skip/refusal/halt outcomes. */\nexport function crossScopeDescription(foreignIds: string[], defaultScope: string): string {\n // The scope is everything before the FIRST '/': a component id is `<scope>/<namespace…>/<name>`.\n const scopes = [...new Set(foreignIds.map((id) => id.split('/', 1)[0]))].sort();\n const sample = capEntries(foreignIds, '', MAX_LISTED_FOREIGN_COMPONENTS).join(', ');\n return (\n `components from scope(s) ${scopes.join(', ')} (this repo maps scope ${defaultScope}); ` +\n `foreign components: ${sample}`\n );\n}\n\n/**\n * A cross-scope lane that was merely enumerated: a skip, and the run stays green — a standing, valid\n * lane must not turn every scheduled run permanently red.\n */\nexport function crossScopeSkipSummary(laneName: string, foreignIds: string[], defaultScope: string): string {\n return (\n `${laneName} -> skipped (cross-scope lane: ${crossScopeDescription(foreignIds, defaultScope)} — ` +\n `no branch created; see the docs' Cross-scope lanes section)`\n );\n}\n\n/**\n * A cross-scope lane the user named explicitly: exits non-zero with the explanation. A refusal, not a\n * halt — no PR is labelled, no branch is written. `existingBranch` keeps the closing sentence truthful\n * when a branch of that name already exists.\n */\nexport function crossScopeRefusal(foreignIds: string[], defaultScope: string, existingBranch?: string): string {\n const outcome = existingBranch\n ? `Nothing was written; the existing branch ${existingBranch} was left untouched`\n : 'No branch was created and nothing was written';\n return (\n `cross-scope lane: ${crossScopeDescription(foreignIds, defaultScope)}; syncing cross-scope lanes is ` +\n `not supported yet — see the docs' Cross-scope lanes section. ${outcome}`\n );\n}\n\n/**\n * Halt reason for a branch that is the live mirror of a different lane — two lanes with the same name\n * in different scopes map to the same branch. Names both ids so the human can tell which owns it.\n */\nexport function branchMirrorsOtherLaneReason(branch: string, mirroredLaneIdStr: string, laneIdStr: string): string {\n return (\n `branch ${branch} mirrors lane ${mirroredLaneIdStr}; refusing to plan for ${laneIdStr} — two lanes ` +\n `with the same name in different scopes map to the same branch, and reconciling this one would ` +\n `overwrite the other lane's mirror`\n );\n}\n\n/**\n * PR comment for the branch-aliasing halt — the one halt whose PR belongs to a DIFFERENT lane. It must\n * not carry the default \"import the lane\" steps, which would perform the overwrite the halt prevented.\n */\nexport function branchMirrorsOtherLaneNote(mirroredLaneIdStr: string, laneIdStr: string): string {\n return `This pull request belongs to lane \\`${mirroredLaneIdStr}\\`, and nothing is wrong with it.\n\nLane \\`${laneIdStr}\\` has the same lane *name* in a different scope, so it maps to this same branch, and \\\n\\`bit ci sync\\` refused to reconcile it here rather than overwrite this branch with the other lane's content.\nBoth lanes stay unsynced until the collision is resolved: rename one of the two lanes, or map one of them to \\\na different branch via the \\`branches\\` option of the \\`teambit.git/ci\\` sync config.\n\nDo NOT run the usual \"bit lane import\" resolution steps on this branch — they would import \\\n\\`${laneIdStr}\\` over \\`${mirroredLaneIdStr}\\`'s mirror.`;\n}\n\n/**\n * A lane that became cross-scope after this repository had already mirrored it onto a branch — the one\n * cross-scope shape that is a genuine halt: the pair is mid-flight and can no longer converge.\n */\nexport function crossScopeMidFlightHaltReason(branch: string, foreignIds: string[], defaultScope: string): string {\n return (\n `lane became cross-scope after it was mirrored onto ${branch}: ${crossScopeDescription(foreignIds, defaultScope)}; ` +\n `the branch and the lane can no longer be reconciled automatically — see the docs' Cross-scope lanes section`\n );\n}\n\n/**\n * Branches `executeClosePr` refuses to delete whatever the ownership evidence concluded — an\n * unconditional guard at the one site that deletes remote branches.\n */\nexport function isProtectedBranch(branch: string, defaultBranch: string, mainSyncBranch: string): boolean {\n return branch === defaultBranch || branch === mainSyncBranch;\n}\n\n/**\n * The summary line a dry run reports for a planned action. A planned halt carries the same prefix the\n * real run would: `summarizeSync` recognizes that prefix and nothing else, so without it a `--dry-run`\n * exits 0 on a plan that needs a human. Refusals never reach here — they are returned before planning.\n */\nexport function dryRunSummaryLine(laneName: string, action: LaneSyncAction): string {\n return action.type === 'halt'\n ? `${HALT_SUMMARY_PREFIX} ${laneName} -> ${action.reason}`\n : `${laneName} -> ${action.type}`;\n}\n\n/** Why each `BranchKeepReason` withheld the deletion — one wording for the PR comment and the summary. */\nexport const KEPT_BECAUSE: Record<BranchKeepReason, string> = {\n 'unmerged-commits': `it carries commits that are not in the default branch`,\n 'tip-not-a-sync-commit': `its tip is not one of this reconciler's own commits, so the work in it may exist nowhere else`,\n 'tip-advanced-during-run': `its tip advanced after the ownership evidence was read, so it may carry work this run never saw`,\n};\n\nexport class LaneSyncExecutor {\n constructor(private deps: LaneSyncDeps) {}\n\n /** Every `origin/<ref>` read assumes current remote refs; fetch once per executor, not per lane. */\n private fetched = false;\n\n /**\n * Reconcile one lane with its git branch/PR. Returns a summary line (HALT/REFUSED prefixed on\n * failure) and NEVER throws — the contract the `--all` loop is written against, for every failure\n * mode: the steps route expected failures to `executeHalt`, this wrapper covers the unexpected ones.\n */\n async syncLane(\n target: LaneTarget,\n opts: {\n dryRun?: boolean;\n /** The user named this lane on the command line; decides how a cross-scope lane is reported. */\n explicitTarget?: boolean;\n } = {}\n ): Promise<string> {\n const { cfg, logger } = this.deps;\n const laneName = target.name;\n const laneIdStr = `${target.hostScope}/${laneName}`;\n // Declared outside the try so the catch can tell \"reconciling failed\" from \"the name never mapped\n // to a branch\". The mapping must run INSIDE the try: `laneNameToBranch` throws on a lane name git\n // cannot accept as a ref, and this method's contract is that it never throws.\n let branch: string | undefined;\n try {\n // The branch mapping is by lane NAME only; everything addressed to bit uses the lane's real id.\n branch = laneNameToBranch(laneName, cfg);\n return await this.reconcileLane({\n target,\n laneIdStr,\n branch,\n dryRun: opts.dryRun,\n explicitTarget: opts.explicitTarget,\n });\n } catch (e: any) {\n const reason = `unexpected error: ${e?.message || e}`;\n // No branch => nothing to annotate: report-only, but still HALT-prefixed so the run exits non-zero.\n if (branch === undefined) {\n logger.console(formatWarningSummary(`Cannot sync lane ${laneIdStr}: ${reason}`));\n return `${HALT_SUMMARY_PREFIX} ${laneName} -> ${reason}`;\n }\n // This catch fires for exceptions thrown before `reconcileLane`'s own dry-run handling gets a\n // say; without the guard an early crash would label a PR on a run that promised no writes.\n if (opts.dryRun) {\n return this.haltOrReport({ laneName, laneIdStr, branch, reason, dryRun: true });\n }\n try {\n return await this.executeHalt({ laneName, laneIdStr, branch, reason, pr: await this.findPr(branch) });\n } catch (haltError: any) {\n // The halt itself failed; throwing here would abort the remaining lanes, so report and move on.\n logger.error(`bit ci sync: failed to halt lane ${laneIdStr}`, haltError);\n logger.consoleWarning(`Could not record the halt of lane ${laneIdStr}: ${haltError?.message || haltError}`);\n return `${HALT_SUMMARY_PREFIX} ${laneName} -> ${reason}`;\n }\n }\n }\n\n private async reconcileLane({\n target,\n laneIdStr,\n branch,\n dryRun,\n explicitTarget,\n }: {\n target: LaneTarget;\n laneIdStr: string;\n branch: string;\n dryRun?: boolean;\n explicitTarget?: boolean;\n }): Promise<string> {\n const { logger, defaultScope, cfg } = this.deps;\n const laneName = target.name;\n\n await this.fetchOnce();\n\n const defaultBranch = await this.deps.ci.getDefaultBranchName();\n\n // RESERVED BRANCHES: a `branches` override can map a lane onto the default or main-sync branch,\n // and the lane path would then commit and push to a branch only the main-scope path may own. The\n // guard lives here because this is the single funnel every trigger passes through.\n if (isProtectedBranch(branch, defaultBranch, cfg.mainSyncBranch)) {\n const reason =\n `lane ${laneIdStr} maps to ${branch}, which is ` +\n `${branch === defaultBranch ? \"the repository's default branch\" : 'the main sync branch maintained by this command'}; ` +\n `the main scope is reconciled by \"bit ci sync --main\", never as a lane. Nothing was written`;\n if (explicitTarget) {\n logger.console(formatWarningSummary(`Cannot sync lane ${laneIdStr}: ${reason}`));\n return `${REFUSED_SUMMARY_PREFIX} ${laneName} -> ${reason}`;\n }\n const summary = `${laneName} -> skipped (${reason})`;\n logger.console(formatWarningSummary(summary));\n return summary;\n }\n\n const remoteLane = await this.getRemoteLane(target);\n\n const laneHead = remoteLane ? laneHeadFingerprint(remoteLane.components) : undefined;\n const branchExists = await branchExistsOnRemote(branch);\n const branchState: BranchSyncState = branchExists\n ? await readBranchSyncState(branch, defaultBranch, defaultScope)\n : { stateCommit: undefined, bitmap: undefined, hasDevCommits: false, tipMessage: '' };\n if (hasSyncMarker(branchState.tipMessage)) {\n logger.console('branch tip is a bit-sync commit; reconciler will no-op unless the lane moved');\n }\n\n // Read before any refusal below: every halt must be suppressible by the conflict label, or a\n // standing problem re-comments on the same PR on every scheduled run.\n const pr = await this.findPr(branch);\n const conflictLabelPresent = pr?.labels.includes(CONFLICT_LABEL) ?? false;\n const suppressedByLabel = `${laneName} -> noop (PR is labeled ${CONFLICT_LABEL}; resolve and remove the label to resume)`;\n\n // Which lane, if any, this branch is the LIVE mirror of. Attribution (the `.bitmap` lane pointer)\n // alone proves nothing: a merged sync PR's state is inherited by every branch cut from the default\n // branch afterwards. Only a state commit the default branch does not contain says \"mirror, now\".\n const mirroredLane = branchState.bitmap?.laneIdStr;\n const claim: LaneOwnershipEvidence =\n mirroredLane && branchState.stateCommit\n ? await this.assessBranchOwnership({ branch, defaultBranch, stateCommit: branchState.stateCommit })\n : 'inherited-or-none';\n const mirroredLaneIdStr = claim === 'own-live' ? mirroredLane : undefined;\n\n // TWO LANES, ONE BRANCH: the mapping is keyed on the lane NAME, so same-named lanes in different\n // scopes collide. Planning against another lane's live mirror would hijack it — halt instead.\n // Only when this lane exists: with no lane, `close-pr` already refuses without attribution, and\n // halting a branch this repository cannot resolve would leave a permanently red run with no PR.\n if (laneHead && mirroredLaneIdStr && mirroredLaneIdStr !== laneIdStr) {\n if (conflictLabelPresent) return suppressedByLabel;\n // The PR annotated here belongs to `mirroredLaneIdStr`, the lane that owns this branch;\n // `commentNote` tells its reviewers why a label appeared on a PR whose own lane is healthy.\n return this.haltOrReport({\n laneName,\n laneIdStr,\n branch,\n reason: branchMirrorsOtherLaneReason(branch, mirroredLaneIdStr, laneIdStr),\n pr,\n dryRun,\n commentNote: branchMirrorsOtherLaneNote(mirroredLaneIdStr, laneIdStr),\n });\n }\n\n // A cross-scope lane cannot be reconciled here — the reconciler acts on a lane whole, so mirroring\n // one would write another repository's components into this one. The check lives in the executor\n // because every trigger funnels through here, and it needs the lane's content.\n const foreign = remoteLane ? foreignLaneComponents(remoteLane.components, defaultScope) : [];\n if (foreign.length) {\n return this.crossScopeOutcome({\n laneName,\n laneIdStr,\n branch,\n branchExists,\n foreign,\n midFlight: mirroredLaneIdStr === laneIdStr,\n explicit: Boolean(explicitTarget),\n conflictLabelPresent,\n suppressedByLabel,\n pr,\n dryRun,\n });\n }\n // Attribution to THIS lane is required: the claim was computed for whichever lane the branch's\n // `.bitmap` names, and a claim on someone else's behalf licenses nothing here.\n const laneIsGone = branchExists && !laneHead;\n const ownership: LaneOwnershipEvidence = laneIsGone && mirroredLane === laneIdStr ? claim : 'inherited-or-none';\n\n // What the branch reflects, read off its own `.bitmap` — only when that `.bitmap` names THIS lane;\n // otherwise the planner's `!lastSyncedHead` rows handle \"no state of ours\".\n const lastSyncedHead =\n remoteLane && branchState.bitmap && mirroredLane === laneIdStr\n ? branchStateFingerprint(branchState.bitmap, laneComponentIds(remoteLane.components))\n : undefined;\n\n // `isSyncAuthoredMessage`, NOT `hasSyncMarker`: this feeds a branch deletion, and a message that\n // merely quotes the marker must not read as one we wrote.\n const tipIsSyncCommit = isSyncAuthoredMessage(branchState.tipMessage);\n\n const action = planLaneSync({\n laneHead,\n branchExists,\n lastSyncedHead,\n hasDevCommits: branchState.hasDevCommits,\n tipIsSyncCommit,\n conflictLabelPresent,\n ownership,\n });\n\n logger.console(\n chalk.blue(\n `${laneName} -> ${action.type} (branch: ${branch}, lane head: ${laneHead?.slice(0, 9) ?? 'none'}, ` +\n `branch state: ${lastSyncedHead?.slice(0, 9) ?? 'none'}, ` +\n `dev commits: ${branchState.hasDevCommits}${laneIsGone ? `, branch claim: ${ownership}` : ''})`\n )\n );\n\n if (dryRun) {\n const line = dryRunSummaryLine(laneName, action);\n logger.console(formatWarningSummary(`Dry-run: ${line}`));\n return line;\n }\n\n // A pair can be converged at the bit level while the tip still holds unsnapped source edits (a\n // single commit that rewrites `.bitmap` AND carries an edit is its own state commit) — say so.\n // `laneHead` must be checked explicitly: with no lane and no attribution both fingerprints are\n // undefined, and `undefined === undefined` would fire on every ordinary developer branch.\n if (\n action.type === 'noop' &&\n action.reason === 'converged' &&\n !tipIsSyncCommit &&\n laneHead &&\n lastSyncedHead === laneHead\n ) {\n logger.console(\n formatWarningSummary(\n `converged on bit state, but ${branch}'s tip is not a bit ci sync commit — any source edits it ` +\n `carries that were never snapped stay invisible until the next commit on the branch`\n )\n );\n }\n\n switch (action.type) {\n case 'noop':\n return `${laneName} -> noop (${action.reason})`;\n case 'import-lane':\n // The planner only emits import-lane when the lane exists, so both casts are safe.\n return this.executeImportLane({\n target,\n laneIdStr,\n branch,\n branchExists,\n defaultBranch,\n laneHead: laneHead as string,\n remoteLane: remoteLane as LaneData,\n pr,\n });\n case 'export-branch':\n return this.executeExportBranch({ target, laneIdStr, branch, defaultBranch });\n case 'merge-diverged':\n return this.executeMergeDiverged({ target, laneIdStr, branch, defaultBranch });\n case 'close-pr':\n return this.executeClosePr({\n laneName,\n laneIdStr,\n branch,\n defaultBranch,\n pr,\n deleteBranch: action.deleteBranch,\n keepReason: action.deleteBranch ? undefined : action.keepReason,\n expectedTipSha: branchState.tipSha,\n });\n case 'halt':\n return this.executeHalt({ laneName, laneIdStr, branch, reason: action.reason, pr });\n default: {\n // exhaustiveness guard\n const unhandled: never = action;\n throw new Error(`bit ci sync: unhandled lane sync action ${JSON.stringify(unhandled)}`);\n }\n }\n }\n\n /**\n * What a cross-scope lane means for this repository: a mid-flight halt when the branch is this\n * lane's live mirror (checked first — the problem is the state of the pair, not the phrasing of the\n * request); a refusal when the user named the lane explicitly; otherwise an enumerated skip that\n * stays green — one standing cross-scope lane must not fail every scheduled run forever.\n */\n private async crossScopeOutcome({\n laneName,\n laneIdStr,\n branch,\n branchExists,\n foreign,\n midFlight,\n explicit,\n conflictLabelPresent,\n suppressedByLabel,\n pr,\n dryRun,\n }: {\n laneName: string;\n laneIdStr: string;\n branch: string;\n branchExists: boolean;\n foreign: string[];\n midFlight: boolean;\n explicit: boolean;\n conflictLabelPresent: boolean;\n suppressedByLabel: string;\n pr?: PrInfo;\n dryRun?: boolean;\n }): Promise<string> {\n const { logger, defaultScope } = this.deps;\n\n if (midFlight) {\n // Self-suppression like every other halt — otherwise this would re-comment on every scheduled run.\n if (conflictLabelPresent) return suppressedByLabel;\n return this.haltOrReport({\n laneName,\n laneIdStr,\n branch,\n reason: crossScopeMidFlightHaltReason(branch, foreign, defaultScope),\n pr,\n dryRun,\n });\n }\n\n if (explicit) {\n const reason = crossScopeRefusal(foreign, defaultScope, branchExists ? branch : undefined);\n logger.console(formatWarningSummary(`Cannot sync lane ${laneIdStr}: ${reason}`));\n return `${REFUSED_SUMMARY_PREFIX} ${laneName} -> ${reason}`;\n }\n\n const summary = crossScopeSkipSummary(laneName, foreign, defaultScope);\n logger.console(formatWarningSummary(summary));\n return summary;\n }\n\n /**\n * Mirror the remote lane onto the branch: check the branch out, materialize the lane into the\n * workspace, and commit the result. The committed `.bitmap` IS the record of the branch's state.\n */\n private async executeImportLane({\n target,\n laneIdStr,\n branch,\n branchExists,\n defaultBranch,\n laneHead,\n remoteLane,\n pr,\n }: {\n target: LaneTarget;\n laneIdStr: string;\n branch: string;\n branchExists: boolean;\n defaultBranch: string;\n laneHead: string;\n remoteLane: LaneData;\n pr?: PrInfo;\n }): Promise<string> {\n const { logger } = this.deps;\n const laneName = target.name;\n logger.console(chalk.blue(`Importing lane ${laneIdStr} onto branch ${branch}`));\n\n // A brand-new lane branch forks from the default branch; an existing one is reset to whatever\n // the remote has, so a stale local copy of the branch can never leak into the sync commit.\n const startPoint = branchExists ? `origin/${branch}` : `origin/${defaultBranch}`;\n await this.checkoutFromRemote(branch, startPoint);\n\n try {\n // A switch that moved the pointer without materializing the files would make every later run\n // read the pair as converged over content the branch never received — see `materializeLane`.\n const switchErr = await this.materializeLane(laneIdStr);\n if (switchErr) {\n return await this.executeHalt({\n laneName,\n laneIdStr,\n branch,\n reason: `failed to switch to lane ${laneIdStr}: ${switchErr.message}`,\n pr,\n });\n }\n\n await this.commitAllAndPush(branch, buildSyncCommitMessage(laneIdStr, laneHead));\n\n let prUrl = pr?.htmlUrl;\n if (!pr) {\n prUrl = await this.openPrForLane({ target, laneIdStr, branch, defaultBranch, laneHead, remoteLane });\n }\n return (\n `${laneName} -> import-lane (pushed ${branch} @ lane ${laneHead.slice(0, 9)}` +\n `${prUrl ? `, PR ${prUrl}` : ''})`\n );\n } finally {\n await this.restoreWorkspace(defaultBranch);\n }\n }\n\n /**\n * Push the branch's dev commits back onto the lane: snap+export the branch's tree, then commit the\n * resulting `.bitmap` back onto the branch so the next run sees the two sides as converged.\n */\n private async executeExportBranch({\n target,\n laneIdStr,\n branch,\n defaultBranch,\n }: {\n target: LaneTarget;\n laneIdStr: string;\n branch: string;\n defaultBranch: string;\n }): Promise<string> {\n const { logger } = this.deps;\n const laneName = target.name;\n logger.console(chalk.blue(`Exporting branch ${branch} onto lane ${laneIdStr}`));\n\n const message = await this.lastNonSyncCommitMessage(branch, defaultBranch);\n await this.checkoutFromRemote(branch, `origin/${branch}`);\n\n try {\n const exportErr = await this.snapAndExportOntoLane(laneIdStr, message);\n if (exportErr) {\n // Halt rather than propagate: one lane's failed snap/export must not abort the lanes after it.\n return await this.executeHalt({\n laneName,\n laneIdStr,\n branch,\n reason: `failed to snap and export branch ${branch} onto lane ${laneIdStr}: ${exportErr.message}`,\n pr: await this.findPr(branch),\n });\n }\n\n const laneHead = await this.recordLaneHeadOnBranch(target, laneIdStr, branch);\n if (!laneHead) {\n return await this.executeHalt({\n laneName,\n laneIdStr,\n branch,\n reason: `lane ${laneIdStr} could not be read back from the remote after export`,\n pr: await this.findPr(branch),\n });\n }\n return `${laneName} -> export-branch (lane ${laneIdStr} @ ${laneHead.slice(0, 9)}, branch ${branch} updated)`;\n } finally {\n await this.restoreWorkspace(defaultBranch);\n }\n }\n\n /**\n * Both sides moved since the last sync. Order is load-bearing: (1) merge the lane into the branch's\n * working tree (`bit checkout head`; conflicts halt or auto-resolve per `sync.onConflict`), (2) snap\n * + export the merged tree — the snap IS the merge, (3) commit the resulting `.bitmap` back onto the\n * branch. The merge cannot be skipped: the export path's switch runs under `forceOurs`, which never\n * touches the filesystem, so a bare export would silently revert every lane-side file edit and then\n * assert convergence over the loss. Never throws; anything unexpected halts.\n */\n private async executeMergeDiverged({\n target,\n laneIdStr,\n branch,\n defaultBranch,\n }: {\n target: LaneTarget;\n laneIdStr: string;\n branch: string;\n defaultBranch: string;\n }): Promise<string> {\n const { logger } = this.deps;\n const laneName = target.name;\n logger.console(\n formatWarningSummary(\n `Diverged: lane ${laneIdStr} and branch ${branch} both moved since the last sync — attempting to converge`\n )\n );\n\n const halt = async (reason: string) =>\n this.executeHalt({ laneName, laneIdStr, branch, reason, pr: await this.findPr(branch) });\n\n try {\n // Force-checkout `origin/<branch>` and reload `.bitmap`: the merge depends on that file for the\n // lane pointer and the merge base, and a stale local branch must never leak into the result.\n await this.checkoutFromRemote(branch, `origin/${branch}`);\n\n // ---- step 1: merge the lane's snaps into the branch's working tree -----------------------\n const merge = await this.mergeLaneIntoBranchWorkingTree(laneIdStr);\n if (merge.error) {\n return await halt(`failed to merge lane ${laneIdStr} into branch ${branch}: ${merge.error.message}`);\n }\n let policyClause = '';\n if (merge.conflicts.length) {\n // Discard the conflict markers before ANY next step: a halt must not leave a half-merged tree,\n // and the policy re-merge would read markers on disk as the branch's own content.\n await this.checkoutFromRemote(branch, `origin/${branch}`);\n if (this.deps.cfg.onConflict === 'halt') {\n // Bounded: this reason is posted as the halt PR comment.\n return await halt(`merge conflicts in: ${capEntries(merge.conflicts).join(', ')}`);\n }\n // Side mapping per bit's checkout semantics: `checkout head` merges the lane's head INTO the\n // workspace, whose tree is the branch's — so 'ours' = the branch (git-wins) and 'theirs' = the\n // incoming lane head (lane-wins).\n const strategy: MergeStrategy = this.deps.cfg.onConflict === 'git-wins' ? 'ours' : 'theirs';\n logger.console(\n formatWarningSummary(\n `Merge conflicts in ${capEntries(merge.conflicts).join(', ')} — resolving by policy ` +\n `sync.onConflict \"${this.deps.cfg.onConflict}\" (bit merge strategy: ${strategy})`\n )\n );\n const resolved = await this.mergeLaneIntoBranchWorkingTree(laneIdStr, strategy);\n if (resolved.error) {\n return await halt(\n `failed to merge lane ${laneIdStr} into branch ${branch} under sync.onConflict ` +\n `\"${this.deps.cfg.onConflict}\": ${resolved.error.message}`\n );\n }\n if (resolved.conflicts.length) {\n // 'ours'/'theirs' cannot leave a conflict by construction; if bit reports one anyway,\n // exporting it as if resolved is the one unacceptable outcome — reset and halt.\n await this.checkoutFromRemote(branch, `origin/${branch}`);\n return await halt(\n `merge conflicts in ${capEntries(resolved.conflicts).join(', ')} survived the ` +\n `\"${this.deps.cfg.onConflict}\" auto-resolution`\n );\n }\n // The count comes from the manual pass; the policy pass no longer sees a conflict.\n policyClause = `conflicts auto-resolved: ${this.deps.cfg.onConflict} on ${merge.conflictedFileCount} file(s); `;\n logger.console(\n chalk.green(\n `Resolved ${merge.conflictedFileCount} conflicted file(s) by \"${this.deps.cfg.onConflict}\" — ` +\n `snapping the merged tree`\n )\n );\n } else {\n logger.console(\n chalk.green(`Merged lane ${laneIdStr} into ${branch} with no conflicts — snapping the merged tree`)\n );\n }\n\n // ---- step 2: snap + export the merged tree onto the lane ---------------------------------\n const exportErr = await this.snapAndExportOntoLane(\n laneIdStr,\n `merge remote lane ${laneIdStr} into ${branch} ${SYNC_COMMIT_MARKER}`\n );\n if (exportErr) {\n return await halt(\n `merged lane ${laneIdStr} into branch ${branch} cleanly, but snapping/exporting the merged ` +\n `result failed: ${exportErr.message}`\n );\n }\n\n // ---- step 3: record the new lane head on the branch --------------------------------------\n const laneHead = await this.recordLaneHeadOnBranch(target, laneIdStr, branch);\n if (!laneHead) {\n return await halt(`lane ${laneIdStr} could not be read back from the remote after the merge export`);\n }\n return (\n `${laneName} -> merge-diverged (${policyClause}merged lane into branch, then exported; lane ${laneIdStr} @ ` +\n `${laneHead.slice(0, 9)}, branch ${branch} updated)`\n );\n } catch (e: any) {\n // Something unforeseen — halt anyway: no single lane may abort the rest of the run.\n return await halt(\n `unexpected failure while reconciling diverged lane ${laneIdStr} with branch ${branch}: ${e?.message || e}`\n );\n } finally {\n await this.restoreWorkspace(defaultBranch);\n }\n }\n\n /**\n * Snap the workspace's current tree onto the lane and export it; returns the error so the caller can\n * halt. Snaps WHATEVER is in the workspace (the switch uses `forceOurs` and never merges files), so\n * a diverged tree must already hold the merged content. `keepLane` preserves the lane's history,\n * `skipCleanup` keeps the snap's `.bitmap` for the caller to commit, `noDestructiveRecovery` turns\n * stale-lane recovery (delete + re-fork the remote lane) into a throw. The lane object must be\n * imported BEFORE delegating: a switch onto the lane the workspace is already on no-ops before any\n * fetch, so it never warms a cold scope.\n */\n private async snapAndExportOntoLane(laneIdStr: string, message: string): Promise<Error | undefined> {\n try {\n await ensureCurrentLaneObject(this.deps.lanes);\n await this.deps.ci.snapPrCommit({\n laneIdStr,\n message,\n build: undefined,\n strict: undefined,\n keepLane: true,\n skipCleanup: true,\n noDestructiveRecovery: true,\n });\n return undefined;\n } catch (e: any) {\n return e instanceof Error ? e : new Error(String(e?.message ?? e));\n }\n }\n\n /**\n * Record on the branch which lane state it now mirrors: re-query the lane (the export just moved it,\n * so any earlier fingerprint is stale), commit — crucially the `.bitmap` the snap rewrote — and push.\n * Returns undefined when the lane can no longer be read, in which case the caller halts.\n */\n private async recordLaneHeadOnBranch(\n target: LaneTarget,\n laneIdStr: string,\n branch: string\n ): Promise<string | undefined> {\n const remoteLane = await this.getRemoteLane(target);\n if (!remoteLane) return undefined;\n const laneHead = laneHeadFingerprint(remoteLane.components);\n await this.commitAllAndPush(branch, buildSyncCommitMessage(laneIdStr, laneHead));\n return laneHead;\n }\n\n /**\n * Merge the lane's snaps into the branch's working tree via `bit checkout head` (three-way merge,\n * base = the branch's `.bitmap` version; `workspaceOnly` must stay false so lane-only components are\n * added). Returns conflicted ids + file count rather than throwing. Not `mergeLanes.mergeLane`: both\n * sides here are the same lane id, which `validateMergeFlags` rejects, and `mergeLane` refuses to\n * run with modified components — exactly the branch's state here.\n */\n private async mergeLaneIntoBranchWorkingTree(\n laneIdStr: string,\n mergeStrategy: MergeStrategy = 'manual'\n ): Promise<{ conflicts: string[]; conflictedFileCount: number; error?: Error }> {\n const { logger, lanes } = this.deps;\n try {\n // `checkout head` merges into the CURRENT lane; if the workspace is not on it, the merge would\n // silently resolve to main's heads and write main's content over the dev work — refuse instead.\n // `currentLaneIdStr`, NOT `lanes.getCurrentLane()`: the latter answers \"main\" on a cold runner.\n const target = await lanes.parseLaneId(laneIdStr);\n const current = currentLaneIdStr(lanes);\n if (current !== target.toString()) {\n return {\n conflicts: [],\n conflictedFileCount: 0,\n error: new Error(\n `the branch's .bitmap points at \"${current ?? 'main'}\" ` +\n `rather than ${laneIdStr}, so the lane's snaps cannot be merged into the branch's working tree`\n ),\n };\n }\n\n // Cold runner: the lane object may not be in this scope at all — import before the merge.\n await ensureCurrentLaneObject(lanes);\n\n logger.console(\n chalk.blue(\n `Merging lane ${laneIdStr} into the branch's working tree (bit checkout head ` +\n `${mergeStrategy === 'manual' ? '--manual' : `--auto-merge-resolve ${mergeStrategy}`})`\n )\n );\n // `checkoutByCLIValues` (rather than `checkout`) because it runs `importer.importCurrentObjects()`\n // first — without it, `head` would resolve to the stale lane heads this workspace already had.\n const results = await lanes.checkout.checkoutByCLIValues('', {\n head: true,\n mergeStrategy,\n promptMergeOptions: false,\n skipNpmInstall: true,\n workspaceOnly: false,\n });\n\n let conflictedFileCount = 0;\n const conflicts: string[] = [];\n (results.components || []).forEach((comp) => {\n const conflictedFiles = Object.values(comp.filesStatus || {}).filter(isConflictFileStatus);\n if (!conflictedFiles.length) return;\n conflictedFileCount += conflictedFiles.length;\n conflicts.push(comp.id.toStringWithoutVersion());\n });\n // If bit's own summary flag disagrees with the per-file scan, trust it — a missed conflict\n // would get exported as if it were resolved.\n if (!conflicts.length && results.leftUnresolvedConflicts) conflicts.push('(component not reported)');\n return { conflicts, conflictedFileCount };\n } catch (e: any) {\n return {\n conflicts: [],\n conflictedFileCount: 0,\n error: e instanceof Error ? e : new Error(String(e?.message ?? e)),\n };\n }\n }\n\n /**\n * Put the working tree on `branch` at a pristine copy of `startPoint` and reload the `.bitmap` it\n * brings (see `checkoutPristine`), so no leftover from a previous lane leaks into this lane's sync\n * commit and the following bit operation resolves against this branch's `.bitmap`. Also the recovery\n * after a merge attempt: resetting to `origin/<branch>` puts both sides back on the fetched tip.\n */\n private async checkoutFromRemote(branch: string, startPoint: string) {\n await checkoutPristine(branch, startPoint, () => this.deps.ci.reloadWorkspaceFromDisk());\n }\n\n /**\n * The reachability half of `LaneOwnershipEvidence`; the attribution half lives at the call site.\n * An unanswerable question resolves to `inherited-or-none` — every other answer permits deleting a\n * branch, and a failed `merge-base` is not evidence of anything. A foreign-hosted lane's branch\n * reached by branch name attributes as `inherited-or-none` (scope mismatch), which is the safe\n * direction: left alone, never retired.\n */\n private async assessBranchOwnership({\n branch,\n defaultBranch,\n stateCommit,\n }: {\n branch: string;\n defaultBranch: string;\n stateCommit: string;\n }): Promise<LaneOwnershipEvidence> {\n const { logger } = this.deps;\n try {\n if (!(await isAncestor(stateCommit, `origin/${defaultBranch}`))) return 'own-live';\n // The PR was merged. Deleting is only safe if the tip is in the default branch too; otherwise\n // work was pushed after the merge and lives nowhere else.\n if (await isAncestor(`origin/${branch}`, `origin/${defaultBranch}`)) return 'own-merged';\n return 'own-superseded';\n } catch (e: any) {\n logger.consoleWarning(\n `Could not establish whether ${branch} is already merged into ${defaultBranch}, so its ownership ` +\n `could not be determined; treating it as inherited-or-none (no branch is retired, and the branch ` +\n `is not treated as any lane's live mirror): ${e?.message || e}`\n );\n return 'inherited-or-none';\n }\n }\n\n /**\n * The lane is gone from bit.cloud — close its PR, and retire the branch if the claim on it allows.\n * Deleting the branch is the one irreversible thing this command does; `keepReason` distinguishes\n * \"work that exists nowhere else\" from \"we did not write the tip\".\n */\n private async executeClosePr({\n laneName,\n laneIdStr,\n branch,\n defaultBranch,\n pr,\n deleteBranch,\n keepReason,\n expectedTipSha,\n }: {\n laneName: string;\n laneIdStr: string;\n branch: string;\n defaultBranch: string;\n pr?: PrInfo;\n deleteBranch: boolean;\n keepReason?: BranchKeepReason;\n /** the tip every input to the deletion decision was read from; the delete leases on it */\n expectedTipSha?: string;\n }): Promise<string> {\n const { logger, gitHost } = this.deps;\n const prClause = pr ? `PR #${pr.number} closed` : 'no open PR';\n\n // Every input to the deletion decision — tip-is-sync-commit, dev commits, ownership — comes from refs\n // fetched once at the start of the run, and an `--all` run can spend minutes on earlier lanes. Re-read\n // this one branch first: the evidence licensed deleting THAT commit, not whatever the branch holds now.\n let keep = keepReason;\n let deleteAt: string | undefined;\n if (deleteBranch) {\n const currentTip = expectedTipSha ? await this.currentBranchTip(branch) : undefined;\n if (currentTip && currentTip === expectedTipSha) deleteAt = currentTip;\n else {\n keep = 'tip-advanced-during-run';\n logger.consoleWarning(\n `Not retiring branch ${branch}: its tip is now ${currentTip ?? 'unreadable'} rather than the ` +\n `${expectedTipSha ?? 'unknown'} its ownership evidence was read from — it advanced during this run`\n );\n }\n }\n\n const keptBecause = KEPT_BECAUSE[keep ?? 'unmerged-commits'];\n const closeComment = deleteAt\n ? `Lane ${laneIdStr} was removed/archived on bit.cloud.`\n : `Lane ${laneIdStr} was removed/archived on bit.cloud. The branch \\`${branch}\\` is being kept: ` +\n `${keptBecause}.`;\n if (gitHost && pr) {\n logger.console(chalk.blue(`Closing PR #${pr.number} for removed lane ${laneIdStr}`));\n await gitHost.closePr(pr.number, closeComment);\n } else if (gitHost) {\n // Not an error: the PR may have been merged or closed by hand already, or never existed.\n logger.console(\n formatWarningSummary(\n `No open PR found for ${branch} — ${deleteAt ? 'only retiring the branch' : 'nothing to close'}`\n )\n );\n } else {\n logger.console(formatWarningSummary(`No configured git host provider — skipping PR close for ${branch}`));\n }\n\n if (!deleteAt) {\n if (keep === 'tip-not-a-sync-commit') {\n logger.console(\n formatWarningSummary(\n `lane removed remotely, but ${branch}'s tip is not a bit ci sync commit — a developer wrote the ` +\n `branch's current bit state, so it is not safe to assume the branch is only our mirror; keeping it`\n )\n );\n return `${laneName} -> close-pr (${prClause}, branch ${branch} kept: its tip was not written by bit ci sync)`;\n }\n if (keep === 'tip-advanced-during-run') {\n return `${laneName} -> close-pr (${prClause}, branch ${branch} kept: ${keptBecause})`;\n }\n logger.console(\n formatWarningSummary(`lane removed remotely but branch carries unmerged commits; keeping branch ${branch}`)\n );\n return (\n `${laneName} -> close-pr (${prClause}, branch ${branch} kept: ` +\n `it carries commits missing from the default branch)`\n );\n }\n\n // Reaching this guard means something upstream is wrong; log it and keep the branch.\n if (isProtectedBranch(branch, defaultBranch, this.deps.cfg.mainSyncBranch)) {\n logger.consoleWarning(\n `Refusing to delete branch ${branch}: it is ${\n branch === defaultBranch ? 'the default branch' : 'the main sync branch'\n }, whatever the ownership evidence concluded`\n );\n return `${laneName} -> close-pr (${prClause}, branch ${branch} kept: deleting it is never allowed)`;\n }\n\n // Best-effort: the branch may be protected, or already removed by hand.\n let branchDeleted = true;\n let leaseRefused = false;\n try {\n await this.pushBranchDeletion(branch, deleteAt);\n } catch (e: any) {\n const message = String(e?.message || e);\n branchDeleted = false;\n // The second belt: the re-read above and this push are not atomic, so the server gets the last word.\n leaseRefused = isStaleLeaseRejection(message);\n logger.consoleWarning(\n leaseRefused\n ? `Not retiring branch ${branch}: the remote refused the lease on ${deleteAt} — it advanced ` +\n `between the re-read and the delete`\n : `Could not delete remote branch ${branch}: ${message}`\n );\n }\n if (leaseRefused) {\n return `${laneName} -> close-pr (${prClause}, branch ${branch} kept: ${KEPT_BECAUSE['tip-advanced-during-run']})`;\n }\n return `${laneName} -> close-pr (${prClause}, branch ${branch} ${branchDeleted ? 'deleted' : 'left in place'})`;\n }\n\n /** Seams for the retirement path, so the one irreversible outcome is unit-testable without a remote. */\n private currentBranchTip(branch: string): Promise<string | undefined> {\n return refetchBranchTip(branch);\n }\n\n private async pushBranchDeletion(branch: string, expectedTipSha: string): Promise<void> {\n await git.push(deleteBranchArgs(branch, expectedTipSha));\n }\n\n /**\n * Record a halt without touching the PR on a dry run — `--dry-run` promises no PR writes, and\n * labelling freezes a lane's syncs. The line stays HALT-prefixed either way. Every pre-planning halt\n * goes through here so the guard cannot be forgotten at one site.\n */\n private async haltOrReport({\n laneName,\n laneIdStr,\n branch,\n reason,\n pr,\n dryRun,\n commentNote,\n }: {\n laneName: string;\n laneIdStr: string;\n branch: string;\n reason: string;\n pr?: PrInfo;\n dryRun?: boolean;\n commentNote?: string;\n }): Promise<string> {\n if (dryRun) {\n const { logger } = this.deps;\n logger.console(formatWarningSummary(`Cannot sync lane ${laneIdStr} automatically: ${reason}`));\n logger.console(formatWarningSummary('Dry-run: the PR is not labelled or commented on'));\n return `${HALT_SUMMARY_PREFIX} ${laneName} -> ${reason}`;\n }\n return this.executeHalt({ laneName, laneIdStr, branch, reason, pr, commentNote });\n }\n\n /**\n * Hand the lane back to a human: label the PR so subsequent runs skip it, and comment the resolution\n * steps. `commentNote` replaces the default steps for halts where they would be wrong.\n */\n private async executeHalt({\n laneName,\n laneIdStr,\n branch,\n reason,\n pr,\n commentNote,\n }: {\n laneName: string;\n laneIdStr: string;\n branch: string;\n reason: string;\n pr?: PrInfo;\n commentNote?: string;\n }): Promise<string> {\n const { logger, gitHost } = this.deps;\n logger.console(formatWarningSummary(`Cannot sync lane ${laneIdStr} automatically: ${reason}`));\n if (gitHost && pr) {\n try {\n await gitHost.addLabel(pr.number, CONFLICT_LABEL);\n await gitHost.comment(pr.number, haltCommentBody({ reason, branch, laneId: laneIdStr, note: commentNote }));\n } catch (e: any) {\n // Failing to annotate the PR must not replace the real reason with a git-host API error.\n logger.consoleWarning(`Failed to annotate PR #${pr.number} with the sync conflict: ${e?.message || e}`);\n }\n } else if (gitHost) {\n logger.console(\n formatWarningSummary(`No open PR found for ${branch} — the halt is recorded in this run's summary only`)\n );\n } else {\n logger.console(\n formatWarningSummary(`No configured git host provider — skipping conflict label/comment for ${branch}`)\n );\n }\n return `${HALT_SUMMARY_PREFIX} ${laneName} -> ${reason}`;\n }\n\n /**\n * Drive the workspace's filesystem to the remote lane's content; returns the error so the caller can\n * halt. Two traps make a plain `switchToLane` insufficient: (1) it defaults to `forceOurs`, which\n * never touches the filesystem — the commit would claim the branch mirrors the lane over the default\n * branch's files — so `forceOurs` is cleared and `forceTheirs` set; (2) switching onto the lane the\n * workspace already sits on throws \"already checked out\", which `switchToLane` swallows as success\n * and nothing materializes — so step off to main first.\n */\n private async materializeLane(laneIdStr: string): Promise<Error | undefined> {\n const { logger } = this.deps;\n const target = await this.deps.lanes.parseLaneId(laneIdStr);\n // Compares name AND scope, and reads from `.bitmap`, not the scope's lane object — the object read\n // answers \"main\" on a cold runner and would skip the step-off to main (see `workspace-lane.ts`).\n const isOnTarget = () => currentLaneIdStr(this.deps.lanes) === target.toString();\n\n if (isOnTarget()) {\n logger.console(\n formatWarningSummary(\n `Workspace is already on ${laneIdStr} — stepping off to main so the re-import actually runs`\n )\n );\n const toMainErr = await this.deps.ci.switchToLaneForSync('main');\n if (toMainErr) return toMainErr;\n if (isOnTarget()) {\n return new Error(`unable to leave lane ${laneIdStr} before re-importing it; the workspace is still on it`);\n }\n }\n\n const switchErr = await this.deps.ci.switchToLaneForSync(laneIdStr, {\n forceOurs: false,\n forceTheirs: true,\n writeAdoptedFiles: true,\n });\n if (switchErr) return switchErr;\n\n // Verify before the caller commits a `.bitmap` asserting this lane's content.\n if (!isOnTarget()) {\n return new Error(\n `switching to lane ${laneIdStr} reported success but the workspace is on ` +\n `\"${currentLaneIdStr(this.deps.lanes) ?? 'main'}\"`\n );\n }\n return undefined;\n }\n\n private async fetchOnce() {\n if (this.fetched) return;\n await fetchRemoteHeads();\n this.fetched = true;\n }\n\n /**\n * The remote lane's data, or undefined when the lane no longer exists. The remote queried must be\n * the lane's HOSTING scope: asking `defaultScope` for a lane it does not host answers \"was not\n * found\" — the input that drives `close-pr`, which deletes branches.\n */\n private async getRemoteLane(target: LaneTarget): Promise<LaneData | undefined> {\n const { hostScope, name } = target;\n const lanes = await this.deps.lanes.getLanes({ remote: hostScope, name }).catch((e) => {\n // \"was not found\" = the lane is gone: a legitimate state (drives close-pr), not an error.\n if (e.toString().includes('was not found')) return [];\n throw new Error(`Failed to read lane ${hostScope}/${name} from the remote: ${e.toString()}`);\n });\n return lanes[0];\n }\n\n /**\n * The open PR for the branch, if any. A git-host API hiccup degrades to \"no PR known\" rather than\n * failing the lane — the git side of the sync is still correct and the next run re-reads the PR.\n */\n private async findPr(branch: string): Promise<PrInfo | undefined> {\n const { gitHost, logger } = this.deps;\n if (!gitHost) return undefined;\n try {\n return await gitHost.findPrByBranch(branch);\n } catch (e: any) {\n logger.consoleWarning(`Could not look up the PR for ${branch}: ${e?.message || e}`);\n return undefined;\n }\n }\n\n /**\n * The subject of the newest commit on the branch that isn't one of our own sync commits — it's\n * the developer's own description of the change, and becomes the snap message on the lane.\n */\n private async lastNonSyncCommitMessage(branch: string, defaultBranch: string): Promise<string> {\n const log = await git.log([`origin/${branch}`, '--max-count=200']);\n const entry = log.all.find((item) => {\n const message = item.body ? `${item.message}\\n\\n${item.body}` : item.message;\n return !hasSyncMarker(message);\n });\n return entry?.message || `chore: sync ${branch} into the lane (from ${defaultBranch})`;\n }\n\n /**\n * Stage everything, commit with the annotated sync message, and push. NEVER force-pushes: a rejected\n * push means someone pushed concurrently and the next run should re-plan rather than clobber.\n * `--allow-empty` is only insurance against `git commit` failing the lane outright.\n */\n private async commitAllAndPush(branch: string, message: string) {\n await addAllExceptScopeAndModules();\n await commitWithIdentity(message, { extraArgs: ['--allow-empty'] });\n // `HEAD:refs/heads/<branch>`: a full-ref destination cannot be resolved as a tag or reinterpreted —\n // the configured branch name is user input (see `sync-config.ts`).\n await git.push(['origin', `HEAD:refs/heads/${branch}`]);\n this.deps.logger.console(chalk.green(`Pushed ${branch}`));\n }\n\n private async openPrForLane({\n target,\n laneIdStr,\n branch,\n defaultBranch,\n laneHead,\n remoteLane,\n }: {\n target: LaneTarget;\n laneIdStr: string;\n branch: string;\n defaultBranch: string;\n laneHead: string;\n remoteLane: LaneData;\n }): Promise<string | undefined> {\n const { gitHost, logger } = this.deps;\n if (!gitHost) {\n logger.console(formatWarningSummary(`No configured git host provider — skipping PR creation for ${branch}`));\n return undefined;\n }\n // The lane page lives under the scope that HOSTS the lane, not necessarily `defaultScope`.\n // `replace('.', '/')` replaces only the first dot, which is correct: a scope id may contain at\n // most one dot (is-valid-scope-name.ts) — the same conversion `ScopeUrl.toPathname` does.\n const laneUrl = `https://${getCloudDomain()}/${target.hostScope.replace('.', '/')}/~lane/${target.name}`;\n const body = laneSyncPrBody({ laneIdStr, laneUrl, branch, laneHead, components: remoteLane.components });\n try {\n const created = await gitHost.createPr({\n head: branch,\n base: defaultBranch,\n title: `Lane sync: ${laneIdStr}`,\n body,\n });\n logger.console(chalk.green(`Opened PR ${created.htmlUrl} for lane ${laneIdStr}`));\n return created.htmlUrl;\n } catch (e: any) {\n // The branch is already pushed — the load-bearing half. A failed PR creation shouldn't fail the\n // lane; the next run retries.\n logger.consoleWarning(`Could not open a PR for ${branch}: ${e?.message || e}`);\n return undefined;\n }\n }\n\n /**\n * Put the workspace back on main with the default branch checked out. Best-effort, warn-only, so a\n * restore hiccup can't throw out of a `finally` and mask the real error. The checkout is forced\n * (switching back to main rewrites `.bitmap`); the scoped clean discards files a halted lane\n * materialized but never committed, which would otherwise be staged onto the NEXT lane's branch;\n * the reload makes the next lane resolve against the right checkout. This is a checkout, never a\n * push — and `MainSyncExecutor.restoreWorkspace` must not diverge from it.\n */\n private async restoreWorkspace(defaultBranch: string) {\n const { logger } = this.deps;\n try {\n if (currentLaneIdStr(this.deps.lanes)) {\n const switchErr = await this.deps.ci.switchToLaneForSync('main');\n if (switchErr) logger.consoleWarning(`Could not switch the workspace back to main: ${switchErr.message}`);\n }\n await checkoutPristineRestore(defaultBranch, () => this.deps.ci.reloadWorkspaceFromDisk());\n } catch (e: any) {\n logger.consoleWarning(`Could not restore the workspace after sync: ${e?.message || e}`);\n }\n }\n}\n\n/**\n * Whether a `filesStatus` entry represents a conflict. Compared against `FileStatus` rather than\n * string literals — its values are chalk-colored labels. `deletedConflict` counts too.\n */\nfunction isConflictFileStatus(status: string): boolean {\n return status === FileStatus.manual || status === FileStatus.binaryConflict || status === FileStatus.deletedConflict;\n}\n\n/**\n * The body of the pull request that mirrors a lane onto a branch. The component list is capped so the\n * body stays inside the git host's size limit however large the lane is; the total is not.\n */\nexport function laneSyncPrBody({\n laneIdStr,\n laneUrl,\n branch,\n laneHead,\n components,\n}: {\n laneIdStr: string;\n laneUrl: string;\n branch: string;\n laneHead: string;\n components: LaneData['components'];\n}): string {\n const listed = capEntries(\n components.map((comp) => `- \\`${comp.id.toStringWithoutVersion()}\\` @ \\`${comp.head.slice(0, 9)}\\``),\n '- '\n ).join('\\n');\n return [\n `Mirrors the Bit lane [\\`${laneIdStr}\\`](${laneUrl}) onto \\`${branch}\\`.`,\n '',\n `- lane: ${laneUrl}`,\n `- lane head: \\`${laneHead}\\``,\n '',\n `Components on the lane (${components.length}):`,\n listed || '_none_',\n '',\n 'This PR is maintained by `bit ci sync` — push to the branch to send changes back to the lane.',\n ].join('\\n');\n}\n\n/**\n * Single-quote a value interpolated into a copy-pasteable shell command. Lane names may contain `$` and\n * `!`, and a configured branch name may contain anything git accepts as a ref — including a quote.\n */\nfunction shellQuote(value: string): string {\n return `'${value.replace(/'/g, `'\\\\''`)}'`;\n}\n\n/**\n * Resolution instructions posted on a halted PR. `note` replaces the default steps for halts where\n * they do not apply (the branch-aliasing halt, whose PR belongs to a different lane).\n */\nexport function haltCommentBody({\n reason,\n branch,\n laneId,\n note,\n}: {\n reason: string;\n branch: string;\n laneId: string;\n note?: string;\n}): string {\n const resolution =\n note ??\n `To resolve locally:\n git fetch origin && git checkout ${shellQuote(branch)}\n bit lane import ${shellQuote(laneId)}\n # resolve conflicts, commit the result, then:\n git push origin ${shellQuote(branch)}`;\n return `bit-git-sync could not reconcile this branch automatically: ${reason}\n\n${resolution}\n\nRemove the \\`bit-sync-conflict\\` label to resume syncing.\n`;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA,SAAAA,OAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,MAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,KAAA;EAAA,MAAAH,IAAA,GAAAE,OAAA;EAAAC,IAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAIA,SAAAI,QAAA;EAAA,MAAAJ,IAAA,GAAAE,OAAA;EAAAE,OAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAK,kBAAA;EAAA,MAAAL,IAAA,GAAAE,OAAA;EAAAG,iBAAA,YAAAA,CAAA;IAAA,OAAAL,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAM,KAAA;EAAA,MAAAN,IAAA,GAAAE,OAAA;EAAAI,IAAA,YAAAA,CAAA;IAAA,OAAAN,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAGA,SAAAO,YAAA;EAAA,MAAAP,IAAA,GAAAE,OAAA;EAAAK,WAAA,YAAAA,CAAA;IAAA,OAAAP,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAQ,WAAA;EAAA,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CAACE,GAAG,CAAEC,IAAI,IAAK,OAAOA,IAAI,CAACC,EAAE,CAACC,sBAAsB,CAAC,CAAC,UAAUF,IAAI,CAACG,IAAI,CAACa,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,EACpG,IACF,CAAC,CAACQ,IAAI,CAAC,IAAI,CAAC;EACZ,OAAO,CACL,2BAA2BS,SAAS,OAAOyL,OAAO,YAAY3L,MAAM,KAAK,EACzE,EAAE,EACF,WAAW2L,OAAO,EAAE,EACpB,kBAAkB/I,QAAQ,IAAI,EAC9B,EAAE,EACF,2BAA2B9E,UAAU,CAACkB,MAAM,IAAI,EAChDyN,MAAM,IAAI,QAAQ,EAClB,EAAE,EACF,+FAA+F,CAChG,CAAChN,IAAI,CAAC,IAAI,CAAC;AACd;;AAEA;AACA;AACA;AACA;AACA,SAASiN,UAAUA,CAAC5P,KAAa,EAAU;EACzC,OAAO,IAAIA,KAAK,CAAC+O,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG;AAC5C;;AAEA;AACA;AACA;AACA;AACO,SAAS1B,eAAeA,CAAC;EAC9BxJ,MAAM;EACNX,MAAM;EACNoK,MAAM;EACNC;AAMF,CAAC,EAAU;EACT,MAAMsC,UAAU,GACdtC,IAAI,IACJ;AACJ,qCAAqCqC,UAAU,CAAC1M,MAAM,CAAC;AACvD,oBAAoB0M,UAAU,CAACtC,MAAM,CAAC;AACtC;AACA,oBAAoBsC,UAAU,CAAC1M,MAAM,CAAC,EAAE;EACtC,OAAO,+DAA+DW,MAAM;AAC9E;AACA,EAAEgM,UAAU;AACZ;AACA;AACA,CAAC;AACD","ignoreList":[]}
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@teambit/ci",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.488",
|
|
4
4
|
"homepage": "https://bit.cloud/teambit/git/ci",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"componentId": {
|
|
7
7
|
"scope": "teambit.git",
|
|
8
8
|
"name": "ci",
|
|
9
|
-
"version": "1.0.
|
|
9
|
+
"version": "1.0.488"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"chalk": "4.1.2",
|
|
@@ -17,23 +17,23 @@
|
|
|
17
17
|
"@teambit/harmony": "0.4.12",
|
|
18
18
|
"@teambit/cli": "0.0.1362",
|
|
19
19
|
"@teambit/logger": "0.0.1455",
|
|
20
|
-
"@teambit/workspace": "1.0.
|
|
21
|
-
"@teambit/builder": "1.0.
|
|
22
|
-
"@teambit/checkout": "1.0.
|
|
20
|
+
"@teambit/workspace": "1.0.1095",
|
|
21
|
+
"@teambit/builder": "1.0.1095",
|
|
22
|
+
"@teambit/checkout": "1.0.1096",
|
|
23
23
|
"@teambit/component-id": "1.2.4",
|
|
24
24
|
"@teambit/component.modules.merge-helper": "0.0.86",
|
|
25
25
|
"@teambit/component.snap-distance": "0.0.144",
|
|
26
|
-
"@teambit/config-merger": "0.0.
|
|
27
|
-
"@teambit/dependency-resolver": "1.0.
|
|
28
|
-
"@teambit/export": "1.0.
|
|
26
|
+
"@teambit/config-merger": "0.0.962",
|
|
27
|
+
"@teambit/dependency-resolver": "1.0.1095",
|
|
28
|
+
"@teambit/export": "1.0.1095",
|
|
29
29
|
"@teambit/harmony.modules.concurrency": "0.0.40",
|
|
30
|
-
"@teambit/importer": "1.0.
|
|
30
|
+
"@teambit/importer": "1.0.1095",
|
|
31
31
|
"@teambit/lane-id": "0.0.312",
|
|
32
|
-
"@teambit/lanes": "1.0.
|
|
32
|
+
"@teambit/lanes": "1.0.1116",
|
|
33
33
|
"@teambit/legacy.consumer-component": "0.0.144",
|
|
34
|
-
"@teambit/objects": "0.0.
|
|
35
|
-
"@teambit/snapping": "1.0.
|
|
36
|
-
"@teambit/status": "1.0.
|
|
34
|
+
"@teambit/objects": "0.0.602",
|
|
35
|
+
"@teambit/snapping": "1.0.1095",
|
|
36
|
+
"@teambit/status": "1.0.1120",
|
|
37
37
|
"@teambit/toolbox.promise.map-pool": "0.0.19",
|
|
38
38
|
"@teambit/toolbox.string.random": "0.0.18",
|
|
39
39
|
"@teambit/bit-error": "0.0.404",
|