feat: give tasks durable project-optional workspaces (#15749)

Give tasks durable company-scoped workspace bindings independent of project assignment, channel defaults and authorized repository preparation. Reuse verified input seeds and sparse output recovery while preserving trust, privacy and controller provisioning boundaries.

Full CI and E2E, Superagent, legacy checks and Greptile Apex 5/5 passed on reviewed head 753680b61c. All review findings are resolved; the PR records focused verification and historical acceptance limits.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
DottaandPaperclip authored and GitHub committed 2026-10-12 20:45:18 -05:00
1 parent 4b958ecbd8
commit f329b24ee1
237 files changed
+191962 -1483

No files matched your search

@@ -7696,7 +7696,7 @@ async function executePaperclipNativeSessionWithinScope(
});
const toolTrace = createNativeToolTrace(trace);
const taskPrepareScope = trace.start("task.prepare", {
parentName: "task.run",
parentName: "task.provider_session",
startedAtMs: preparationStarts.preparationStartedAtMs,
});
const environmentSpans = preparationSpans.filter(
@@ -7724,7 +7724,7 @@ async function executePaperclipNativeSessionWithinScope(
await trace.record({
...span,
parentName: rootMilestone
? "task.run"
? "task.provider_session"
: environmentSpans.includes(span)
? "environment.startup"
: "task.prepare",
@@ -8285,7 +8285,7 @@ async function executePaperclipNativeSessionWithinScope(
outcome,
});
taskSettleScope = trace.start("task.settle", {
parentName: "task.run",
parentName: "task.provider_session",
startedAtMs: milestoneAtMs,
});
trace.activate(taskSettleScope);
@@ -8955,7 +8955,7 @@ async function executePaperclipNativeSessionWithinScope(
});
return result;
},
{ parentName: "task.run" },
{ parentName: "task.provider_session" },
);
// A detached consumer can resolve successfully after its stream closes.
// Only the replacement controller may settle the run or certify accounting.
@@ -9059,7 +9059,7 @@ async function executePaperclipNativeSessionWithinScope(
).slice(-4_096);
if (!taskSettleScope) {
taskSettleScope = trace.start("task.settle", {
parentName: "task.run",
parentName: "task.provider_session",
startedAtMs: failedAtMs,
});
}