@intentius/chant 0.124.62 → 0.124.64

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.
Files changed (262) hide show
  1. package/dist/cli/handlers/approve.d.ts +26 -0
  2. package/dist/cli/handlers/approve.d.ts.map +1 -1
  3. package/dist/cli/handlers/approve.js +167 -18
  4. package/dist/cli/handlers/plan.d.ts +10 -0
  5. package/dist/cli/handlers/plan.d.ts.map +1 -0
  6. package/dist/cli/handlers/plan.js +71 -0
  7. package/dist/cli/handlers/pr.d.ts.map +1 -1
  8. package/dist/cli/handlers/pr.js +2 -1
  9. package/dist/cli/handlers/release.d.ts +11 -7
  10. package/dist/cli/handlers/release.d.ts.map +1 -1
  11. package/dist/cli/handlers/release.js +93 -20
  12. package/dist/cli/main.d.ts.map +1 -1
  13. package/dist/cli/main.js +48 -7
  14. package/dist/cli/mcp/workspace-tools.d.ts.map +1 -1
  15. package/dist/cli/mcp/workspace-tools.js +2 -1
  16. package/dist/cli/parse-args.d.ts.map +1 -1
  17. package/dist/cli/parse-args.js +43 -0
  18. package/dist/cli/registry.d.ts +18 -2
  19. package/dist/cli/registry.d.ts.map +1 -1
  20. package/dist/config.d.ts +50 -0
  21. package/dist/config.d.ts.map +1 -1
  22. package/dist/config.js +1 -0
  23. package/dist/gate-decision.d.ts +1 -1
  24. package/dist/gate-decision.d.ts.map +1 -1
  25. package/dist/gate-decision.js +4 -2
  26. package/dist/gate-statement.schema.json +46 -0
  27. package/dist/lifecycle/__fixtures__/publish-fakes.d.ts +20 -0
  28. package/dist/lifecycle/__fixtures__/publish-fakes.d.ts.map +1 -1
  29. package/dist/lifecycle/__fixtures__/publish-fakes.js +119 -3
  30. package/dist/lifecycle/gate-ledger.d.ts +28 -5
  31. package/dist/lifecycle/gate-ledger.d.ts.map +1 -1
  32. package/dist/lifecycle/gate-ledger.js +6 -0
  33. package/dist/lifecycle/gate-seal.d.ts +59 -7
  34. package/dist/lifecycle/gate-seal.d.ts.map +1 -1
  35. package/dist/lifecycle/gate-seal.js +68 -15
  36. package/dist/lifecycle/gate-statement.d.ts +95 -0
  37. package/dist/lifecycle/gate-statement.d.ts.map +1 -0
  38. package/dist/lifecycle/gate-statement.js +110 -0
  39. package/dist/lifecycle/gate-webauthn.d.ts +79 -0
  40. package/dist/lifecycle/gate-webauthn.d.ts.map +1 -0
  41. package/dist/lifecycle/gate-webauthn.js +105 -0
  42. package/dist/lifecycle/git.d.ts +1 -1
  43. package/dist/lifecycle/git.d.ts.map +1 -1
  44. package/dist/lifecycle/git.js +24 -19
  45. package/dist/lifecycle/ledger-remote.d.ts +37 -0
  46. package/dist/lifecycle/ledger-remote.d.ts.map +1 -0
  47. package/dist/lifecycle/ledger-remote.js +42 -0
  48. package/dist/lifecycle/plan-stale.d.ts +76 -0
  49. package/dist/lifecycle/plan-stale.d.ts.map +1 -0
  50. package/dist/lifecycle/plan-stale.js +120 -0
  51. package/dist/lifecycle/publish-credentials.d.ts +1 -1
  52. package/dist/lifecycle/publish-credentials.d.ts.map +1 -1
  53. package/dist/lifecycle/publish-credentials.js +2 -0
  54. package/dist/lifecycle/publish-declaration.d.ts +107 -0
  55. package/dist/lifecycle/publish-declaration.d.ts.map +1 -1
  56. package/dist/lifecycle/publish-declaration.js +110 -1
  57. package/dist/lifecycle/publish-forge.d.ts +5 -1
  58. package/dist/lifecycle/publish-forge.d.ts.map +1 -1
  59. package/dist/lifecycle/publish-forge.js +13 -4
  60. package/dist/lifecycle/publish-git-ssh.d.ts +82 -0
  61. package/dist/lifecycle/publish-git-ssh.d.ts.map +1 -0
  62. package/dist/lifecycle/publish-git-ssh.js +180 -0
  63. package/dist/lifecycle/publish-github.d.ts +69 -0
  64. package/dist/lifecycle/publish-github.d.ts.map +1 -0
  65. package/dist/lifecycle/publish-github.js +153 -0
  66. package/dist/lifecycle/publish-homebrew.d.ts +77 -0
  67. package/dist/lifecycle/publish-homebrew.d.ts.map +1 -0
  68. package/dist/lifecycle/publish-homebrew.js +265 -0
  69. package/dist/lifecycle/publish-marketplace.d.ts +85 -0
  70. package/dist/lifecycle/publish-marketplace.d.ts.map +1 -0
  71. package/dist/lifecycle/publish-marketplace.js +398 -0
  72. package/dist/lifecycle/publish-targets.d.ts +6 -0
  73. package/dist/lifecycle/publish-targets.d.ts.map +1 -1
  74. package/dist/lifecycle/publish-targets.js +15 -0
  75. package/dist/lifecycle/publish-tauri.d.ts +61 -0
  76. package/dist/lifecycle/publish-tauri.d.ts.map +1 -0
  77. package/dist/lifecycle/publish-tauri.js +181 -0
  78. package/dist/lifecycle/release-cut.d.ts +51 -5
  79. package/dist/lifecycle/release-cut.d.ts.map +1 -1
  80. package/dist/lifecycle/release-cut.js +165 -16
  81. package/dist/lifecycle/release-publish.d.ts +18 -2
  82. package/dist/lifecycle/release-publish.d.ts.map +1 -1
  83. package/dist/lifecycle/release-publish.js +5 -0
  84. package/dist/lifecycle/release-revocation.d.ts +4 -3
  85. package/dist/lifecycle/release-revocation.d.ts.map +1 -1
  86. package/dist/lifecycle/release-revocation.js +5 -4
  87. package/dist/lifecycle/release-store.d.ts +32 -0
  88. package/dist/lifecycle/release-store.d.ts.map +1 -1
  89. package/dist/lifecycle/release-store.js +11 -0
  90. package/dist/lifecycle/snapshot-store.d.ts.map +1 -1
  91. package/dist/lifecycle/snapshot-store.js +17 -9
  92. package/dist/lifecycle/test-passkey.d.ts +25 -0
  93. package/dist/lifecycle/test-passkey.d.ts.map +1 -0
  94. package/dist/lifecycle/test-passkey.js +39 -0
  95. package/dist/notify.d.ts +23 -3
  96. package/dist/notify.d.ts.map +1 -1
  97. package/dist/notify.js +8 -2
  98. package/dist/notify.schema.json +12 -3
  99. package/dist/op/gate.d.ts +1 -1
  100. package/dist/op/gate.d.ts.map +1 -1
  101. package/dist/op/gate.js +2 -1
  102. package/dist/pr-forge.d.ts +20 -0
  103. package/dist/pr-forge.d.ts.map +1 -1
  104. package/dist/pr-forge.js +87 -8
  105. package/dist/release-floors.d.ts +1 -1
  106. package/dist/release-floors.js +1 -1
  107. package/dist/wave-runtime.mjs +333 -331
  108. package/dist/workspace/ci-builds.d.ts +21 -0
  109. package/dist/workspace/ci-builds.d.ts.map +1 -1
  110. package/dist/workspace/ci-builds.js +14 -0
  111. package/dist/workspace/ci-green.d.ts +45 -2
  112. package/dist/workspace/ci-green.d.ts.map +1 -1
  113. package/dist/workspace/ci-green.js +123 -5
  114. package/dist/workspace/ci-quarantine-report.d.ts +80 -0
  115. package/dist/workspace/ci-quarantine-report.d.ts.map +1 -0
  116. package/dist/workspace/ci-quarantine-report.js +204 -0
  117. package/dist/workspace/ci-quarantine.d.ts +73 -0
  118. package/dist/workspace/ci-quarantine.d.ts.map +1 -0
  119. package/dist/workspace/ci-quarantine.js +170 -0
  120. package/dist/workspace/ci-serve.d.ts.map +1 -1
  121. package/dist/workspace/ci-serve.js +7 -4
  122. package/dist/workspace/class-data.d.ts +3 -1
  123. package/dist/workspace/class-data.d.ts.map +1 -1
  124. package/dist/workspace/class-data.js +4 -1
  125. package/dist/workspace/declaration.d.ts +45 -2
  126. package/dist/workspace/declaration.d.ts.map +1 -1
  127. package/dist/workspace/declaration.js +45 -2
  128. package/dist/workspace/declaration.schema.json +51 -3
  129. package/dist/workspace/forge-work.d.ts +76 -0
  130. package/dist/workspace/forge-work.d.ts.map +1 -0
  131. package/dist/workspace/forge-work.js +160 -0
  132. package/dist/workspace/identity-gate-rule.d.ts +3 -2
  133. package/dist/workspace/identity-gate-rule.d.ts.map +1 -1
  134. package/dist/workspace/identity-gate-rule.js +5 -7
  135. package/dist/workspace/identity.d.ts +3 -2
  136. package/dist/workspace/identity.d.ts.map +1 -1
  137. package/dist/workspace/identity.js +6 -3
  138. package/dist/workspace/intent-cli.d.ts +3 -2
  139. package/dist/workspace/intent-cli.d.ts.map +1 -1
  140. package/dist/workspace/intent-cli.js +26 -5
  141. package/dist/workspace/intent-record.d.ts +3 -0
  142. package/dist/workspace/intent-record.d.ts.map +1 -1
  143. package/dist/workspace/intent-record.schema.json +32 -0
  144. package/dist/workspace/intent.d.ts +9 -0
  145. package/dist/workspace/intent.d.ts.map +1 -1
  146. package/dist/workspace/intent.js +2 -0
  147. package/dist/workspace/intent.schema.json +32 -0
  148. package/dist/workspace/kind-readers.d.ts.map +1 -1
  149. package/dist/workspace/kind-readers.js +2 -1
  150. package/dist/workspace/kinds.d.ts +6 -1
  151. package/dist/workspace/kinds.d.ts.map +1 -1
  152. package/dist/workspace/kinds.js +8 -3
  153. package/dist/workspace/plan-stale.schema.json +286 -0
  154. package/dist/workspace/release-candidates.d.ts +42 -7
  155. package/dist/workspace/release-candidates.d.ts.map +1 -1
  156. package/dist/workspace/release-candidates.js +64 -23
  157. package/dist/workspace/release-candidates.schema.json +55 -2
  158. package/dist/workspace/releases.schema.json +47 -0
  159. package/dist/workspace/trust/policy.d.ts +10 -0
  160. package/dist/workspace/trust/policy.d.ts.map +1 -1
  161. package/dist/workspace/trust/policy.js +19 -1
  162. package/dist/workspace/trust/run-commits.d.ts.map +1 -1
  163. package/dist/workspace/trust/run-commits.js +2 -1
  164. package/dist/workspace/trust/seal.d.ts.map +1 -1
  165. package/dist/workspace/trust/seal.js +34 -3
  166. package/dist/workspace/trust/trust-files.d.ts.map +1 -1
  167. package/dist/workspace/trust/trust-files.js +6 -1
  168. package/package.json +2 -1
  169. package/src/cli/handlers/approve-external-signature.test.ts +328 -0
  170. package/src/cli/handlers/approve.ts +206 -18
  171. package/src/cli/handlers/plan.ts +74 -0
  172. package/src/cli/handlers/pr.ts +2 -1
  173. package/src/cli/handlers/release.ts +84 -20
  174. package/src/cli/main.ts +48 -7
  175. package/src/cli/mcp/workspace-tools.ts +2 -1
  176. package/src/cli/parse-args.ts +33 -0
  177. package/src/cli/registry.ts +18 -2
  178. package/src/config.ts +8 -0
  179. package/src/gate-decision-bundle.test.ts +4 -2
  180. package/src/gate-decision.ts +11 -2
  181. package/src/gate-statement.schema.json +46 -0
  182. package/src/lifecycle/__fixtures__/publish-fakes.ts +125 -5
  183. package/src/lifecycle/gate-ledger.ts +34 -5
  184. package/src/lifecycle/gate-seal.ts +86 -15
  185. package/src/lifecycle/gate-statement.ts +144 -0
  186. package/src/lifecycle/gate-webauthn.test.ts +77 -0
  187. package/src/lifecycle/gate-webauthn.ts +133 -0
  188. package/src/lifecycle/git.ts +23 -19
  189. package/src/lifecycle/ledger-remote.test.ts +183 -0
  190. package/src/lifecycle/ledger-remote.ts +46 -0
  191. package/src/lifecycle/plan-stale.test.ts +149 -0
  192. package/src/lifecycle/plan-stale.ts +172 -0
  193. package/src/lifecycle/publish-credentials.ts +2 -0
  194. package/src/lifecycle/publish-declaration.ts +116 -1
  195. package/src/lifecycle/publish-forge.ts +14 -4
  196. package/src/lifecycle/publish-git-ssh.ts +202 -0
  197. package/src/lifecycle/publish-github.ts +174 -0
  198. package/src/lifecycle/publish-homebrew.test.ts +358 -0
  199. package/src/lifecycle/publish-homebrew.ts +283 -0
  200. package/src/lifecycle/publish-marketplace.test.ts +406 -0
  201. package/src/lifecycle/publish-marketplace.ts +421 -0
  202. package/src/lifecycle/publish-resume.test.ts +40 -0
  203. package/src/lifecycle/publish-target-context.test.ts +2 -2
  204. package/src/lifecycle/publish-targets.test.ts +23 -0
  205. package/src/lifecycle/publish-targets.ts +15 -0
  206. package/src/lifecycle/publish-tauri.test.ts +163 -0
  207. package/src/lifecycle/publish-tauri.ts +198 -0
  208. package/src/lifecycle/release-cut-lane.test.ts +177 -0
  209. package/src/lifecycle/release-cut-override.test.ts +213 -0
  210. package/src/lifecycle/release-cut.ts +198 -17
  211. package/src/lifecycle/release-publish.ts +23 -3
  212. package/src/lifecycle/release-revocation.ts +5 -4
  213. package/src/lifecycle/release-store.ts +44 -0
  214. package/src/lifecycle/snapshot-store.ts +16 -9
  215. package/src/lifecycle/test-passkey.ts +55 -0
  216. package/src/notify-bundle.test.ts +3 -1
  217. package/src/notify.schema.json +12 -3
  218. package/src/notify.ts +20 -3
  219. package/src/op/gate.ts +2 -1
  220. package/src/override-gate-bundle.test.ts +2 -0
  221. package/src/pr-forge-bundle.test.ts +2 -2
  222. package/src/pr-forge.test.ts +38 -0
  223. package/src/pr-forge.ts +93 -11
  224. package/src/pr-requires.test.ts +9 -0
  225. package/src/release-floors.ts +1 -1
  226. package/src/stage-hooks-bundle.test.ts +2 -0
  227. package/src/wave-runtime-bundle.test.ts +3 -2
  228. package/src/workspace/ci-builds.ts +27 -0
  229. package/src/workspace/ci-green-stale.test.ts +193 -0
  230. package/src/workspace/ci-green.ts +137 -6
  231. package/src/workspace/ci-quarantine-report.test.ts +145 -0
  232. package/src/workspace/ci-quarantine-report.ts +234 -0
  233. package/src/workspace/ci-quarantine.test.ts +160 -0
  234. package/src/workspace/ci-quarantine.ts +188 -0
  235. package/src/workspace/ci-serve.ts +7 -4
  236. package/src/workspace/class-data.ts +5 -1
  237. package/src/workspace/declaration.schema.json +51 -3
  238. package/src/workspace/declaration.test.ts +1 -0
  239. package/src/workspace/declaration.ts +88 -5
  240. package/src/workspace/forge-work.test.ts +143 -0
  241. package/src/workspace/forge-work.ts +195 -0
  242. package/src/workspace/identity-gate-rule.ts +6 -8
  243. package/src/workspace/identity.ts +6 -3
  244. package/src/workspace/intent-cli.ts +24 -5
  245. package/src/workspace/intent-record.schema.json +32 -0
  246. package/src/workspace/intent-record.ts +3 -0
  247. package/src/workspace/intent.schema.json +32 -0
  248. package/src/workspace/intent.ts +9 -0
  249. package/src/workspace/kind-readers.ts +2 -1
  250. package/src/workspace/kinds.test.ts +13 -0
  251. package/src/workspace/kinds.ts +12 -3
  252. package/src/workspace/plan-stale.schema.json +286 -0
  253. package/src/workspace/release-candidates.schema.json +55 -2
  254. package/src/workspace/release-candidates.test.ts +77 -4
  255. package/src/workspace/release-candidates.ts +80 -23
  256. package/src/workspace/releases.schema.json +47 -0
  257. package/src/workspace/trust/gate-seal.test.ts +44 -0
  258. package/src/workspace/trust/policy.ts +24 -1
  259. package/src/workspace/trust/run-commits.ts +2 -1
  260. package/src/workspace/trust/seal.ts +35 -3
  261. package/src/workspace/trust/trust-files.test.ts +5 -0
  262. package/src/workspace/trust/trust-files.ts +15 -1
@@ -0,0 +1,204 @@
1
+ /**
2
+ * The quarantine's scheduled run (#4677): what became of each quarantined
3
+ * test, read from the run's JUnit XML, and `ci.quarantine-passed` through
4
+ * `ci.green.notify` for each one that passed, so someone can take it out.
5
+ *
6
+ * ci quarantine report --phase <name> --junit <file>... [--commit <sha>] [--dry-run] [--json]
7
+ *
8
+ * nextest (`[profile.<p>.junit]`), Playwright (`--reporter=junit`) and most
9
+ * other runners write JUnit XML. A test counts as passed only when every
10
+ * case of it passed on its first try: one nextest marks flaky (it failed,
11
+ * then passed on a retry) is still flaky. The report gates nothing: it exits
12
+ * 0 whatever the tests did, and 1 only when it can't read what it was given.
13
+ *
14
+ * The event is sent on every scheduled run the test passes in, with an id
15
+ * made from the test and the commit, so a re-run of the same commit sends
16
+ * the same id and a receiver can drop it.
17
+ */
18
+ import { createHash } from "node:crypto";
19
+ import { execFileSync } from "node:child_process";
20
+ import { readFileSync } from "node:fs";
21
+ import { resolve } from "node:path";
22
+ import { formatError } from "../cli/format.js";
23
+ import { makeNotifyEvent, sendNotify as realSendNotify } from "../notify.js";
24
+ import { quarantineName } from "./ci-quarantine.js";
25
+ import { locateWorkspace } from "./which-chant.js";
26
+ import { readDeclaration, WorkspaceReadError } from "./declaration.js";
27
+ /** The first chant that sends `ci.quarantine-passed` (#4677). */
28
+ export const CI_QUARANTINE_NOTIFY_FLOOR = "0.124.63";
29
+ const ENTITY = { lt: "<", gt: ">", amp: "&", quot: '"', apos: "'" };
30
+ const decode = (s) => s.replace(/&(#x[0-9a-fA-F]+|#[0-9]+|[a-z]+);/g, (all, e) => (e[0] === "#" ? String.fromCodePoint(e[1] === "x" ? parseInt(e.slice(2), 16) : parseInt(e.slice(1), 10)) : (ENTITY[e] ?? all)));
31
+ function attributes(text) {
32
+ const out = {};
33
+ for (const m of text.matchAll(/([^\s=]+)\s*=\s*(?:"([^"]*)"|'([^']*)')/g))
34
+ out[m[1]] = decode(m[2] ?? m[3] ?? "");
35
+ return out;
36
+ }
37
+ /**
38
+ * The test cases of a JUnit XML document. Only the elements a test's
39
+ * outcome needs are read: `testsuite`, `testcase` and its `failure`,
40
+ * `error`, `skipped`, and nextest's `flakyFailure` and `flakyError`.
41
+ */
42
+ export function parseJUnit(xml) {
43
+ // CDATA, comments and declarations can hold anything, `<` included.
44
+ const text = xml.replace(/<!\[CDATA\[[\s\S]*?\]\]>/g, "").replace(/<!--[\s\S]*?-->/g, "").replace(/<[?!][\s\S]*?>/g, "");
45
+ if (!/<testsuites?[\s>/]/.test(text))
46
+ throw new Error("not JUnit XML: no <testsuites> or <testsuite>");
47
+ const out = [];
48
+ const suites = [];
49
+ let open = null;
50
+ const close = () => {
51
+ if (!open)
52
+ return;
53
+ const m = open.marks;
54
+ open.outcome = m.has("failure") || m.has("error") ? "failed" : m.has("flakyFailure") || m.has("flakyError") ? "flaky" : m.has("skipped") ? "skipped" : "passed";
55
+ const { marks: _m, ...c } = open;
56
+ out.push(c);
57
+ open = null;
58
+ };
59
+ for (const m of text.matchAll(/<(\/?)([A-Za-z][\w:.-]*)((?:\s+[^\s=>/]+\s*=\s*(?:"[^"]*"|'[^']*'))*)\s*(\/?)>/g)) {
60
+ const [, end, tag, attrs, selfClosing] = m;
61
+ if (tag === "testsuite") {
62
+ if (end)
63
+ suites.pop();
64
+ else if (!selfClosing)
65
+ suites.push(attributes(attrs).name ?? "");
66
+ }
67
+ else if (tag === "testcase") {
68
+ if (end)
69
+ close();
70
+ else {
71
+ close();
72
+ const a = attributes(attrs);
73
+ open = { suite: suites.at(-1) ?? "", classname: a.classname ?? "", name: a.name ?? "", outcome: "passed", marks: new Set() };
74
+ if (selfClosing)
75
+ close();
76
+ }
77
+ }
78
+ else if (open && !end)
79
+ open.marks.add(tag);
80
+ }
81
+ close();
82
+ return out;
83
+ }
84
+ /** Whether a case is the entry's test. See {@link quarantineResults}. */
85
+ function matches(e, c) {
86
+ // Playwright joins a case's describes and title with " › "; the entry, like its grep, may give them with spaces.
87
+ const name = c.name.replace(/ › /g, " ");
88
+ if (e.file !== undefined)
89
+ return (c.classname === e.file || c.suite === e.file) && (name === e.test || name.endsWith(` ${e.test}`));
90
+ if (c.name === e.test)
91
+ return true;
92
+ const at = e.test.indexOf(" ");
93
+ return at > 0 && (c.suite === e.test.slice(0, at) || c.classname === e.test.slice(0, at)) && c.name === e.test.slice(at + 1);
94
+ }
95
+ /**
96
+ * Each entry of `phase` with how its cases ended. An entry with a `file`
97
+ * matches a case whose classname or suite is the file and whose name (`›`
98
+ * read as a space) is its test or ends with it, as Playwright writes them.
99
+ * One without matches a case named its test, or, for `<binary> <name>` as
100
+ * nextest gives it, a case named `<name>` in the suite (or classname)
101
+ * `<binary>`. Any failed case makes the entry failed, then any flaky, then
102
+ * any passed; all skipped is skipped, and none is not run.
103
+ */
104
+ export function quarantineResults(green, phase, cases) {
105
+ return (green.quarantine?.entries ?? [])
106
+ .filter((e) => e.phase === phase)
107
+ .map((entry) => {
108
+ const mine = cases.filter((c) => matches(entry, c));
109
+ const has = (o) => mine.some((c) => c.outcome === o);
110
+ const outcome = mine.length === 0 ? "not-run" : has("failed") ? "failed" : has("flaky") ? "flaky" : has("passed") ? "passed" : "skipped";
111
+ return { entry, outcome, cases: mine.length };
112
+ });
113
+ }
114
+ /** `ci.quarantine-passed` for one entry that passed at `commit`. */
115
+ export function quarantinePassedEvent(green, entry, commit, env = process.env) {
116
+ const name = quarantineName(entry);
117
+ const run = { commit };
118
+ return makeNotifyEvent({
119
+ id: createHash("sha256").update(JSON.stringify(["chant", "ci.quarantine-passed", entry.phase, entry.file ?? null, entry.test, commit])).digest("hex"),
120
+ source: "chant",
121
+ event: "ci.quarantine-passed",
122
+ summary: `quarantined ${name} passed in phase ${entry.phase}'s scheduled run at ${commit.slice(0, 12)}: take it out of ci.green.quarantine if ${entry.issue} is fixed`,
123
+ targets: [name],
124
+ ci: { branch: green.branch, commit, phase: entry.phase, quarantine: { test: entry.test, ...(entry.file !== undefined ? { file: entry.file } : {}), issue: entry.issue, until: entry.until } },
125
+ run,
126
+ }, { env });
127
+ }
128
+ /** Read the run's JUnit files, match them to `phase`'s entries, and send `ci.quarantine-passed` for each that passed. */
129
+ export async function quarantineReport(req) {
130
+ const { green, phase } = req;
131
+ if (!green.phases.some((p) => p.name === phase)) {
132
+ throw new WorkspaceReadError("declaration-invalid", `ci.green declares no phase ${JSON.stringify(phase)}; it declares ${green.phases.map((p) => p.name).join(", ")}`);
133
+ }
134
+ const cases = req.junit.flatMap((xml) => parseJUnit(xml));
135
+ const results = quarantineResults(green, phase, cases);
136
+ const dryRun = req.dryRun === true;
137
+ const send = req.sendNotify ?? realSendNotify;
138
+ const told = [];
139
+ for (const r of results.filter((x) => x.outcome === "passed")) {
140
+ const name = quarantineName(r.entry);
141
+ if (!green.notify)
142
+ continue;
143
+ if (dryRun) {
144
+ told.push({ name, sent: false });
145
+ continue;
146
+ }
147
+ const deliveries = await send(green.notify, quarantinePassedEvent(green, r.entry, req.commit, req.env ?? process.env), { env: req.env ?? process.env });
148
+ told.push({ name, sent: deliveries.some((d) => d.ok) });
149
+ }
150
+ return { phase, commit: req.commit, results, told, dryRun };
151
+ }
152
+ const LABEL = { passed: "passed", flaky: "flaky", failed: "failed", skipped: "skipped", "not-run": "not run" };
153
+ /** The report as text: a line per entry, then what was told. */
154
+ export function formatQuarantineReport(r, green) {
155
+ const lines = [`quarantine of phase ${r.phase} at ${r.commit.slice(0, 12)}: ${r.results.length} test${r.results.length === 1 ? "" : "s"}`];
156
+ for (const x of r.results) {
157
+ const hint = x.outcome === "passed" ? ": it may be fixed; take it out once the issue says so" : "";
158
+ lines.push(` ${LABEL[x.outcome].padEnd(8)} ${quarantineName(x.entry)} (${x.entry.issue}, until ${x.entry.until})${hint}`);
159
+ }
160
+ const passed = r.results.filter((x) => x.outcome === "passed").length;
161
+ if (passed > 0 && !green.notify)
162
+ lines.push(" ci.green.notify is not set, so no ci.quarantine-passed was sent");
163
+ for (const t of r.told)
164
+ lines.push(` ${r.dryRun ? "would tell" : t.sent ? "told" : "noted (no notify variable set, or every delivery failed)"} ci.quarantine-passed: ${t.name}`);
165
+ return lines.join("\n");
166
+ }
167
+ const USAGE = "chant ci quarantine report --phase <name> --junit <file>... [--commit <sha>] [--dry-run] [--json]";
168
+ const describe = (err) => (err instanceof WorkspaceReadError ? err.describe() : err instanceof Error ? err.message : String(err));
169
+ /** `chant ci quarantine report` (#4677). */
170
+ export async function runCiQuarantineReport(ctx) {
171
+ const { args } = ctx;
172
+ try {
173
+ if (!args.phase)
174
+ throw new Error("--phase names the ci.green phase whose quarantined tests the run ran");
175
+ const files = args.quarantineJunit ?? [];
176
+ if (files.length === 0)
177
+ throw new Error("--junit names the JUnit XML the run wrote; repeat it for several");
178
+ const declaration = readDeclaration(locateWorkspace(process.cwd()).tree);
179
+ const green = declaration.ci?.green;
180
+ if (!green)
181
+ throw new WorkspaceReadError("declaration-invalid", `${declaration.file} declares no ci.green, so it has no quarantine`);
182
+ const junit = files.map((f) => {
183
+ try {
184
+ return readFileSync(resolve(f), "utf8");
185
+ }
186
+ catch (err) {
187
+ throw new Error(`could not read --junit ${f}: ${err instanceof Error ? err.message : String(err)}`);
188
+ }
189
+ });
190
+ const commit = args.commit ?? process.env.GITHUB_SHA ?? execFileSync("git", ["rev-parse", "HEAD"], { encoding: "utf-8" }).trim();
191
+ const report = await quarantineReport({ green, phase: args.phase, junit, commit, dryRun: args.dryRun === true });
192
+ if (args.json) {
193
+ const { results, ...rest } = report;
194
+ console.log(JSON.stringify({ ...rest, results: results.map((x) => ({ test: x.entry.test, ...(x.entry.file !== undefined ? { file: x.entry.file } : {}), issue: x.entry.issue, until: x.entry.until, outcome: x.outcome, cases: x.cases })) }, null, 2));
195
+ }
196
+ else
197
+ console.log(formatQuarantineReport(report, green));
198
+ return 0;
199
+ }
200
+ catch (err) {
201
+ console.error(formatError({ message: `chant ci quarantine report: ${describe(err)}`, hint: USAGE }));
202
+ return 1;
203
+ }
204
+ }
@@ -0,0 +1,73 @@
1
+ /**
2
+ * The quarantine (#4677): known-flaky tests a phase's runner leaves out
3
+ * until they are fixed, declared in `ci.green.quarantine`.
4
+ *
5
+ * ci quarantine check every entry is current: none is past its
6
+ * `until`, and none is more than maxDays out
7
+ * ci quarantine filter --phase <name> --runner nextest|playwright|list [--only] [--json]
8
+ * what the phase's runner leaves out, or with
9
+ * --only what the scheduled run runs
10
+ * ci quarantine report --phase <name> --junit <file>... [--commit <sha>] [--dry-run] [--json]
11
+ * what became of each quarantined test in the
12
+ * scheduled run, and ci.quarantine-passed for
13
+ * each that passed (./ci-quarantine-report.ts)
14
+ *
15
+ * The tick judges a phase by its check runs, whole, so a quarantined test is
16
+ * kept out of the verdict by its runner never running it there: nextest gets
17
+ * a filterset (`-E`), Playwright a `--grep-invert` pattern, and any other
18
+ * runner a list. A scheduled run of the quarantined tests alone, under a job
19
+ * no phase's patterns match, tells whether one is fixed.
20
+ *
21
+ * Whether an entry has expired depends on the day, so the declaration's
22
+ * reader doesn't judge it: an expired quarantine would otherwise stop every
23
+ * chant command, the tick among them. `check` and `filter` do, and fail
24
+ * with `declaration-invalid` at the entry, so the phase whose job asks for
25
+ * its filter goes red until someone fixes the test or the entry. `filter
26
+ * --only` doesn't refuse, so the scheduled run still says whether an expired
27
+ * test passes.
28
+ */
29
+ import type { CommandContext } from "../cli/registry.js";
30
+ import { type CiGreen, type CiQuarantineEntry } from "./declaration.js";
31
+ /** The first chant that reads `ci.green.quarantine` and runs `chant ci quarantine` (#4677). */
32
+ export declare const CI_QUARANTINE_FLOOR = "0.124.63";
33
+ export declare const QUARANTINE_RUNNERS: readonly ["nextest", "playwright", "list"];
34
+ export type QuarantineRunner = (typeof QUARANTINE_RUNNERS)[number];
35
+ /** Today, YYYY-MM-DD in UTC. */
36
+ export declare const utcToday: (now?: Date) => string;
37
+ /** An entry as a person reads it: `file › test`, or the test. */
38
+ export declare const quarantineName: (e: Pick<CiQuarantineEntry, "test" | "file">) => string;
39
+ /** What is wrong with an entry on `today`: past its `until`, or `until` further out than `maxDays`. */
40
+ export interface QuarantineProblem {
41
+ entry: CiQuarantineEntry;
42
+ message: string;
43
+ }
44
+ /** The quarantine's entries that are expired or too far out on `today`, of `phase` when given. */
45
+ export declare function quarantineProblems(green: CiGreen, today: string, phase?: string): QuarantineProblem[];
46
+ /** A regex that matches nothing, for a `--grep-invert` that leaves nothing out. */
47
+ export declare const PLAYWRIGHT_NOTHING = "(?!)";
48
+ export interface QuarantineFilter {
49
+ phase: string;
50
+ runner: QuarantineRunner;
51
+ only: boolean;
52
+ /** What the runner takes: a filterset, a pattern, or lines. */
53
+ filter: string;
54
+ /** The entries it covers. */
55
+ entries: CiQuarantineEntry[];
56
+ }
57
+ /**
58
+ * What `phase`'s runner takes (#4677). nextest covers the entries that
59
+ * name no file, and Playwright the ones that do; `list` covers every one, a
60
+ * line each, `file<TAB>test` for an entry with a file. Without `only` it
61
+ * leaves the quarantined tests out, as a phase's run does, and refuses when
62
+ * an entry of the phase is expired or too far out on `today`; with `only` it
63
+ * selects them, for the scheduled run.
64
+ */
65
+ export declare function quarantineFilter(green: CiGreen, req: {
66
+ phase: string;
67
+ runner: QuarantineRunner;
68
+ only?: boolean;
69
+ today: string;
70
+ }): QuarantineFilter;
71
+ /** `chant ci quarantine check|filter` (#4677). */
72
+ export declare function runCiQuarantine(ctx: CommandContext): Promise<number>;
73
+ //# sourceMappingURL=ci-quarantine.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ci-quarantine.d.ts","sourceRoot":"","sources":["../../src/workspace/ci-quarantine.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAGH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAEtD,OAAO,EAAsD,KAAK,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAEzH,+FAA+F;AAC/F,eAAO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CAAC,CAgC1E"}
@@ -0,0 +1,170 @@
1
+ /**
2
+ * The quarantine (#4677): known-flaky tests a phase's runner leaves out
3
+ * until they are fixed, declared in `ci.green.quarantine`.
4
+ *
5
+ * ci quarantine check every entry is current: none is past its
6
+ * `until`, and none is more than maxDays out
7
+ * ci quarantine filter --phase <name> --runner nextest|playwright|list [--only] [--json]
8
+ * what the phase's runner leaves out, or with
9
+ * --only what the scheduled run runs
10
+ * ci quarantine report --phase <name> --junit <file>... [--commit <sha>] [--dry-run] [--json]
11
+ * what became of each quarantined test in the
12
+ * scheduled run, and ci.quarantine-passed for
13
+ * each that passed (./ci-quarantine-report.ts)
14
+ *
15
+ * The tick judges a phase by its check runs, whole, so a quarantined test is
16
+ * kept out of the verdict by its runner never running it there: nextest gets
17
+ * a filterset (`-E`), Playwright a `--grep-invert` pattern, and any other
18
+ * runner a list. A scheduled run of the quarantined tests alone, under a job
19
+ * no phase's patterns match, tells whether one is fixed.
20
+ *
21
+ * Whether an entry has expired depends on the day, so the declaration's
22
+ * reader doesn't judge it: an expired quarantine would otherwise stop every
23
+ * chant command, the tick among them. `check` and `filter` do, and fail
24
+ * with `declaration-invalid` at the entry, so the phase whose job asks for
25
+ * its filter goes red until someone fixes the test or the entry. `filter
26
+ * --only` doesn't refuse, so the scheduled run still says whether an expired
27
+ * test passes.
28
+ */
29
+ import { formatError } from "../cli/format.js";
30
+ import { locateWorkspace } from "./which-chant.js";
31
+ import { quarantineDay, readDeclaration, WorkspaceReadError } from "./declaration.js";
32
+ /** The first chant that reads `ci.green.quarantine` and runs `chant ci quarantine` (#4677). */
33
+ export const CI_QUARANTINE_FLOOR = "0.124.63";
34
+ export const QUARANTINE_RUNNERS = ["nextest", "playwright", "list"];
35
+ const USAGE = "chant ci quarantine check | ci quarantine filter --phase <name> --runner nextest|playwright|list [--only] [--json] | ci quarantine report --phase <name> --junit <file>... [--commit <sha>] [--dry-run] [--json]";
36
+ /** Today, YYYY-MM-DD in UTC. */
37
+ export const utcToday = (now = new Date()) => now.toISOString().slice(0, 10);
38
+ /** An entry as a person reads it: `file › test`, or the test. */
39
+ export const quarantineName = (e) => (e.file !== undefined ? `${e.file} › ${e.test}` : e.test);
40
+ /** The quarantine's entries that are expired or too far out on `today`, of `phase` when given. */
41
+ export function quarantineProblems(green, today, phase) {
42
+ const q = green.quarantine;
43
+ if (!q)
44
+ return [];
45
+ const now = quarantineDay(today);
46
+ if (now === null)
47
+ throw new Error(`today isn't a day: ${today}`);
48
+ const out = [];
49
+ for (const e of q.entries) {
50
+ if (phase !== undefined && e.phase !== phase)
51
+ continue;
52
+ const until = quarantineDay(e.until);
53
+ const what = `ci.green.quarantine: ${e.phase}: ${quarantineName(e)} (${e.issue})`;
54
+ if (until < now)
55
+ out.push({ entry: e, message: `${what} expired on ${e.until}: fix the test and delete the entry, or delete the test` });
56
+ else if (until - now > q.maxDays)
57
+ out.push({ entry: e, message: `${what} stays out until ${e.until}, more than ${q.maxDays} days from ${today} (ci.green.quarantine.maxDays)` });
58
+ }
59
+ return out;
60
+ }
61
+ /** A problem as the reader's own `declaration-invalid` error, located at its entry. */
62
+ function problemError(p) {
63
+ return new WorkspaceReadError("declaration-invalid", p.message, p.entry.location);
64
+ }
65
+ const escapeRegExp = (s) => s.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
66
+ // A Rust binary id and test name use none of the characters nextest's
67
+ // matchers would need escaped, so a name that does is refused, not escaped.
68
+ const NEXTEST_PART = /^[A-Za-z0-9_:/.-]+$/;
69
+ /** One entry as a nextest filterset: `binary_id(=B) & test(=T)`, or `test(=T)` for a name alone. */
70
+ function nextestSet(e) {
71
+ const parts = e.test.split(" ");
72
+ if (parts.length > 2 || !parts.every((p) => NEXTEST_PART.test(p))) {
73
+ throw new WorkspaceReadError("declaration-invalid", `ci.green.quarantine: ${e.phase}: ${JSON.stringify(e.test)} isn't a nextest test: give the binary id and the test's name as nextest prints them ("my-crate::integration module::test_name"), or the name alone`, e.location);
74
+ }
75
+ return parts.length === 2 ? `(binary_id(=${parts[0]}) & test(=${parts[1]}))` : `test(=${parts[0]})`;
76
+ }
77
+ /**
78
+ * One entry as a pattern for Playwright's `grep`, which it matches against
79
+ * a test's title path joined by spaces (project, spec file from testDir,
80
+ * describe titles, title) with its tags after: the file, then the title at
81
+ * the end, any describe titles between.
82
+ */
83
+ function playwrightPattern(e) {
84
+ return `(?:^| )${escapeRegExp(e.file)} (?:.* )?${escapeRegExp(e.test)}(?: @\\S+)*$`;
85
+ }
86
+ /** A regex that matches nothing, for a `--grep-invert` that leaves nothing out. */
87
+ export const PLAYWRIGHT_NOTHING = "(?!)";
88
+ /**
89
+ * What `phase`'s runner takes (#4677). nextest covers the entries that
90
+ * name no file, and Playwright the ones that do; `list` covers every one, a
91
+ * line each, `file<TAB>test` for an entry with a file. Without `only` it
92
+ * leaves the quarantined tests out, as a phase's run does, and refuses when
93
+ * an entry of the phase is expired or too far out on `today`; with `only` it
94
+ * selects them, for the scheduled run.
95
+ */
96
+ export function quarantineFilter(green, req) {
97
+ if (!green.phases.some((p) => p.name === req.phase)) {
98
+ throw new WorkspaceReadError("declaration-invalid", `ci.green declares no phase ${JSON.stringify(req.phase)}; it declares ${green.phases.map((p) => p.name).join(", ")}`);
99
+ }
100
+ const only = req.only === true;
101
+ if (!only) {
102
+ const [problem] = quarantineProblems(green, req.today, req.phase);
103
+ if (problem)
104
+ throw problemError(problem);
105
+ }
106
+ const all = (green.quarantine?.entries ?? []).filter((e) => e.phase === req.phase);
107
+ const entries = req.runner === "nextest" ? all.filter((e) => e.file === undefined) : req.runner === "playwright" ? all.filter((e) => e.file !== undefined) : all;
108
+ let filter;
109
+ if (req.runner === "nextest") {
110
+ const set = entries.map(nextestSet).join(" | ");
111
+ filter = only ? set || "none()" : set ? `not (${set})` : "all()";
112
+ }
113
+ else if (req.runner === "playwright") {
114
+ filter = entries.map(playwrightPattern).join("|") || PLAYWRIGHT_NOTHING;
115
+ }
116
+ else {
117
+ filter = entries.map((e) => (e.file !== undefined ? `${e.file}\t${e.test}` : e.test)).join("\n");
118
+ }
119
+ return { phase: req.phase, runner: req.runner, only, filter, entries };
120
+ }
121
+ function readGreenOnly(cwd) {
122
+ const declaration = readDeclaration(locateWorkspace(cwd).tree);
123
+ const green = declaration.ci?.green;
124
+ if (!green)
125
+ throw new WorkspaceReadError("declaration-invalid", `${declaration.file} declares no ci.green, so it has no phases to quarantine tests of`);
126
+ return green;
127
+ }
128
+ const describe = (err) => (err instanceof WorkspaceReadError ? err.describe() : err instanceof Error ? err.message : String(err));
129
+ /** `chant ci quarantine check|filter` (#4677). */
130
+ export async function runCiQuarantine(ctx) {
131
+ const { args } = ctx;
132
+ const action = args.extraPositional;
133
+ try {
134
+ const today = utcToday();
135
+ if (action === "check") {
136
+ const green = readGreenOnly(process.cwd());
137
+ const problems = quarantineProblems(green, today);
138
+ for (const p of problems)
139
+ console.error(problemError(p).describe());
140
+ if (problems.length > 0)
141
+ return 1;
142
+ const n = green.quarantine?.entries.length ?? 0;
143
+ console.log(`${n} test${n === 1 ? "" : "s"} quarantined, every one current on ${today}`);
144
+ return 0;
145
+ }
146
+ if (action === "filter") {
147
+ if (!args.phase)
148
+ throw new Error("--phase names the ci.green phase whose runner takes the filter");
149
+ const runner = args.quarantineRunner;
150
+ if (!runner || !QUARANTINE_RUNNERS.includes(runner))
151
+ throw new Error(`--runner takes ${QUARANTINE_RUNNERS.join(", ")}${runner ? `, not ${JSON.stringify(runner)}` : ""}`);
152
+ const out = quarantineFilter(readGreenOnly(process.cwd()), { phase: args.phase, runner: runner, only: args.quarantineOnly === true, today });
153
+ if (args.json) {
154
+ const { entries, ...rest } = out;
155
+ console.log(JSON.stringify({ ...rest, entries: entries.map(({ pointer: _p, location: _l, ...e }) => e) }, null, 2));
156
+ }
157
+ else if (out.filter !== "")
158
+ console.log(out.filter);
159
+ return 0;
160
+ }
161
+ if (action === "report")
162
+ return (await import("./ci-quarantine-report.js")).runCiQuarantineReport(ctx);
163
+ console.error(formatError({ message: action ? `chant ci quarantine: no ${action}` : "chant ci quarantine needs check, filter or report", hint: USAGE }));
164
+ return 1;
165
+ }
166
+ catch (err) {
167
+ console.error(formatError({ message: `chant ci quarantine: ${describe(err)}`, hint: USAGE }));
168
+ return 1;
169
+ }
170
+ }
@@ -1 +1 @@
1
- {"version":3,"file":"ci-serve.d.ts","sourceRoot":"","sources":["../../src/workspace/ci-serve.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6FG;AAMH,OAAO,EAA0C,KAAK,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAE9F,OAAO,EAAgB,KAAK,eAAe,EAAE,MAAM,aAAa,CAAC;AACjE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAKtD,OAAO,EAA0F,KAAK,SAAS,EAAE,KAAK,YAAY,EAAE,KAAK,WAAW,EAAE,MAAM,UAAU,CAAC;AACvK,OAAO,EAAsF,KAAK,aAAa,EAAE,MAAM,YAAY,CAAC;AAOpI,oHAAoH;AACpH,MAAM,MAAM,gBAAgB,GAAG,QAAQ,GAAG,SAAS,GAAG,KAAK,CAAC;AAE5D,gHAAgH;AAChH,MAAM,WAAW,YAAY;IAC3B,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,EAAE,CAAC,CAAC;IAC3D,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IACxD,mIAAmI;IACnI,cAAc,CAAC,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;CACtD;AAED;;;;GAIG;AACH,MAAM,MAAM,cAAc,GACtB;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC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DAAsD;AACtD,wBAAgB,kBAAkB,CAAC,CAAC,EAAE,YAAY,GAAG,MAAM,CAwC1D;AAID;;;;;GAKG;AACH,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,cAAc,GAAG,MAAM,CAkBjE;AAUD,sFAAsF;AACtF,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,CAKjE;AAcD,gCAAgC;AAChC,wBAAsB,UAAU,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAqHrE"}
@@ -101,6 +101,7 @@ import { prApplyGroup, prApplyRecordKey } from "../components/pr-pipeline.js";
101
101
  import { forgeFromEnv } from "../pr-forge.js";
102
102
  import { formatError, formatWarning } from "../cli/format.js";
103
103
  import { acquireLease, currentHolderId, releaseLease, DEFAULT_LEASE_TTL_MS } from "../lifecycle/lease.js";
104
+ import { lifecycleRemoteOverride } from "../lifecycle/ledger-remote.js";
104
105
  import { parseDuration } from "../op/duration.js";
105
106
  import { reportUrlOf } from "./ci-report-url.js";
106
107
  import { CI_JOB_OPS, ciJobPlace, ciLoopOptions, ciSecretsOf, ciRun, ciStatusFromEnv, CiRunError } from "./ci-run.js";
@@ -168,11 +169,13 @@ function gitStatus(cwd, args) {
168
169
  * fetch says why.
169
170
  */
170
171
  export function reconcileCiServeLedger(top) {
172
+ // #4647: the remote the apply jobs push the ledger to.
173
+ const remote = lifecycleRemoteOverride() ?? "origin";
171
174
  const local = tryGit(top, ["rev-parse", "--verify", "--quiet", `refs/heads/${LEDGER}^{commit}`]);
172
- const listed = gitStatus(top, ["ls-remote", "--exit-code", "origin", `refs/heads/${LEDGER}`]);
175
+ const listed = gitStatus(top, ["ls-remote", "--exit-code", remote, `refs/heads/${LEDGER}`]);
173
176
  if (listed.code === 2) {
174
177
  // A remote-tracking ref left from a deleted branch would be the next push's lease, and refuse it.
175
- tryGit(top, ["update-ref", "-d", `refs/remotes/origin/${LEDGER}`]);
178
+ tryGit(top, ["update-ref", "-d", `refs/remotes/${remote}/${LEDGER}`]);
176
179
  if (!local)
177
180
  return undefined;
178
181
  tryGit(top, ["update-ref", "-d", `refs/heads/${LEDGER}`, local]);
@@ -183,7 +186,7 @@ export function reconcileCiServeLedger(top) {
183
186
  const forge = listed.out.split(/\s+/)[0];
184
187
  if (!forge || forge === local)
185
188
  return undefined;
186
- if (gitStatus(top, ["fetch", "--quiet", "--no-tags", "origin", `+refs/heads/${LEDGER}:${FORGE_LEDGER}`]).code !== 0)
189
+ if (gitStatus(top, ["fetch", "--quiet", "--no-tags", remote, `+refs/heads/${LEDGER}:${FORGE_LEDGER}`]).code !== 0)
187
190
  return undefined;
188
191
  try {
189
192
  const ahead = gitStatus(top, ["merge-base", "--is-ancestor", forge, local]).code === 0;
@@ -191,7 +194,7 @@ export function reconcileCiServeLedger(top) {
191
194
  if (ahead || behind)
192
195
  return undefined;
193
196
  tryGit(top, ["update-ref", `refs/heads/${LEDGER}`, forge, local]);
194
- tryGit(top, ["update-ref", `refs/remotes/origin/${LEDGER}`, forge]);
197
+ tryGit(top, ["update-ref", `refs/remotes/${remote}/${LEDGER}`, forge]);
195
198
  return { type: "ledger", action: "reset", local, forge };
196
199
  }
197
200
  finally {
@@ -11,7 +11,7 @@
11
11
  * several pins merge. {@link classDataShapeProblems} is the schema written
12
12
  * out by hand for the bundle; `class-data.test.ts` holds it to ajv's answer.
13
13
  *
14
- * The module imports node:fs and node:path and nothing else.
14
+ * The module imports node:fs, node:path and node:url and nothing else.
15
15
  */
16
16
  import { type PrincipalClass } from "./identity-gate-rule.js";
17
17
  /** The subpath a package publishes its principal classes at. */
@@ -25,6 +25,8 @@ export interface ClassData {
25
25
  export type PackageFiles = (path: string) => string | undefined;
26
26
  /** A package directory on disk. */
27
27
  export declare function diskFiles(dir: string): PackageFiles;
28
+ /** This chant's own install: a pinned package a checkout does not hold is looked up from here too (plywood#54). */
29
+ export declare const CHANT_INSTALL: string;
28
30
  /**
29
31
  * The directory of an installed package `name`, found the way Node finds a
30
32
  * bare import: `node_modules/<name>` in `fromDir` and each directory above it.
@@ -1 +1 @@
1
- {"version":3,"file":"class-data.d.ts","sourceRoot":"","sources":["../../src/workspace/class-data.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAIH,OAAO,EAAwC,KAAK,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAEjG,gEAAgE;AAChE,eAAO,MAAM,kBAAkB,2BAA2B,CAAC;AAE3D,MAAM,WAAW,SAAS;IACxB,OAAO,EAAE,cAAc,EAAE,CAAC;IAC1B,mFAAmF;IACnF,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB;AAED,gGAAgG;AAChG,MAAM,MAAM,YAAY,GAAG,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,GAAG,SAAS,CAAC;AAEhE,mCAAmC;AACnC,wBAAgB,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,YAAY,CAQnD;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAUtF;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,GAAG;IAAE,OAAO,EAAE,MAAM,CAAA;CAAE,CAiBxH;AASD;;;;GAIG;AACH,wBAAgB,sBAAsB,CAAC,GAAG,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,CA0B7E;AAID;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE;IAAE,OAAO,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,WAAW,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,EAAE,CAAA;CAAE,EAAE,MAAM,EAAE,MAAM,GAAG,SAAS,CA2BnI;AAED,4J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,OAAO,EAAE,MAAM,CAAA;KAAE,EAAE,CAAA;CAAE,CA6B3I"}
@@ -11,10 +11,11 @@
11
11
  * several pins merge. {@link classDataShapeProblems} is the schema written
12
12
  * out by hand for the bundle; `class-data.test.ts` holds it to ajv's answer.
13
13
  *
14
- * The module imports node:fs and node:path and nothing else.
14
+ * The module imports node:fs, node:path and node:url and nothing else.
15
15
  */
16
16
  import { existsSync, readFileSync, statSync } from "node:fs";
17
17
  import { dirname, join, posix, resolve } from "node:path";
18
+ import { fileURLToPath } from "node:url";
18
19
  import { CORE_CLASSES, CORE_PRINCIPAL_CLASSES } from "./identity-gate-rule.js";
19
20
  /** The subpath a package publishes its principal classes at. */
20
21
  export const PRINCIPALS_SUBPATH = "./workspace-principals";
@@ -29,6 +30,8 @@ export function diskFiles(dir) {
29
30
  }
30
31
  };
31
32
  }
33
+ /** This chant's own install: a pinned package a checkout does not hold is looked up from here too (plywood#54). */
34
+ export const CHANT_INSTALL = dirname(fileURLToPath(import.meta.url));
32
35
  /**
33
36
  * The directory of an installed package `name`, found the way Node finds a
34
37
  * bare import: `node_modules/<name>` in `fromDir` and each directory above it.