Files
sencho/docs/tutorials
Anso 30e39368ab fix: preserve exact guardrail message for Save & Deploy and Start (#1898)
* feat: preserve exact guardrail message for Save & Deploy and Start

When 'Block deploy on missing required env vars' is enabled, the exact
guardrail message now reaches Save & Deploy and Start (not just Update).
Previously the external-networks preflight replaced the message with a
generic networking error. The fix selects the guardrail-aware message
inside the existing render pipeline without duplicating the render.

Changes:
- Backend: isGuardrailEnabled() plus guardrail-aware message selection in
  renderModel(), with exact singular/plural grammar matching the
  ComposeService guard method.
- Frontend: parseMissingExternalNetworksPayload validates non-empty
  renderError; missingExternalBlocksDeploy prefers it with generic
  fallback; MissingExternalNetworksPayload extended with optional field.
- Tests: backend regression for plural grammar; frontend regression for
  guardrail-on/off, older-node fallback, empty-string fallback, and no
  deploy-POST assertions.
- Documentation: environment-guardrails tutorial updated.

* fix: log guardrail-setting read failures and fix guardrail test isolation

isGuardrailEnabled() dropped its nodeId on read failure instead of
logging it, unlike the sibling isAutoCreateEnabled() next to it.

The new guardrail-message tests never enabled the guided external-network
preflight flag they were meant to exercise, and never reset the shared
apiFetch mock, so their assertions were checked against leftover calls
from unrelated earlier tests in the file.
2026-09-15 22:43:50 -04:00
..