fix(workflows): callees of a test run inherit the test source

This commit is contained in:
sam committed 2026-10-13 12:46:48 +11:00
1 parent 2a066f6d4f
commit 25face6d04
4 files changed
+10 -6

No files matched your search

@@ -36,7 +36,8 @@ SELECT
caller.owner,
caller.repo,
number.last_number,
$2, $3, 'chat', $4, 'chat', $5,
$2, $3, 'chat', $4,
CASE WHEN caller.source = 'test' THEN 'test' ELSE 'chat' END, $5,
caller.org_id, caller.workspace_id, $6,
caller.id, caller.call_depth + 1, $7
FROM caller, number
@@ -69,7 +70,8 @@ type EnqueueCallTaskParams struct {
// InsertChatTask. The callee is started by the identity the caller's
// workflow declares, read from its pinned definition: a callee never inherits the
// identity that started its caller, and runs as the one its own workflow
// declares.
// declares. A callee of a test run is a test run too, so it cannot write to a
// forge either.
func (q *Queries) EnqueueCallTask(ctx context.Context, arg EnqueueCallTaskParams) (Task, error) {
row := q.db.QueryRow(ctx, enqueueCallTask,
arg.ID,