Commit Graph

14 Commits

Author SHA1 Message Date
peptiderepo
b5cbbef804 feat: v0.2.1 — fix encryption, diverse multi-topic generation, UX fixes
- Rewrite encryption with "enc:" prefix to permanently eliminate
  the double-encryption bug on settings save
- Add one-time migration to clear legacy non-prefixed encrypted values
- Rewrite content analyzer prompts to request N distinct diverse topics
  across 5 categories (question, complaint, comparison, news, guide)
- Pass target_count*2 from pipeline to analyzer for headroom
- Add skip_dedup flag so manual Generate Now always produces content
- Generate Now button now sends force=1 to clear stale locks
- Rename OpenRouter provider files to PSR-4 convention (hyphenated)
- Switch default models to google/gemini-2.5-flash-lite
- Clean up reddit_debug log channel to standard 'reddit'
- Bump version to 0.2.1

Cost: ~$0.003/article with Gemini 2.0 Flash, ~34s pipeline.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-12 13:36:36 +07:00
peptiderepo
726b378a52 feat: v0.2.0 — PullPush.io admin UI, version bump, deploy fix
- Remove Reddit OAuth fields (Client ID/Secret) from admin settings
- Add source status indicator showing PullPush.io + .json fallback health
- Add configurable cache TTL, time window, and posts-per-subreddit settings
- Update Test Connections to report which Reddit source is active
- Bump version 0.1.0 → 0.2.0 across plugin header, constant, and readme
- Switch deploy pipeline from zip/REST API to SSH rsync with --delete
- Add LiteSpeed cache purge step to prevent stale OPcache after deploy
- Update CHANGELOG.md and readme.txt for 0.2.0 release

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-12 10:59:35 +07:00
peptiderepo
fd404a26ab docs: update ARCHITECTURE.md for PullPush.io migration
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-12 10:00:59 +07:00
peptiderepo
0db5096b31 feat: replace Reddit OAuth with PullPush.io + .json fallback 2026-04-12 09:16:46 +07:00
peptiderepo
a5d426989c fix: resolve Logger access, wrong model name, and API key guard tests
- bootstrap: add PRAUTOBLOGGER_MAX_RETRIES, API_TIMEOUT, RETRY_BASE_DELAY constants
- BaseTestCase: add wp_json_encode + home_url stubs, reset Logger singleton in tearDown
- CostTrackerTest: use openai/gpt-4o (in MODEL_PRICING), fix log_api_call args,
  allow multiple wpdb inserts (Logger may also insert event_log rows)
- OpenRouterPricingTest: add wpdb mock with prefix for Logger access on unknown models
- OpenRouterProviderTest: test send_chat_completion throws RuntimeException when
  no API key is configured (matches actual guard clause behavior)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-12 08:35:01 +07:00
peptiderepo
f8b4051437 fix: add transient stubs to BaseTestCase setUp to fix remaining 4 test errors
The get_transient, set_transient, and delete_transient functions are now
stubbed in BaseTestCase::setUp() so all tests have them available by default.
Individual tests can still override with Functions\when() in their own setUp.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-12 08:25:00 +07:00
peptiderepo
7728db5671 fix: add WP constants, WP_Query mock, fix arg types and stubs
- bootstrap: define DAY_IN_SECONDS, ARRAY_A, mock WP_Query class
- CostTrackerTest: fix log_api_call signature (post_id is ?int, not string)
- PublisherTest: fix apply_filters usage, remove broken expectation
- OpenRouterPricingTest: fix assertGreaterThanOrEqual direction
- OpenRouterProviderTest: add wp_salt stub, use empty API key
- ContentAnalyzerTest: add apply_filters, current_time, get_results stubs

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-12 08:17:18 +07:00
peptiderepo
ece032efe5 fix: add missing WordPress function stubs to unit tests
- ContentAnalyzerTest: pass Cost_Tracker as 2nd constructor arg
- IdeaScorerTest: stub get_option for topic_exclusions
- CostTrackerTest: stub get_option for monthly_budget_usd
- OpenRouterPricingTest: stub get_transient with cached model data
- OpenRouterProviderTest: stub get_option for API key + get_transient

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-12 08:05:43 +07:00
peptiderepo
ab8d38a9c8 fix: rewrite all unit tests to match actual class signatures
All 14 test files updated to use correct constructor patterns (array-based
value objects, dependency injection for ContentAnalyzer, etc.) and verified
method names against source.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-12 01:43:02 +07:00
peptiderepo
83567dcb1f Fix composer.json BOM encoding issue
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-12 00:42:46 +07:00
peptiderepo
f5f3a1dbd3 Add autoload-dev PSR-4 mapping for test namespace
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-12 00:40:48 +07:00
peptiderepo
c6370cf854 Add unit test suite: 54 tests across models, core, and providers
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-12 00:36:59 +07:00
Terence Ong
88d674d679 Initial commit: PRAutoBlogger v0.1.0 with frontend posts widget 2026-04-10 23:33:42 +07:00
Terence Ong
68c6f67bcf Initial commit: AutoBlogger v0.1.0
WordPress plugin that auto-researches topics from Reddit, generates
SEO-optimized articles via OpenRouter LLMs, runs them through a chief
editor agent, and publishes on a daily schedule.

Includes:
- Full generation pipeline (collect → analyze → score → generate → review → publish)
- Cost tracking and budget enforcement
- Admin UI: settings, review queue, metrics, activity log
- CI/CD pipeline (GitHub Actions → WordPress REST deploy)
- Unit test suite (PHPUnit + Brain Monkey)
- Structured logging with configurable verbosity

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-10 16:10:27 +07:00