Add deploy escalation output
This commit is contained in:
parent
72290cd461
commit
104d8dc06d
|
|
@ -84,6 +84,9 @@ SESSION_STATE:
|
||||||
D24: "Updated deploy_agent.py status validation: deployment success now requires status containing 'Up' and not containing 'unhealthy' case-insensitively."
|
D24: "Updated deploy_agent.py status validation: deployment success now requires status containing 'Up' and not containing 'unhealthy' case-insensitively."
|
||||||
D25: "User reiterated file-only output expectation after status-validation request; no code change beyond D24."
|
D25: "User reiterated file-only output expectation after status-validation request; no code change beyond D24."
|
||||||
D26: "User requested git commit on 2026-04-22; commit scope includes ./deploy_agent.py and ./codex_context.yaml for log-analysis and status-validation updates."
|
D26: "User requested git commit on 2026-04-22; commit scope includes ./deploy_agent.py and ./codex_context.yaml for log-analysis and status-validation updates."
|
||||||
|
D27: "Git commit created on 2026-04-22: 72290cd 'Improve deploy failure analysis'."
|
||||||
|
D28: "Updated deploy_agent.py second-failure path to return 'ESCALATE_TO_CODEX' with formatted debug block containing service, error, status, and logs instead of returning plain ERROR."
|
||||||
|
D29: "User requested git commit on 2026-04-22; commit scope includes ./deploy_agent.py and ./codex_context.yaml for Codex escalation-path update."
|
||||||
todos:
|
todos:
|
||||||
T1: "For all future meaningful changes/decisions, update and overwrite ./codex_context.yaml."
|
T1: "For all future meaningful changes/decisions, update and overwrite ./codex_context.yaml."
|
||||||
T2: "DONE: Commit current changes."
|
T2: "DONE: Commit current changes."
|
||||||
|
|
@ -103,6 +106,8 @@ SESSION_STATE:
|
||||||
T16: "DONE: Commit LLM-assisted deploy retry changes."
|
T16: "DONE: Commit LLM-assisted deploy retry changes."
|
||||||
T17: "DONE: Add bounded container log analysis to deploy failure recovery."
|
T17: "DONE: Add bounded container log analysis to deploy failure recovery."
|
||||||
T18: "DONE: Tighten deploy status validation against unhealthy containers."
|
T18: "DONE: Tighten deploy status validation against unhealthy containers."
|
||||||
|
T19: "DONE: Commit deploy failure analysis and status validation updates."
|
||||||
|
T20: "DONE: Add Codex escalation output on second deployment failure."
|
||||||
issues:
|
issues:
|
||||||
I1: "Tailscale DNS health warning: configured DNS servers unreachable."
|
I1: "Tailscale DNS health warning: configured DNS servers unreachable."
|
||||||
I2: "Preferred gateway path unavailable: 100.108.208.3:8080 connection failed."
|
I2: "Preferred gateway path unavailable: 100.108.208.3:8080 connection failed."
|
||||||
|
|
|
||||||
|
|
@ -189,9 +189,22 @@ def deploy_service(service: str) -> str:
|
||||||
ok, error = _run_compose_up(target_dir)
|
ok, error = _run_compose_up(target_dir)
|
||||||
if not ok:
|
if not ok:
|
||||||
status = get_service_status(target_dir)
|
status = get_service_status(target_dir)
|
||||||
if status and not status.startswith("ERROR:"):
|
logs = _get_compose_logs(target_dir)
|
||||||
return f"ERROR: {error}\n{status}"
|
debug = f"""
|
||||||
return f"ERROR: {error}"
|
ESCALATION REQUIRED
|
||||||
|
|
||||||
|
SERVICE: {service}
|
||||||
|
|
||||||
|
ERROR:
|
||||||
|
{error}
|
||||||
|
|
||||||
|
STATUS:
|
||||||
|
{status}
|
||||||
|
|
||||||
|
LOGS:
|
||||||
|
{logs}
|
||||||
|
"""
|
||||||
|
return f"ESCALATE_TO_CODEX\n{debug}"
|
||||||
|
|
||||||
status = get_service_status(target_dir)
|
status = get_service_status(target_dir)
|
||||||
if status.startswith("ERROR:"):
|
if status.startswith("ERROR:"):
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue