mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-11-10 20:46:28 +01:00
perf(wake-queue): omit unused native launch context from release reads (#17619)
Read native wake-release control context without saved launch payloads. Keep stored input, full legacy context, cancellation evidence, and release decisions. PostgreSQL response-budget regression, 785 lifecycle tests, typecheck, build, and all 55 CI checks pass. Apex reviewed the exact head at 5/5 with no findings. Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
1 parent
b792165ba4
commit
e302f2098f
4 files changed
+69
-6
No files matched your search
@@ -219,7 +219,8 @@ describeEmbeddedPostgres("wake-queue postgres adapter", () => {
|
||||
executionCancellation: { state: "acknowledged" }, executionRecovery: { kind: "interrupted", providerStopped: true },
|
||||
configurationIncomplete: { reason: "workspace_unavailable" }, unknownFutureReceipt: { retained: true } };
|
||||
await db.update(heartbeatRuns).set({ runtimeMode,
|
||||
...(runtimeMode === "native" ? { runnerProfileJson: { savedInput: payload }, stdoutExcerpt: payload, stderrExcerpt: payload } : {}),
|
||||
...(runtimeMode === "native" ? { runnerProfileJson: { savedInput: payload }, stdoutExcerpt: payload, stderrExcerpt: payload,
|
||||
contextSnapshot: { issueId, paperclipWake: { savedTask: payload }, paperclipTaskMarkdown: payload } } : {}),
|
||||
resultJson: { ...evidence, stdout: payload.repeat(3), stderr: payload } }).where(eq(heartbeatRuns.id, runId));
|
||||
await db.update(issues).set({ executionRunId: runId, checkoutRunId: runId }).where(eq(issues.id, issueId));
|
||||
const [run] = await db.select().from(heartbeatRuns).where(eq(heartbeatRuns.id, runId));
|
||||
@@ -233,7 +234,9 @@ describeEmbeddedPostgres("wake-queue postgres adapter", () => {
|
||||
expect(result.outcome.kind).toBe("released");
|
||||
expect(rows).toHaveLength(1);
|
||||
expect(rows[0]).toEqual([{ ...run, resultJson: evidence,
|
||||
...(runtimeMode === "native" ? { runnerProfileJson: null, stdoutExcerpt: null, stderrExcerpt: null } : {}) }]);
|
||||
...(runtimeMode === "native" ? { runnerProfileJson: null, stdoutExcerpt: null, stderrExcerpt: null,
|
||||
contextSnapshot: { issueId } } : {}) }]);
|
||||
expect(result.run.contextSnapshot).toEqual({ issueId });
|
||||
expect(Buffer.byteLength(JSON.stringify(rows))).toBeLessThan(8 * 1024);
|
||||
expect((await db.select().from(heartbeatRuns).where(eq(heartbeatRuns.id, runId)))[0]).toEqual(run);
|
||||
expect((await db.select().from(issues).where(eq(issues.id, issueId)))[0]).toEqual(issue);
|
||||
|
||||
Reference in new issue
Block a user