@mmnto/cli 1.103.0 → 1.104.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.
Files changed (40) hide show
  1. package/dist/commands/doctor-parity-fetch.d.ts +84 -0
  2. package/dist/commands/doctor-parity-fetch.d.ts.map +1 -0
  3. package/dist/commands/doctor-parity-fetch.js +367 -0
  4. package/dist/commands/doctor-parity-fetch.js.map +1 -0
  5. package/dist/commands/doctor-parity-fetch.test.d.ts +13 -0
  6. package/dist/commands/doctor-parity-fetch.test.d.ts.map +1 -0
  7. package/dist/commands/doctor-parity-fetch.test.js +269 -0
  8. package/dist/commands/doctor-parity-fetch.test.js.map +1 -0
  9. package/dist/commands/doctor-parity.d.ts.map +1 -1
  10. package/dist/commands/doctor-parity.js +57 -1
  11. package/dist/commands/doctor-parity.js.map +1 -1
  12. package/dist/commands/eject.d.ts.map +1 -1
  13. package/dist/commands/eject.js +3 -0
  14. package/dist/commands/eject.js.map +1 -1
  15. package/dist/commands/init-templates.d.ts +15 -0
  16. package/dist/commands/init-templates.d.ts.map +1 -1
  17. package/dist/commands/init-templates.js +183 -2
  18. package/dist/commands/init-templates.js.map +1 -1
  19. package/dist/commands/init.d.ts.map +1 -1
  20. package/dist/commands/init.js +30 -2
  21. package/dist/commands/init.js.map +1 -1
  22. package/dist/commands/init.test.js +264 -1
  23. package/dist/commands/init.test.js.map +1 -1
  24. package/dist/commands/install-hooks-exit-contract.test.js +107 -3
  25. package/dist/commands/install-hooks-exit-contract.test.js.map +1 -1
  26. package/dist/commands/install-hooks.d.ts +39 -0
  27. package/dist/commands/install-hooks.d.ts.map +1 -1
  28. package/dist/commands/install-hooks.js +152 -0
  29. package/dist/commands/install-hooks.js.map +1 -1
  30. package/dist/commands/pr.d.ts +130 -0
  31. package/dist/commands/pr.d.ts.map +1 -0
  32. package/dist/commands/pr.js +427 -0
  33. package/dist/commands/pr.js.map +1 -0
  34. package/dist/commands/pr.test.d.ts +2 -0
  35. package/dist/commands/pr.test.d.ts.map +1 -0
  36. package/dist/commands/pr.test.js +494 -0
  37. package/dist/commands/pr.test.js.map +1 -0
  38. package/dist/index.js +34 -0
  39. package/dist/index.js.map +1 -1
  40. package/package.json +2 -2
@@ -0,0 +1,427 @@
1
+ // ─── `totem pr merge` — the sanctioned auto-close-safe merge actuator ────────
2
+ //
3
+ // The B-slice of the auto-close enforcement seam (mmnto-ai/totem#1762).
4
+ // The sanctioned paved-road merge path — the A-slice command-interception was
5
+ // stripped per the OPTION 1 ruling (2026-07-22): repo config (squash-only +
6
+ // BLANK squash body) + D1/D2 cover the raw-merge vectors; see
7
+ // .totem/specs/1762-ab.md. It:
8
+ // 1. asserts the repo merge-config posture (E lever + squash-only) via GraphQL,
9
+ // failing closed on drift (reusing core's evaluateMergeConfigPosture);
10
+ // 2. fetches the PR title + body ONLY (never comments — comments never
11
+ // auto-close), zod-validated;
12
+ // 3. evaluates title + body against the ONE shared close-keyword evaluator,
13
+ // refusing to merge when an undeclared close-keyword-adjacent ref is present
14
+ // (the totem-close marker is the sole authorizing channel — codex #3);
15
+ // 4. merges SQUASH-ONLY with NO body/subject flags (the E-lever BLANK posture
16
+ // means a body flag is the confirmed accidental-close vector), binding the
17
+ // merge to the evaluated snapshot via `--match-head-commit <headRefOid>`;
18
+ // 5. optionally (--close-declared) closes the marker-declared targets, else
19
+ // prints the exact (shell-quoted, backtick-free) commands.
20
+ //
21
+ // CLAIM BOUNDARY (condition 2 — claim no larger than the mechanism): the safety
22
+ // assertion is EVALUATION-TIME. `gh pr view` reads the title/body ONCE and the
23
+ // evaluator runs on that snapshot. HEAD drift between evaluation and merge is
24
+ // closed by `--match-head-commit <headRefOid>` (the merge refuses if the head
25
+ // moved). BODY-TEXT drift (a body edited after the read but before the merge) is
26
+ // NOT proven by B — the layered D1 (PR-time required check) + D2 (post-merge
27
+ // reconciliation) sensors are the loud backstop for that vector. B never claims a
28
+ // merge-time text guarantee.
29
+ //
30
+ // Fail-closed everywhere: any gh/env failure in the pre-merge phase exits 1 with
31
+ // NO merge attempted. A merge-queue landing (auto-merge armed / queued) is NOT
32
+ // treated as a completed merge — the post-command PR state is re-read and declared
33
+ // closes are DEFERRED until it actually lands. GraphQL (not REST) is used for the
34
+ // posture read because REST omits the merge-policy fields for non-admin tokens
35
+ // (see merge-config.ts).
36
+ import { z } from 'zod';
37
+ // totem-context: pr.ts is loaded ONLY via `await import('./commands/pr.js')` in index.ts (the lazy-load convention), so this @mmnto/totem barrel import never resolves at CLI `--help` startup — the cold-start rule (mmnto-ai/totem#2339) is N/A here, same as mail.ts / gh-utils.ts.
38
+ import { evaluateMergeConfigPosture, parseDeclaredCloseIntent, safeExec, scanPrCorpus, TotemError, } from '@mmnto/totem';
39
+ import { GH_TIMEOUT_MS } from '../utils.js';
40
+ // ─── Validated GitHub surfaces ───────────────────────────────────────────────
41
+ /**
42
+ * `gh pr view --json title,body,state,number,headRefOid`. NO comments field —
43
+ * comments never auto-close, so they are never fetched or scanned. `body` is
44
+ * coerced from a possible null to '' (gh emits null for an empty description).
45
+ */
46
+ export const PrViewSchema = z.object({
47
+ title: z.string(),
48
+ body: z
49
+ .string()
50
+ .nullish()
51
+ .transform((v) => v ?? ''),
52
+ state: z.string(),
53
+ number: z.number(),
54
+ headRefOid: z.string(),
55
+ });
56
+ /** `gh pr view N --json state,mergedAt` — the post-command landing check (codex B-5). */
57
+ export const PrMergeStateSchema = z.object({
58
+ state: z.string(),
59
+ mergedAt: z.string().nullish(),
60
+ });
61
+ /**
62
+ * A positive-decimal PR number. `gh pr view` officially accepts a NUMBER, a URL,
63
+ * or a branch — a URL/branch positional lets an arbitrary PR (a DIFFERENT repo) be
64
+ * looked up while the merge actuates in the current repo (the confused-deputy
65
+ * vector, codex B-2). We accept ONLY `[1-9][0-9]*`.
66
+ */
67
+ const PR_NUMBER_RE = /^[1-9][0-9]*$/;
68
+ /**
69
+ * Reject any PR positional that is not a positive decimal (codex B-2). Called at
70
+ * BOTH the Commander boundary (index.ts action) and the command boundary
71
+ * (prMergeCommand) so no path forwards a URL/branch to `gh pr view`. `undefined`
72
+ * (no positional — merge the current branch's PR) is allowed.
73
+ */
74
+ export function assertValidPrNumberArg(arg) {
75
+ if (arg === undefined)
76
+ return;
77
+ if (!PR_NUMBER_RE.test(arg)) {
78
+ throw new TotemError('PR_MERGE_FAILED', `invalid PR argument "${arg}" — expected a positive decimal PR number`, 'pass a bare PR number (e.g. `totem pr merge 1762`), or omit it to merge the current branch’s PR. ' +
79
+ 'A URL or branch name is refused: it could resolve a PR in a different repo than the one being merged.');
80
+ }
81
+ }
82
+ /** The GraphQL `repository` merge-policy fields (all nullable per token visibility). */
83
+ const MergeConfigGraphqlSchema = z
84
+ .object({
85
+ squashMergeAllowed: z.boolean().nullish(),
86
+ mergeCommitAllowed: z.boolean().nullish(),
87
+ rebaseMergeAllowed: z.boolean().nullish(),
88
+ squashMergeCommitTitle: z.string().nullish(),
89
+ squashMergeCommitMessage: z.string().nullish(),
90
+ })
91
+ .passthrough();
92
+ // The merge-config posture query — GraphQL, not REST (merge-config.ts records why:
93
+ // REST hides these fields from non-admin tokens; GraphQL reads them with a plain
94
+ // token). Kept verbatim in sync with tools/autoclose-pr.mjs (the D1 glue).
95
+ const MERGE_CONFIG_QUERY = 'query($owner: String!, $name: String!) { repository(owner: $owner, name: $name) { ' +
96
+ 'squashMergeAllowed mergeCommitAllowed rebaseMergeAllowed ' +
97
+ 'squashMergeCommitTitle squashMergeCommitMessage } }';
98
+ /**
99
+ * Evaluate a PR's title + body against the ONE shared close-keyword evaluator.
100
+ * Reuses core's {@link scanPrCorpus} (which composes `findAutoCloseRefs` +
101
+ * `parseDeclaredCloseIntent` + the marker-strip) over the title + body ONLY — no
102
+ * commit messages, no comments. `closingIssuesReferences` is GitHub-derived and
103
+ * therefore non-authorizing (codex #3), so the client wrapper passes `[]`.
104
+ */
105
+ export function evaluatePrMerge(pr) {
106
+ const scan = scanPrCorpus({
107
+ title: pr.title,
108
+ body: pr.body,
109
+ commitMessages: [],
110
+ closingIssuesReferences: [],
111
+ repo: pr.repo,
112
+ });
113
+ return {
114
+ ok: scan.ok,
115
+ findings: scan.findings,
116
+ declaredByMarker: scan.declaredByMarker,
117
+ undeclared: scan.undeclared,
118
+ };
119
+ }
120
+ /**
121
+ * Flags a merge argv must NEVER contain: any body/subject vector. Under the BLANK
122
+ * squash posture a `--body`/`-b`/`--body-file`/`-F`/`-t`/`--subject` is the
123
+ * confirmed accidental-close vector, so the constructed argv is asserted (not just
124
+ * the behavior) to exclude them.
125
+ */
126
+ export const FORBIDDEN_MERGE_FLAGS = ['-b', '--body', '-F', '--body-file', '-t', '--subject'];
127
+ /**
128
+ * Build the squash-only merge argv. NO body/subject flags, EVER (asserted in
129
+ * tests). Binds the merge to the resolved `repo` (same identity `gh pr view` used
130
+ * — codex B-2) and to the evaluated snapshot via `--match-head-commit <headRefOid>`
131
+ * (codex Q / Greptile P1 / CR): the merge refuses if HEAD moved after evaluation.
132
+ */
133
+ export function buildMergeArgv(prNumber, repo, headRefOid) {
134
+ return [
135
+ 'pr',
136
+ 'merge',
137
+ String(prNumber),
138
+ '--repo',
139
+ repo,
140
+ '--squash',
141
+ '--match-head-commit',
142
+ headRefOid,
143
+ ];
144
+ }
145
+ /**
146
+ * Build the `gh issue close` argv for a marker-declared target (opt-in
147
+ * --close-declared). Binds to the ref's qualifier when present, else the resolved
148
+ * `repo` (same identity as the merge). The comment carries NO backticks (they
149
+ * execute as command substitution if the printed line is pasted — codex NB-1) and
150
+ * no close-keyword adjacent to the digit ref (the word before `#N` is `PR`).
151
+ */
152
+ export function buildIssueCloseArgv(ref, prNumber, repo) {
153
+ const comment = `Auto-close guard: declared close target for PR #${prNumber}, merged via ` +
154
+ 'totem pr merge --close-declared. mmnto-ai/totem#1762.';
155
+ return [
156
+ 'issue',
157
+ 'close',
158
+ String(ref.issue),
159
+ '--repo',
160
+ ref.qualifier ?? repo,
161
+ '--comment',
162
+ comment,
163
+ ];
164
+ }
165
+ /**
166
+ * Shell-quote a single argv token for a COPY-PASTE-runnable display line
167
+ * (codex NB-1). OS-appropriate: PowerShell single-quotes (embedded `'` doubled)
168
+ * on Windows, POSIX single-quotes (embedded `'` → `'\''`) elsewhere. A token with
169
+ * no shell-special char is left bare.
170
+ */
171
+ export function quoteArgForDisplay(token) {
172
+ if (/^[A-Za-z0-9_./:=-]+$/.test(token))
173
+ return token;
174
+ if (process.platform === 'win32') {
175
+ return `'${token.replace(/'/g, "''")}'`;
176
+ }
177
+ return `'${token.replace(/'/g, "'\\''")}'`;
178
+ }
179
+ /** Render a `gh <argv>` line that is safe to copy-paste into the user's shell. */
180
+ export function displayGhCommand(argv) {
181
+ return `gh ${argv.map(quoteArgForDisplay).join(' ')}`;
182
+ }
183
+ /** Human label for a declared ref (`owner/repo#N` or `#N`). */
184
+ function refLabel(ref) {
185
+ return ref.qualifier ? `${ref.qualifier}#${ref.issue}` : `#${ref.issue}`;
186
+ }
187
+ // ─── I/O helpers ─────────────────────────────────────────────────────────────
188
+ function defaultGh(cwd) {
189
+ return (args) => safeExec('gh', args, {
190
+ cwd,
191
+ timeout: GH_TIMEOUT_MS,
192
+ maxBuffer: 16 * 1024 * 1024,
193
+ env: { ...process.env, GH_PROMPT_DISABLED: '1' },
194
+ });
195
+ }
196
+ function resolveDeps(input) {
197
+ const cwd = input.cwd ?? process.cwd();
198
+ return {
199
+ cwd,
200
+ gh: input.gh ?? defaultGh(cwd),
201
+ out: input.out ?? ((t) => process.stdout.write(t)),
202
+ err: input.err ?? ((t) => process.stderr.write(t)),
203
+ };
204
+ }
205
+ function messageOf(e) {
206
+ return e instanceof Error ? e.message : String(e);
207
+ }
208
+ function resolveRepo(gh) {
209
+ const raw = gh(['repo', 'view', '--json', 'nameWithOwner', '--jq', '.nameWithOwner']).trim();
210
+ if (!/^[^/\s]+\/[^/\s]+$/.test(raw)) {
211
+ throw new TotemError('PR_MERGE_FAILED', `could not resolve owner/repo from \`gh repo view\` (got "${raw}")`, 'run inside a GitHub repository with `gh` authenticated (`gh auth status`).');
212
+ }
213
+ return raw;
214
+ }
215
+ function assertPosture(gh, repo) {
216
+ const [owner, name] = repo.split('/');
217
+ const raw = gh([
218
+ 'api',
219
+ 'graphql',
220
+ '-f',
221
+ `query=${MERGE_CONFIG_QUERY}`,
222
+ '-f',
223
+ `owner=${owner}`,
224
+ '-f',
225
+ `name=${name}`,
226
+ '--jq',
227
+ '.data.repository',
228
+ ]);
229
+ const r = MergeConfigGraphqlSchema.parse(JSON.parse(raw));
230
+ return evaluateMergeConfigPosture({
231
+ squash_merge_commit_title: r.squashMergeCommitTitle,
232
+ squash_merge_commit_message: r.squashMergeCommitMessage,
233
+ allow_squash_merge: r.squashMergeAllowed,
234
+ allow_merge_commit: r.mergeCommitAllowed,
235
+ allow_rebase_merge: r.rebaseMergeAllowed,
236
+ });
237
+ }
238
+ function fetchPr(gh, prNumberArg, repo) {
239
+ // Bind the lookup to the SAME resolved repo as the merge (codex B-2): with an
240
+ // explicit --repo, an out-of-repo PR positional cannot be looked up here.
241
+ const args = [
242
+ 'pr',
243
+ 'view',
244
+ ...(prNumberArg ? [prNumberArg] : []),
245
+ '--repo',
246
+ repo,
247
+ '--json',
248
+ 'title,body,state,number,headRefOid',
249
+ ];
250
+ return PrViewSchema.parse(JSON.parse(gh(args)));
251
+ }
252
+ /** Re-read the PR's landing state after `gh pr merge` (codex B-5). */
253
+ function fetchMergeState(gh, prNumber, repo) {
254
+ const raw = gh(['pr', 'view', String(prNumber), '--repo', repo, '--json', 'state,mergedAt']);
255
+ return PrMergeStateSchema.parse(JSON.parse(raw));
256
+ }
257
+ // ─── The command ─────────────────────────────────────────────────────────────
258
+ /**
259
+ * `totem pr merge [number]`. Returns an exit code (the index wrapper sets
260
+ * process.exitCode) — 0 on a clean merge / clean --check-only / a queued
261
+ * (merge-queue) landing, 1 on an invalid PR argument, posture drift, an undeclared
262
+ * close-keyword ref, any gh/env failure in the pre-merge phase (fail-closed, NO
263
+ * merge attempted), or a `--close-declared` run where a requested close failed.
264
+ *
265
+ * `assertValidPrNumberArg` runs FIRST (before any gh call) so a URL/branch
266
+ * positional is refused up front (codex B-2); it throws a TotemError that
267
+ * propagates to the index handler.
268
+ */
269
+ export async function prMergeCommand(prNumberArg, opts, depsInput = {}) {
270
+ const { gh, out, err } = resolveDeps(depsInput);
271
+ // Refuse a non-decimal PR positional before touching gh (the confused-deputy
272
+ // guard, codex B-2). Throws TotemError → index.ts handleError → exit 1.
273
+ assertValidPrNumberArg(prNumberArg);
274
+ // ── Phase 1: resolve + assert posture + fetch + evaluate — all fail-closed ──
275
+ let repo;
276
+ let pr;
277
+ let evaluation;
278
+ try {
279
+ repo = resolveRepo(gh);
280
+ const posture = assertPosture(gh, repo);
281
+ if (!posture.conforms) {
282
+ err(`[totem pr merge] ${posture.message}\n`);
283
+ return { exitCode: 1 };
284
+ }
285
+ pr = fetchPr(gh, prNumberArg, repo);
286
+ if (pr.state !== 'OPEN') {
287
+ err(`[totem pr merge] PR #${pr.number} is ${pr.state}, not OPEN — nothing to merge. ` +
288
+ 'Failing closed (no merge attempted).\n');
289
+ return { exitCode: 1 };
290
+ }
291
+ evaluation = evaluatePrMerge({ title: pr.title, body: pr.body, repo });
292
+ // totem-context: intentional fail-closed exit-code boundary — any gh/env failure in the pre-merge phase is surfaced LOUDLY via err() and returns exit 1 with NO merge attempted (the custom exit-code contract, like mail/ecl-gc), never silent degradation (Tenet 4).
293
+ }
294
+ catch (e) {
295
+ err('[totem pr merge] pre-merge check failed — failing closed, NO merge attempted: ' +
296
+ `${messageOf(e)}\n`);
297
+ return { exitCode: 1 };
298
+ }
299
+ if (!evaluation.ok) {
300
+ err(`[totem pr merge] BLOCKED: PR #${pr.number} title/body carries close-keyword-adjacent ` +
301
+ `issue ref(s) not authorized by a totem-close marker: ${evaluation.undeclared.join(', ')}.\n` +
302
+ 'GitHub auto-closes a linked issue from a PR title / squash body carrying this pattern ' +
303
+ '(even under negation).\n' +
304
+ 'Declare each INTENDED close with a `<!-- totem-close: #N -->` marker (or a `Totem-Close: #N` ' +
305
+ 'trailer) in the PR body — the sole authorizing channel — then re-run. Otherwise rephrase to ' +
306
+ 'a non-keyword form (references / see / tracks). NO merge attempted. mmnto-ai/totem#1762.\n');
307
+ return { exitCode: 1 };
308
+ }
309
+ if (opts.checkOnly) {
310
+ out(`[totem pr merge] --check-only PASS: merge-config posture conforms and PR #${pr.number} ` +
311
+ 'carries no undeclared close-keyword refs. No merge attempted.\n');
312
+ return { exitCode: 0 };
313
+ }
314
+ // ── Phase 2: merge — SQUASH-ONLY, NO body/subject flags, bound to repo + head ──
315
+ try {
316
+ gh(buildMergeArgv(pr.number, repo, pr.headRefOid));
317
+ // totem-context: intentional fail-closed exit-code boundary — a merge failure is surfaced LOUDLY (gh stderr passed through) and returns exit 1; not a silent swallow (Tenet 4).
318
+ }
319
+ catch (e) {
320
+ err(`[totem pr merge] \`gh pr merge --squash --match-head-commit\` failed: ${messageOf(e)}\n` +
321
+ 'If this was a head-mismatch (HEAD advanced since evaluation), re-run `totem pr merge` to ' +
322
+ 're-evaluate the new snapshot before merging. NO closes attempted.\n');
323
+ return { exitCode: 1 };
324
+ }
325
+ // Merge-queue semantics (codex B-5): a zero exit from `gh pr merge` may mean the
326
+ // PR was ADDED TO A QUEUE / auto-merge was ARMED, not that it landed. Re-read the
327
+ // state; only a MERGED PR proceeds to the merged message + declared-close phase.
328
+ let landingState;
329
+ try {
330
+ landingState = fetchMergeState(gh, pr.number, repo).state;
331
+ // totem-context: the merge already returned 0 (irreversible) — an inability to CONFIRM the landing state is surfaced LOUDLY via err() and we DEFER closes (conservative), never a silent swallow (Tenet 4).
332
+ }
333
+ catch (e) {
334
+ // The merge command already returned 0 (irreversible), but the landing-state read
335
+ // FAILED — we cannot confirm whether the PR actually merged. NEVER print the
336
+ // completed-merge line: that is a false all-actions-success signal (codex round-2
337
+ // BLOCKING — {exitCode: 0, closeCalls: 0} today masqueraded as a clean merge). Say
338
+ // UNCONFIRMED, and DEFER declared closes (closing against an unproven merge is worse).
339
+ const declaredRefs = parseDeclaredCloseIntent([pr.title, pr.body].join('\n'));
340
+ err(`[totem pr merge] merge command accepted for PR #${pr.number} but its landing state is ` +
341
+ `UNCONFIRMED (state read failed: ${messageOf(e)}). Confirm the merge actually landed before ` +
342
+ 'acting on it — do NOT assume it merged.\n');
343
+ if (opts.closeDeclared && declaredRefs.length > 0) {
344
+ // --close-declared was requested but NONE of the closes ran — a PARTIAL FAILURE,
345
+ // not a success. Exit non-zero, name the deferred targets, and give the VALID
346
+ // MANUAL close commands — NOT a `--close-declared` re-run path: the pre-merge
347
+ // guard rejects an already-MERGED PR (state !== OPEN) before the close phase, so
348
+ // re-running is impossible once the merge lands (automation must never read this
349
+ // as all-actions-success — codex round-2).
350
+ err(`[totem pr merge] ${declaredRefs.length} declared close(s) were NOT executed (landing ` +
351
+ 'state unconfirmed): ' +
352
+ declaredRefs.map((ref) => refLabel(ref)).join(', ') +
353
+ // NOT "re-run totem pr merge --close-declared": the pre-merge guard rejects an
354
+ // already-MERGED PR (state !== OPEN) before the close phase, so that path is
355
+ // impossible once the merge has landed. Give the valid manual commands only.
356
+ '. After confirming the merge landed, close the declared target(s) manually:\n' +
357
+ declaredRefs
358
+ .map((ref) => ` ${displayGhCommand(buildIssueCloseArgv(ref, pr.number, repo))}\n`)
359
+ .join(''));
360
+ return { exitCode: 1 };
361
+ }
362
+ if (declaredRefs.length > 0) {
363
+ // Parity with the merge-queue DEFER and default-print branches (CR B-only round):
364
+ // without the manual commands the operator has zero close guidance once they
365
+ // confirm the merge landed — the --close-declared re-run path is impossible then.
366
+ err('Once you confirm the merge landed, close the declared target(s) manually:\n' +
367
+ declaredRefs
368
+ .map((ref) => ` ${displayGhCommand(buildIssueCloseArgv(ref, pr.number, repo))}\n`)
369
+ .join(''));
370
+ }
371
+ // No --close-declared: exit 0 is acceptable — but the message above already stated
372
+ // the landing state is UNCONFIRMED (never "merged").
373
+ return { exitCode: 0 };
374
+ }
375
+ if (landingState !== 'MERGED') {
376
+ // Queued / auto-merge armed: the PR has not landed yet. Closing declared issues
377
+ // now would close them against an unmerged PR — DEFER them.
378
+ const declaredRefs = parseDeclaredCloseIntent([pr.title, pr.body].join('\n'));
379
+ out(`[totem pr merge] PR #${pr.number} is ${landingState}, not yet MERGED — a merge queue / ` +
380
+ 'auto-merge is in effect. The PR will land when its checks pass.\n' +
381
+ (declaredRefs.length > 0
382
+ ? 'Declared closes are DEFERRED until it lands. After it merges, run these to close them:\n' +
383
+ declaredRefs
384
+ .map((ref) => ` ${displayGhCommand(buildIssueCloseArgv(ref, pr.number, repo))}\n`)
385
+ .join('')
386
+ : ''));
387
+ return { exitCode: 0 };
388
+ }
389
+ out(`[totem pr merge] merged PR #${pr.number} (--squash).\n`);
390
+ // ── Phase 3: marker-declared closes (opt-in; default prints the commands) ──
391
+ const declaredRefs = parseDeclaredCloseIntent([pr.title, pr.body].join('\n'));
392
+ if (declaredRefs.length === 0) {
393
+ return { exitCode: 0 };
394
+ }
395
+ if (!opts.closeDeclared) {
396
+ out('[totem pr merge] marker-declared closes were NOT executed (default). Run these to close them:\n');
397
+ for (const ref of declaredRefs) {
398
+ out(` ${displayGhCommand(buildIssueCloseArgv(ref, pr.number, repo))}\n`);
399
+ }
400
+ return { exitCode: 0 };
401
+ }
402
+ // Continue through ALL declared targets (the merge is irreversible), but track
403
+ // failures: the final exit code is 1 when any requested close failed (codex B-4),
404
+ // so automation never gets a false all-actions-success signal.
405
+ const failed = [];
406
+ for (const ref of declaredRefs) {
407
+ try {
408
+ gh(buildIssueCloseArgv(ref, pr.number, repo));
409
+ out(`[totem pr merge] closed ${refLabel(ref)} (marker-declared).\n`);
410
+ // totem-context: the merge already landed (irreversible), so a per-issue close failure is annotated LOUDLY via err() and the loop continues — a post-merge cleanup sensor, not a silent swallow (Tenet 4).
411
+ }
412
+ catch (e) {
413
+ // The merge already landed (irreversible), so a close failure is annotated
414
+ // loudly and the loop continues — the merge is the primary act.
415
+ failed.push(refLabel(ref));
416
+ err(`[totem pr merge] could NOT close ${refLabel(ref)}: ${messageOf(e)} — ` +
417
+ 'close it manually (the merge already landed).\n');
418
+ }
419
+ }
420
+ if (failed.length > 0) {
421
+ err(`[totem pr merge] ${failed.length} declared close(s) FAILED: ${failed.join(', ')}. ` +
422
+ 'The merge landed; close the listed target(s) manually. Exiting non-zero.\n');
423
+ return { exitCode: 1 };
424
+ }
425
+ return { exitCode: 0 };
426
+ }
427
+ //# sourceMappingURL=pr.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pr.js","sourceRoot":"","sources":["../../src/commands/pr.ts"],"names":[],"mappings":"AAAA,gFAAgF;AAChF,EAAE;AACF,wEAAwE;AACxE,8EAA8E;AAC9E,4EAA4E;AAC5E,8DAA8D;AAC9D,+BAA+B;AAC/B,kFAAkF;AAClF,4EAA4E;AAC5E,yEAAyE;AACzE,mCAAmC;AACnC,8EAA8E;AAC9E,kFAAkF;AAClF,4EAA4E;AAC5E,gFAAgF;AAChF,gFAAgF;AAChF,+EAA+E;AAC/E,8EAA8E;AAC9E,gEAAgE;AAChE,EAAE;AACF,gFAAgF;AAChF,+EAA+E;AAC/E,8EAA8E;AAC9E,8EAA8E;AAC9E,iFAAiF;AACjF,6EAA6E;AAC7E,kFAAkF;AAClF,6BAA6B;AAC7B,EAAE;AACF,iFAAiF;AACjF,+EAA+E;AAC/E,mFAAmF;AACnF,kFAAkF;AAClF,+EAA+E;AAC/E,yBAAyB;AAEzB,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,uRAAuR;AACvR,OAAO,EAEL,0BAA0B,EAE1B,wBAAwB,EACxB,QAAQ,EACR,YAAY,EACZ,UAAU,GACX,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAqB5C,gFAAgF;AAEhF;;;;GAIG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,CAAC,MAAM,CAAC;IACnC,KAAK,EAAE,CAAC,CAAC,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