- parseResetTime: 'resets 5pm', 'resets at 3:10 AM', 'resets in 2h 15m',
'try again at 23:30'; nearest future time, local clock
- recordLimit (hook StopFailure and the watchdog's banner path): status
rate_limited, resume_at = reset + 60 s, or probes 30 → 60 → 120 min when
unknown or the limit came back right after a resume; cap 6/day;
PEPPA_LIMIT_AUTORESUME=off; PM is told 'continues at HH:MM'
- watchdog: at resume_at nudges the live agent or relaunches it with
resume (vanished/dead rate-limited runners wait instead of failing); the
limit message is closed as resolved; tick(db, { now }) for tests
- mocks: limit with resetInSec / unknown reset (claude and codex)
- tests: one per spec scenario + Codex (82 e2e total, green)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
5 lines
445 B
SQL
5 lines
445 B
SQL
ALTER TABLE "sessions" ADD COLUMN "resume_at" timestamp with time zone;--> statement-breakpoint
|
|
ALTER TABLE "sessions" ADD COLUMN "limit_probe_min" integer;--> statement-breakpoint
|
|
ALTER TABLE "sessions" ADD COLUMN "limit_resumes" integer DEFAULT 0 NOT NULL;--> statement-breakpoint
|
|
ALTER TABLE "sessions" ADD COLUMN "limit_resumes_day" text;--> statement-breakpoint
|
|
ALTER TABLE "sessions" ADD COLUMN "limit_resumed_at" timestamp with time zone; |