@sagentlab/navarch-runtime 0.1.169 → 0.1.171
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/delivery.cjs +14 -1
- package/package.json +1 -1
package/dist/delivery.cjs
CHANGED
|
@@ -84,6 +84,19 @@ async function probeWorktreeDelivery(args) {
|
|
|
84
84
|
// failed sessions that correctly delivered nothing — a superseded task, say —
|
|
85
85
|
// as "1 commit never pushed" and pushed their agent to open an empty PR.
|
|
86
86
|
const aheadBase = args.claimBaselineSha ?? args.baseRef;
|
|
87
|
+
// Commits the delivery base (the default or working branch) already carries
|
|
88
|
+
// are never this task's work. The claim baseline alone does not exclude
|
|
89
|
+
// them, because for a PR continuation it is the reviewed PR's head, pinned at
|
|
90
|
+
// claim, while `prepare()` starts the worktree from the newer default
|
|
91
|
+
// branch. `baseline..HEAD` then holds every default-branch commit since the
|
|
92
|
+
// PR's merge base. Verify task 5fc02114 (PR #3228) failed attempts 4–8 as
|
|
93
|
+
// "3, 5, 6 commits were pushed … but no pull request was opened" with HEAD
|
|
94
|
+
// still on the claim commit. #3236 covers verify and review through
|
|
95
|
+
// `inheritRemoteCommitsExcept`; a review-fix, conflict or stale-PR build
|
|
96
|
+
// that ends without leaving its allocated branch (nothing left to fix,
|
|
97
|
+
// superseded) still tripped it. Written as `^ref`, not `--not`, because a
|
|
98
|
+
// second `--not` below would flip it back.
|
|
99
|
+
const deliveryBaseExclusion = args.claimBaselineSha && args.baseRef ? [`^${args.baseRef}`] : [];
|
|
87
100
|
// `--exclude` applies to the next `--remotes` and matches the short name
|
|
88
101
|
// (`origin/<branch>`), so every origin ref except the task's own is excluded.
|
|
89
102
|
const inherited = args.inheritRemoteCommitsExcept
|
|
@@ -93,7 +106,7 @@ async function probeWorktreeDelivery(args) {
|
|
|
93
106
|
git(["rev-parse", "--abbrev-ref", "HEAD"]),
|
|
94
107
|
git(["status", "--porcelain"]),
|
|
95
108
|
aheadBase
|
|
96
|
-
? git(["rev-list", "--count", "--full-history", `${aheadBase}..HEAD`, ...inherited, "--", "."])
|
|
109
|
+
? git(["rev-list", "--count", "--full-history", `${aheadBase}..HEAD`, ...deliveryBaseExclusion, ...inherited, "--", "."])
|
|
97
110
|
: Promise.resolve(null),
|
|
98
111
|
// Commits no origin ref carries. Independent of the base ref, so it still
|
|
99
112
|
// answers "was this pushed?" when the base cannot be resolved at all.
|
package/package.json
CHANGED