@atolis-hq/wake 0.2.94 → 0.2.95

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.
@@ -268,6 +268,10 @@ async function applyEvent(current, event, ctx, config) {
268
268
  config !== undefined &&
269
269
  isCustomCommandAction(payload.action, config);
270
270
  const shouldClearSession = isForwardProgression || isFailed;
271
+ const hasPendingChangesRequested = (typeof current.context.changesRequestedCount === 'number' &&
272
+ current.context.changesRequestedCount > 0) ||
273
+ current.context.changesRequestedFeedback !== undefined;
274
+ const resolvesChangesRequested = sentinel === doneRunnerSentinel && (!hasPendingChangesRequested || !approvalGated);
271
275
  const currentFailureCount = typeof current.context.failureCount === 'number' &&
272
276
  Number.isInteger(current.context.failureCount)
273
277
  ? current.context.failureCount
@@ -327,9 +331,11 @@ async function applyEvent(current, event, ctx, config) {
327
331
  approvalGated,
328
332
  }),
329
333
  }),
330
- // A fresh DONE cycle (gated or not) resolves whatever changes were
331
- // previously requested reset the loop counter and stored feedback.
332
- ...(sentinel === doneRunnerSentinel
334
+ // An approval-gated DONE after changes-requested only resubmits work for
335
+ // review; the next reviewer verdict decides whether the request was
336
+ // actually resolved. Keep the retry counter through that gate so
337
+ // repeated rejections can hit the configured escalation cap.
338
+ ...(resolvesChangesRequested
333
339
  ? { changesRequestedCount: 0, changesRequestedFeedback: undefined }
334
340
  : {}),
335
341
  };
@@ -701,9 +701,9 @@ const wakeConfigBaseSchema = z.object({
701
701
  retry: z
702
702
  .object({
703
703
  maxFailureRetries: z.number().int().positive().default(5),
704
- maxChangesRequestedRetries: z.number().int().positive().default(5),
704
+ maxChangesRequestedRetries: z.number().int().positive().default(3),
705
705
  })
706
- .default({ maxFailureRetries: 5, maxChangesRequestedRetries: 5 }),
706
+ .default({ maxFailureRetries: 5, maxChangesRequestedRetries: 3 }),
707
707
  runners: z.record(z.string(), runnerEntrySchema).default({
708
708
  fake: { kind: 'fake', cli: 'Fake' },
709
709
  'claude-haiku': {
@@ -124,4 +124,4 @@ export function resolveWakeVersion(options = {}) {
124
124
  }
125
125
  return '0.1.0-dev';
126
126
  }
127
- export const wakeVersion = "g6f92af7";
127
+ export const wakeVersion = "g803f372";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atolis-hq/wake",
3
- "version": "0.2.94",
3
+ "version": "0.2.95",
4
4
  "description": "Local autonomous agent control plane for software development",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {