feat(stack-9): implement MVP gaps#3
Merged
Merged
Conversation
… 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]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
load_config()now raisesOSErrorinstead of printing a warning whenWP_URLuses HTTP — Application Passwords must not be transmitted over plaintextReviewGate.approve_content()rejects drafts withquality_score < 60(configurable viaMIN_QUALITY_SCORE); drafts with no score bypass the gateBlogJob.reject(force=True)andbrewpress reject --forceallow rejection fromAPPROVED_STEP_2state (e.g., after a failed publish where rollback isn't viable)is_code_posttagging:Orchestrator.draft()now stampsis_code_poston theBlogJobfromWorkContextso downstream publish can act on content type--auto-approvewired: CLI passesauto_approve=args.auto_approvethrough toOrchestrator.draft(), transitioning the job straight toAPPROVED_STEP_1in one commandWordPressClient.upload_image_file()uploads a local image via raw-body multipart POST;Orchestrator.publish()detects terminal screenshots for code posts and setsfeatured_mediaon the WP postbrewpress calibrate: Fetches last 20 published WP posts and writes a tone fingerprint to~/.brewpress/tone.jsonbrewpress suggest: Wired toTrendScoutwith pluggableTrendDataSource; usesNullTrendSourceby default (returns empty — swap in a real source for scoring)Test plan
pytest -qNonebypasses--forcesucceeds fromAPPROVED_STEP_2, without flag raisesis_code_posttagged correctly in both code and non-code post pathsauto_approve=TruereturnsAPPROVED_STEP_1state,FalsereturnsREVIEWEDtest_publish_calls_wp_client_with_jobupdated forfeatured_media_id=Nonekwarg🤖 Generated with Claude Code