Files
archie/internal/infrastructure/taskactions
sam fb945fec41 fix(taskactions): resolve max_retries from the task's owning identity
WIRE, not delete: per-repo max_retries is a configured field with a real
consumer (the retry gate), and it works for the legacy single-identity
[[repos]] list. In a multi-identity deployment repositories live under
[[identities.repos]] and there is no global [[repos]] at all, so the resolver
never saw the override and a parked task was killed at the global cap rather
than the configured one.

MaxRetries now consults the identity named on the task before the legacy list,
then falls back to the global cap. Identity name is the only thing that says
which repository list owns a persisted row.

Red-then-green: TestMaxRetriesResolvesFromTheOwningIdentity gained the
multi-identity cases; "identity repo override wins over the global cap" failed
with `MaxRetries = 3, want 7`. Two neighbouring cases keep the fix honest:
another identity's override must not leak, and the legacy path must still
resolve. Mutation-verified by deleting only the identity lookup, keeping the
extracted helper and the API intact.
2026-09-15 12:59:06 +10:00
..