Phase 08: GitHub Action + README#16
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
fix: recover wrapped classifier JSON for phase 8 demo
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
ⓘ You are approaching your monthly quota for Qodo. Upgrade your plan Review Summary by QodoPhase 8 Complete: GitHub Actions Automation Workflow + README Rewrite with Bot Comment Filtering
WalkthroughsDescription**Phase 8 Completion: GitHub Actions Automation + README Rewrite** • Shipped copyable GitHub Actions workflow (.github/workflows/github-pr-kb.yml) triggered on merged PRs and manual workflow_dispatch with dual-mode auth (GitHub App preferred, PAT fallback) • Implemented action_state helper module for testable, deterministic workflow skip/cursor decisions with stdlib-only imports and CLI interface • Added robust comment filtering: Qodo bot issue comments excluded, automation KB publication PR skipped, while preserving inline review comments • Enhanced classifier robustness to parse JSON from markdown fences, prose-wrapped responses, and varied model output formats • Rewrote README with automation-first structure, credential-role matrix, platform-aware local setup, and explicit committed-vs-not-committed artifact guidance • Added comprehensive test coverage for action state logic, workflow contract, extractor filtering, classifier parsing, and README/.env.example alignment • Completed Phase 8 with all three plans (action-state helper, workflow automation, README rewrite) verified through UAT, security audit, Nyquist validation, and live consumer-repo demo • Configuration extended with kb_bot_branch field to identify rolling KB publication PR without hardcoding Diagramflowchart LR
A["Merged PR Event<br/>or Manual Dispatch"] -->|"action_state helper"| B["Skip/Cursor Decision"]
B -->|"Monotonic Cursor"| C["Extract New Comments"]
C -->|"Filter Qodo Issues<br/>Skip Automation PR"| D["Cleaned Comments"]
D -->|"Robust Parsing"| E["Classify Comments"]
E -->|"Generate KB"| F["Publish Rolling PR"]
F -->|"Persist Cursor"| G["Repository Variable"]
H["README + .env.example"] -->|"Automation-First<br/>Dual Auth"| I["User Bootstrap"]
File Changes1. src/github_pr_kb/action_state.py
|
Code Review by Qodo
1.
|
|
|
||
|
|
||
| def decide_action_run( | ||
| *, |
There was a problem hiding this comment.
What's *,? What is it used for and why?
There was a problem hiding this comment.
What's the point in having tests for a README.md file? I've never seen such tests before.
- Use Search API for reliable merged-PR lookup in workflow_dispatch (fixes potential skip when first 100 closed PRs have no merges) - Add comment explaining keyword-only (*,) syntax in action_state.py - Remove test_readme.py (README structural tests deemed unnecessary) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Replace fragile one-liner with inline Python that catches ValueError/TypeError on malformed KB_LAST_SUCCESSFUL_CURSOR values, emits a GitHub Actions warning, and continues with any valid cursor. Prevents late-pipeline crash when cursor is manually repaired with a formatting mistake. Addresses Qodo review: 'Bad cursor breaks persistence' Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- New test_e2e_pipeline.py runs extract -> classify -> generate against Galzi1/github-pr-kb-demo with real API keys - 9 assertions covering cache files, classification, KB articles, frontmatter, manifest, INDEX.md, and category structure - Gated: requires RUN_INTEGRATION_TESTS=1 + real tokens; skipped in unit test runs (marked @pytest.mark.e2e) - New e2e-pipeline CI job runs only on pushes to main (cost guard) - Uses same pinned actions (checkout, setup-uv) as existing jobs Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…ntmatter Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Summary
Phase 8: github-action-readme
Goal: A repository maintainer can add a provided workflow file and have PR comments automatically extracted after merged PRs or manual recovery runs, with no wasted API calls when nothing is new, and a new user can get from zero to a generated KB by following the README alone.
Status: Verified via UAT, security audit, Nyquist validation, and live consumer-repo demo
This ships the copyable GitHub Actions workflow, the standalone action-state helper, and an automation-first README/.env surface. The branch also includes the follow-up fixes discovered during the live Phase 8 demo so the shipped workflow, extractor filters, and classifier behavior match the validated happy path.
Changes
Plan 01: Action State Helper
Added a standalone
github_pr_kb.action_statemodule that makes workflow run/skip decisions testable and deterministic.Key files:
src/github_pr_kb/action_state.pytests/test_action_state.pyPlan 02: Workflow Automation
Shipped the merged-PR plus
workflow_dispatchautomation workflow, including cache restore, rolling PR publication, and monotonic cursor persistence.Key files:
.github/workflows/github-pr-kb.ymltests/test_action_workflow.pyPlan 03: README Rewrite
Rewrote the README around the shipped workflow and aligned
.env.examplewith the real local config surface.Key files:
README.md.env.exampletests/test_readme.pyDemo hardening included on this branch
Follow-up fixes from the live consumer-repo validation are included in this PR so the shipped phase matches the validated behavior.
Key files:
src/github_pr_kb/classifier.pysrc/github_pr_kb/extractor.pytests/test_classifier.pytests/test_extractor.pyRequirements Addressed
Verification
.planning/phases/08-github-action-readme/08-UAT.md(4/4 checks passed).planning/phases/08-github-action-readme/08-SECURITY.md(threats_open: 0, 14 threats closed).planning/phases/08-github-action-readme/08-VALIDATION.md(0 gaps).\.venv\Scripts\python.exe -m pytest tests\test_action_state.py tests\test_action_workflow.py tests\test_readme.py -q.\.venv\Scripts\python.exe -m pytest tests -qGalzi1/github-pr-kb-demo#1024277455924Galzi1/github-pr-kb-demo#1124277477172Key Decisions
KB_TOOL_REPOSITORYand immutableKB_TOOL_REF.KB_VARIABLES_TOKENas the fallback path.KB_LAST_SUCCESSFUL_CURSORonly after successful publication, and only as the monotonic max against the freshest stored value..github-pr-kb/cache/.