Skip to content

feat(stack-9): implement MVP gaps#3

Merged
ucguy4u merged 2 commits into
mainfrom
feat/mvp-gaps
Apr 5, 2026
Merged

feat(stack-9): implement MVP gaps#3
ucguy4u merged 2 commits into
mainfrom
feat/mvp-gaps

Conversation

@ucguy4u

@ucguy4u ucguy4u commented Apr 5, 2026

Copy link
Copy Markdown
Contributor

Summary

  • HTTPS enforcement: load_config() now raises OSError instead of printing a warning when WP_URL uses HTTP — Application Passwords must not be transmitted over plaintext
  • Quality gate: ReviewGate.approve_content() rejects drafts with quality_score < 60 (configurable via MIN_QUALITY_SCORE); drafts with no score bypass the gate
  • Force-reject: BlogJob.reject(force=True) and brewpress reject --force allow rejection from APPROVED_STEP_2 state (e.g., after a failed publish where rollback isn't viable)
  • is_code_post tagging: Orchestrator.draft() now stamps is_code_post on the BlogJob from WorkContext so downstream publish can act on content type
  • --auto-approve wired: CLI passes auto_approve=args.auto_approve through to Orchestrator.draft(), transitioning the job straight to APPROVED_STEP_1 in one command
  • Featured image upload: WordPressClient.upload_image_file() uploads a local image via raw-body multipart POST; Orchestrator.publish() detects terminal screenshots for code posts and sets featured_media on the WP post
  • brewpress calibrate: Fetches last 20 published WP posts and writes a tone fingerprint to ~/.brewpress/tone.json
  • brewpress suggest: Wired to TrendScout with pluggable TrendDataSource; uses NullTrendSource by default (returns empty — swap in a real source for scoring)

Test plan

  • All existing tests green: pytest -q
  • Quality gate: approve with score < 60 raises, = 60 passes, None bypasses
  • Force-reject: --force succeeds from APPROVED_STEP_2, without flag raises
  • is_code_post tagged correctly in both code and non-code post paths
  • auto_approve=True returns APPROVED_STEP_1 state, False returns REVIEWED
  • test_publish_calls_wp_client_with_job updated for featured_media_id=None kwarg

🤖 Generated with Claude Code

uday chauhan and others added 2 commits April 5, 2026 20:39
… upload, calibrate, suggest

- Enforce HTTPS on WP_URL at load_config time (raise OSError instead of warning)
- Add quality gate in ReviewGate.approve_content() (MIN_QUALITY_SCORE=60)
- Add force-reject from APPROVED_STEP_2 via --force flag on CLI and model
- Tag is_code_post on BlogJob from WorkContext after generation
- Wire --auto-approve flag through CLI → Orchestrator.draft(auto_approve=)
- Upload terminal screenshot as WP featured_media for code posts at publish time
- Add WordPressClient.upload_image_file() with multipart raw-body upload
- Wire brewpress calibrate: fetch last 20 WP posts → ~/.brewpress/tone.json
- Wire brewpress suggest: TrendScout with NullTrendSource (pluggable data source)
- Fix tests: HTTPS raises, reject error messages, new behavior coverage

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
ci.yml:
  - Runs on push to main and all PRs
  - lint job: ruff check src/ (fast gate, no test matrix overhead)
  - test job (needs lint): pytest on Python 3.11/3.12/3.13 in parallel
  - cancel-in-progress prevents stale runs from blocking new pushes

release.yml:
  - Triggered by v*.*.* tag push
  - Builds sdist + wheel via python -m build
  - Creates GitHub Release with artifacts and auto-generated release notes

Also fix ruff lint issues found while wiring:
  - cli.py: import order + line length in calibrate block
  - orchestrator.py: remove unused WorkContext and AmbiguousMatchError imports

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
@ucguy4u
ucguy4u merged commit 9c48d65 into main Apr 5, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant