mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-10-24 10:13:11 +02:00
fix: resume pending repository work with an empty work list
Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
1 parent
6df51567e7
commit
9dcccc9e46
2 files changed
+7
-2
No files matched your search
@@ -251,6 +251,10 @@ describe("native final-response feedback", () => {
|
||||
scope: "current_track", unblockAction: "Start the next normal admission" },
|
||||
};
|
||||
await expect(nativeCompletionFeedback(db, value.runId, report)).rejects.toThrow('paperclip_finish with reportedWorkDisposition="yielded"');
|
||||
await expect(nativeCompletionFeedback(db, value.runId, { ...report, completionClaim: { ...report.completionClaim, remainingWork: [] } }))
|
||||
.rejects.toThrow('paperclip_finish with reportedWorkDisposition="yielded"');
|
||||
await expect(nativeCompletionFeedback(db, value.runId, { ...report, completionClaim: { ...report.completionClaim, objectiveSatisfied: true } }))
|
||||
.rejects.toThrow('paperclip_finish with reportedWorkDisposition="yielded"');
|
||||
await expect(nativeCompletionFeedback(db, value.runId, { ...report, evidence: [{ ref: `repository-preparation:${randomUUID()}` }] }))
|
||||
.resolves.toContain("Blocker report accepted");
|
||||
await expect(nativeCompletionFeedback(db, value.runId, { ...report, blocker: { ...report.blocker!, reasonCode: "missing_access" } }))
|
||||
|
||||
@@ -239,9 +239,10 @@ export async function nativeCompletionFeedback(
|
||||
if (readiness.unresolvedBlockerCount > 0) {
|
||||
return `Completion report accepted; this task still has unresolved dependencies. Explain the blockers on [this task](/issues/${issue.identifier ?? issue.id}); do not say the task is done.`;
|
||||
}
|
||||
const unfinishedWork = !result.completionClaim.objectiveSatisfied || result.completionClaim.remainingWork.some(work => work.blocksCompletion);
|
||||
if (result.reportedWorkDisposition === "blocked" && result.blocker?.owner.kind === "system" &&
|
||||
result.blocker.scope === "current_track" && result.blocker.reasonCode === "repository_checkout_pending" &&
|
||||
!result.completionClaim.objectiveSatisfied && result.completionClaim.remainingWork.some(work => work.blocksCompletion) &&
|
||||
unfinishedWork &&
|
||||
signals.actionableAttentionRequests.length === 0 && issue.workMode === "standard" &&
|
||||
issue.executionRunId === run.id && run.status === "running") {
|
||||
const repositoryIds = result.evidence.flatMap(evidence => {
|
||||
@@ -262,7 +263,7 @@ export async function nativeCompletionFeedback(
|
||||
!isConversation(issue) &&
|
||||
result.reportedWorkDisposition === "yielded" &&
|
||||
result.continuation?.kind === "response_wake" &&
|
||||
(!result.completionClaim.objectiveSatisfied || result.completionClaim.remainingWork.some((entry) => entry.blocksCompletion)) &&
|
||||
unfinishedWork &&
|
||||
signals.actionableAttentionRequests.length === 0
|
||||
) {
|
||||
const pause = await issueTreeControlService(db).getActivePauseHoldGate(
|
||||
|
||||
Reference in new issue
Block a user