@mestreyoda/fabrica 0.2.35 → 0.2.36

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 (2) hide show
  1. package/dist/index.js +28 -4
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -113905,8 +113905,8 @@ import fsSync from "node:fs";
113905
113905
  import path5 from "node:path";
113906
113906
  import { fileURLToPath as fileURLToPath3 } from "node:url";
113907
113907
  function getCurrentVersion() {
113908
- if ("0.2.35") {
113909
- return "0.2.35";
113908
+ if ("0.2.36") {
113909
+ return "0.2.36";
113910
113910
  }
113911
113911
  try {
113912
113912
  const pkgPath = path5.join(THIS_DIR, "..", "..", "package.json");
@@ -131742,9 +131742,18 @@ async function defaultValidateDeveloperDone(opts) {
131742
131742
  );
131743
131743
  return { ok: true, prStatus };
131744
131744
  } catch (error48) {
131745
+ let prStatus;
131746
+ try {
131747
+ const fallbackPr = await opts.provider.getPrStatus(opts.issueId);
131748
+ if (fallbackPr.url && fallbackPr.state !== "merged" && fallbackPr.state !== "closed") {
131749
+ prStatus = fallbackPr;
131750
+ }
131751
+ } catch {
131752
+ }
131745
131753
  return {
131746
131754
  ok: false,
131747
- reason: error48 instanceof Error ? error48.message : "developer_validation_failed"
131755
+ reason: error48 instanceof Error ? error48.message : "developer_validation_failed",
131756
+ prStatus
131748
131757
  };
131749
131758
  }
131750
131759
  }
@@ -131836,9 +131845,24 @@ async function applyWorkerResult(opts) {
131836
131845
  if (!validation.ok) {
131837
131846
  const validationReason = validation.reason ?? "developer_validation_failed";
131838
131847
  const feedbackQueueLabel = getQueueLabels(workflow, "developer").find((label) => isFeedbackState(workflow, label)) ?? "To Improve";
131848
+ const convergenceIssueRuntime = validation.prStatus ? {
131849
+ ...context2.issueRuntime,
131850
+ currentPrNumber: validation.prStatus.number ?? context2.issueRuntime?.currentPrNumber ?? null,
131851
+ currentPrUrl: validation.prStatus.url ?? context2.issueRuntime?.currentPrUrl ?? null,
131852
+ currentPrState: validation.prStatus.state ?? context2.issueRuntime?.currentPrState ?? null
131853
+ } : context2.issueRuntime;
131854
+ if (validation.prStatus) {
131855
+ await persistDeveloperPrBinding({
131856
+ workspaceDir: opts.workspaceDir,
131857
+ projectSlug: context2.projectSlug,
131858
+ issueId: context2.issueId,
131859
+ prStatus: validation.prStatus
131860
+ }).catch(() => {
131861
+ });
131862
+ }
131839
131863
  const convergence = decidePostPrConvergence({
131840
131864
  workflow,
131841
- issueRuntime: context2.issueRuntime,
131865
+ issueRuntime: convergenceIssueRuntime,
131842
131866
  reason: validationReason,
131843
131867
  feedbackQueueLabel
131844
131868
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mestreyoda/fabrica",
3
- "version": "0.2.35",
3
+ "version": "0.2.36",
4
4
  "description": "Autonomous software engineering pipeline for OpenClaw. Turns ideas into deployed code via intake, dispatch, review, test, and merge.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",