chore: auto-commit (97 archivos)
- .claude/CLAUDE.md - .claude/agents/fn-recopilador/SKILL.md - .claude/rules/INDEX.md - .claude/rules/cpp_apps.md - bash/functions/infra/build_cpp_windows.sh - cpp/CMakeLists.txt - cpp/PATTERNS.md - cpp/framework/app_base.cpp - cpp/framework/app_base.h - dev/issues/README.md - ... Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
---
|
||||
name: CheckResult
|
||||
lang: go
|
||||
domain: infra
|
||||
version: "1.0.0"
|
||||
algebraic: product
|
||||
definition: |
|
||||
type CheckResult struct {
|
||||
ID string `json:"id"`
|
||||
Status string `json:"status"`
|
||||
Severity string `json:"severity"`
|
||||
DurationMs int64 `json:"duration_ms"`
|
||||
ExitCode int `json:"exit_code"`
|
||||
Stdout string `json:"stdout,omitempty"`
|
||||
Stderr string `json:"stderr,omitempty"`
|
||||
Error string `json:"error,omitempty"`
|
||||
}
|
||||
description: "Salida de ejecutar un E2ECheck individual. Captura status (pass/fail/skip), severidad heredada del check, duracion en ms, exit code del proceso, stdout/stderr capturados, y mensaje de error si aplica."
|
||||
tags: [e2e, result, check, validation, infra, testing]
|
||||
uses_types: []
|
||||
file_path: "functions/infra/check_result.go"
|
||||
---
|
||||
|
||||
## Campos
|
||||
|
||||
- `id`: mismo ID del `E2ECheck` que origino este resultado.
|
||||
- `status`: `pass` si todos los predicados se cumplen, `fail` si alguno falla, `skip` si el check no tiene cmd/ref/health.
|
||||
- `severity`: `critical` o `warning`, heredado del `E2ECheck.Severity`.
|
||||
- `duration_ms`: tiempo total de ejecucion del check en milisegundos.
|
||||
- `exit_code`: codigo de salida del proceso. 0 si es check de tipo health o skip.
|
||||
- `stdout`: salida capturada del proceso (truncada si excede 4KB).
|
||||
- `stderr`: error capturado del proceso.
|
||||
- `error`: mensaje de error de infraestructura (timeout, exec.Error, etc.).
|
||||
|
||||
## Notas
|
||||
|
||||
Tipo de retorno de `e2e_run_checks_go_infra`. Los resultados con `status=fail` y
|
||||
`severity=critical` son candidatos a generar proposals via `proposal_from_failure_go_infra`.
|
||||
@@ -0,0 +1,41 @@
|
||||
---
|
||||
name: ComposeTraefikConfig
|
||||
lang: go
|
||||
domain: infra
|
||||
version: "1.0.0"
|
||||
algebraic: product
|
||||
definition: |
|
||||
type ComposeTraefikConfig struct {
|
||||
ProjectName string
|
||||
ServiceName string
|
||||
BuildContext string
|
||||
Dockerfile string
|
||||
Port int
|
||||
VolumeName string
|
||||
EnvVars []string
|
||||
Network string
|
||||
}
|
||||
description: "Parametriza la generacion de un docker-compose.yml para una app Go desplegada behind Traefik + Coolify. Usado por generate_compose_traefik."
|
||||
tags: [docker, compose, traefik, coolify, config, infra, deploy]
|
||||
uses_types: []
|
||||
file_path: "functions/infra/compose_traefik_config.go"
|
||||
---
|
||||
|
||||
## Ejemplo
|
||||
|
||||
```go
|
||||
cfg := ComposeTraefikConfig{
|
||||
ProjectName: "registry-api",
|
||||
ServiceName: "registry_api",
|
||||
BuildContext: "../../",
|
||||
Dockerfile: "apps/registry_api/Dockerfile",
|
||||
Port: 8420,
|
||||
VolumeName: "registry_data",
|
||||
EnvVars: []string{"REGISTRY_API_TOKEN"},
|
||||
Network: "coolify",
|
||||
}
|
||||
```
|
||||
|
||||
## Notas
|
||||
|
||||
`VolumeName` vacio omite la seccion `volumes:` y el mount `/data`. `EnvVars` es una lista ordenada de nombres de variables de entorno que se pasan como passthrough con `${KEY:-}`. `Network` es la red externa de Coolify (por convencion `"coolify"`).
|
||||
@@ -0,0 +1,40 @@
|
||||
---
|
||||
name: E2ECheck
|
||||
lang: go
|
||||
domain: infra
|
||||
version: "1.0.0"
|
||||
algebraic: product
|
||||
definition: |
|
||||
type E2ECheck struct {
|
||||
ID string `json:"id"`
|
||||
Cmd string `json:"cmd,omitempty"`
|
||||
Health string `json:"health,omitempty"`
|
||||
Ref string `json:"ref,omitempty"`
|
||||
TimeoutS int `json:"timeout_s,omitempty"`
|
||||
ExpectExit *int `json:"expect_exit,omitempty"`
|
||||
ExpectStdoutContains string `json:"expect_stdout_contains,omitempty"`
|
||||
ExpectStdoutJSON string `json:"expect_stdout_json,omitempty"`
|
||||
Severity string `json:"severity,omitempty"`
|
||||
}
|
||||
description: "Describe una validacion individual declarada en app.md::e2e_checks. Cada check especifica un comando a ejecutar, un endpoint de health a sondear, o una referencia a otro servicio. Ejecutados secuencialmente por E2ERunChecks."
|
||||
tags: [e2e, check, validation, infra, testing]
|
||||
uses_types: []
|
||||
file_path: "functions/infra/e2e_check.go"
|
||||
---
|
||||
|
||||
## Campos
|
||||
|
||||
- `id`: identificador unico del check, usado en el resultado.
|
||||
- `cmd`: comando de shell a ejecutar (via `bash -c`). Si termina con `&`, se lanza en background.
|
||||
- `health`: URL HTTP para sondear despues de `cmd`. Se usa `HealthCheckHTTP` con el timeout configurado.
|
||||
- `ref`: referencia a otro artefacto en formato `<servicio>:<path>`. Por ahora produce `skip`.
|
||||
- `timeout_s`: timeout en segundos para `cmd` y `health`. Default 60.
|
||||
- `expect_exit`: codigo de salida esperado. Default 0.
|
||||
- `expect_stdout_contains`: substring que debe aparecer en stdout para que el check sea pass.
|
||||
- `expect_stdout_json`: campo JSON del stdout que debe existir (reservado para implementacion futura).
|
||||
- `severity`: `critical` (default) o `warning`. Determina el `kind` de la proposal si falla.
|
||||
|
||||
## Notas
|
||||
|
||||
Tipo de datos usado como input de `e2e_run_checks_go_infra`.
|
||||
Se serializa/deserializa desde el frontmatter YAML de `app.md` via campos `e2e_checks`.
|
||||
@@ -0,0 +1,37 @@
|
||||
---
|
||||
name: TraefikDynamicConfig
|
||||
lang: go
|
||||
domain: infra
|
||||
version: "1.0.0"
|
||||
algebraic: product
|
||||
definition: |
|
||||
type TraefikDynamicConfig struct {
|
||||
Name string
|
||||
Domain string
|
||||
UpstreamURL string
|
||||
BasicAuthLine string
|
||||
EnableGzip bool
|
||||
CertResolver string
|
||||
}
|
||||
description: "Parametriza la generacion de un traefik-dynamic.yml para el file provider de Traefik (Coolify). Usado por generate_traefik_dynamic."
|
||||
tags: [traefik, config, infra, deploy, basicauth, tls, coolify]
|
||||
uses_types: []
|
||||
file_path: "functions/infra/traefik_dynamic_config.go"
|
||||
---
|
||||
|
||||
## Ejemplo
|
||||
|
||||
```go
|
||||
cfg := TraefikDynamicConfig{
|
||||
Name: "registry-api",
|
||||
Domain: "registry.organic-machine.com",
|
||||
UpstreamURL: "http://registry-api:8420",
|
||||
BasicAuthLine: "lucas:$2a$10$hashedpassword",
|
||||
EnableGzip: true,
|
||||
CertResolver: "letsencrypt",
|
||||
}
|
||||
```
|
||||
|
||||
## Notas
|
||||
|
||||
`Name` se usa como prefix para todos los routers, services y middlewares Traefik (ej. `registry-api-auth`, `registry-api-gzip`). `BasicAuthLine` es el output directo de `BcryptHtpasswd` — ya incluye el usuario y el hash con `$` simple (file provider). `CertResolver` vacio equivale a `"letsencrypt"`.
|
||||
Reference in New Issue
Block a user