feat(v3): exemptions + CI awareness + round tracking + audit-paths prompt#8
Merged
Merged
Conversation
Four upgrades to the codex-review pre-push hook based on lessons from spec 004's 12-round wingman convergence on project-arc: 1. Exemption file (.wingman-exemptions.yaml) — codex skips findings ratified out-of-scope by the project. Saves 30-50% of late-round noise where codex re-flags decisions like "preserve old import paths via shims" that conflict with constitutional rules. 2. CI status awareness — hook calls gh pr checks after the review; prepends a synthetic P1 finding if required-status-check is RED. Catches "wingman happy, CI screaming" pattern (12 rounds of undetected test failure on spec 004). 3. Round tracking + convergence detection — .reviews/_convergence.json ledger; emits [CONVERGENCE NOTICE] when stop-rule met (0 P1 + bounded P2 for 2 consecutive rounds) or [STAGNATION ALERT] when same finding flagged 2 rounds in a row. 4. Audit-related-paths prompt — codex prompt extended to audit code paths importing from / imported by the changed files for the same defect class. Bigger per-round prompts -> fewer total rounds. Hook version bumped 2->3. Installer's idempotent block-replacer upgrades v2 hooks in place. Sample exemption file at assets/.wingman-exemptions.yaml.sample for users to copy. CI smoke test extended: v2->v3 upgrade scenario, exemption parsing, _convergence.json schema validation.
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
Four upgrades to the codex-review pre-push hook (hook version stamp
2 -> 3):.wingman-exemptions.yaml) — codex sees ratified out-of-scope decisions and stops re-flagging them. Sample shipped atassets/.wingman-exemptions.yaml.sample; installer copies it to the user's repo as.wingman-exemptions.yaml.sample(NEVER auto-creates the active file).gh pr checksand prepends a synthetic[P1]finding if a required check is RED, so the next remediation round addresses CI-red instead of bandaging code that's locally green..reviews/_convergence.jsonledger; emits[CONVERGENCE NOTICE]when the stop-rule fires (0 P1 + <=2 P2for 2 consecutive rounds) or[STAGNATION ALERT]when the same finding flags twice in a row.Rationale
Direct lessons from
project-arcspec 004's 12-round wingman convergence. Each gap was felt for 3+ rounds before being addressed by hand:quality-gaterequired check was red the entire time, wingman never noticed -> Feature 2Full feature write-up:
docs/wingman-v3-features.md. Schema bump documented in README.Test plan
lint(shellcheck),syntax(bash -n + py_compile of both embedded heredocs),install-smoke(6 scenarios — fresh / v1->v3 upgrade / v2->v3 upgrade / --force / exemption parsing / convergence ledger schema)bash -n scripts/install.sh && bash -n assets/pre-push.sample-> cleanshellcheck --severity=erroron both -> cleaninstall.sh-> v3 marker present, exactly 1 wingman block, exemption sample copied_convergence.jsonschema matches spec — branch, rounds[], convergence{stop_rule, trend, stagnation}; stop-rule fires correctly at round 3 of0,0,0P1.wingman-exemptions.yamlStays DRAFT
This PR stays DRAFT per workflow policy — only the human un-drafts after review.