Refs #214
## Résumé
- Réessaie l’enregistrement complet et idempotent des jobs Hangfire après une `PostgreSqlDistributedLockException`, avec nouveau scope par tentative, délais bornés et annulation à l’arrêt.
- Ajoute un test ciblé de contention transitoire et la skill projet `hangfire-startup-lock`.
## Vérifications
- `dotnet test tests/Heimdall.Api.Tests/Heimdall.Api.Tests.csproj --no-restore --filter FullyQualifiedName~RecurringJobStartupRetryTests` — 1 passé.
- `dotnet build src/Heimdall.Web/Heimdall.Web.csproj --no-restore` — réussi, 0 avertissement.
- Compose disposable depuis la source: projet `heimdall214-261107080901-ae486b`, sans ports hôtes publiés; Central healthy et `hangfire.hash` confirme `recurring-job:agent-failover` avec cron `*/1 * * * *`.
- Trap de nettoyage: aucun conteneur/volume/réseau du projet et tag `heimdall:heimdall214-261107080901-ae486b-acceptance` absent. Bases PostgreSQL/.NET conservées.
Le critère de télémétrie après déploiement reste ouvert dans #214. Aucun déploiement réel n’est déclaré validé.
Reviewed-on: #278
- Add InternalsVisibleTo for Heimdall.Api.Tests and
Heimdall.IntegrationTests in Web.csproj
- Add partial class Program for WebApplicationFactory<Program>
- Pass builder.Environment.EnvironmentName instead of env var
so AddInfrastructure correctly detects Testing environment
- Skip DATABASE_URL check, Hangfire setup, migrations, and
recurring jobs when environment is Testing
- Update test project references from Heimdall.Api to Heimdall.Web
- Add PlaceholderTest.cs to Api.Tests, Application.Tests, Infrastructure.Tests,
Web.Tests, Workers.Tests (1 passing test each)
- Prevents 'no test available' warnings in CI