{"record":{"id":"1d17dc83ab274d17","repo":"multica-ai/multica","slug":"attribution-no-precise-accountable-human-and-enqu","errorCode":null,"errorMessage":"attribution: no precise accountable human and enqueue refused (fail-closed policy, policy read failed, or no agent owner)","messagePattern":"attribution: no precise accountable human and enqueue refused \\(fail-closed policy, policy read failed, or no agent owner\\)","errorType":"validation","errorClass":"ErrAttributionFailClosed","httpStatus":null,"severity":"error","filePath":"server/internal/service/task.go","lineNumber":572,"sourceCode":"\t\t// its triggers), then the editor. So a run attributes to whoever last shaped\n\t\t// what fires it, not the original creator — and editing another trigger never\n\t\t// moves this one (MUL-4302; Elon must-fix).\n\t\tif trig, err := q.GetAutopilotTrigger(ctx, triggerID); err == nil &&\n\t\t\ttrig.PublishedByType.Valid && trig.PublishedByType.String == \"member\" && trig.PublishedByID.Valid {\n\t\t\treturn attribution.TriggerOwner(trig.PublishedByID, evidenceKind, evidenceRefID)\n\t\t}\n\t}\n\treturn ruleOwnerAttribution(ctx, q, workspaceID, autopilotID, evidenceKind, evidenceRefID)\n}\n\n// ErrAttributionFailClosed signals that a run resolved to no precise accountable\n// human and the enqueue is REFUSED rather than started. It covers three cases, all\n// of which mean \"we cannot guarantee an accountable human for this run\" (MUL-4302\n// §1/§3.5): the workspace opted into fail-closed; the workspace policy could not be\n// read (so we cannot confirm fallback is allowed — fail closed, don't run); or\n// owner_fallback has no agent owner to fall back to. Enqueue paths surface it so the\n// run never starts.\nvar ErrAttributionFailClosed = errors.New(\"attribution: no precise accountable human and enqueue refused (fail-closed policy, policy read failed, or no agent owner)\")\n\n// ErrDuplicatePendingTask means a fresh enqueue lost the race to a concurrent\n// one: a queued/dispatched task for the same (issue, agent) already exists, so\n// the pending-task unique index rejected the insert (#5914). This is a benign\n// outcome — a sibling run already covers this target\n// — not a server fault. Enqueue paths return it so callers can report a\n// success-shaped coalesced outcome / structured 409 instead of surfacing the\n// raw Postgres constraint as a 500. It is returned BARE (the raw driver text,\n// including the index name, is logged once at debug and never wrapped in) so no\n// upper-layer log or response can leak the constraint name (#5914, Elon review).\nvar ErrDuplicatePendingTask = errors.New(\"a pending task for this issue and agent already exists\")\n\n// isDuplicatePendingTaskErr reports whether err is the pending-task unique-index\n// violation (a concurrent enqueue won the race). Accept both names while v1 and\n// v2 can coexist during a rolling deploy.\nfunc isDuplicatePendingTaskErr(err error) bool {\n\tvar pgErr *pgconn.PgError\n\tif !errors.As(err, &pgErr) || pgErr.Code != \"23505\" {","sourceCodeStart":554,"sourceCodeEnd":590,"githubUrl":"https://github.com/multica-ai/multica/blob/2c0912b6ec764b373d44eeea1e80f0d9f11ab417/server/internal/service/task.go#L554-L590","documentation":"Error \"attribution: no precise accountable human and enqueue refused (fail-closed policy, policy read failed, or no agent owner)\" thrown in multica-ai/multica.","triggerScenarios":"Thrown at server/internal/service/task.go:572 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Assign an accountable owner to the agent or issue, or review the fail-closed attribution policy and its configuration."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"2c0912b6ec764b373d44eeea1e80f0d9f11ab417","analyzedAt":"2026-08-15T13:25:18.241Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}