looply-cli 0.5.39 → 0.5.43

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 (98) hide show
  1. package/dist/account-standing.d.ts +23 -0
  2. package/dist/account-standing.d.ts.map +1 -0
  3. package/dist/account-standing.js +41 -0
  4. package/dist/account-standing.js.map +1 -0
  5. package/dist/bin.d.ts.map +1 -1
  6. package/dist/bin.js +1 -0
  7. package/dist/bin.js.map +1 -1
  8. package/dist/branch-delivery-wiring.d.ts +19 -0
  9. package/dist/branch-delivery-wiring.d.ts.map +1 -1
  10. package/dist/branch-delivery-wiring.js +49 -26
  11. package/dist/branch-delivery-wiring.js.map +1 -1
  12. package/dist/checkout-deps.d.ts +6 -0
  13. package/dist/checkout-deps.d.ts.map +1 -1
  14. package/dist/checkout-deps.js +11 -0
  15. package/dist/checkout-deps.js.map +1 -1
  16. package/dist/checkout-leftovers.d.ts.map +1 -1
  17. package/dist/checkout-leftovers.js +28 -21
  18. package/dist/checkout-leftovers.js.map +1 -1
  19. package/dist/daemon-cmd.d.ts.map +1 -1
  20. package/dist/daemon-cmd.js +51 -1
  21. package/dist/daemon-cmd.js.map +1 -1
  22. package/dist/feature-report.d.ts.map +1 -1
  23. package/dist/feature-report.js +27 -4
  24. package/dist/feature-report.js.map +1 -1
  25. package/dist/gate-health.d.ts +7 -0
  26. package/dist/gate-health.d.ts.map +1 -1
  27. package/dist/gate-health.js +11 -1
  28. package/dist/gate-health.js.map +1 -1
  29. package/dist/goal-compile.d.ts.map +1 -1
  30. package/dist/goal-compile.js +3 -0
  31. package/dist/goal-compile.js.map +1 -1
  32. package/dist/goal-gap.d.ts +22 -1
  33. package/dist/goal-gap.d.ts.map +1 -1
  34. package/dist/goal-gap.js +65 -6
  35. package/dist/goal-gap.js.map +1 -1
  36. package/dist/grant-waiting-wiring.d.ts +16 -1
  37. package/dist/grant-waiting-wiring.d.ts.map +1 -1
  38. package/dist/grant-waiting-wiring.js +27 -1
  39. package/dist/grant-waiting-wiring.js.map +1 -1
  40. package/dist/heroku-cli.d.ts +13 -1
  41. package/dist/heroku-cli.d.ts.map +1 -1
  42. package/dist/heroku-cli.js +15 -0
  43. package/dist/heroku-cli.js.map +1 -1
  44. package/dist/machine-settings.d.ts +7 -0
  45. package/dist/machine-settings.d.ts.map +1 -1
  46. package/dist/machine-settings.js +27 -0
  47. package/dist/machine-settings.js.map +1 -1
  48. package/dist/provider-accounts.d.ts +5 -1
  49. package/dist/provider-accounts.d.ts.map +1 -1
  50. package/dist/provider-accounts.js +1 -0
  51. package/dist/provider-accounts.js.map +1 -1
  52. package/dist/qa-feedback.d.ts +110 -0
  53. package/dist/qa-feedback.d.ts.map +1 -0
  54. package/dist/qa-feedback.js +353 -0
  55. package/dist/qa-feedback.js.map +1 -0
  56. package/dist/run-cmd.d.ts.map +1 -1
  57. package/dist/run-cmd.js +43 -6
  58. package/dist/run-cmd.js.map +1 -1
  59. package/dist/self-update.d.ts +440 -0
  60. package/dist/self-update.d.ts.map +1 -0
  61. package/dist/self-update.js +1006 -0
  62. package/dist/self-update.js.map +1 -0
  63. package/dist/serve-cmd.d.ts +32 -1
  64. package/dist/serve-cmd.d.ts.map +1 -1
  65. package/dist/serve-cmd.js +162 -7
  66. package/dist/serve-cmd.js.map +1 -1
  67. package/dist/serve.d.ts.map +1 -1
  68. package/dist/serve.js +3 -0
  69. package/dist/serve.js.map +1 -1
  70. package/dist/server-client.d.ts +6 -0
  71. package/dist/server-client.d.ts.map +1 -1
  72. package/dist/server-client.js +4 -0
  73. package/dist/server-client.js.map +1 -1
  74. package/dist/setup-check-wiring.d.ts +31 -0
  75. package/dist/setup-check-wiring.d.ts.map +1 -0
  76. package/dist/setup-check-wiring.js +195 -0
  77. package/dist/setup-check-wiring.js.map +1 -0
  78. package/dist/setup-check.d.ts +222 -0
  79. package/dist/setup-check.d.ts.map +1 -0
  80. package/dist/setup-check.js +620 -0
  81. package/dist/setup-check.js.map +1 -0
  82. package/dist/signals.d.ts +13 -0
  83. package/dist/signals.d.ts.map +1 -1
  84. package/dist/signals.js +26 -1
  85. package/dist/signals.js.map +1 -1
  86. package/dist/ticket-attachments.d.ts +31 -1
  87. package/dist/ticket-attachments.d.ts.map +1 -1
  88. package/dist/ticket-attachments.js +232 -9
  89. package/dist/ticket-attachments.js.map +1 -1
  90. package/dist/watchdog-wiring.d.ts +40 -0
  91. package/dist/watchdog-wiring.d.ts.map +1 -0
  92. package/dist/watchdog-wiring.js +108 -0
  93. package/dist/watchdog-wiring.js.map +1 -0
  94. package/dist/watchdog.d.ts +107 -0
  95. package/dist/watchdog.d.ts.map +1 -0
  96. package/dist/watchdog.js +424 -0
  97. package/dist/watchdog.js.map +1 -0
  98. package/package.json +4 -4
package/dist/run-cmd.js CHANGED
@@ -78,6 +78,7 @@ const branch_replay_1 = require("./branch-replay");
78
78
  const run_base_2 = require("./run-base");
79
79
  const round_records_1 = require("./round-records");
80
80
  const goal_gap_1 = require("./goal-gap");
81
+ const qa_feedback_1 = require("./qa-feedback");
81
82
  const adaptive_budget_1 = require("./adaptive-budget");
82
83
  const visual_proof_run_1 = require("./visual-proof-run");
83
84
  const bug_repro_1 = require("./bug-repro");
@@ -3527,7 +3528,24 @@ async function runLoop(opts) {
3527
3528
  // A reproduced bug is met only when its test passes at this tree, run by the machine (`bug-repro.ts`).
3528
3529
  // The ticket's images are named to the check too (LOO-B-2).
3529
3530
  const seen = { ...i, goalText: (0, ticket_attachments_1.withAttachments)(i.goalText, cwd, `${bound.id}@${bound.version}`) };
3530
- const gap = await (0, goal_gap_1.evaluateGoalGap)(screenshots.length > 0 ? { ...seen, screenshots } : seen, { invoke: planAgent, timeoutMs: adaptiveBudget.checkMs });
3531
+ /**
3532
+ * A SEND-BACK'S PROOFS are checked against this work's own changes (`qa-feedback.ts`): the files changed
3533
+ * from the merge base with the base branch to HEAD, read at this tree. Read only for a send-back; null
3534
+ * when the base or the diff could not be read (then a cited file must at least exist and hold the line).
3535
+ */
3536
+ const qaProof = (0, qa_feedback_1.qaFeedbackOf)(bound.text) === null
3537
+ ? undefined
3538
+ : {
3539
+ changedFiles: await (async () => {
3540
+ const base = (await (0, run_base_2.resolveBaseBranch)(git, config.run.baseBranch).catch(() => null))?.ref ?? null;
3541
+ const head = await git.headSha().catch(() => null);
3542
+ const from = base === null || head === null ? null : await git.mergeBase(base, head);
3543
+ return from === null || head === null ? null : await git.changedPathsBetween(from, head).catch(() => null);
3544
+ })(),
3545
+ readFile: (0, bug_repro_1.checkoutReader)(cwd),
3546
+ };
3547
+ const proofDeps = qaProof === undefined ? {} : { qaProof };
3548
+ const gap = await (0, goal_gap_1.evaluateGoalGap)(screenshots.length > 0 ? { ...seen, screenshots } : seen, Object.assign(proofDeps, { invoke: planAgent, timeoutMs: adaptiveBudget.checkMs }));
3531
3549
  if (!gap.ok && gap.timedOut === true)
3532
3550
  checkTimedOut = true;
3533
3551
  return (0, bug_repro_1.evaluateWithReproduction)(gap, reproFor(goalId, bound.version), {
@@ -4485,11 +4503,20 @@ async function runLoop(opts) {
4485
4503
  let record;
4486
4504
  try {
4487
4505
  const treeSha = await git.headTreeSha();
4488
- const key = (0, gate_health_1.baseHealthKey)(treeSha, steps, daemon_cmd_1.CLI_VERSION);
4506
+ /**
4507
+ * 🔴 THE INSTALLED VERSION, NOT `CLI_VERSION` (a constant '0.1.0' that never moves): keyed on that,
4508
+ * a new Looply reused the old one's answer — the very thing the version in the key is for.
4509
+ * The setup check (`setup-check.ts`) keys its record the same way, so the first goal reuses it.
4510
+ */
4511
+ const key = (0, gate_health_1.baseHealthKey)(treeSha, steps, (0, daemon_cmd_1.installedCliVersion)());
4489
4512
  record = (0, gate_health_1.readBaseHealth)(projectStateDirPath);
4490
- // Dependencies installed this run: what any earlier check of this base said was said without them.
4491
- if (!depsInstalled && (0, gate_health_1.reusable)(record, key, Date.now())) {
4492
- log(`base : the checks on this base were ${record.state} at ${record.checkedAt}`);
4513
+ /**
4514
+ * Dependencies installed this run: what an earlier check of this base said was said without them —
4515
+ * unless it, too, ran with them installed AND found the base healthy (the setup check's throwaway
4516
+ * checkout does). A quarantined or red answer is never carried across an install: this run decides.
4517
+ */
4518
+ if ((!depsInstalled || (record?.withDependencies === true && record.state === 'healthy')) && (0, gate_health_1.reusable)(record, key, Date.now())) {
4519
+ log(`base : the checks on this base were ${record.state} at ${record.checkedAt}${record.by === 'setup' ? ' (checked when the repository was set up)' : ''}`);
4493
4520
  }
4494
4521
  else {
4495
4522
  log('base : running the checks on the unchanged base before the first round');
@@ -4506,7 +4533,17 @@ async function runLoop(opts) {
4506
4533
  log(`base : the full output of the red "${step}" run is kept at ${at}`);
4507
4534
  },
4508
4535
  });
4509
- record = { version: 1, key, treeSha, baseSha: await git.headSha(), checkedAt: new Date().toISOString(), state: checked.state, steps: checked.steps };
4536
+ record = {
4537
+ version: 1,
4538
+ key,
4539
+ treeSha,
4540
+ baseSha: await git.headSha(),
4541
+ checkedAt: new Date().toISOString(),
4542
+ state: checked.state,
4543
+ steps: checked.steps,
4544
+ ...(depsInstalled ? { withDependencies: true } : {}),
4545
+ by: 'run',
4546
+ };
4510
4547
  try {
4511
4548
  (0, gate_health_1.writeBaseHealth)(projectStateDirPath, record);
4512
4549
  }