-
Notifications
You must be signed in to change notification settings - Fork 1
Add QC orchestrator sub-agent for pre-merge quality validation in multi-worktree workflows #57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Co-authored-by: zapabob <[email protected]>
Co-authored-by: zapabob <[email protected]>
Co-authored-by: zapabob <[email protected]>
Co-authored-by: zapabob <[email protected]>
Co-authored-by: zapabob <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR implements a QC (Quality Check) orchestrator sub-agent for automated pre-merge quality validation in AI-assisted multi-worktree development workflows. The implementation adds comprehensive testing infrastructure with configurable profiles, risk scoring, and structured logging with a 200-line change threshold for PR recommendations.
Key Changes
- Implemented complete QC orchestrator module with test execution, diff analysis, risk scoring (0.0-1.0), and merge recommendation logic
- Added three test profiles (minimal, standard, full) with different levels of test coverage
- Integrated QC functionality into the CLI with
codex qcsubcommand supporting--profileoption
Reviewed Changes
Copilot reviewed 16 out of 17 changed files in this pull request and generated 17 comments.
Show a summary per file
| File | Description |
|---|---|
| config.toml | Added [qc] configuration section with default_profile setting |
| codex-rs/tui/src/main.rs | Minor whitespace cleanup (removed BOM, trailing spaces) |
| codex-rs/tui/Cargo.toml | Removed conflicting workspace declaration |
| codex-rs/core/src/qc/worktree.rs | New module for Git worktree detection and branch name extraction |
| codex-rs/core/src/qc/profiles.rs | New module defining test profiles with Rust and Web test commands |
| codex-rs/core/src/qc/orchestrator.rs | Core orchestration logic for test execution, diff analysis, and recommendations |
| codex-rs/core/src/qc/logger.rs | Markdown log generation with timezone-aware timestamps |
| codex-rs/core/src/qc/mod.rs | Module exports for QC functionality |
| codex-rs/core/src/lib.rs | Added qc module to core library |
| codex-rs/core/Cargo.toml | Added chrono dependency with serde feature |
| codex-rs/cli/src/main.rs | Integrated qc subcommand with profile selection and summary output |
| codex-rs/cli/Cargo.toml | Added codex-core dependency and removed workspace declaration |
| codex-rs/Cargo.lock | Lock file updates for new dependencies (chrono and transitive deps) |
| _docs/test-profiles.md | Documentation for the three test profiles and their use cases |
| _docs/qc-usage-guide.md | Comprehensive usage guide with examples, workflow integration, and troubleshooting |
| _docs/logs/2025-11-19-copilot-add-qc-orchestrator-sub-agent-impl.md | Example log file from QC test runs |
| _docs/QC_ORCHESTRATOR_IMPLEMENTATION_SUMMARY.md | Technical implementation summary and validation checklist |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
I have read the CLA Document and I hereby sign the CLA 0 out of 2 committers have signed the CLA. |
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
… add named constants for risk scoring and security documentation for command execution Co-authored-by: zapabob <[email protected]>
Fixed file corruption and addressed remaining PR review feedback:
Changes
1. Fixed File Corruption
2. Named Constants for Risk Scoring (Comment 2541464636)
MAX_LINES_FOR_RISK = 500.0: Lines threshold for normalizationMAX_FILES_FOR_RISK = 20.0: Files threshold for normalizationRISK_WEIGHT_LINES = 0.7: Weight for line changes (70%)RISK_WEIGHT_FILES = 0.3: Weight for file changes (30%)calculate_risk_scoremethod documentation explaining the algorithm3. Security Documentation (Comment 2541464569)
run_commandmethod4. Restored profiles.rs
|| echofallbacksoptional_rust_commands()method for tarpaulinTesting
Original prompt
Implement a production-ready QC orchestrator sub-agent in the zapabob/codex repository that performs pre-merge quality checks for AI-assisted multi-worktree development.
Context and goals
_docsdirectory.High-level requirements
QC orchestrator agent
qc_orchestrator.rsin the Rust backend) that can be invoked from:git worktree listor equivalent) for the current working directory._docs/logs(see below for format).Test profiles ("best-practice" defaults)
minimal:cargo test -p codex-clistandard(default):cargo test --allcargo clippy --all --all-targets -- -D warningspnpm test(ornpm testif pnpm is unavailable) in appropriate packagesfull:standardcargo tarpaulin --workspace) if availablepnpm lint(ornpm run lint)_docs/test-profiles.md.config.tomlunder a[qc]section, with fallback tostandard).Logging format and storage
All QC runs must append a log entry to a markdown file under
_docs/logs, created as needed.File naming convention:
_docs/logs/YYYY-MM-DD-{worktreename}-impl.mdEach QC run appends a section with this structure:
The QC orchestrator should:
Git diff and 200-line rule
git diffbetween the current worktree state and its upstream (e.g. the main branch or configured base ref).Integration into CLI and Tauri GUI
codex qcor similar:--profile,--agent-name,--ai-name,--feature(機能 description)._docs/logs.This pull request was created as a result of the following prompt from Copilot chat.
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.