@sagentlab/navarch-runtime 0.1.168 → 0.1.170
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 +8 -2
- package/dist/session.cjs +10 -0
- package/package.json +1 -1
package/dist/delivery.cjs
CHANGED
|
@@ -83,11 +83,17 @@ async function probeWorktreeDelivery(args) {
|
|
|
83
83
|
// `chore(navarch): claim task branch` commit (git-worktree.cts); counting it
|
|
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
|
+
const aheadBase = args.claimBaselineSha ?? args.baseRef;
|
|
87
|
+
// `--exclude` applies to the next `--remotes` and matches the short name
|
|
88
|
+
// (`origin/<branch>`), so every origin ref except the task's own is excluded.
|
|
89
|
+
const inherited = args.inheritRemoteCommitsExcept
|
|
90
|
+
? ["--not", `--exclude=origin/${args.inheritRemoteCommitsExcept}`, "--remotes=origin"]
|
|
91
|
+
: [];
|
|
86
92
|
const [branchRaw, statusRaw, aheadRaw, unpushedRaw] = await Promise.all([
|
|
87
93
|
git(["rev-parse", "--abbrev-ref", "HEAD"]),
|
|
88
94
|
git(["status", "--porcelain"]),
|
|
89
|
-
|
|
90
|
-
? git(["rev-list", "--count", "--full-history", `${
|
|
95
|
+
aheadBase
|
|
96
|
+
? git(["rev-list", "--count", "--full-history", `${aheadBase}..HEAD`, ...inherited, "--", "."])
|
|
91
97
|
: Promise.resolve(null),
|
|
92
98
|
// Commits no origin ref carries. Independent of the base ref, so it still
|
|
93
99
|
// answers "was this pushed?" when the base cannot be resolved at all.
|
package/dist/session.cjs
CHANGED
|
@@ -1299,6 +1299,16 @@ async function runClaimedSession(deps, claimed, sessionId, lifecycle) {
|
|
|
1299
1299
|
worktreePath: gitWorktree.worktreePath,
|
|
1300
1300
|
baseRef: await gitWorktree.resolveDeliveryBase(),
|
|
1301
1301
|
claimBaselineSha: deliveryBaselineSha,
|
|
1302
|
+
// A verify or review agent may check the reviewed PR's head out,
|
|
1303
|
+
// onto its task branch or the PR's own branch. Those commits are
|
|
1304
|
+
// on origin under the PR's head ref and are not this task's work
|
|
1305
|
+
// (delivery.cjs). This holds with or without review_of_task_id:
|
|
1306
|
+
// the review loop links every review and verify task it spawns to
|
|
1307
|
+
// the reviewed delivery. Build, docs and ops continuations deliver
|
|
1308
|
+
// commits, so they keep counting every commit ahead.
|
|
1309
|
+
...(task.task_type === "verify" || task.task_type === "review"
|
|
1310
|
+
? { inheritRemoteCommitsExcept: gitWorktree.branch }
|
|
1311
|
+
: {}),
|
|
1302
1312
|
});
|
|
1303
1313
|
delivery = (0, delivery_cjs_1.evaluateDelivery)({ ...probe, pullRequestUrl, pullRequestLookupFailed }, deliveryBinding);
|
|
1304
1314
|
}
|
package/package.json
CHANGED