@atolis-hq/wake 0.2.74 → 0.2.76
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.
- package/dist/src/core/tick-runner.js +34 -16
- package/dist/src/version.js +1 -1
- package/package.json +1 -1
- package/prompts/plan-review.md +1 -1
- package/prompts/pr-review.md +1 -1
|
@@ -1470,14 +1470,22 @@ export function createTickRunner(deps) {
|
|
|
1470
1470
|
? { lastDispatchedEventId: watcherTriggerForRun.eventId }
|
|
1471
1471
|
: { lastDispatchedSlot: watcherTriggerForRun.slot });
|
|
1472
1472
|
}
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1473
|
+
// Watcher runs execute a *different* workflow's stage (e.g. plan-review)
|
|
1474
|
+
// against the same parent projection, not a stage transition of the
|
|
1475
|
+
// parent's own workflow — writing labels here would stamp the child
|
|
1476
|
+
// workflow's stage/workflow onto the parent's GitHub issue. The parent's
|
|
1477
|
+
// labels must only ever reflect the parent's own action (see the mirrored
|
|
1478
|
+
// guard on the completion path below).
|
|
1479
|
+
if (!watcherRun) {
|
|
1480
|
+
await deliverOutboundEvent(createLabelsEvent({
|
|
1481
|
+
projection: candidate,
|
|
1482
|
+
runId,
|
|
1483
|
+
statusLabel: 'wake:status.working',
|
|
1484
|
+
stageLabel: stageLabelForStage(claimedStage),
|
|
1485
|
+
workflowLabel: workflowLabelForWorkflowName(workflowName),
|
|
1486
|
+
occurredAt: eventStampNow(),
|
|
1487
|
+
}));
|
|
1488
|
+
}
|
|
1481
1489
|
let leaseRenewalTimer;
|
|
1482
1490
|
function startLeaseRenewal() {
|
|
1483
1491
|
leaseRenewalTimer = setInterval(() => {
|
|
@@ -2101,18 +2109,28 @@ export function createTickRunner(deps) {
|
|
|
2101
2109
|
// network error) never reached the agent, so it isn't an answer to the
|
|
2102
2110
|
// triggering comment. Leaving it unset lets the next tick retry the same
|
|
2103
2111
|
// request instead of silently eating it (S9).
|
|
2112
|
+
// Mirrors the happy-path completion payload below: without this flag,
|
|
2113
|
+
// projection-updater.ts folds sentinel/workflowOutcome onto the
|
|
2114
|
+
// *parent's* context, even though this failure belongs to a watcher's
|
|
2115
|
+
// own child-workflow run, not the parent's own action.
|
|
2116
|
+
...(watcherRun ? { watcherRun: true, watcherTrigger: watcherTriggerForRun } : {}),
|
|
2104
2117
|
},
|
|
2105
2118
|
});
|
|
2106
2119
|
await deps.stateStore.appendEventEnvelope(runCompletedEvent);
|
|
2107
2120
|
await projectionUpdater.rebuildFromEvents([runCompletedEvent]);
|
|
2108
|
-
|
|
2109
|
-
|
|
2110
|
-
|
|
2111
|
-
|
|
2112
|
-
|
|
2113
|
-
|
|
2114
|
-
|
|
2115
|
-
|
|
2121
|
+
// See the matching guard on the claim path above: a watcher run's
|
|
2122
|
+
// failure is not the parent's own action failing, so it must not
|
|
2123
|
+
// stamp the child workflow's stage/workflow onto the parent's labels.
|
|
2124
|
+
if (!watcherRun) {
|
|
2125
|
+
await deliverOutboundEvent(createLabelsEvent({
|
|
2126
|
+
projection: candidate,
|
|
2127
|
+
runId,
|
|
2128
|
+
statusLabel: 'wake:status.failed',
|
|
2129
|
+
stageLabel: stageLabelForStage(claimedStage),
|
|
2130
|
+
workflowLabel: workflowLabelForWorkflowName(workflowName),
|
|
2131
|
+
occurredAt: finishedAt,
|
|
2132
|
+
}));
|
|
2133
|
+
}
|
|
2116
2134
|
const errorMessage = err instanceof Error ? err.message : String(err);
|
|
2117
2135
|
const infraFailureResult = {
|
|
2118
2136
|
result: errorMessage,
|
package/dist/src/version.js
CHANGED
package/package.json
CHANGED
package/prompts/plan-review.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
permissionMode: default
|
|
3
3
|
allowedTools: Read, Glob, Grep, Bash(git fetch), Bash(git status), Bash(gh issue view *), Bash(gh api repos/*/issues/*), WebSearch, WebFetch
|
|
4
|
-
maxTurns:
|
|
4
|
+
maxTurns: 30
|
|
5
5
|
skipApproval: true
|
|
6
6
|
---
|
|
7
7
|
You are Wake, in the PLAN-REVIEW workflow for work item {{workItemKey}}.
|
package/prompts/pr-review.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
permissionMode: default
|
|
3
3
|
allowedTools: Bash(gh pr view *), Bash(gh pr diff *), Bash(gh pr checks *), Bash(gh pr list *), Bash(gh run view *), Bash(gh api repos/*/pulls*), Bash(gh api repos/*/commits/*), Bash(gh issue view *), Bash(git status), Bash(git log *), Bash(git diff *), Read, Glob, Grep
|
|
4
|
-
maxTurns:
|
|
4
|
+
maxTurns: 50
|
|
5
5
|
skipApproval: true
|
|
6
6
|
---
|
|
7
7
|
You are Wake, in the PR-REVIEW workflow for work item {{workItemKey}}.
|