@xdevops/issue-auto-finish 1.0.61 → 1.0.63

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 (49) hide show
  1. package/dist/{LockNote-53KFIXKS.js → LockNote-6EWVEN4I.js} +3 -3
  2. package/dist/{braindump-JZ2CJC2I.js → braindump-WKX3CMLK.js} +4 -4
  3. package/dist/{chunk-ZBBKZIEX.js → chunk-AO5N7MEE.js} +1 -1
  4. package/dist/{chunk-LMTBPYF7.js → chunk-CSXGQXW5.js} +17 -12
  5. package/dist/chunk-CSXGQXW5.js.map +1 -0
  6. package/dist/{chunk-SH5RIZIS.js → chunk-DV56JSEN.js} +2 -2
  7. package/dist/{chunk-MEDXZ5JM.js → chunk-EB6TGE3H.js} +7 -1
  8. package/dist/chunk-EB6TGE3H.js.map +1 -0
  9. package/dist/{chunk-BXCTN44G.js → chunk-IUEPATAP.js} +132 -26
  10. package/dist/chunk-IUEPATAP.js.map +1 -0
  11. package/dist/{chunk-WBHUOIEV.js → chunk-PKJJWSEZ.js} +2 -2
  12. package/dist/{chunk-NKJGLRZS.js → chunk-QES5SSLV.js} +2 -2
  13. package/dist/{chunk-6Q7ITCA4.js → chunk-XAJ7ZZGA.js} +2 -2
  14. package/dist/{chunk-UBRYQRTJ.js → chunk-YRPHDIBG.js} +2 -2
  15. package/dist/cli.js +5 -5
  16. package/dist/coordination/IssueClaimer.d.ts +4 -0
  17. package/dist/coordination/IssueClaimer.d.ts.map +1 -1
  18. package/dist/{doctor-TRERBG3Q.js → doctor-5ITA6CG7.js} +3 -3
  19. package/dist/i18n/locales/en.d.ts.map +1 -1
  20. package/dist/i18n/locales/zh-CN.d.ts.map +1 -1
  21. package/dist/index.js +8 -8
  22. package/dist/{init-USNTJBIC.js → init-YOPQN6EZ.js} +4 -4
  23. package/dist/lib.js +3 -3
  24. package/dist/persistence/PlanPersistence.d.ts +5 -1
  25. package/dist/persistence/PlanPersistence.d.ts.map +1 -1
  26. package/dist/phases/BasePhase.d.ts +10 -0
  27. package/dist/phases/BasePhase.d.ts.map +1 -1
  28. package/dist/poller/IssuePoller.d.ts.map +1 -1
  29. package/dist/{restart-EPG3LNYV.js → restart-TYMFRGEW.js} +2 -2
  30. package/dist/run.js +8 -8
  31. package/dist/{start-3C6YJKDF.js → start-VA36CYSJ.js} +2 -2
  32. package/dist/tracker/IssueState.d.ts +2 -0
  33. package/dist/tracker/IssueState.d.ts.map +1 -1
  34. package/package.json +1 -1
  35. package/dist/chunk-BXCTN44G.js.map +0 -1
  36. package/dist/chunk-LMTBPYF7.js.map +0 -1
  37. package/dist/chunk-MEDXZ5JM.js.map +0 -1
  38. /package/dist/{LockNote-53KFIXKS.js.map → LockNote-6EWVEN4I.js.map} +0 -0
  39. /package/dist/{braindump-JZ2CJC2I.js.map → braindump-WKX3CMLK.js.map} +0 -0
  40. /package/dist/{chunk-ZBBKZIEX.js.map → chunk-AO5N7MEE.js.map} +0 -0
  41. /package/dist/{chunk-SH5RIZIS.js.map → chunk-DV56JSEN.js.map} +0 -0
  42. /package/dist/{chunk-WBHUOIEV.js.map → chunk-PKJJWSEZ.js.map} +0 -0
  43. /package/dist/{chunk-NKJGLRZS.js.map → chunk-QES5SSLV.js.map} +0 -0
  44. /package/dist/{chunk-6Q7ITCA4.js.map → chunk-XAJ7ZZGA.js.map} +0 -0
  45. /package/dist/{chunk-UBRYQRTJ.js.map → chunk-YRPHDIBG.js.map} +0 -0
  46. /package/dist/{doctor-TRERBG3Q.js.map → doctor-5ITA6CG7.js.map} +0 -0
  47. /package/dist/{init-USNTJBIC.js.map → init-YOPQN6EZ.js.map} +0 -0
  48. /package/dist/{restart-EPG3LNYV.js.map → restart-TYMFRGEW.js.map} +0 -0
  49. /package/dist/{start-3C6YJKDF.js.map → start-VA36CYSJ.js.map} +0 -0
@@ -5,8 +5,8 @@ import {
5
5
  findLockNote,
6
6
  isLockStale,
7
7
  parseLockNote
8
- } from "./chunk-UBRYQRTJ.js";
9
- import "./chunk-MEDXZ5JM.js";
8
+ } from "./chunk-YRPHDIBG.js";
9
+ import "./chunk-EB6TGE3H.js";
10
10
  export {
11
11
  buildLockNoteBody,
12
12
  buildReleaseNoteBody,
@@ -15,4 +15,4 @@ export {
15
15
  isLockStale,
16
16
  parseLockNote
17
17
  };
18
- //# sourceMappingURL=LockNote-53KFIXKS.js.map
18
+ //# sourceMappingURL=LockNote-6EWVEN4I.js.map
@@ -9,13 +9,13 @@ import {
9
9
  import {
10
10
  BraindumpOrchestrator,
11
11
  BraindumpTracker
12
- } from "./chunk-NKJGLRZS.js";
12
+ } from "./chunk-QES5SSLV.js";
13
13
  import {
14
14
  AsyncMutex,
15
15
  GitOperations
16
- } from "./chunk-SH5RIZIS.js";
16
+ } from "./chunk-DV56JSEN.js";
17
17
  import "./chunk-ACVOOHAR.js";
18
- import "./chunk-MEDXZ5JM.js";
18
+ import "./chunk-EB6TGE3H.js";
19
19
  import {
20
20
  loadConfig
21
21
  } from "./chunk-4D5GYH4P.js";
@@ -204,4 +204,4 @@ ${bold("\u786E\u8BA4\u6267\u884C\uFF1F")} (${green("y")}=\u786E\u8BA4 / ${red("q
204
204
  export {
205
205
  braindumpCommand
206
206
  };
207
- //# sourceMappingURL=braindump-JZ2CJC2I.js.map
207
+ //# sourceMappingURL=braindump-WKX3CMLK.js.map
@@ -89,4 +89,4 @@ async function startDaemon(configPath) {
89
89
  export {
90
90
  startCommand
91
91
  };
92
- //# sourceMappingURL=chunk-ZBBKZIEX.js.map
92
+ //# sourceMappingURL=chunk-AO5N7MEE.js.map
@@ -1,16 +1,16 @@
1
1
  import {
2
2
  BraindumpOrchestrator,
3
3
  BraindumpTracker
4
- } from "./chunk-NKJGLRZS.js";
4
+ } from "./chunk-QES5SSLV.js";
5
5
  import {
6
6
  createSetupRouter
7
- } from "./chunk-WBHUOIEV.js";
7
+ } from "./chunk-PKJJWSEZ.js";
8
8
  import {
9
9
  buildLockNoteBody,
10
10
  buildReleaseNoteBody,
11
11
  findAllLockNotes,
12
12
  findLockNote
13
- } from "./chunk-UBRYQRTJ.js";
13
+ } from "./chunk-YRPHDIBG.js";
14
14
  import {
15
15
  BrainstormService,
16
16
  GongfengClient,
@@ -29,7 +29,7 @@ import {
29
29
  setE2eOverride,
30
30
  setNoteSyncOverride,
31
31
  validatePhaseRegistry
32
- } from "./chunk-BXCTN44G.js";
32
+ } from "./chunk-IUEPATAP.js";
33
33
  import {
34
34
  AsyncMutex,
35
35
  BaseTracker,
@@ -38,7 +38,7 @@ import {
38
38
  getExternalId,
39
39
  getIid,
40
40
  getTitle
41
- } from "./chunk-SH5RIZIS.js";
41
+ } from "./chunk-DV56JSEN.js";
42
42
  import {
43
43
  IwikiImporter,
44
44
  getProjectKnowledge,
@@ -47,7 +47,7 @@ import {
47
47
  import {
48
48
  setLocale,
49
49
  t
50
- } from "./chunk-MEDXZ5JM.js";
50
+ } from "./chunk-EB6TGE3H.js";
51
51
  import {
52
52
  loadConfig,
53
53
  reloadConfig,
@@ -338,7 +338,12 @@ var IssuePoller = class {
338
338
  const isRetry = record.state === "failed" /* Failed */;
339
339
  const result = await this.claimer.tryClaim(issue, notes, { isRetry });
340
340
  if (!result.success) {
341
- logger3.info("Could not claim issue, skipping", { iid });
341
+ if (result.reason === "locked_by_other" || result.reason === "cas_lost") {
342
+ logger3.info("Claim failed (another node owns it), marking as skipped", { iid, reason: result.reason });
343
+ this.tracker.updateState(iid, "skipped" /* Skipped */);
344
+ } else {
345
+ logger3.info("Claim failed with transient error, will retry next cycle", { iid });
346
+ }
342
347
  return;
343
348
  }
344
349
  }
@@ -449,7 +454,7 @@ var IssueClaimer = class {
449
454
  iid,
450
455
  holder: existingLock.payload.nodeId
451
456
  });
452
- return { success: false };
457
+ return { success: false, reason: "locked_by_other" };
453
458
  }
454
459
  const visibleMessage = options?.isRetry ? t("lock.retryMessage") : t("lock.startMessage");
455
460
  const lockBody = buildLockNoteBody(
@@ -484,10 +489,10 @@ var IssueClaimer = class {
484
489
  winnerNode: winner.payload.nodeId
485
490
  });
486
491
  await this.safeDeleteNote(issueId, myNote.id);
487
- return { success: false };
492
+ return { success: false, reason: "cas_lost" };
488
493
  } catch (err) {
489
494
  logger4.error("Claim failed with error", { iid, error: err.message });
490
- return { success: false };
495
+ return { success: false, reason: "error" };
491
496
  }
492
497
  }
493
498
  /**
@@ -1474,7 +1479,7 @@ data: ${JSON.stringify({ time: (/* @__PURE__ */ new Date()).toISOString() })}
1474
1479
  const issueId = getExternalId(record);
1475
1480
  const iid = getIid(record);
1476
1481
  const notes = await gongfeng.listIssueNotes(issueId);
1477
- const { findLockNote: findLockNote2 } = await import("./LockNote-53KFIXKS.js");
1482
+ const { findLockNote: findLockNote2 } = await import("./LockNote-6EWVEN4I.js");
1478
1483
  const existingLock = findLockNote2(notes);
1479
1484
  if (!existingLock) {
1480
1485
  const result = await claimer.tryClaim(
@@ -8286,4 +8291,4 @@ function migrateKnowledgeDir(srcDir, destDir) {
8286
8291
  export {
8287
8292
  main
8288
8293
  };
8289
- //# sourceMappingURL=chunk-LMTBPYF7.js.map
8294
+ //# sourceMappingURL=chunk-CSXGQXW5.js.map