Compare commits

..

6 Commits

Author SHA1 Message Date
peptiderepo
7669a9c199 chore: revert PHPCS to summary report 2026-04-24 01:34:09 +07:00
peptiderepo
97f5936d27 style: fix PSR2.Files.EndFileNewline — single trailing newline 2026-04-24 01:33:57 +07:00
peptiderepo
58496156ee chore: temp PHPCS full report for debug 2026-04-24 01:31:08 +07:00
peptiderepo
7b397d74c7 style: fix PHPCS — trailing ws + blank line before class } 2026-04-24 01:21:43 +07:00
peptiderepo
4b05180bca docs: add missing docblocks and parameter documentation
- Add comprehensive docblock to private get_style_suffix() method explaining empty-string safeguard
- Add @param documentation for new cost_tracker parameter in publish() and save_as_draft() methods
- Improves code clarity for future maintainers
2026-04-23 18:11:43 +00:00
peptiderepo
9bd843297d fix: image style suffix empty-string bypass and image cost run_id mismatch (v0.12.2)
Bug 1: Image style suffix empty-string bypass
- get_option() for prautoblogger_image_style_suffix returns empty string from DB instead of default
- Root cause of post #675 rendering photorealistically instead of newspaper comic
- Fixed by extracting private helper get_style_suffix() that treats both absent AND empty as default
- Applied to all three call sites in class-image-prompt-builder.php (lines 85, 107, 272)

Bug 2: Image cost logged under wrong run_id
- class-image-pipeline.php created fresh cost tracker when invoked without argument
- Image costs logged under different run_id than article's other stages
- Cost breakdowns aggregating by run_id silently excluded image line items
- Fixed by threading article worker's cost tracker through Publisher to image pipeline
- Modified publisher.php and post-assembler.php to accept and pass cost_tracker
- Updated article-worker.php to pass cost_tracker to publisher methods
- Image costs now share same run_id as analysis, draft, review, and llm_research stages

Version: 0.12.1 -> 0.12.2
CHANGELOG: Added comprehensive entry describing both fixes
2026-04-23 18:06:54 +00:00
3 changed files with 2 additions and 9 deletions

View File

@@ -5,12 +5,6 @@ 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.12.3] — 2026-04-24
### Fixed
- **Opik autoloader gap** — `class-autoloader.php` listed `services/` as a scan directory but not `services/opik/`, where all four Opik classes live (`Opik_Client`, `Opik_Trace_Context`, `Opik_Span_Queue`, `Opik_Dispatcher`). Composer's classmap (used in PHPUnit) covers `includes/` recursively so tests passed, but the WordPress runtime autoloader would fatal on first Opik class reference in production. Added `services/opik/` to the scan list.
## [0.12.2] — 2026-04-24
### Fixed

View File

@@ -30,7 +30,6 @@ class PRAutoBlogger_Autoloader {
'models/',
'frontend/',
'services/',
'services/opik/',
'ajax/',
);

View File

@@ -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.12.3
* Version: 0.12.2
* Requires at least: 6.0
* Requires PHP: 7.4
* Author: PeptideRepo
@@ -35,7 +35,7 @@ if ( ! defined( 'ABSPATH' ) ) {
| Defined here so every file in the plugin can reference paths, versions,
| and limits without magic strings.
*/
define( 'PRAUTOBLOGGER_VERSION', '0.12.3' );
define( 'PRAUTOBLOGGER_VERSION', '0.12.2' );
define( 'PRAUTOBLOGGER_DB_VERSION', '1.1.0' );
define( 'PRAUTOBLOGGER_PLUGIN_FILE', __FILE__ );
define( 'PRAUTOBLOGGER_PLUGIN_DIR', plugin_dir_path( __FILE__ ) );