feat(image): complete reviewed generation delivery
Memind CI / Test, build, and release guards (pull_request) Successful in 2m47s
Memind CI / Test, build, and release guards (pull_request) Successful in 2m47s
This commit is contained in:
+10
-5
@@ -864,13 +864,18 @@ export function createAgentRunGateway({
|
||||
{ routing = null, toolEvidence = null } = {},
|
||||
) {
|
||||
assertRequiredImageGenerationCompleted(row, routing, toolEvidence);
|
||||
// `row` was loaded before this worker claimed the run, so its started_at
|
||||
// can still be null. Refresh it before scoping workspace files to the
|
||||
// current execution window.
|
||||
const claimedRun = await getRunById(runId);
|
||||
const runStartedAtMs = claimedRun?.started_at ?? row.started_at ?? null;
|
||||
let deliveryResult = null;
|
||||
if (typeof syncUserPagesOnSuccess === 'function') {
|
||||
deliveryResult = await syncUserPagesOnSuccess({
|
||||
userId: row.user_id,
|
||||
sessionId,
|
||||
runId,
|
||||
runStartedAtMs: row.started_at ?? null,
|
||||
runStartedAtMs,
|
||||
});
|
||||
}
|
||||
const pageDataErrors = Array.isArray(deliveryResult?.pageDataBind?.errors)
|
||||
@@ -892,17 +897,17 @@ export function createAgentRunGateway({
|
||||
if (requiresPageDeliverable || typeof validateRunDeliverables === 'function') {
|
||||
const latest = await getRunById(runId);
|
||||
// `[]` is a strict allowlist meaning no workspace page may be examined.
|
||||
// Static page runs commonly have no Page Data artifact list, so use
|
||||
// `null` to discover the current run's newly synced workspace output.
|
||||
// Preserve it so a run with no current artifact cannot fall back to
|
||||
// historical workspace pages; `null` is reserved for legacy callers
|
||||
// that provide no scoping information at all.
|
||||
const workspaceRelativePaths = Array.isArray(deliveryResult?.pageDataRelativePaths)
|
||||
&& deliveryResult.pageDataRelativePaths.length > 0
|
||||
? deliveryResult.pageDataRelativePaths
|
||||
: null;
|
||||
deliverables = await prepareAndDetectSessionDeliverables({
|
||||
pool,
|
||||
userId: row.user_id,
|
||||
sessionId,
|
||||
runStartedAtMs: latest?.started_at ?? row.started_at ?? null,
|
||||
runStartedAtMs: latest?.started_at ?? runStartedAtMs,
|
||||
workspaceRelativePaths,
|
||||
});
|
||||
if (requiresPageDeliverable && deliverables.pageCount < 1) {
|
||||
|
||||
Reference in New Issue
Block a user