mirror of
https://github.com/Dasemu/chatgpt-imagegen-mcp.git
synced 2026-11-26 23:36:26 +00:00
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:
1 parent
f7e7148135
commit
550396d7ed
13 files changed
+823
-3
No files matched your search
@@ -1,5 +1,8 @@
|
||||
import assert from "node:assert/strict";
|
||||
import { randomUUID } from "node:crypto";
|
||||
import { mkdtemp } from "node:fs/promises";
|
||||
import os from "node:os";
|
||||
import path from "node:path";
|
||||
import { after, before, describe, it } from "node:test";
|
||||
import { normalizeArguments, resolveModel } from "../src/arguments.js";
|
||||
import {
|
||||
@@ -249,6 +252,11 @@ describe("JobManager", () => {
|
||||
assert.equal(this.active, 0, "checkSession ran during a generation");
|
||||
return this.sessionResult;
|
||||
}
|
||||
snapshots = 0;
|
||||
async snapshotProfile(): Promise<string> {
|
||||
this.snapshots += 1;
|
||||
return mkdtemp(path.join(os.tmpdir(), "chatgpt-profile-"));
|
||||
}
|
||||
async close(): Promise<void> {}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user