forgedock 1.66.0 → 1.68.0
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/bin/config-schema.mjs +3 -0
- package/bin/engine/outcome-codes.mjs +2 -0
- package/bin/engine-cli.mjs +193 -27
- package/bin/engine.mjs +10 -0
- package/bin/forgedock.mjs +24 -1
- package/bin/help-text.mjs +4 -3
- package/bin/introspect-schedule.mjs +98 -0
- package/bin/introspect-schedule.test.mjs +67 -0
- package/bin/lean/admission.mjs +21 -0
- package/bin/lean/admission.test.mjs +30 -0
- package/bin/lean/advisory.test.mjs +64 -0
- package/bin/lean/amendment-schema.mjs +30 -0
- package/bin/lean/attempts.mjs +162 -0
- package/bin/lean/attempts.test.mjs +141 -0
- package/bin/lean/basered.mjs +81 -0
- package/bin/lean/basered.test.mjs +68 -1
- package/bin/lean/batch-health.mjs +20 -12
- package/bin/lean/batch-health.test.mjs +55 -11
- package/bin/lean/batch.mjs +45 -0
- package/bin/lean/batch.test.mjs +105 -5
- package/bin/lean/capwait.mjs +14 -3
- package/bin/lean/capwait.test.mjs +20 -0
- package/bin/lean/ci-gate.mjs +2 -90
- package/bin/lean/ci-gate.test.mjs +1 -127
- package/bin/lean/ci-precheck.mjs +25 -8
- package/bin/lean/ci-precheck.test.mjs +24 -0
- package/bin/lean/clear-breaker.mjs +14 -0
- package/bin/lean/clear-breaker.test.mjs +4 -3
- package/bin/lean/commentstate.mjs +46 -0
- package/bin/lean/commentstate.test.mjs +43 -0
- package/bin/lean/concurrency.mjs +89 -0
- package/bin/lean/concurrency.test.mjs +113 -0
- package/bin/lean/conformance.e2e.test.mjs +13 -8
- package/bin/lean/conformance.mjs +73 -181
- package/bin/lean/conformance.test.mjs +61 -345
- package/bin/lean/depcache.mjs +100 -10
- package/bin/lean/depcache.test.mjs +105 -0
- package/bin/lean/docsgate.mjs +0 -32
- package/bin/lean/docsgate.test.mjs +2 -23
- package/bin/lean/effects-cap.test.mjs +9 -1
- package/bin/lean/effects-killtree.test.mjs +35 -0
- package/bin/lean/effects.mjs +42 -24
- package/bin/lean/efficiency.mjs +162 -0
- package/bin/lean/efficiency.test.mjs +79 -0
- package/bin/lean/engine-readmit.test.mjs +35 -0
- package/bin/lean/envgap.mjs +93 -0
- package/bin/lean/envgap.test.mjs +53 -0
- package/bin/lean/execution.mjs +41 -17
- package/bin/lean/execution.test.mjs +58 -0
- package/bin/lean/failure-census.mjs +170 -0
- package/bin/lean/failure-census.test.mjs +59 -0
- package/bin/lean/failure-stop.mjs +46 -0
- package/bin/lean/failure-stop.test.mjs +45 -0
- package/bin/lean/fixtures/capacity-storm.json +609 -0
- package/bin/lean/guardgate.test.mjs +2 -3
- package/bin/lean/heavy.mjs +33 -4
- package/bin/lean/heavy.test.mjs +38 -6
- package/bin/lean/hotarea.mjs +0 -36
- package/bin/lean/hotarea.test.mjs +1 -22
- package/bin/lean/issuewatch-verify.mjs +19 -4
- package/bin/lean/issuewatch.mjs +21 -4
- package/bin/lean/issuewatch.test.mjs +48 -1
- package/bin/lean/lane-audit-gap.mjs +66 -0
- package/bin/lean/lane-audit-gap.test.mjs +59 -0
- package/bin/lean/lane-audit-llm.mjs +5 -0
- package/bin/lean/lane-audit-query.mjs +47 -0
- package/bin/lean/lane-audit-query.test.mjs +44 -0
- package/bin/lean/lane-audit-signatures.mjs +33 -0
- package/bin/lean/lane-audit.mjs +110 -0
- package/bin/lean/lane-audit.test.mjs +97 -0
- package/bin/lean/lane-recovery.test.mjs +33 -0
- package/bin/lean/lanecheck.mjs +5 -3
- package/bin/lean/lanecheck.test.mjs +6 -0
- package/bin/lean/lean.mjs +311 -154
- package/bin/lean/lean.test.mjs +530 -223
- package/bin/lean/limits.mjs +17 -0
- package/bin/lean/limits.test.mjs +15 -1
- package/bin/lean/live-execution.mjs +21 -2
- package/bin/lean/live-execution.test.mjs +39 -0
- package/bin/lean/liveness.mjs +37 -0
- package/bin/lean/liveness.test.mjs +33 -0
- package/bin/lean/orchestrate-attempts.test.mjs +82 -0
- package/bin/lean/orchestrate-envhold.test.mjs +47 -0
- package/bin/lean/orchestrate-heldroot.test.mjs +72 -0
- package/bin/lean/orchestrate-hostfallback.test.mjs +59 -1
- package/bin/lean/orchestrate-overload-recovery.test.mjs +37 -0
- package/bin/lean/orchestrate-pause.test.mjs +76 -1
- package/bin/lean/orchestrate-reconcile.test.mjs +164 -0
- package/bin/lean/orchestrate-relaunch-gates.test.mjs +57 -0
- package/bin/lean/orchestrate-stacking.test.mjs +10 -0
- package/bin/lean/orchestrate.mjs +344 -45
- package/bin/lean/phaseledger.mjs +6 -0
- package/bin/lean/phaseledger.test.mjs +13 -1
- package/bin/lean/postdeploy-check.test.mjs +1 -3
- package/bin/lean/precheck.mjs +20 -0
- package/bin/lean/preflight.mjs +100 -11
- package/bin/lean/preflight.test.mjs +44 -4
- package/bin/lean/prompts.mjs +13 -28
- package/bin/lean/reconcile.mjs +90 -0
- package/bin/lean/recurrence.mjs +6 -112
- package/bin/lean/recurrence.test.mjs +11 -92
- package/bin/lean/release-flakes.mjs +14 -2
- package/bin/lean/release-flakes.test.mjs +17 -1
- package/bin/lean/release-ledger.mjs +19 -1
- package/bin/lean/release-ledger.test.mjs +23 -0
- package/bin/lean/release-preflight.mjs +28 -0
- package/bin/lean/release-preflight.test.mjs +42 -1
- package/bin/lean/release-review.mjs +40 -5
- package/bin/lean/release-review.test.mjs +43 -2
- package/bin/lean/release.mjs +43 -14
- package/bin/lean/release.test.mjs +32 -0
- package/bin/lean/retry.mjs +1 -1
- package/bin/lean/retry.test.mjs +6 -1
- package/bin/lean/rotator.mjs +9 -0
- package/bin/lean/rotator.test.mjs +11 -1
- package/bin/lean/sandbox-remote.mjs +49 -11
- package/bin/lean/sched.mjs +19 -0
- package/bin/lean/sched.test.mjs +11 -1
- package/bin/lean/schedd-health.mjs +4 -4
- package/bin/lean/schedd-health.test.mjs +8 -4
- package/bin/lean/schedd.mjs +45 -8
- package/bin/lean/schedd.test.mjs +120 -7
- package/bin/lean/selfreview.mjs +1 -1
- package/bin/lean/slo.mjs +126 -0
- package/bin/lean/slo.test.mjs +112 -0
- package/bin/lean/statuscomment.mjs +40 -0
- package/bin/lean/statuscomment.test.mjs +48 -1
- package/bin/lean/validate-catalog.mjs +108 -0
- package/bin/lean/validate-catalog.test.mjs +46 -1
- package/bin/lean/verify.mjs +3 -2
- package/bin/pool/affinity.test.mjs +91 -0
- package/bin/pool/agent.mjs +144 -10
- package/bin/pool/cache-sweep.mjs +31 -10
- package/bin/pool/ci-autoscale.mjs +160 -0
- package/bin/pool/cli.mjs +53 -9
- package/bin/pool/docker.mjs +3 -0
- package/bin/pool/engine-placement.test.mjs +94 -0
- package/bin/pool/lane-target.mjs +41 -0
- package/bin/pool/lane-tools.mjs +26 -0
- package/bin/pool/lane-tools.test.mjs +9 -0
- package/bin/pool/mirror-seed.mjs +15 -11
- package/bin/pool/router.mjs +88 -32
- package/bin/pool/version.mjs +29 -2
- package/bin/review-staging.mjs +11 -3
- package/bin/runner.mjs +59 -11
- package/bin/stats/attempts.mjs +54 -0
- package/bin/stats/attempts.test.mjs +30 -0
- package/bin/stats/churn.mjs +49 -0
- package/bin/stats/churn.test.mjs +31 -0
- package/bin/stats/index.mjs +11 -3
- package/bin/stats/release.mjs +7 -0
- package/bin/stats/release.test.mjs +20 -0
- package/bin/stats/scorecard.mjs +187 -0
- package/bin/stats/scorecard.test.mjs +89 -0
- package/commands/orchestrate.md +21 -18
- package/docs/CONFIG.md +41 -0
- package/docs/OUTCOME-CODES.md +2 -0
- package/docs/STATS.md +17 -0
- package/package.json +1 -1
- package/pool/image/Dockerfile +14 -2
- package/pool/image/manifest.json +25 -0
- package/pool/image/mirror.sh +11 -2
- package/pool/install/install-agent.ps1 +11 -4
- package/scripts/check-devdocs-freshness.sh +1 -1
- package/scripts/ci-local/adapters/github-actions.mjs +8 -0
- package/scripts/ci-local/cli.mjs +1 -1
- package/scripts/ci-local/plan.mjs +3 -2
- package/scripts/ci-local.test.sh +11 -0
- package/scripts/failure-census.mjs +67 -0
- package/scripts/review-finalize.sh +5 -5
- package/scripts/review-finalize.test.sh +8 -1
- package/scripts/verify-phase-trail.sh +11 -0
- package/scripts/verify-phase-trail.test.sh +9 -0
|
@@ -17,6 +17,8 @@
|
|
|
17
17
|
|
|
18
18
|
export const STATUS_MARKER = "FORGE:STATUS";
|
|
19
19
|
export const STATUS_SEP = "<!-- FORGE:STATUS:SEP -->";
|
|
20
|
+
import { createHash } from "node:crypto";
|
|
21
|
+
|
|
20
22
|
/** Markers folded into the status comment, keyed by the FIRST marker of a post. */
|
|
21
23
|
export const STATUS_SECTIONS = Object.freeze(["FORGE:STARTED", "FORGE:CONTEXT", "FORGE:LANE_BRANCH", "FORGE:LITE", "FORGE:TRAJECTORY", "FORGE:DECISION"]);
|
|
22
24
|
/** Sections that keep their last N entries instead of only the newest. */
|
|
@@ -24,6 +26,11 @@ export const APPEND_SECTIONS = Object.freeze({ "FORGE:DECISION": 5 });
|
|
|
24
26
|
export const ENTRY_SEP = "\n\n---\n\n";
|
|
25
27
|
/** Markers posted once and edited in place (the marker leads the comment body, so anchored readers still match). */
|
|
26
28
|
export const UPSERT_MARKERS = Object.freeze(["FORGE:INVESTIGATION", "FORGE:IMPLEMENTATION", "FORGE:PARKED"]);
|
|
29
|
+
/** #5979: markers re-derived on every pass; a repeat of the same state posts nothing (FACTS and DEPENDENCY are edited in place, NEEDS_HUMAN stays a new comment when it changed). */
|
|
30
|
+
export const IN_PLACE_MARKERS = Object.freeze(["FORGE:FACTS", "FORGE:DEPENDENCY", "FORGE:NEEDS_HUMAN", "FORGE:AMENDMENT-STATE"]);
|
|
31
|
+
/** #5931: the hidden tag that keys an in-place comment to its issue's contract hash: one comment per (marker, hash), edited in place while the hash holds. */
|
|
32
|
+
export const contractKey = (hash) => (hash ? `<!-- forge-contract hash=${String(hash).replace(/[^\w]/g, "")} -->` : "");
|
|
33
|
+
export const contractKeyOf = (body) => /<!-- forge-contract hash=(\w+) -->/.exec(String(body ?? ""))?.[1] ?? null;
|
|
27
34
|
|
|
28
35
|
const esc = (s) => s.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
29
36
|
const markLine = (m) => `<!-- ${m} -->`;
|
|
@@ -149,6 +156,39 @@ export async function postUpsert({ gh, repo, issue, markers, body, comments = nu
|
|
|
149
156
|
return newUrl(gh, repo, issue, full);
|
|
150
157
|
}
|
|
151
158
|
|
|
159
|
+
/** #5986: markers posted once per (kind, content hash): an identical payload updates one comment and bumps its counter. */
|
|
160
|
+
export const KEYED_MARKERS = Object.freeze(["FORGE:AMENDMENT", "FORGE:NEEDS_HUMAN", "FORGE:FACTS"]);
|
|
161
|
+
export const isKeyedPost = (marker) => KEYED_MARKERS.includes(asArr(marker)[0]);
|
|
162
|
+
/** Hard cap of engine comments per issue: beyond it a post edits an existing comment in place and never adds one. */
|
|
163
|
+
export const MAX_ENGINE_COMMENTS = 12;
|
|
164
|
+
export const engineCommentCount = (comments, trusted) => (comments ?? []).filter((c) => /^\s*<!--\s*FORGE:/.test(String(c?.body ?? "")) && trusted(c)).length;
|
|
165
|
+
const contentKey = (body) => createHash("sha256").update(String(body)).digest("hex").slice(0, 12);
|
|
166
|
+
|
|
167
|
+
/**
|
|
168
|
+
* Post `body` under `marker` keyed by (marker, content hash): a trusted comment with the same hash is edited with `n` bumped, a new
|
|
169
|
+
* payload is a new comment, and at `limit` engine comments the newest comment of that kind is edited in place (none: nothing is posted, null).
|
|
170
|
+
* The comments are always read fresh. Returns the comment url.
|
|
171
|
+
*/
|
|
172
|
+
export async function postKeyed({ gh, repo, issue, marker, body, cap = (s) => s, trusted, limit = MAX_ENGINE_COMMENTS, comments = null }) {
|
|
173
|
+
const t = trusted ?? (await import("./prefilter.mjs")).isTrustedIssueComment;
|
|
174
|
+
const list = comments ?? await viewComments(gh, repo, issue), key = contentKey(String(body).replace(/\n\n_[^\n]*_\s*$/, "")); // the trailing usage line varies per run
|
|
175
|
+
const mine = list.filter((c) => new RegExp(`^\\s*<!--\\s*${esc(marker)}(?![A-Za-z0-9_:])`).test(String(c?.body ?? "")) && t(c) && commentId(c));
|
|
176
|
+
const keyLine = (c) => /<!-- forge-key hash=(\w+) n=(\d+) -->\s*$/.exec(String(c.body)); // trailing: the leading marker line stays exactly `<!-- MARKER -->` for every reader
|
|
177
|
+
const same = [...mine].reverse().find((c) => keyLine(c)?.[1] === key);
|
|
178
|
+
const render = (n) => cap(`<!-- ${marker} -->\n${body}${n > 1 ? `\n\n_Identical update seen ${n} times._` : ""}\n<!-- forge-key hash=${key} n=${n} -->`);
|
|
179
|
+
const edit = async (c, n) => { try { await patchWith(gh, repo)(commentId(c), render(n)); return c.url ?? null; } catch { return undefined; } };
|
|
180
|
+
if (same) {
|
|
181
|
+
const n = Number(keyLine(same)[2]) + 1;
|
|
182
|
+
const u = await edit(same, n); if (u !== undefined) return u;
|
|
183
|
+
}
|
|
184
|
+
if (engineCommentCount(list, t) >= limit) {
|
|
185
|
+
const last = mine[mine.length - 1];
|
|
186
|
+
if (!last) return null;
|
|
187
|
+
const u = await edit(last, 1); return u === undefined ? null : u;
|
|
188
|
+
}
|
|
189
|
+
return newUrl(gh, repo, issue, render(1));
|
|
190
|
+
}
|
|
191
|
+
|
|
152
192
|
/** #5592: labels that mean "parked / waiting for a person or the remediation queue"; a live or finished issue must not keep them. */
|
|
153
193
|
export const isPipelineLabel = (name) => { const n = String(name ?? ""); return n === "needs-human" || n.startsWith("needs-human:") || n.startsWith("parked:") || n === "remediation-queue"; };
|
|
154
194
|
/** The pipeline labels among `labels` (names, or `{name}` objects). */
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import { describe, it } from "node:test";
|
|
4
4
|
import assert from "node:assert/strict";
|
|
5
5
|
import { STATUS_SEP, parseStatus, renderStatus, putSection, writeStatus, findStatus, findLeading, hasSection, sectionText, commentId, isStatusPost, isUpsertPost,
|
|
6
|
-
postStatusSection, postUpsert, clearPipelineLabels, pipelineLabels, isPipelineLabel } from "./statuscomment.mjs";
|
|
6
|
+
postStatusSection, postUpsert, postKeyed, isKeyedPost, engineCommentCount, MAX_ENGINE_COMMENTS, clearPipelineLabels, pipelineLabels, isPipelineLabel } from "./statuscomment.mjs";
|
|
7
7
|
|
|
8
8
|
const BOT = { author: { login: "rapiercraft-forgedock" }, authorAssociation: "CONTRIBUTOR" };
|
|
9
9
|
const trusted = (c) => c.author?.login === "rapiercraft-forgedock";
|
|
@@ -148,3 +148,50 @@ describe("#5592 gh helpers", () => {
|
|
|
148
148
|
assert.deepEqual(read, [[]]);
|
|
149
149
|
});
|
|
150
150
|
});
|
|
151
|
+
|
|
152
|
+
describe("#5986 keyed upsert and the engine comment cap", () => {
|
|
153
|
+
// a tiny in-memory issue: comment posts append, PATCH edits
|
|
154
|
+
const issue = (seed = []) => {
|
|
155
|
+
const comments = [...seed], log = [];
|
|
156
|
+
const gh = async (a) => {
|
|
157
|
+
log.push(a);
|
|
158
|
+
if (a[1] === "view") return JSON.stringify({ comments });
|
|
159
|
+
if (a[1] === "comment") { const id = 100 + comments.length; comments.push({ ...BOT, url: url(id), body: a[a.indexOf("--body") + 1] }); return url(id); }
|
|
160
|
+
if (a[0] === "api") { const id = /comments\/(\d+)/.exec(a[3])[1]; comments.find((c) => c.url.endsWith(`-${id}`)).body = a[a.indexOf("-f") + 1].slice(5); return ""; }
|
|
161
|
+
return "";
|
|
162
|
+
};
|
|
163
|
+
return { gh, comments, log };
|
|
164
|
+
};
|
|
165
|
+
const post = (i, marker, body) => postKeyed({ gh: i.gh, repo: "o/r", issue: 7, marker, body, trusted });
|
|
166
|
+
|
|
167
|
+
it("an identical amendment payload posted twice yields one comment, updated with a counter", async () => {
|
|
168
|
+
const i = issue();
|
|
169
|
+
await post(i, "FORGE:AMENDMENT", "## Contract amended\n- add-deliverable a.mjs");
|
|
170
|
+
await post(i, "FORGE:AMENDMENT", "## Contract amended\n- add-deliverable a.mjs");
|
|
171
|
+
assert.equal(i.comments.length, 1);
|
|
172
|
+
assert.match(i.comments[0].body, /^<!-- FORGE:AMENDMENT -->\n[\s\S]*<!-- forge-key hash=[0-9a-f]{12} n=2 -->$/);
|
|
173
|
+
await post(i, "FORGE:AMENDMENT", "## Contract amended\n- add-deliverable b.mjs");
|
|
174
|
+
assert.equal(i.comments.length, 2, "a different payload is a new comment");
|
|
175
|
+
});
|
|
176
|
+
it("the trailing usage line does not make a repeat look new", async () => {
|
|
177
|
+
const i = issue();
|
|
178
|
+
await post(i, "FORGE:NEEDS_HUMAN", "## Needs human\nwhy\n\n_cost $0.10, wall 3 min_");
|
|
179
|
+
await post(i, "FORGE:NEEDS_HUMAN", "## Needs human\nwhy\n\n_cost $0.20, wall 5 min_");
|
|
180
|
+
assert.equal(i.comments.length, 1);
|
|
181
|
+
});
|
|
182
|
+
it("at 12 engine comments a new payload edits the newest comment of its kind in place and never adds one", async () => {
|
|
183
|
+
const i = issue(Array.from({ length: MAX_ENGINE_COMMENTS - 1 }, (_, k) => ({ ...BOT, url: url(k + 1), body: `<!-- FORGE:FACTS -->\nfact ${k}\n<!-- forge-key hash=${String(k).padStart(12, "0")} n=1 -->` })));
|
|
184
|
+
await post(i, "FORGE:AMENDMENT", "first");
|
|
185
|
+
assert.equal(i.comments.length, MAX_ENGINE_COMMENTS);
|
|
186
|
+
await post(i, "FORGE:AMENDMENT", "second");
|
|
187
|
+
await post(i, "FORGE:AMENDMENT", "third");
|
|
188
|
+
assert.equal(i.comments.length, MAX_ENGINE_COMMENTS, "capped");
|
|
189
|
+
assert.match(i.comments.at(-1).body, /third/);
|
|
190
|
+
assert.equal(await post(i, "FORGE:NEEDS_HUMAN", "no comment of this kind yet"), null, "nothing posted past the cap");
|
|
191
|
+
assert.equal(i.comments.length, MAX_ENGINE_COMMENTS);
|
|
192
|
+
});
|
|
193
|
+
it("only trusted FORGE comments count; keyed markers are recognised", () => {
|
|
194
|
+
assert.equal(engineCommentCount([{ ...BOT, body: "<!-- FORGE:FACTS -->" }, { author: { login: "x" }, body: "<!-- FORGE:FACTS -->" }, { ...BOT, body: "hi" }], trusted), 1);
|
|
195
|
+
assert.ok(isKeyedPost("FORGE:FACTS") && isKeyedPost(["FORGE:AMENDMENT"]) && !isKeyedPost("FORGE:PARKED"));
|
|
196
|
+
});
|
|
197
|
+
});
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
* base-drift classifier. Pure; lean.mjs owns every effect.
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
+
import { posix } from "node:path";
|
|
10
11
|
import { venvPythonRewrite } from "./preflight.mjs";
|
|
11
12
|
|
|
12
13
|
/** Default CI sources read for the derived catalogue (repo-relative). */
|
|
@@ -108,3 +109,110 @@ export function rewriteSubprojectVenv(contract, files, exists) {
|
|
|
108
109
|
if (t && typeof t === "object" && typeof t.command === "string") out.repro_test = { ...t, command: fix("repro_test", t.command) };
|
|
109
110
|
return applied.length ? { contract: out, applied } : { contract, applied };
|
|
110
111
|
}
|
|
112
|
+
|
|
113
|
+
const CI_PY_RUNNER_RE = /\b((?:poetry|uv) run(?: +--[\w-]+(?:[ =][^\s|&;-][^\s|&;]*)?)*) +(?:python3? +-m +)?pytest\b([^\n|&;]*)/; // PY_RUNNER_RE's option grammar
|
|
114
|
+
const PYTEST_SEG_RE = /^(\s*(?:[A-Za-z_]\w*=\S*\s+)*)((?:\S*\/)?\.venv\/bin\/python3?\s+-m\s+pytest|(?:\S*\/)?\.venv\/bin\/pytest|python3?(?:\.\d+)?\s+-m\s+pytest|pytest)(?=\s|$)(.*)$/s;
|
|
115
|
+
const normRel = (p) => { const n = posix.normalize(String(p).replace(/^\.\//, "").replace(/\/+$/, "")); return n === "" ? "." : n.replace(/\/+$/, ""); };
|
|
116
|
+
const under = (p, root) => (root === "." ? !p.startsWith("..") : p === root || p.startsWith(`${root}/`));
|
|
117
|
+
const pathish = (x) => !!x && !x.startsWith("-") && !x.startsWith("$") && !x.includes("=") && (x.includes("/") || /\.py(?:::|$)/.test(x) || x === ".");
|
|
118
|
+
const indent = (l) => /^\s*/.exec(l)[0].length;
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* #5753: which env the repo's own CI runs each Python test path in, parsed from CI text (0 LLM calls). Every `poetry run` /
|
|
122
|
+
* `uv run` pytest line, with its step's `working-directory:` (and an inline `cd X &&`), becomes {dir, runner, paths}: `paths`
|
|
123
|
+
* are repo-relative (`../../shared` under `services/worker` is `shared`); no path argument means the whole `dir`. Pure.
|
|
124
|
+
*/
|
|
125
|
+
export function deriveTestEnvMap(texts) {
|
|
126
|
+
const out = [], seen = new Set();
|
|
127
|
+
for (const text of (Array.isArray(texts) ? texts : [texts]).filter((t) => typeof t === "string")) {
|
|
128
|
+
const lines = text.split("\n");
|
|
129
|
+
for (let i = 0; i < lines.length; i++) {
|
|
130
|
+
const m = CI_PY_RUNNER_RE.exec(lines[i]);
|
|
131
|
+
if (!m) continue;
|
|
132
|
+
let s = i;
|
|
133
|
+
while (s > 0 && !/^\s*-\s/.test(lines[s])) s--; // the step this line belongs to
|
|
134
|
+
let e = s + 1;
|
|
135
|
+
while (e < lines.length && !(lines[e].trim() && indent(lines[e]) <= indent(lines[s]))) e++;
|
|
136
|
+
const wd = lines.slice(s, e).map((l) => /^\s*-?\s*working-directory:\s*["']?([^"'\s#]+)/.exec(l)).find(Boolean);
|
|
137
|
+
if (wd && wd[1].includes("$")) continue;
|
|
138
|
+
let dir = wd ? normRel(wd[1]) : ".";
|
|
139
|
+
const cd = /\bcd\s+["']?([^"'\s&;]+)["']?\s*&&[^&|;]*$/.exec(lines[i].slice(0, m.index));
|
|
140
|
+
if (cd) {
|
|
141
|
+
if (cd[1].includes("$") || cd[1].startsWith("/")) continue;
|
|
142
|
+
dir = normRel(posix.join(dir, cd[1]));
|
|
143
|
+
}
|
|
144
|
+
if (dir.startsWith("..")) continue;
|
|
145
|
+
const args = m[2].trim().split(/\s+/).filter(pathish).map((x) => x.replace(/::.*$/, ""));
|
|
146
|
+
const paths = (args.length ? args : ["."]).map((p) => normRel(posix.join(dir, p))).filter((p) => !p.startsWith(".."));
|
|
147
|
+
const runner = m[1].trim(), key = `${dir}|${runner}|${paths.join(",")}`;
|
|
148
|
+
if (paths.length && !seen.has(key)) { seen.add(key); out.push({ dir, runner, paths }); }
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
return out;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
/** #5753: one pytest segment run from `cwd` -> {dir, cmd} in its CI env (or its lock's runner), or null when it stays. */
|
|
155
|
+
function ciEnvSegment(seg, cwd, map, files, exists) {
|
|
156
|
+
const m = PYTEST_SEG_RE.exec(seg);
|
|
157
|
+
if (!m) return null;
|
|
158
|
+
const [, envs, interp, rest] = m;
|
|
159
|
+
const venv = /^(\S*?)\.venv\/bin\/(\S+)/.exec(interp);
|
|
160
|
+
if (venv && exists(normRel(posix.join(cwd, `${venv[1]}.venv/bin/${venv[2]}`)))) return null; // #5683: a venv that resolves stays
|
|
161
|
+
const toks = rest.trim() ? rest.trim().split(/\s+/) : [];
|
|
162
|
+
const tests = toks.filter(pathish).map((x) => normRel(posix.join(cwd, x.replace(/::.*$/, ""))));
|
|
163
|
+
const all = tests.length ? tests : [cwd];
|
|
164
|
+
const hit = all.some((p) => p.startsWith("..")) ? null : map.find((en) => all.every((p) => en.paths.some((root) => under(p, root))));
|
|
165
|
+
if (hit) {
|
|
166
|
+
const reRel = (x) => { const [p, ...id] = x.split("::"); return [posix.relative(hit.dir === "." ? "" : hit.dir, normRel(posix.join(cwd, p))) || ".", ...id].join("::"); };
|
|
167
|
+
const args = toks.map((x) => (pathish(x) ? reRel(x) : x));
|
|
168
|
+
return { dir: hit.dir, cmd: `${envs}${hit.runner} pytest${args.length ? ` ${args.join(" ")}` : ""}` };
|
|
169
|
+
}
|
|
170
|
+
if (!venv) return null; // a bare interpreter CI does not map stays (rewriteSubprojectVenv owns the sub-project venv case)
|
|
171
|
+
const proj = normRel(posix.join(cwd, venv[1] || "."));
|
|
172
|
+
if (proj !== cwd) return null;
|
|
173
|
+
const at = (f) => (proj === "." ? f : `${proj}/${f}`);
|
|
174
|
+
const runner = files.includes(at("poetry.lock")) ? "poetry run" : files.includes(at("uv.lock")) ? "uv run" : null;
|
|
175
|
+
return runner ? { dir: cwd, cmd: `${envs}${runner} pytest${rest.replace(/\s+$/, "")}` } : null;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
/**
|
|
179
|
+
* #5753: the repro and validate pytest commands that run under a bare interpreter (`python -m pytest`, `pytest`) or a
|
|
180
|
+
* `.venv/bin/python` that does not exist, for test paths CI runs in another env (`map`: deriveTestEnvMap), become
|
|
181
|
+
* `cd <dir> && <runner> pytest <dir-relative paths>`. With no map entry, a missing `.venv` with a poetry.lock / uv.lock next
|
|
182
|
+
* to it runs through `poetry run` / `uv run`. Commands already using poetry/uv run, a venv that resolves and unmapped bare
|
|
183
|
+
* commands are unchanged. `files`: tracked paths; `exists(rel)`: repo-relative check. Returns {contract, applied[{id, from, to}]}.
|
|
184
|
+
*/
|
|
185
|
+
export function rewriteToCiEnv(contract, map = [], files = [], exists = () => false) {
|
|
186
|
+
if (!contract || typeof contract !== "object") return { contract, applied: [] };
|
|
187
|
+
const fix1 = (command) => {
|
|
188
|
+
const parts = String(command).split(/(&&|\|\||;|\||\n)/);
|
|
189
|
+
let cwd = ".", onlyCd = true, changed = false;
|
|
190
|
+
const out = [];
|
|
191
|
+
for (let i = 0; i < parts.length; i++) {
|
|
192
|
+
const seg = parts[i];
|
|
193
|
+
if (i % 2) { out.push(seg); continue; }
|
|
194
|
+
const cd = /^\s*cd\s+(?:"([^"]+)"|'([^']+)'|(\S+))\s*$/.exec(seg);
|
|
195
|
+
if (cd) {
|
|
196
|
+
const t = cd[1] ?? cd[2] ?? cd[3];
|
|
197
|
+
cwd = cwd === "?" || t.startsWith("/") || t.startsWith("$") ? "?" : normRel(posix.join(cwd, t));
|
|
198
|
+
if (cwd.startsWith("..")) cwd = "?";
|
|
199
|
+
out.push(seg); continue;
|
|
200
|
+
}
|
|
201
|
+
const r = cwd === "?" || /\b(?:poetry|uv)\s+(?:-\S+\s+)*run\b/.test(seg) ? null : ciEnvSegment(seg, cwd, map, files, exists);
|
|
202
|
+
if (!r) { onlyCd = false; out.push(seg); continue; }
|
|
203
|
+
changed = true;
|
|
204
|
+
const lead = /^\s*/.exec(seg)[0], tail = /\s*$/.exec(seg)[0], cmd = r.cmd.trim(), last = i === parts.length - 1;
|
|
205
|
+
if (onlyCd && last) { out.length = 0; out.push(r.dir === "." ? cmd : `cd ${r.dir} && ${cmd}`); } // leading cds give way to the env's dir
|
|
206
|
+
else if (r.dir === cwd) out.push(`${lead}${cmd}${tail}`);
|
|
207
|
+
else { const rel = posix.relative(cwd === "." ? "" : cwd, r.dir === "." ? "" : r.dir) || "."; out.push(`${lead}${last ? `cd ${rel} && ${cmd}` : `(cd ${rel} && ${cmd})`}${tail}`); } // later segments keep their cwd
|
|
208
|
+
onlyCd = false;
|
|
209
|
+
}
|
|
210
|
+
return changed ? out.join("") : String(command);
|
|
211
|
+
};
|
|
212
|
+
const applied = [], fix = (id, cmd) => { const to = fix1(cmd); if (to !== cmd) applied.push({ id, from: cmd, to }); return to; };
|
|
213
|
+
const out = { ...contract };
|
|
214
|
+
if (Array.isArray(contract.validate)) out.validate = contract.validate.map((v) => (v && typeof v.command === "string" ? { ...v, command: fix(v.id, v.command) } : v));
|
|
215
|
+
const t = contract.repro_test;
|
|
216
|
+
if (t && typeof t === "object" && typeof t.command === "string") out.repro_test = { ...t, command: fix("repro_test", t.command) };
|
|
217
|
+
return applied.length ? { contract: out, applied } : { contract, applied };
|
|
218
|
+
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// SPDX-License-Identifier: AGPL-3.0-or-later
|
|
3
3
|
import { describe, it } from "node:test";
|
|
4
4
|
import assert from "node:assert/strict";
|
|
5
|
-
import { deriveCatalog, mergeRecipes, rewriteMissed, extractTestIds, equivalentRuns, isDriftFailure, rewriteSubprojectVenv } from "./validate-catalog.mjs";
|
|
5
|
+
import { deriveCatalog, mergeRecipes, rewriteMissed, extractTestIds, equivalentRuns, isDriftFailure, rewriteSubprojectVenv, deriveTestEnvMap, rewriteToCiEnv } from "./validate-catalog.mjs";
|
|
6
6
|
import { applyValidateRecipes } from "./conformance.mjs";
|
|
7
7
|
|
|
8
8
|
const CI = "run: uv run --with-requirements r.txt pytest tests\nrun: npx vitest run";
|
|
@@ -56,3 +56,48 @@ describe("#5683 sub-project venv rewrite", () => {
|
|
|
56
56
|
assert.equal(rewriteSubprojectVenv(same, files, exists).contract, same);
|
|
57
57
|
});
|
|
58
58
|
});
|
|
59
|
+
|
|
60
|
+
describe("#5753 CI test-env map: a test path runs in the env CI runs it in", () => {
|
|
61
|
+
const CI = [
|
|
62
|
+
"jobs:",
|
|
63
|
+
" worker:",
|
|
64
|
+
" steps:",
|
|
65
|
+
" - uses: actions/checkout@v4",
|
|
66
|
+
" - name: Test worker",
|
|
67
|
+
" working-directory: services/worker",
|
|
68
|
+
" run: poetry run pytest tests/ ../../shared -q",
|
|
69
|
+
" - run: |",
|
|
70
|
+
" cd services/api && uv run --frozen pytest",
|
|
71
|
+
"",
|
|
72
|
+
].join("\n");
|
|
73
|
+
it("deriveTestEnvMap reads working-directory, inline cd and poetry/uv run pytest paths, repo-relative", () => {
|
|
74
|
+
assert.deepEqual(deriveTestEnvMap([CI, ""]), [
|
|
75
|
+
{ dir: "services/worker", runner: "poetry run", paths: ["services/worker/tests", "shared"] },
|
|
76
|
+
{ dir: "services/api", runner: "uv run --frozen", paths: ["services/api"] },
|
|
77
|
+
]);
|
|
78
|
+
assert.deepEqual(deriveTestEnvMap(["run: python -m pytest tests", "run: npm test"]), [], "a bare interpreter or no pytest is no env");
|
|
79
|
+
});
|
|
80
|
+
it("a shared/ pytest under a bare interpreter is rewritten to the services/worker env", () => {
|
|
81
|
+
const map = deriveTestEnvMap(CI);
|
|
82
|
+
const c = { validate: [{ id: "V1", command: "python -m pytest shared/detection/test_x.py" }, { id: "V2", command: "cd shared && python3 -m pytest -q detection/test_x.py::test_a" }, { id: "V3", command: "pytest services/api/tests/t.py && echo ok" }] };
|
|
83
|
+
const r = rewriteToCiEnv(c, map, [], () => false);
|
|
84
|
+
assert.deepEqual(r.contract.validate.map((v) => v.command), [
|
|
85
|
+
"cd services/worker && poetry run pytest ../../shared/detection/test_x.py",
|
|
86
|
+
"cd services/worker && poetry run pytest -q ../../shared/detection/test_x.py::test_a",
|
|
87
|
+
"(cd services/api && uv run --frozen pytest tests/t.py) && echo ok",
|
|
88
|
+
]);
|
|
89
|
+
assert.deepEqual(r.applied.map((a) => a.id), ["V1", "V2", "V3"]);
|
|
90
|
+
});
|
|
91
|
+
it("wrapped, unmapped and resolving-venv commands stay byte-identical", () => {
|
|
92
|
+
const map = deriveTestEnvMap(CI);
|
|
93
|
+
const c = { validate: [{ id: "V1", command: "cd services/worker && poetry run pytest tests" }, { id: "V2", command: "uv run pytest shared/t.py" }, { id: "V3", command: "python -m pytest other/test_y.py" }, { id: "V4", command: "services/worker/.venv/bin/python -m pytest shared/t.py" }], repro_test: { command: "node --test x.test.mjs" } };
|
|
94
|
+
const r = rewriteToCiEnv(c, map, [], (rel) => rel === "services/worker/.venv/bin/python");
|
|
95
|
+
assert.equal(r.contract, c); assert.deepEqual(r.applied, []);
|
|
96
|
+
});
|
|
97
|
+
it("a .venv/bin/python that does not exist falls back to the lock's runner; no lock leaves it", () => {
|
|
98
|
+
const c = { repro_test: { command: "cd services/x && .venv/bin/python -m pytest t.py" } };
|
|
99
|
+
assert.equal(rewriteToCiEnv(c, [], ["services/x/poetry.lock"], () => false).contract.repro_test.command, "cd services/x && poetry run pytest t.py");
|
|
100
|
+
assert.equal(rewriteToCiEnv(c, [], ["services/x/uv.lock"], () => false).contract.repro_test.command, "cd services/x && uv run pytest t.py");
|
|
101
|
+
assert.equal(rewriteToCiEnv(c, [], [], () => false).contract, c);
|
|
102
|
+
});
|
|
103
|
+
});
|
package/bin/lean/verify.mjs
CHANGED
|
@@ -100,7 +100,8 @@ export function parseVerify(sec = {}) {
|
|
|
100
100
|
const baselines = parseBaselines(s.baselines); // #5448: suites validate runs when matching paths change
|
|
101
101
|
const precheckBlock = str(s.precheck_block).toLowerCase() === "true"; // #5079: a still-failing declared check stops the lane (ci.red)
|
|
102
102
|
const guardBlock = str(s.guard_block).toLowerCase() !== "false"; // #5239: verify.invariants (the pre-merge guard set) block the merge unless false
|
|
103
|
-
|
|
103
|
+
const guardBypass = str(s.guard_bypass).toLowerCase() === "true"; // #5992: opt in: a lane clear of a red guard's files proceeds; the guard is re-run at merge
|
|
104
|
+
return { ...(settle !== "fixed" ? { settle } : {}), ...(parseCancelSuperseded(s.cancel_superseded) !== "off" ? { cancelSuperseded: parseCancelSuperseded(s.cancel_superseded) } : {}), mode, workflow, pathsInput, skipPaths, maxRounds, precheckTimeoutSeconds, precheckTotalSeconds, checkRun, checks, postMerge, flaky, duplicateExports, enumeratingMechanical, invariants, ...(precheckBlock ? { precheckBlock } : {}), ...(guardBlock ? {} : { guardBlock: false }), ...(Object.keys(guardCommand).length ? { guardCommand } : {}), ...(baselines.length ? { baselines } : {}), ...(Object.keys(sandboxes).length ? { sandboxes } : {}), e2e: parseE2e(s), ...(guardBypass ? { guardBypass } : {}) };
|
|
104
105
|
}
|
|
105
106
|
|
|
106
107
|
const globRe = (g) => new RegExp(`^${g.split("**").map((p) => p.replace(/[.+^${}()|[\]\\]/g, "\\$&").replace(/\*/g, "[^/]*").replace(/\?/g, "[^/]")).join(".*")}$`);
|
|
@@ -299,7 +300,7 @@ export async function cancelSuperseded({ io, branch, head, mode = "off", pushedA
|
|
|
299
300
|
return out;
|
|
300
301
|
}
|
|
301
302
|
|
|
302
|
-
const VALIDATE_KINDS = ["validate_missing", "validate_failed"], REQUIREMENT_KINDS = ["requirement_unimplemented", "untracked_deferral"];
|
|
303
|
+
const VALIDATE_KINDS = ["validate_missing", "validate_failed"], REQUIREMENT_KINDS = ["requirement_unimplemented", "requirement_no_status", "untracked_deferral"];
|
|
303
304
|
/**
|
|
304
305
|
* #4270: the `forgedock/verify` check-run payload from the results the lane already computed (no gate logic of its own).
|
|
305
306
|
* commands: [{command, rc}] of the last declared-check round, or null (none configured); structure: the structure delta or
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: Copyright (c) RapierCraft Studios
|
|
2
|
+
// SPDX-License-Identifier: AGPL-3.0-or-later
|
|
3
|
+
// #6041: per-repo agent affinity (repos.<slug>.agents / exclude_agents) shared by launch, claim, seedAgent and the capacity views.
|
|
4
|
+
import { test } from "node:test";
|
|
5
|
+
import { Readable } from "node:stream";
|
|
6
|
+
import assert from "node:assert/strict";
|
|
7
|
+
import { createRouter } from "./router.mjs";
|
|
8
|
+
import { httpTransport } from "../lean/sandbox-remote.mjs";
|
|
9
|
+
import { tmpDir } from "../tests/_tmp.mjs";
|
|
10
|
+
|
|
11
|
+
const quiet = { info() {}, warn() {}, error() {} };
|
|
12
|
+
const json = (o, status = 200) => new Response(JSON.stringify(o), { status, headers: { "content-type": "application/json" } });
|
|
13
|
+
const spec = (id, slug = "o/x") => ({ id, issue: 1, batch: "b", repo: { slug, url: `https://github.com/${slug}.git` }, command: ["x"] });
|
|
14
|
+
|
|
15
|
+
function fixture(repos, hosts = ["a", "b", "c"]) {
|
|
16
|
+
const posts = [];
|
|
17
|
+
const fetchFn = async (url, init) => {
|
|
18
|
+
const u = new URL(url);
|
|
19
|
+
if (u.pathname === "/capacity") return json({ cpus_free: 8 - hosts.indexOf(u.hostname), mem_free_gb: 16 });
|
|
20
|
+
posts.push(`${u.hostname}${u.pathname}`);
|
|
21
|
+
const p = JSON.parse(init.body);
|
|
22
|
+
return json({ id: p.spec.id, state: "running" }, u.pathname === "/warm/claim" ? 200 : 201);
|
|
23
|
+
};
|
|
24
|
+
const router = createRouter({ state_dir: tmpDir("cs-aff-"), lane: { cpus: 2, mem_gb: 3 }, enroll_token: "e", forgedock_token: "fd", repos }, { fetchFn, now: () => 5_000_000, log: quiet });
|
|
25
|
+
for (const n of hosts) router.store.data.agents[n] = { url: `http://${n}:7711`, token: "t" };
|
|
26
|
+
return { router, posts };
|
|
27
|
+
}
|
|
28
|
+
const placed = async (router, id, slug) => (await router.launch(spec(id, slug))).body.agent;
|
|
29
|
+
|
|
30
|
+
test("allowlist: every launch for the repo goes to an allowed agent", async () => {
|
|
31
|
+
const { router } = fixture({ "o/x": { agents: ["b"] } });
|
|
32
|
+
for (let i = 0; i < 3; i++) assert.equal(await placed(router, `l${i}`, "o/x"), "b");
|
|
33
|
+
assert.equal(await placed(router, "other", "o/y"), "a"); // another repo is unrestricted
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
test("allowlist with no live allowed agent defers, never lands elsewhere", async () => {
|
|
37
|
+
const { router, posts } = fixture({ "o/x": { agents: ["zz"] } });
|
|
38
|
+
const r = await router.launch(spec("d1"));
|
|
39
|
+
assert.equal(r.status, 503);
|
|
40
|
+
assert.deepEqual(posts, []);
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
test("exclude list and both combine", async () => {
|
|
44
|
+
assert.equal(await placed(fixture({ "o/x": { exclude_agents: ["a"] } }).router, "e1", "o/x"), "b");
|
|
45
|
+
const { router } = fixture({ "o/x": { agents: ["a", "b"], exclude_agents: ["a"] } });
|
|
46
|
+
assert.equal(await placed(router, "e2", "o/x"), "b");
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
test("unset, empty or non-array config keeps today's placement (best host first)", async () => {
|
|
50
|
+
for (const repos of [{}, { "o/x": {} }, { "o/x": { agents: [] } }, { "o/x": { agents: "b" } }]) {
|
|
51
|
+
assert.equal(await placed(fixture(repos).router, "u1", "o/x"), "a");
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
test("claim honours the allowlist", async () => {
|
|
56
|
+
const { router, posts } = fixture({ "o/x": { agents: ["c"] } });
|
|
57
|
+
const r = await router.claim(spec("c1"));
|
|
58
|
+
assert.equal(r.body.agent, "c");
|
|
59
|
+
assert.deepEqual(posts, ["c/warm/claim"]);
|
|
60
|
+
});
|
|
61
|
+
|
|
62
|
+
test("seed pick honours the allowlist", async () => {
|
|
63
|
+
const { router, posts } = fixture({ "o/x": { agents: ["b"] } });
|
|
64
|
+
const call = (method, path, body) => new Promise((resolve) => {
|
|
65
|
+
const r = Readable.from(body ? [Buffer.from(JSON.stringify(body))] : []);
|
|
66
|
+
Object.assign(r, { method, url: path, headers: { authorization: "Bearer fd", "content-type": "application/json" }, socket: { remoteAddress: "127.0.0.1" } });
|
|
67
|
+
const chunks = []; const res = { writeHead() { return res; }, setHeader() {}, write(c) { chunks.push(c); }, end(c) { if (c) chunks.push(c); resolve(Buffer.concat(chunks.map(Buffer.from)).toString()); } };
|
|
68
|
+
router.handle(r, res);
|
|
69
|
+
});
|
|
70
|
+
await call("POST", "/sandboxes/s1/seed", { slug: "o/x", data_b64: "AA" });
|
|
71
|
+
assert.deepEqual(posts, ["b/mirrors/seed"]);
|
|
72
|
+
});
|
|
73
|
+
|
|
74
|
+
test("status(repo) counts only the allowed agents; no repo counts all", async () => {
|
|
75
|
+
const { router } = fixture({ "o/x": { agents: ["b", "c"], exclude_agents: ["c"] } });
|
|
76
|
+
assert.equal((await router.status()).total, 3);
|
|
77
|
+
const s = await router.status("o/x");
|
|
78
|
+
assert.equal(s.total, 1); assert.equal(s.online, 1); assert.equal(s.agents[0].name, "b");
|
|
79
|
+
assert.equal((await router.status("o/y")).total, 3);
|
|
80
|
+
});
|
|
81
|
+
|
|
82
|
+
test("transport.capacity appends ?repo= to /status and /agents only when a repo is given", async () => {
|
|
83
|
+
const urls = [];
|
|
84
|
+
const fetchFn = async (url) => { urls.push(url); return json({ agents: [{ ok: true, name: "a" }] }); };
|
|
85
|
+
const t = httpTransport({ endpoint: "http://pool", fetchFn });
|
|
86
|
+
await t.capacity();
|
|
87
|
+
assert.deepEqual(urls, ["http://pool/status", "http://pool/agents"]);
|
|
88
|
+
urls.length = 0;
|
|
89
|
+
await t.capacity({ repo: "o/x y" });
|
|
90
|
+
assert.deepEqual(urls, ["http://pool/status?repo=o%2Fx%20y", "http://pool/agents?repo=o%2Fx%20y"]);
|
|
91
|
+
});
|