@@ -79,10 +79,6 @@ import {
7979import { FIXUP_OWNERS_ENV , FOLD_MESSAGES_ENV , sequenceEditor } from "./lib/fork-sync-todo.ts" ;
8080import { splitTrailerBlock } from "./lib/fork-trailers.ts" ;
8181
82- // ---------------------------------------------------------------------------
83- // Constants
84- // ---------------------------------------------------------------------------
85-
8682const SYNC_DIR = ".t3/fork-sync" ;
8783const WORKTREE_DIR = "worktree" ;
8884/** `gh` files and lists block issues only under this label; the title search does the rest. */
@@ -104,10 +100,6 @@ const failureIssueTitle = (step: string, key: string): string =>
104100export const failureMarker = ( step : string , key : string ) : string =>
105101 `<!-- sync-failure:${ step } :${ key } -->` ;
106102
107- // ---------------------------------------------------------------------------
108- // Command runner
109- // ---------------------------------------------------------------------------
110-
111103export interface CommandSpec {
112104 readonly cwd : string ;
113105 readonly env ?: NodeJS . ProcessEnv ;
@@ -171,10 +163,6 @@ const trunkSha = (runner: CommandRunner, root: string): string => {
171163 : "unknown" ;
172164} ;
173165
174- // ---------------------------------------------------------------------------
175- // Typed report
176- // ---------------------------------------------------------------------------
177-
178166/** How a conflict row resolved: hook re-apply, an accepted net-zero delete, regeneration, or a manual resolution. */
179167export const ConflictVia = Schema . Literals ( [ "hook" , "manual" , "net-zero-delete" , "regenerate" ] ) ;
180168
@@ -316,10 +304,6 @@ const writeReport = (root: string, report: ForkSyncReport): string => {
316304export const readReport = ( root : string , tag : string ) : ForkSyncReport =>
317305 decodeForkSyncReport ( JSON . parse ( NodeFS . readFileSync ( reportPath ( root , tag ) , "utf8" ) ) ) ;
318306
319- // ---------------------------------------------------------------------------
320- // Target
321- // ---------------------------------------------------------------------------
322-
323307/**
324308 * The release tags upstream published onto `upstream/main`'s first-parent lane,
325309 * oldest first (`--reverse`), since `positionUpstreamReleaseTags` and
@@ -358,10 +342,6 @@ export const resolveTarget = (
358342 return newest ;
359343} ;
360344
361- // ---------------------------------------------------------------------------
362- // Rebase
363- // ---------------------------------------------------------------------------
364-
365345/**
366346 * `maintenance.auto=false`: every `git commit` the sequencer runs would
367347 * otherwise detach a `git maintenance run --auto` whose `rerere gc` holds
@@ -996,10 +976,6 @@ export const rebaseOnto = (
996976 return { ...outcome , recorded : mergeStops ( carried , outcome . conflicts ) } ;
997977} ;
998978
999- // ---------------------------------------------------------------------------
1000- // Scrubbed environment
1001- // ---------------------------------------------------------------------------
1002-
1003979const VERIFICATION_ENV_KEYS = new Set ( [
1004980 // Vite+'s `node_modules/.bin/vp` shim exports an absolute NODE_PATH into the
1005981 // store of the checkout it belongs to; inherited, it pins module resolution
@@ -1065,10 +1041,6 @@ export const checkFailureDetail = (
10651041 return `${ text . split ( "\n" ) . slice ( - tail ) . join ( "\n" ) } (exit ${ result . status } )` ;
10661042} ;
10671043
1068- // ---------------------------------------------------------------------------
1069- // Candidate CI
1070- // ---------------------------------------------------------------------------
1071-
10721044const CI_WORKFLOW = NodePath . basename ( FORK_CI_WORKFLOW_PATH ) ;
10731045const CI_POLL_SECONDS = 30 ;
10741046/** A push that has no run this long after it never will. */
@@ -1171,10 +1143,6 @@ const ciMark = (conclusion: string): string =>
11711143const redJobs = ( ci : CandidateCi ) : ReadonlyArray < CiJob > =>
11721144 ci . jobs . filter ( ( job ) => job . conclusion !== "success" && job . conclusion !== "skipped" ) ;
11731145
1174- // ---------------------------------------------------------------------------
1175- // Issue publication
1176- // ---------------------------------------------------------------------------
1177-
11781146export const blockingShaOf = ( conflicts : ReadonlyArray < ConflictRow > ) : string | null =>
11791147 conflicts . find ( ( row ) => row . via === "manual" ) ?. upstreamCommit ??
11801148 conflicts [ 0 ] ?. upstreamCommit ??
@@ -1607,10 +1575,6 @@ export const closeBlocks = (
16071575 return closures ;
16081576} ;
16091577
1610- // ---------------------------------------------------------------------------
1611- // Rendering — output only, never read back
1612- // ---------------------------------------------------------------------------
1613-
16141578export const renderReport = ( report : ForkSyncReport ) : string => {
16151579 const head = {
16161580 applied : "✅ applied" ,
@@ -1678,10 +1642,6 @@ export const renderReport = (report: ForkSyncReport): string => {
16781642 return [ ...rows , ...conflictTable , ...ci , ...blocks , ...decision , ...failure ] . join ( "\n" ) ;
16791643} ;
16801644
1681- // ---------------------------------------------------------------------------
1682- // The run
1683- // ---------------------------------------------------------------------------
1684-
16851645export interface RunOptions {
16861646 readonly runner ?: CommandRunner ;
16871647 readonly root ?: string ;
0 commit comments