feat: self-heal the chatgpt.com scraper with codex and open a PR

After SELFHEAL_FAILURE_THRESHOLD consecutive UI_CHANGED/TURN_TIMED_OUT
failures the queue snapshots the logged-in profile and runs
scripts/selfheal.sh: codex exec in yolo mode on a throwaway clone, with a
Playwright + playwright-stealth inspector to study the live frontend.
Changes are limited to src/chatgpt and test fixtures, must pass typecheck
and tests, and are pushed as a pull request for human review.
Disabled by default (SELFHEAL_ENABLED).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
dasemuandClaude Opus 5.5 committed 2026-10-07 20:13:11 +02:00
1 parent f7e7148135
commit 550396d7ed
13 files changed
+823 -3

No files matched your search

+16
View File
@@ -49,6 +49,22 @@ MAX_QUEUE_LENGTH=20
DIAGNOSTICS_DIR=diagnostics
MAX_DIAGNOSTICS=10
# --- Self-heal with codex (see docs/selfheal.md) ---
SELFHEAL_ENABLED=false
SELFHEAL_FAILURE_THRESHOLD=3
SELFHEAL_COOLDOWN_HOURS=6
SELFHEAL_SCRIPT=scripts/selfheal.sh
SELFHEAL_LOG_FILE=logs/selfheal.log
SELFHEAL_REMOTE=origin
SELFHEAL_BASE_BRANCH=main
SELFHEAL_CODEX_BIN=codex
SELFHEAL_CODEX_MODEL=
SELFHEAL_CODEX_TIMEOUT_SECONDS=2700
SELFHEAL_VENV=.selfheal-venv
SELFHEAL_PR_ASSIGNEES=
SELFHEAL_TEA_LOGIN=
SELFHEAL_DRY_RUN=false
# --- Update endpoint (/admin/update) ---
# Bearer secret, >= 32 chars; unset disables the endpoint
UPDATE_TOKEN=