From 9366a017b8884338f2022c164f2c5fbd81399db5 Mon Sep 17 00:00:00 2001 From: peptiderepo Date: Fri, 12 Jun 2026 15:23:06 +0000 Subject: [PATCH] =?UTF-8?q?fix:=20restore=203=20bootstrap=20constants=20dr?= =?UTF-8?q?opped=20in=20v0.19.0=20=E2=80=94=20admin=20500=20hotfix=20(v0.2?= =?UTF-8?q?0.1)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Prod incident 2026-06-12: all plugin admin pages 500'd after the v0.20.0 deploy (Undefined constant PRAUTOBLOGGER_DEFAULT_RUN_CEILING_USD then ..._REQUEST_JSON_RETENTION_DAYS at class-activator.php:71-72 on the migration path). Root cause: PR #156 (v0.19.0) deleted the v0.18.x trio from the constants block; tests/bootstrap.php fallbacks masked it in CI. Values restored verbatim from v0.18.3 (22ae7e7). Prod hot-patch applied 15:1x UTC, verified (board+dossier 200, db 1.3.0); this makes it canonical. Agent-Session: cto-constants-hotfix-20260612 --- CHANGELOG.md | 14 ++++++++++++++ prautoblogger.php | 12 ++++++++++-- 2 files changed, 24 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 88f1332..776ddee 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,20 @@ All notable changes to PRAutoBlogger will be documented in this file. Format follows [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project uses [Semantic Versioning](https://semver.org/). +## [0.20.1] - 2026-06-12 + +### Fixed +- **Restore three bootstrap constants deleted by the v0.19.0 constants-block regression** + (`PRAUTOBLOGGER_DEFAULT_RUN_CEILING_USD` 0.50, `PRAUTOBLOGGER_DEFAULT_REQUEST_JSON_RETENTION_DAYS` 14, + `PRAUTOBLOGGER_DEFAULT_REASONING_MAX_TOKENS` 2048 — verbatim v0.18.3 values). PR #156 (v0.19.0) + dropped them from `prautoblogger.php`; the gap was latent because `tests/bootstrap.php` defines + its own fallbacks (CI green) and no exercised v0.19.x runtime path read them (prod reasoning + disabled). v0.20.0's activator defaults + run-state ceiling read them on the admin + migration path -> fatal 500 on all plugin admin pages immediately after the v0.20.0 deploy + (2026-06-12; front-of-site unaffected; hot-patched on prod within minutes, this commit makes + it canonical). Follow-up owed: CI guard asserting every referenced PRAUTOBLOGGER_* constant + is production-defined or defined()-guarded (maintenance thread). + ## [0.20.0] - 2026-06-12 ### Added diff --git a/prautoblogger.php b/prautoblogger.php index d3bc5b4..7d297c1 100644 --- a/prautoblogger.php +++ b/prautoblogger.php @@ -9,7 +9,7 @@ * Plugin Name: PRAutoBlogger * Plugin URI: https://peptiderepo.com/prautoblogger * Description: Monitors social media for trending topics, generates SEO-friendly blog posts using AI, and publishes them on a daily schedule with full cost tracking and self-improvement metrics. - * Version: 0.20.0 + * Version: 0.20.1 * Requires at least: 6.0 * Requires PHP: 7.4 * Author: PeptideRepo @@ -35,8 +35,16 @@ if ( ! defined( 'ABSPATH' ) ) { | Defined here so every file in the plugin can reference paths, versions, | and limits without magic strings. */ -define( 'PRAUTOBLOGGER_VERSION', '0.20.0' ); +define( 'PRAUTOBLOGGER_VERSION', '0.20.1' ); define( 'PRAUTOBLOGGER_DB_VERSION', '1.3.0' ); +define( 'PRAUTOBLOGGER_DEFAULT_RUN_CEILING_USD', 0.50 ); +define( 'PRAUTOBLOGGER_DEFAULT_REQUEST_JSON_RETENTION_DAYS', 14 ); +// v0.18.1: ceiling on "thinking" tokens per reasoning-enabled LLM call. The +// request's completion budget (max_tokens) is RAISED by this amount so +// reasoning can never consume the visible-content budget and return an empty +// message (the 2026-06-11 empty-draft incident). SETTINGS-backed +// (prautoblogger_reasoning_max_tokens); 0 disables the cap (pure effort mode). +define( 'PRAUTOBLOGGER_DEFAULT_REASONING_MAX_TOKENS', 2048 ); define( 'PRAUTOBLOGGER_PLUGIN_FILE', __FILE__ ); define( 'PRAUTOBLOGGER_PLUGIN_DIR', plugin_dir_path( __FILE__ ) ); define( 'PRAUTOBLOGGER_PLUGIN_URL', plugin_dir_url( __FILE__ ) );