looply-cli 0.5.53 → 0.5.54

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 (79) hide show
  1. package/dist/branch-delivery-wiring.d.ts +23 -0
  2. package/dist/branch-delivery-wiring.d.ts.map +1 -1
  3. package/dist/branch-delivery-wiring.js +189 -38
  4. package/dist/branch-delivery-wiring.js.map +1 -1
  5. package/dist/branch-delivery.d.ts +10 -0
  6. package/dist/branch-delivery.d.ts.map +1 -1
  7. package/dist/branch-delivery.js +39 -5
  8. package/dist/branch-delivery.js.map +1 -1
  9. package/dist/bug-repro.d.ts +23 -2
  10. package/dist/bug-repro.d.ts.map +1 -1
  11. package/dist/bug-repro.js +38 -3
  12. package/dist/bug-repro.js.map +1 -1
  13. package/dist/daemon-cmd.d.ts.map +1 -1
  14. package/dist/daemon-cmd.js +51 -0
  15. package/dist/daemon-cmd.js.map +1 -1
  16. package/dist/earlier-answers-cache.d.ts +71 -0
  17. package/dist/earlier-answers-cache.d.ts.map +1 -0
  18. package/dist/earlier-answers-cache.js +253 -0
  19. package/dist/earlier-answers-cache.js.map +1 -0
  20. package/dist/failing-checks-tick.d.ts +158 -0
  21. package/dist/failing-checks-tick.d.ts.map +1 -0
  22. package/dist/failing-checks-tick.js +313 -0
  23. package/dist/failing-checks-tick.js.map +1 -0
  24. package/dist/feature-report.d.ts +2 -0
  25. package/dist/feature-report.d.ts.map +1 -1
  26. package/dist/feature-report.js +19 -5
  27. package/dist/feature-report.js.map +1 -1
  28. package/dist/gate-health.d.ts +8 -0
  29. package/dist/gate-health.d.ts.map +1 -1
  30. package/dist/gate-health.js +13 -0
  31. package/dist/gate-health.js.map +1 -1
  32. package/dist/goal-adaptive.d.ts +21 -1
  33. package/dist/goal-adaptive.d.ts.map +1 -1
  34. package/dist/goal-adaptive.js +55 -8
  35. package/dist/goal-adaptive.js.map +1 -1
  36. package/dist/goal-gap.d.ts +17 -4
  37. package/dist/goal-gap.d.ts.map +1 -1
  38. package/dist/goal-gap.js +25 -7
  39. package/dist/goal-gap.js.map +1 -1
  40. package/dist/project-memory-store.d.ts +7 -0
  41. package/dist/project-memory-store.d.ts.map +1 -1
  42. package/dist/project-memory-store.js +31 -1
  43. package/dist/project-memory-store.js.map +1 -1
  44. package/dist/project-terminal.d.ts +1 -0
  45. package/dist/project-terminal.d.ts.map +1 -1
  46. package/dist/project-terminal.js +14 -2
  47. package/dist/project-terminal.js.map +1 -1
  48. package/dist/run-cmd.d.ts.map +1 -1
  49. package/dist/run-cmd.js +52 -5
  50. package/dist/run-cmd.js.map +1 -1
  51. package/dist/run-refusal-marks.d.ts +12 -0
  52. package/dist/run-refusal-marks.d.ts.map +1 -1
  53. package/dist/run-refusal-marks.js +22 -3
  54. package/dist/run-refusal-marks.js.map +1 -1
  55. package/dist/server-client.d.ts +32 -0
  56. package/dist/server-client.d.ts.map +1 -1
  57. package/dist/server-client.js +26 -0
  58. package/dist/server-client.js.map +1 -1
  59. package/dist/setup-check.d.ts +39 -1
  60. package/dist/setup-check.d.ts.map +1 -1
  61. package/dist/setup-check.js +73 -1
  62. package/dist/setup-check.js.map +1 -1
  63. package/dist/visual-proof-browser.d.ts +6 -0
  64. package/dist/visual-proof-browser.d.ts.map +1 -1
  65. package/dist/visual-proof-browser.js +16 -0
  66. package/dist/visual-proof-browser.js.map +1 -1
  67. package/dist/visual-proof-config.d.ts +10 -1
  68. package/dist/visual-proof-config.d.ts.map +1 -1
  69. package/dist/visual-proof-config.js +20 -2
  70. package/dist/visual-proof-config.js.map +1 -1
  71. package/dist/visual-proof-detect.d.ts +45 -3
  72. package/dist/visual-proof-detect.d.ts.map +1 -1
  73. package/dist/visual-proof-detect.js +60 -3
  74. package/dist/visual-proof-detect.js.map +1 -1
  75. package/dist/visual-proof-run.d.ts +8 -0
  76. package/dist/visual-proof-run.d.ts.map +1 -1
  77. package/dist/visual-proof-run.js +16 -6
  78. package/dist/visual-proof-run.js.map +1 -1
  79. package/package.json +2 -2
@@ -13,6 +13,7 @@ exports.partsLine = partsLine;
13
13
  exports.summarizeChanges = summarizeChanges;
14
14
  exports.conflictFilesOf = conflictFilesOf;
15
15
  exports.deliveryConflictOf = deliveryConflictOf;
16
+ exports.reportOf = reportOf;
16
17
  exports.deliveryStall = deliveryStall;
17
18
  exports.pullTitle = pullTitle;
18
19
  exports.maintenanceSection = maintenanceSection;
@@ -458,6 +459,8 @@ function reportOf(e) {
458
459
  ...(e.changes ? { changes: e.changes } : {}),
459
460
  ...(e.reproduction ? { reproduction: e.reproduction } : {}),
460
461
  ...(conflict === null ? {} : { conflict }),
462
+ // A split part's release order, as data: AutoRyn ships the repositories in it, one after another.
463
+ ...(e.releaseOrder && e.releaseOrder.length > 1 ? { releaseOrder: [...e.releaseOrder] } : {}),
461
464
  };
462
465
  }
463
466
  /**
@@ -510,6 +513,20 @@ function pullTitle(goalText) {
510
513
  * changelog and advisory links, the build note, and why Looply will not merge it.
511
514
  */
512
515
  function maintenanceSection(m) {
516
+ if (m.kind === 'failing-checks' && m.failingChecks) {
517
+ const f = m.failingChecks;
518
+ const on = f.branch ?? 'the base branch';
519
+ const out = [`### Checks failing on ${on}: "${f.step}" (since ${f.since.slice(0, 10)}, last seen on ${f.baseSha.slice(0, 7)})`];
520
+ if (f.tests.length > 0) {
521
+ out.push('', 'Failing test files on the unchanged base:');
522
+ for (const t of f.tests)
523
+ out.push(`- \`${t}\``);
524
+ if (f.testCount > f.tests.length)
525
+ out.push(`- and ${f.testCount - f.tests.length} more`);
526
+ }
527
+ out.push('', `🔒 Looply opened this itself after ${f.checks} base checks in a row found these failures. A person reviews and merges the fix.`);
528
+ return out;
529
+ }
513
530
  const kind = m.kind === 'upgrade' ? 'dependency upgrade' : m.kind === 'security' ? 'security fixes' : 'unused dependencies and dead code';
514
531
  const out = [`### Scheduled maintenance: ${kind} (${m.week}, ${m.root === '.' ? 'repository root' : m.root}, ${m.packageManager})`];
515
532
  if (m.packages.length > 0) {
@@ -628,6 +645,7 @@ async function deliverOnce(deps, input) {
628
645
  ...(input.clientRef ? { clientRef: input.clientRef } : {}),
629
646
  ...(input.late === true ? { late: true } : {}),
630
647
  ...(input.parts ? { parts: input.parts.map((p) => ({ ...p })) } : {}),
648
+ ...(input.releaseOrder && input.releaseOrder.length > 0 ? { releaseOrder: [...input.releaseOrder] } : {}),
631
649
  state: 'not-pushed',
632
650
  note: null,
633
651
  dependsOn: null,
@@ -758,6 +776,8 @@ async function deliverOnce(deps, input) {
758
776
  const couldNot = plan.kind === 'stacked' && plan.because !== null ? `Looply could not rebuild it without that work (${plan.because})` : null;
759
777
  let pull = await api.findPull(branch);
760
778
  let replacedOwn = null;
779
+ // The red pull request this fix-up replaces, closed only once the server has accepted the fix-up (below).
780
+ let toReplace = null;
761
781
  if (pull === null || (pull.state === 'closed' && !pull.merged)) {
762
782
  const stackedPull = stack !== null && stack.onOrigin ? await api.findPull(stack.branch).catch(() => null) : null;
763
783
  try {
@@ -783,10 +803,8 @@ async function deliverOnce(deps, input) {
783
803
  }),
784
804
  });
785
805
  deps.log(`deliver : opened ${pull.url} (${branch} → ${prBase})`);
786
- if (replacing !== null) {
787
- await api.closePull(replacing.pullNumber, `Replaced by ${pull.url}, which contains this work and its fix.`).catch(() => undefined);
788
- await save(deps, { ...replacing, done: true, note: `replaced by ${pull.url}`, updatedAt: at });
789
- }
806
+ if (replacing !== null)
807
+ toReplace = replacing;
790
808
  // `--rebuild`: the old pull request of this goal's stacked branch is closed, pointing here.
791
809
  if (input.replace === true && rebuilt !== null && prior !== null && prior.pullNumber !== null && prior.branch === original.name && prior.pullRequestUrl !== pull.url) {
792
810
  const old = await api.getPull(prior.pullNumber).catch(() => null);
@@ -831,7 +849,7 @@ async function deliverOnce(deps, input) {
831
849
  const changes = deps.git.changeSummary === undefined
832
850
  ? null
833
851
  : await deps.git.freshBase(pull.base || prBase).then((b) => deps.git.changeSummary(b, entry.sha)).catch(() => null);
834
- return save(deps, {
852
+ const saved = await save(deps, {
835
853
  ...entry,
836
854
  ...(changes === null ? {} : { changes }),
837
855
  ...(inheritsHold ? { mode: 'pr', noAutoMerge: true } : {}),
@@ -842,6 +860,22 @@ async function deliverOnce(deps, input) {
842
860
  note: modeNote === null ? note : note === null ? modeNote : `${note}; ${modeNote}`.slice(0, 600),
843
861
  ...(absorbs.length > 0 ? { absorbs } : {}),
844
862
  });
863
+ /**
864
+ * 🔴 THE RED ONE IS CLOSED ONLY AFTER THE SERVER ACCEPTED ITS REPLACEMENT (review, 2026-11-17). Closed as the fix-up
865
+ * opened, a fix-up the server then answered `unwanted` (its goal given up meanwhile) was closed as a stray right
866
+ * after — and neither pull request was open: the dependency's work went down with it. So the save above reports the
867
+ * fix-up first; only when nobody refused it is the red one closed, pointing at it.
868
+ */
869
+ if (toReplace !== null) {
870
+ if (deps.unwanted?.(input.goalId) === true) {
871
+ deps.log(`deliver : ${input.goalId}: ${pull.url} is not wanted, so ${toReplace.pullRequestUrl} is left open (not replaced)`);
872
+ }
873
+ else {
874
+ await api.closePull(toReplace.pullNumber, `Replaced by ${pull.url}, which contains this work and its fix.`).catch(() => undefined);
875
+ await save(deps, { ...toReplace, done: true, note: `replaced by ${pull.url}`, updatedAt: at });
876
+ }
877
+ }
878
+ return saved;
845
879
  }
846
880
  /**
847
881
  * Decide — and, when it is the answer, do — the rebuild of a branch that carries other goals'