Довёл fix20: firewall-mode, staged state, diagnostics, readiness и build-gate

This commit is contained in:
2026-05-07 23:38:55 +05:00
parent 0a8f4e0c3d
commit 4b382d6ef9
25 changed files with 840 additions and 133 deletions
+33
View File
@@ -69,6 +69,37 @@
9. попытка использовать `HY2XS_IPV6_ENABLED=true`
10. `HY2XS_PUBLIC_HOST=0.0.0.0`
## E. Fix20 production matrix (обязательные сценарии)
1. **Clean Debian 13 minimal**:
- только SSH, без ручной установки зависимостей;
- default `/etc/nftables.conf` stub;
- install проходит полностью;
- `doctor`/`status` показывают рабочее состояние.
2. **Non-systemd container**:
- fail-fast до destructive шагов;
- диагностическое сообщение с причиной capability/systemd.
3. **Foreign nftables**:
- при `HY2XS_FIREWALL_MODE=managed` install/reconfigure блокируются;
- при `HY2XS_FIREWALL_MODE=takeover` создаются backup/rollback guard и apply проходит.
4. **Rollback guard cleanup**:
- после успешного apply/smoke не остаются `hy2xs-fw-rollback-*.timer/.service`.
5. **Partial install + repair**:
- состояние `install-state` фиксирует промежуточную фазу;
- `repair` завершает граф до `installed=true`.
6. **AAAA при IPv4-only**:
- policy строго валидируется preflight;
- soft warning path не используется в production baseline.
7. **Slow-start admin readiness**:
- install не падает на race после restart;
- readiness waiters дожидаются listener/healthz.
## Acceptance criteria
Система принимается, если:
@@ -86,3 +117,5 @@
11. UI не запускается от root
12. клиентские endpoint не зависят от request `Host`/`hostname`
13. production build verify падает, если `config/hy2xs.env` содержит placeholder-значения
14. production build verify падает при dirty git tree (кроме `ALLOW_DIRTY_BUILD=true`)
15. metadata содержит `source_git_commit`, `dirty_tree`, `build_profile=production`