Nothing records who created a forge-polled task. On the live instance all 253 forge tasks have an empty identity, and all 243 task_queued and 12 work_request_submitted events have no task id, actor or principal.
Causes:
daemon.sourceTag stores "" when the polling identity is RootIdentityID, and task.Task.Identity documents empty as "the root identity".
RootIdentityID is identity.StableID(IdentityNames(cfg)[0]), an identity derived from the config's bot_user. It is a second "root" next to the seeded identity.SystemID (kind system), which is why the execution identities page lists System plus a bot named after the forge account.
Daemon.acknowledge emits task_queued with repo, issue and title only.
Wanted:
identity.SystemID is the one root/instance identity. The bot_user-derived root identity and the empty-string sentinel go.
A polled task stores the identity that polled it, never "". Instance-level work is attributed to System.
Task-creation events carry the task id, actor and principal.
Existing rows are migrated in the same change: empty tasks.identity and the root key in identity-grants move to the identity they stand for, so the dedupe key (tasks_current_item_key, the intake idempotency key) does not re-queue existing issues.
Done when a newly polled task and its task_queued event name the identity that created it, no code path writes an empty identity, and a migrated instance re-polls without duplicating tasks.
Nothing records who created a forge-polled task. On the live instance all 253 forge tasks have an empty `identity`, and all 243 `task_queued` and 12 `work_request_submitted` events have no task id, actor or principal.
Causes:
- `daemon.sourceTag` stores `""` when the polling identity is `RootIdentityID`, and `task.Task.Identity` documents empty as "the root identity".
- `RootIdentityID` is `identity.StableID(IdentityNames(cfg)[0])`, an identity derived from the config's `bot_user`. It is a second "root" next to the seeded `identity.SystemID` (kind `system`), which is why the execution identities page lists System plus a bot named after the forge account.
- `Daemon.acknowledge` emits `task_queued` with repo, issue and title only.
Wanted:
- `identity.SystemID` is the one root/instance identity. The `bot_user`-derived root identity and the empty-string sentinel go.
- A polled task stores the identity that polled it, never `""`. Instance-level work is attributed to System.
- Task-creation events carry the task id, actor and principal.
- Existing rows are migrated in the same change: empty `tasks.identity` and the `root` key in `identity-grants` move to the identity they stand for, so the dedupe key (`tasks_current_item_key`, the intake idempotency key) does not re-queue existing issues.
Done when a newly polled task and its `task_queued` event name the identity that created it, no code path writes an empty identity, and a migrated instance re-polls without duplicating tasks.
Fixed in e3ffefdc7 on main. System is the one root: it polls forge connections, tasks never store an empty identity (CHECK constraint), and task_queued/work_request_submitted carry task id, actor and principal. Migration 0072 moves empty task identities, the identity-grants root key and the old root's connection permits to System; a dry run on a snapshot of the live database moved 253 tasks and both connections' permits as intended. Regression test TestPolledTaskKeepsItsCreatingIdentity fails on the old code. task check passes. Not deployed.
Fixed in e3ffefdc7 on main. System is the one root: it polls forge connections, tasks never store an empty identity (CHECK constraint), and task_queued/work_request_submitted carry task id, actor and principal. Migration 0072 moves empty task identities, the identity-grants root key and the old root's connection permits to System; a dry run on a snapshot of the live database moved 253 tasks and both connections' permits as intended. Regression test TestPolledTaskKeepsItsCreatingIdentity fails on the old code. task check passes. Not deployed.
Verified on the live instance, which now runs the commit that carries the fix (e3ffefdc7 is an ancestor of the deployed 1.62.0-19-g255e0c7ee): migration 0072 is applied, all 253 tasks that held an empty identity now hold System, the identity-grants root key and the old root's connection permits are on System, and the table refuses an empty identity. Since the migration the poller has run every 10s against the three repositories and created no task and emitted no task_queued event, so the migrated rows match the poller's identity and the dedupe key no longer re-queues existing issues. No issue has carried the dispatch label since the deploy, so the first newly polled task is the one live observation left; TestPolledTaskKeepsItsCreatingIdentity pins that envelope's identity and idempotency key, and task_queued is now built from the stored task with its id, actor and principal. Closing.
Verified on the live instance, which now runs the commit that carries the fix (e3ffefdc7 is an ancestor of the deployed 1.62.0-19-g255e0c7ee): migration 0072 is applied, all 253 tasks that held an empty identity now hold System, the identity-grants root key and the old root's connection permits are on System, and the table refuses an empty identity. Since the migration the poller has run every 10s against the three repositories and created no task and emitted no task_queued event, so the migrated rows match the poller's identity and the dedupe key no longer re-queues existing issues. No issue has carried the dispatch label since the deploy, so the first newly polled task is the one live observation left; TestPolledTaskKeepsItsCreatingIdentity pins that envelope's identity and idempotency key, and task_queued is now built from the stored task with its id, actor and principal. Closing.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Nothing records who created a forge-polled task. On the live instance all 253 forge tasks have an empty
identity, and all 243task_queuedand 12work_request_submittedevents have no task id, actor or principal.Causes:
daemon.sourceTagstores""when the polling identity isRootIdentityID, andtask.Task.Identitydocuments empty as "the root identity".RootIdentityIDisidentity.StableID(IdentityNames(cfg)[0]), an identity derived from the config'sbot_user. It is a second "root" next to the seededidentity.SystemID(kindsystem), which is why the execution identities page lists System plus a bot named after the forge account.Daemon.acknowledgeemitstask_queuedwith repo, issue and title only.Wanted:
identity.SystemIDis the one root/instance identity. Thebot_user-derived root identity and the empty-string sentinel go."". Instance-level work is attributed to System.tasks.identityand therootkey inidentity-grantsmove to the identity they stand for, so the dedupe key (tasks_current_item_key, the intake idempotency key) does not re-queue existing issues.Done when a newly polled task and its
task_queuedevent name the identity that created it, no code path writes an empty identity, and a migrated instance re-polls without duplicating tasks.Fixed in
e3ffefdc7on main. System is the one root: it polls forge connections, tasks never store an empty identity (CHECK constraint), and task_queued/work_request_submitted carry task id, actor and principal. Migration 0072 moves empty task identities, the identity-grants root key and the old root's connection permits to System; a dry run on a snapshot of the live database moved 253 tasks and both connections' permits as intended. Regression test TestPolledTaskKeepsItsCreatingIdentity fails on the old code. task check passes. Not deployed.Verified on the live instance, which now runs the commit that carries the fix (
e3ffefdc7is an ancestor of the deployed 1.62.0-19-g255e0c7ee): migration 0072 is applied, all 253 tasks that held an empty identity now hold System, the identity-grants root key and the old root's connection permits are on System, and the table refuses an empty identity. Since the migration the poller has run every 10s against the three repositories and created no task and emitted no task_queued event, so the migrated rows match the poller's identity and the dedupe key no longer re-queues existing issues. No issue has carried the dispatch label since the deploy, so the first newly polled task is the one live observation left; TestPolledTaskKeepsItsCreatingIdentity pins that envelope's identity and idempotency key, and task_queued is now built from the stored task with its id, actor and principal. Closing.