@bridge_gpt/mcp-server 0.2.66 → 0.2.68
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/README.md +421 -83
- package/build/agent-capabilities/probes.js +15 -5
- package/build/agent-launchers/claude-executor-adapter.js +70 -16
- package/build/agent-launchers/executor-adapter.js +7 -4
- package/build/agents.generated.js +22 -2
- package/build/bitbucket-workspace-remote.js +136 -0
- package/build/bootstrap-project-identity.js +24 -0
- package/build/bounded-wait.js +67 -10
- package/build/bridge-permissions.js +829 -0
- package/build/claude-settings.js +18 -0
- package/build/cli-help.js +21 -0
- package/build/command-assets-doctor.js +24 -70
- package/build/command-provisioning.js +29 -5
- package/build/commands.generated.js +12 -12
- package/build/conductor/bridge-api-client.js +857 -1
- package/build/conductor/bring-up-facts.js +1 -1
- package/build/conductor/command-drift-production.js +92 -0
- package/build/conductor/command-drift.js +89 -0
- package/build/conductor/doctor.js +72 -29
- package/build/conductor/epic-branch-ci-inspection.js +1375 -0
- package/build/conductor/epic-implementer-cli.js +98 -28
- package/build/conductor/errors.js +4 -3
- package/build/conductor/gate-discovery.js +890 -0
- package/build/conductor/guided-repair.js +6 -2
- package/build/conductor/hook-runtime-qualification.js +1 -1
- package/build/conductor/install-doctor.js +15 -3
- package/build/conductor/json-output.js +63 -0
- package/build/conductor/merge-execution-contract.js +27 -8
- package/build/conductor/merge-execution-eligibility.js +3 -2
- package/build/conductor/pr-ci-producer.js +1 -1
- package/build/conductor/readiness-cli.js +113 -12
- package/build/conductor/readiness-sections.js +410 -9
- package/build/conductor/readiness.js +388 -33
- package/build/conductor/recovery-cli.js +310 -12
- package/build/conductor/recovery-operations.js +167 -3
- package/build/conductor/repair-contract.js +54 -3
- package/build/conductor/repository-workflow-remedy.js +125 -0
- package/build/conductor/tools.js +2 -2
- package/build/conductor-bundle-artifacts.js +8 -0
- package/build/connect-bitbucket-api.js +41 -6
- package/build/connect-bitbucket.js +106 -33
- package/build/credential-store.js +207 -47
- package/build/docs.generated.js +62 -3
- package/build/doctor.js +92 -1
- package/build/drive-epic-key.js +6 -5
- package/build/drive-epic.js +129 -61
- package/build/epic-coherence-input.js +2 -1
- package/build/epic-coherence-input.test-fixtures.js +4 -3
- package/build/epic-implementer-bin.js +1379 -28
- package/build/epic-implementer-bundle-cli.js +2 -2
- package/build/epic-workarounds-path.js +39 -0
- package/build/executor/cli.js +33 -2
- package/build/executor/completion-contract.js +66 -10
- package/build/executor/completion-supervision.js +4 -0
- package/build/executor/deps.js +4 -1
- package/build/executor/env.js +19 -0
- package/build/executor/gate-qualification-job.js +499 -0
- package/build/executor/guarded-fast-forward-push.js +129 -0
- package/build/executor/heartbeat.js +1 -1
- package/build/executor/http-client.js +20 -0
- package/build/executor/integration-job.js +122 -8
- package/build/executor/job-errors.js +33 -1
- package/build/executor/job-runner.js +813 -87
- package/build/executor/likely-tests.js +290 -0
- package/build/executor/live-worker-registry.js +1 -1
- package/build/executor/observation.js +37 -3
- package/build/executor/packaged-recipe.js +106 -0
- package/build/executor/permissions.js +115 -28
- package/build/executor/platform.js +1 -1
- package/build/executor/preflight.js +112 -26
- package/build/executor/process-containment.js +36 -12
- package/build/executor/process.js +15 -7
- package/build/executor/prompt-spec.js +33 -1
- package/build/executor/recently-failed-tests-file.js +71 -0
- package/build/executor/reconcile-overlap-job.js +41 -23
- package/build/executor/required-verification.js +1 -1
- package/build/executor/required-work-ledger.js +111 -18
- package/build/executor/resume-pre-spawn.js +2 -0
- package/build/executor/retirement.js +69 -0
- package/build/executor/runner.js +122 -13
- package/build/executor/service-unit.js +7 -1
- package/build/executor/test-clock.js +15 -0
- package/build/executor/types.js +32 -0
- package/build/executor/viewer-tabs.js +58 -8
- package/build/executor/worker-command.js +23 -7
- package/build/executor/worker-diagnostics.js +37 -0
- package/build/executor/worker-finalization.js +113 -34
- package/build/executor/worker-guard-hook.js +316 -58
- package/build/executor/worker-log.js +4 -3
- package/build/executor/worker-verification-guidance.js +37 -0
- package/build/executor/worktree.js +166 -8
- package/build/first-build-advisory.js +97 -0
- package/build/generated-assets-advisory.js +14 -0
- package/build/generated-assets-catalog.js +66 -0
- package/build/generated-assets-context.js +46 -0
- package/build/generated-assets-dependencies.js +26 -0
- package/build/generated-assets-doctor.js +50 -0
- package/build/generated-assets-health.js +65 -0
- package/build/generated-assets-host.js +17 -0
- package/build/generated-assets-inventory.js +17 -0
- package/build/generated-assets-paths.js +60 -0
- package/build/generated-assets-publisher.js +133 -0
- package/build/generated-assets-remedy.js +25 -0
- package/build/generated-assets-repair.js +72 -0
- package/build/generated-assets-session.js +71 -0
- package/build/generated-assets-test-support.js +35 -0
- package/build/index.js +1224 -1054
- package/build/init.js +54 -177
- package/build/install-bridge-conductor-gate.js +1372 -0
- package/build/install-bridge-conductor.js +296 -41
- package/build/install-bridge.js +547 -40
- package/build/mcp-install-state.js +50 -4
- package/build/merge-workflow-install.js +3 -4
- package/build/phase-context-git-probe.js +68 -0
- package/build/phase-result-artifacts.js +173 -5
- package/build/pipeline-utils.js +6 -2
- package/build/pipelines.generated.js +34 -160
- package/build/plan-execution-ledger.js +2 -32
- package/build/plane/alembic-head.js +12 -3
- package/build/plane/base-worktree-guard.js +147 -0
- package/build/plane/cli.js +217 -17
- package/build/plane/code-snapshot.js +468 -0
- package/build/plane/defaults.js +48 -3
- package/build/plane/endpoint.js +41 -0
- package/build/plane/manifest.js +136 -2
- package/build/plane/member-roster.js +94 -19
- package/build/plane/preflight.js +83 -2
- package/build/plane/process-cwd.js +67 -0
- package/build/plane/restart.js +542 -0
- package/build/plane/shutdown.js +31 -0
- package/build/plane/status.js +143 -8
- package/build/plane/supervisor.js +586 -179
- package/build/plane/types.js +54 -2
- package/build/printed-remedy-commands.js +52 -0
- package/build/readiness-check.js +1 -1
- package/build/readme.generated.js +1 -1
- package/build/repair-assets.js +93 -0
- package/build/review-generation.js +22 -0
- package/build/run-unit-tests-launcher.js +130 -49
- package/build/secret-redaction.js +33 -0
- package/build/setup-epic.js +152 -22
- package/build/sfcc/config.js +9 -0
- package/build/sfcc/credentials.js +100 -38
- package/build/sfcc/hostname.js +67 -0
- package/build/sfcc/permissions.js +17 -13
- package/build/sfcc/register.js +1 -1
- package/build/sfcc/tool-wrapper.js +39 -43
- package/build/sfcc/write-grants.js +17 -11
- package/build/sfcc/write-result.js +4 -3
- package/build/sfcc/writes-site-preference.js +20 -8
- package/build/start-tickets-prereqs.js +70 -16
- package/build/start-tickets.js +208 -36
- package/build/tool-error-envelope.js +61 -0
- package/build/tool-surface-gating.js +36 -0
- package/build/upgrade-cli.js +55 -1
- package/build/version.generated.js +3 -3
- package/build/visual-diff.js +22 -1
- package/build/worker-guard-hook-bin.js +4 -6
- package/build/worker-guard-hook-main.js +47 -0
- package/build/worktree-core.js +145 -6
- package/docs/EPIC-IMPLEMENTER-INSTALL.md +867 -0
- package/docs/EPIC-IMPLEMENTER.md +728 -0
- package/docs/install/mcp-tool-integrations.md +24 -15
- package/docs/install/sfcc-integration.md +12 -4
- package/package.json +3 -3
- package/pipelines/greenfield-setup.json +4 -128
- package/pipelines/implement-ticket.json +3 -2
- package/pipelines/plan-epic.json +0 -5
- package/pipelines/review-ticket.json +1 -1
- package/docs/CONDUCTOR.md +0 -605
- package/pipelines/idea-to-pr.json +0 -49
|
@@ -60,6 +60,15 @@
|
|
|
60
60
|
* reports its head, publication is `unknown`
|
|
61
61
|
* (`WorkerFinalizationPublicationUnverified`), never `ok`.
|
|
62
62
|
*
|
|
63
|
+
* BAPI-1357: "absent" and "could not be checked" are different facts. Only the
|
|
64
|
+
* origin lookup's authoritative "no matching ref" (`git ls-remote --exit-code`
|
|
65
|
+
* exit code 2), or having no expected branch at all, is reported as
|
|
66
|
+
* `WorkerFinalizationMissingRemoteBranchAndPr`; a thrown command, an expired
|
|
67
|
+
* call bound, any other exit, or unusable output leaves publication unknown and is
|
|
68
|
+
* `WorkerFinalizationOriginUnverifiable`, which the server treats as transient.
|
|
69
|
+
* Both keep the `clean_exit` classification the process earned. No-expected-branch
|
|
70
|
+
* and absent-on-origin are still one cause, and may be refined later.
|
|
71
|
+
*
|
|
63
72
|
* This check is deliberately fail-CLOSED, unlike the BAPI-586 base check it now
|
|
64
73
|
* shares a lookup with. "The PR could not be verified" and "there is no PR" are
|
|
65
74
|
* the same thing from the contract's point of view: neither is evidence that the
|
|
@@ -67,7 +76,7 @@
|
|
|
67
76
|
* this ticket removes. The reconciler stays the decision-maker — the executor
|
|
68
77
|
* only reports the observation (R14 rule 3).
|
|
69
78
|
*/
|
|
70
|
-
import { ReconcileOverlapPushUnfinalized,
|
|
79
|
+
import { ReconcileOverlapPushUnfinalized, WorkerFinalizationMissingRemoteBranchAndPr, WorkerFinalizationOriginUnverifiable, WorkerFinalizationPrBaseMismatch, WorkerFinalizationPrNotAttached, WorkerFinalizationPublicationUnverified, WorkerFinalizationSavedButUnfinalized, } from "./job-errors.js";
|
|
71
80
|
import { isImplementationStyleJobType } from "./job-types.js";
|
|
72
81
|
/** A full, lower-case 40-hex commit SHA. */
|
|
73
82
|
const FULL_SHA_RE = /^[0-9a-f]{40}$/;
|
|
@@ -129,40 +138,56 @@ function parseLsRemoteHeadSha(stdout, expectedRef) {
|
|
|
129
138
|
}
|
|
130
139
|
return null;
|
|
131
140
|
}
|
|
141
|
+
/** `git ls-remote --exit-code` exits with this status when no ref matched. */
|
|
142
|
+
const LS_REMOTE_NO_MATCHING_REF_EXIT_CODE = 2;
|
|
132
143
|
/**
|
|
133
|
-
* Resolve the origin branch's authoritative current tip
|
|
134
|
-
*
|
|
135
|
-
*
|
|
136
|
-
*
|
|
137
|
-
*
|
|
144
|
+
* Resolve the origin branch's authoritative current tip. Uses `git ls-remote`
|
|
145
|
+
* against the exact normalized ref — never a local `origin/<branch>`
|
|
146
|
+
* remote-tracking ref, which can be stale on a recovery worktree.
|
|
147
|
+
*
|
|
148
|
+
* Only exit code 2 (`--exit-code`'s "no matching ref") is `absent`. A thrown
|
|
149
|
+
* command, an expired call bound, every other non-zero exit, and an exit-zero
|
|
150
|
+
* response with no usable SHA for the exact ref are all `unverifiable`: none of
|
|
151
|
+
* them is evidence the branch is missing. Neither stderr nor a thrown error's
|
|
152
|
+
* message is read or copied anywhere.
|
|
138
153
|
*/
|
|
139
154
|
export async function resolveOriginBranchSha(runCommand, worktreePath, branch, bound) {
|
|
140
155
|
const normalizedRef = normalizeBranchRef(branch);
|
|
141
156
|
if (callExpired(bound))
|
|
142
|
-
return
|
|
143
|
-
|
|
157
|
+
return { state: "unverifiable" };
|
|
158
|
+
let result;
|
|
159
|
+
try {
|
|
160
|
+
result = await runCommand("git", ["ls-remote", "--exit-code", "--heads", "origin", normalizedRef], callOptions(worktreePath, bound));
|
|
161
|
+
}
|
|
162
|
+
catch {
|
|
163
|
+
return { state: "unverifiable" };
|
|
164
|
+
}
|
|
165
|
+
if (result.exitCode === LS_REMOTE_NO_MATCHING_REF_EXIT_CODE)
|
|
166
|
+
return { state: "absent" };
|
|
144
167
|
if (result.exitCode !== 0)
|
|
145
|
-
return
|
|
146
|
-
|
|
168
|
+
return { state: "unverifiable" };
|
|
169
|
+
const sha = parseLsRemoteHeadSha(result.stdout, normalizedRef);
|
|
170
|
+
return sha === null ? { state: "unverifiable" } : { state: "found", sha };
|
|
147
171
|
}
|
|
148
172
|
/**
|
|
149
173
|
* Repeatedly resolve the authoritative origin tip until it either satisfies
|
|
150
174
|
* finalization or the bounded retry budget is exhausted. Stops early (no further
|
|
151
175
|
* lookups) when the origin tip matches the worker HEAD, or when the branch exists
|
|
152
176
|
* and the worker HEAD is unavailable (degraded telemetry, existence-only). Retries
|
|
153
|
-
*
|
|
154
|
-
*
|
|
155
|
-
*
|
|
177
|
+
* an observed absence, a found tip that does not yet match a known HEAD, and an
|
|
178
|
+
* unverifiable read (a later read may succeed). Returns the LAST observation with
|
|
179
|
+
* its state intact — an unverifiable read is never turned into an absence here,
|
|
180
|
+
* so the caller decides loud-failure from what was actually established.
|
|
156
181
|
*/
|
|
157
182
|
async function resolveOriginBranchShaForFinalization(runCommand, worktreePath, branch, trimmedHeadSha, attempts, retryDelayMs, sleep, bound) {
|
|
158
183
|
const total = Math.max(1, attempts);
|
|
159
|
-
let
|
|
184
|
+
let lookup = { state: "unverifiable" };
|
|
160
185
|
for (let attempt = 0; attempt < total; attempt++) {
|
|
161
|
-
|
|
162
|
-
if (
|
|
186
|
+
lookup = await resolveOriginBranchSha(runCommand, worktreePath, branch, bound?.());
|
|
187
|
+
if (lookup.state === "found") {
|
|
163
188
|
// Existence-only success when HEAD is unknown; exact-match success otherwise.
|
|
164
|
-
if (!trimmedHeadSha ||
|
|
165
|
-
return {
|
|
189
|
+
if (!trimmedHeadSha || lookup.sha === trimmedHeadSha) {
|
|
190
|
+
return { lookup, attemptsUsed: attempt + 1 };
|
|
166
191
|
}
|
|
167
192
|
}
|
|
168
193
|
if (attempt < total - 1)
|
|
@@ -170,7 +195,7 @@ async function resolveOriginBranchShaForFinalization(runCommand, worktreePath, b
|
|
|
170
195
|
}
|
|
171
196
|
// `attemptsUsed` is reported even on failure so the caller can tell a
|
|
172
197
|
// first-try answer from one that needed the settling window (BAPI-862).
|
|
173
|
-
return {
|
|
198
|
+
return { lookup, attemptsUsed: total };
|
|
174
199
|
}
|
|
175
200
|
/** The bounded, public projection finalization asks the provider for. */
|
|
176
201
|
const PR_VIEW_JSON_FIELDS = "number,url,baseRefName,body,headRefOid";
|
|
@@ -385,12 +410,19 @@ function publicationUnverifiedFailure(job, branch, workerHeadSha, detail) {
|
|
|
385
410
|
};
|
|
386
411
|
}
|
|
387
412
|
/**
|
|
388
|
-
* `detail` describes a state with NO evidence any work reached origin
|
|
389
|
-
*
|
|
413
|
+
* `detail` describes a state with NO evidence any work reached origin, and is
|
|
414
|
+
* used for exactly two cases: no expected branch to verify, or a branch the
|
|
415
|
+
* origin lookup OBSERVED absent (exit code 2). An origin lookup that merely
|
|
416
|
+
* failed is {@link originUnverifiableFailure}, never this. Those two cases stay
|
|
417
|
+
* one cause for now and may be refined later.
|
|
390
418
|
* `hasPrUrl` only changes the wording — a PR existing is never treated as
|
|
391
419
|
* evidence of a push, so the message must not claim "no PR URL" when one was
|
|
392
420
|
* actually present (that would be false and would mislead the operator reading
|
|
393
421
|
* it toward the wrong recovery step).
|
|
422
|
+
*
|
|
423
|
+
* The classification is `clean_exit` because the worker process did exit
|
|
424
|
+
* cleanly; the finalization failure rides in the error kind, not in a rewritten
|
|
425
|
+
* exit (the same rule the other finalization failures follow).
|
|
394
426
|
*/
|
|
395
427
|
function missingBranchAndPrFailure(job, detail, hasPrUrl) {
|
|
396
428
|
const label = job.ticket_key ? `${job.ticket_key} (job ${job.id})` : `job ${job.id}`;
|
|
@@ -398,7 +430,23 @@ function missingBranchAndPrFailure(job, detail, hasPrUrl) {
|
|
|
398
430
|
return {
|
|
399
431
|
error_kind: WorkerFinalizationMissingRemoteBranchAndPr,
|
|
400
432
|
error_message: `${label} exited cleanly but ${prefix} ${detail}`,
|
|
401
|
-
classification: "
|
|
433
|
+
classification: "clean_exit",
|
|
434
|
+
};
|
|
435
|
+
}
|
|
436
|
+
/**
|
|
437
|
+
* BAPI-1357: the origin lookup could not be trusted, so the branch was neither
|
|
438
|
+
* seen nor observed missing. The wording is fixed and bounded: it names only the
|
|
439
|
+
* ticket, job and branch (public identifiers), never a command, stderr, a thrown
|
|
440
|
+
* error's text, a host, or a credential, and it does not claim the branch is
|
|
441
|
+
* absent. The server treats this kind as transient.
|
|
442
|
+
*/
|
|
443
|
+
function originUnverifiableFailure(job, branch) {
|
|
444
|
+
const label = job.ticket_key ? `${job.ticket_key} (job ${job.id})` : `job ${job.id}`;
|
|
445
|
+
return {
|
|
446
|
+
error_kind: WorkerFinalizationOriginUnverifiable,
|
|
447
|
+
error_message: `${label} exited cleanly, but whether branch '${branch}' reached origin could not be ` +
|
|
448
|
+
`verified. The branch was not observed to be missing; publication is unknown for this attempt.`,
|
|
449
|
+
classification: "clean_exit",
|
|
402
450
|
};
|
|
403
451
|
}
|
|
404
452
|
/**
|
|
@@ -411,14 +459,14 @@ function missingBranchAndPrFailure(job, detail, hasPrUrl) {
|
|
|
411
459
|
* existing convention); the full 40-character origin SHA is carried in the
|
|
412
460
|
* structured `last_commit_sha` field so nothing has to re-derive it from prose.
|
|
413
461
|
*/
|
|
414
|
-
function savedButUnfinalizedFailure(job, branch, originSha, workerHeadSha) {
|
|
462
|
+
function savedButUnfinalizedFailure(job, branch, originSha, workerHeadSha, publicationAttempted = false) {
|
|
415
463
|
const label = job.ticket_key ? `${job.ticket_key} (job ${job.id})` : `job ${job.id}`;
|
|
416
464
|
return {
|
|
417
465
|
error_kind: WorkerFinalizationSavedButUnfinalized,
|
|
418
466
|
error_message: `${label} exited cleanly, but origin branch '${branch}' is at ${originSha.slice(0, 12)}, ` +
|
|
419
|
-
`which does not match this worker's HEAD ${workerHeadSha.slice(0, 12)}
|
|
420
|
-
`
|
|
421
|
-
|
|
467
|
+
`which does not match this worker's HEAD ${workerHeadSha.slice(0, 12)}. The newer commit ` +
|
|
468
|
+
`is retained only in the local worktree and was not pushed. Automatic publication ` +
|
|
469
|
+
`${publicationAttempted ? "was refused" : "was unavailable or not attempted"}; preserve the worktree for recovery.`,
|
|
422
470
|
classification: "crashed",
|
|
423
471
|
last_commit_sha: originSha,
|
|
424
472
|
};
|
|
@@ -525,19 +573,50 @@ export async function validateWorkerFinalization(input) {
|
|
|
525
573
|
try {
|
|
526
574
|
origin = await resolveOriginBranchShaForFinalization(runCommand, worktreePath, trimmedBranch, trimmedHeadSha, attempts, retryDelayMs, sleep, bound);
|
|
527
575
|
}
|
|
528
|
-
catch
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
};
|
|
576
|
+
catch {
|
|
577
|
+
// BAPI-1357: nothing thrown here says anything about the branch, and its text
|
|
578
|
+
// is never rendered — the fixed unverifiable outcome is the whole report.
|
|
579
|
+
return { ok: false, failure: originUnverifiableFailure(job, trimmedBranch) };
|
|
533
580
|
}
|
|
534
|
-
|
|
535
|
-
|
|
581
|
+
// BAPI-1357: only an authoritative "no matching ref" is an absence. A lookup
|
|
582
|
+
// that could not be trusted stays unknown and never funds the deterministic
|
|
583
|
+
// missing-branch failure.
|
|
584
|
+
if (origin.lookup.state === "unverifiable") {
|
|
585
|
+
return { ok: false, failure: originUnverifiableFailure(job, trimmedBranch) };
|
|
586
|
+
}
|
|
587
|
+
if (origin.lookup.state === "absent") {
|
|
536
588
|
return {
|
|
537
589
|
ok: false,
|
|
538
590
|
failure: missingBranchAndPrFailure(job, `branch '${trimmedBranch}' is not on origin`, hasPrUrl),
|
|
539
591
|
};
|
|
540
592
|
}
|
|
593
|
+
let publicationAttempted = false;
|
|
594
|
+
if (trimmedHeadSha && origin.lookup.sha !== trimmedHeadSha && job.job_type !== "reconcile_overlap" && input.publishRetainedHead) {
|
|
595
|
+
publicationAttempted = true;
|
|
596
|
+
let pushed;
|
|
597
|
+
try {
|
|
598
|
+
pushed = await input.publishRetainedHead();
|
|
599
|
+
}
|
|
600
|
+
catch {
|
|
601
|
+
pushed = { status: "refused", reason: "remote_rejected" };
|
|
602
|
+
}
|
|
603
|
+
// The original lease is never replaced after an intermediate worker push.
|
|
604
|
+
// A timeout/rejected lease may have landed elsewhere; only the ordinary
|
|
605
|
+
// authoritative origin and PR contracts can accept that state, without
|
|
606
|
+
// manufacturing a wrapper publication fact.
|
|
607
|
+
if (pushed.status === "published" || pushed.reason === "lease_rejected" || pushed.reason === "timeout") {
|
|
608
|
+
origin = await resolveOriginBranchShaForFinalization(runCommand, worktreePath, trimmedBranch, trimmedHeadSha, 1, retryDelayMs, sleep, bound);
|
|
609
|
+
if (origin.lookup.state !== "found")
|
|
610
|
+
return { ok: false, failure: originUnverifiableFailure(job, trimmedBranch) };
|
|
611
|
+
pr = await resolvePrForFinalization(runCommand, worktreePath, trimmedBranch, bound());
|
|
612
|
+
const refreshedBase = evaluatePrBase(job, pr, expectedBase);
|
|
613
|
+
if (refreshedBase)
|
|
614
|
+
return { ok: false, failure: refreshedBase };
|
|
615
|
+
}
|
|
616
|
+
}
|
|
617
|
+
if (origin.lookup.state !== "found")
|
|
618
|
+
return { ok: false, failure: originUnverifiableFailure(job, trimmedBranch) };
|
|
619
|
+
const remoteSha = origin.lookup.sha;
|
|
541
620
|
// BAPI-762: an authoritative origin tip that does not match the worker's HEAD
|
|
542
621
|
// is positive evidence of RECOVERABLE work — distinct from the sub-cases above,
|
|
543
622
|
// which have no evidence any work reached origin at all. This is the only
|
|
@@ -549,7 +628,7 @@ export async function validateWorkerFinalization(input) {
|
|
|
549
628
|
ok: false,
|
|
550
629
|
failure: job.job_type === "reconcile_overlap"
|
|
551
630
|
? reconcilePushUnfinalizedFailure(job, trimmedBranch, remoteSha, trimmedHeadSha)
|
|
552
|
-
: savedButUnfinalizedFailure(job, trimmedBranch, remoteSha, trimmedHeadSha),
|
|
631
|
+
: savedButUnfinalizedFailure(job, trimmedBranch, remoteSha, trimmedHeadSha, publicationAttempted),
|
|
553
632
|
};
|
|
554
633
|
}
|
|
555
634
|
// BAPI-862: the work is provably ON ORIGIN. That was the whole of the success
|