Skip to content

fix: ne plus basculer une app Astro SSR vers nginx static - #37

Merged
bobdivx merged 6 commits into
mainfrom
fix/astro-ssr-no-static-flip
Aug 29, 2026
Merged

bobdivx merged 6 commits into
mainfrom
fix/astro-ssr-no-static-flip

Conversation

@bobdivx

@bobdivx bobdivx commented Aug 29, 2026

Copy link
Copy Markdown
Owner

Problème

Le harness ISSUE_ASTRO_STATIC_RUNTIME appliquait aveuglément astroStaticNginxRuntimeSettings() (is_static, nginx:alpine, port 80, /dist) puis redéployait.

Conséquence : une app Astro SSR (output server/hybrid, @astrojs/node, node ./dist/server/entry.mjs, port 4321) se retrouvait servie en static nginx. Le détecteur inférait bien astro-ssr, mais le déploiement utilisait un build_pack=static périmé en base.

Les échecs mux SSH mkdir précédents avaient ensuite poussé le harness à basculer vers static.

Correctifs

  • AgentRepairHarness : avant tout flip nginx, lance ApplicationRuntimeSettingsDetector. Si le framework est astro-ssr (ou signaux SSR : start entry.mjs, port 4321), applique/conserve les réglages nixpacks (is_static=false, build_pack=nixpacks, port 4321, node ./dist/server/entry.mjs, health /status:4321).
  • AgentChatRepairStrategy::detectIssue : un 404 nginx /status ou un healthcheck fail sur une app SSR connue n'est plus classé ISSUE_ASTRO_STATIC_RUNTIME, sauf si entry.mjs est vraiment absent et que le détecteur dit static.
  • ApplicationDeploySettingsReconciler : si le détecteur dit SSR et que build_pack stocké vaut static → nixpacks. Ce reconcile tourne déjà au début de queue_application_deployment (avant le job), donc le build ne part plus en static nginx.
  • AgentDirectives : astroSsrNixpacksRuntimeSettings() + helpers SSR.

Tests

  • AgentDirectivesTest : réglages SSR nixpacks ; nginx /status 404 ≠ static ; missing entry + astro-ssr ≠ ISSUE_ASTRO_STATIC_RUNTIME ; missing entry + astro-static = static.
  • ApplicationDeploySettingsReconcilerTest : build_pack=static stale corrigé vers nixpacks pour Astro SSR.

Le cas harness existant (UUID fictif, pas de ligne Application) continue d'appliquer nginx static.

Version

Pas de bump : constants.php est déjà en 4.1.18 (action Hub). versions.json sera mis à jour par la CI après merge.

Hors scope

Pas de merge ici (attendre la CI). Aucun redeploy starbasefr. Aucune touche ollama / popcornn / zimatools.

@bobdivx
bobdivx merged commit a5fed56 into main Aug 29, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant