mirror of
https://github.com/garrytan/gstack.git
synced 2026-09-16 09:55:29 +02:00
* fix(review): bind evidence to completed unchanged review passes * fix(review): keep unresolved Codex findings unverified * docs: update review evidence documentation for v1.87.3.0 * test(cso): let Windows integration finish within subprocess budgets * docs: update project documentation for v1.87.3.0 --------- Co-authored-by: garrytan <19957+garrytan@users.noreply.github.com>
60 lines
4.9 KiB
Cheetah
60 lines
4.9 KiB
Cheetah
## Step 9: Pre-Landing Review
|
|
|
|
Review structural issues tests don't catch. Order: calibrate, checklist, design, specialists, deduplicate, fix, persist. All phases below belong to Step 9; only continue to Step 10 after item 9.
|
|
|
|
{{CONFIDENCE_CALIBRATION}}
|
|
|
|
1. Read `~/.claude/skills/gstack/review/checklist.md`. If the file cannot be read, **STOP** and report the error.
|
|
|
|
2. Before reading the diff, run `~/.claude/skills/gstack/bin/gstack-review-log --start review` and remember the printed token as REVIEW_START for this pass. Then run `git diff origin/<base>` to get the full diff (scoped to feature changes against the freshly-fetched base branch). Read non-ignored untracked source files too (`git ls-files --others --exclude-standard`); the fingerprint includes them. Each full re-review captures a new token here, never at log time.
|
|
|
|
3. Apply the review checklist in two passes:
|
|
- **Pass 1 (CRITICAL):** SQL & Data Safety, LLM Output Trust Boundary
|
|
- **Pass 2 (INFORMATIONAL):** All remaining categories
|
|
|
|
{{DESIGN_REVIEW_LITE}}
|
|
|
|
Include any design findings alongside the code review findings. They follow the same Fix-First flow below.
|
|
|
|
{{REVIEW_ARMY}}
|
|
|
|
{{CROSS_REVIEW_DEDUP}}
|
|
|
|
### Step 9: Fix-First and persistence (items 4-9)
|
|
|
|
4. **Classify each finding from both the checklist pass and specialist review (Step 9.1-Step 9.2) as AUTO-FIX or ASK** per the Fix-First Heuristic in
|
|
checklist.md. Critical findings lean toward ASK; informational lean toward AUTO-FIX.
|
|
|
|
5. **Auto-fix all AUTO-FIX items.** Apply each fix. Output one line per fix:
|
|
`[AUTO-FIXED] [file:line] Problem → what you did`
|
|
|
|
6. **If ASK items remain,** present them in ONE AskUserQuestion:
|
|
- List each with number, severity, problem, recommended fix
|
|
- Per-item options: A) Fix B) Skip
|
|
- Overall RECOMMENDATION
|
|
- If 3 or fewer ASK items, you may use individual AskUserQuestion calls instead
|
|
|
|
7. **After all fixes (auto + user-approved):**
|
|
- If ANY fixes were applied: commit fixed files by name (`git add <fixed-files> && git commit -m "fix: pre-landing review fixes"`), then **stay in this invocation and loop**: re-run the test suite (Step 5) on the fixed code, then re-run this review (Step 9 items 2-6) against the updated diff. Repeat until one full pass applies ZERO fixes — tests green and review clean — then summarize and persist (items 8-9). NEVER stop to tell the user to run `/ship` again; a fix-and-rerun cycle has no user decision in it, and stopping there breaks the fully-automated contract (#2391).
|
|
- **Bound: 3 fix cycles.** If the 3rd cycle still applies fixes, persist item 9 with `converged:false` using that pass's original REVIEW_START, then STOP and report which findings keep reappearing — a review that won't converge is a genuine blocker worth human eyes, not a re-run request.
|
|
- If no fixes applied (all ASK items skipped, or no issues found): summarize and persist (items 8-9).
|
|
|
|
8. Output summary: `Pre-Landing Review: N issues — M auto-fixed, K asked (J fixed, L skipped)`
|
|
|
|
If no issues found: `Pre-Landing Review: No issues found.`
|
|
|
|
9. Persist the review result to the review log:
|
|
```bash
|
|
~/.claude/skills/gstack/bin/gstack-review-log '{"skill":"review","timestamp":"TIMESTAMP","status":"STATUS","issues_found":N,"critical":N,"informational":N,"quality_score":SCORE,"specialists":SPECIALISTS_JSON,"findings":FINDINGS_JSON,"commit":"'"$(git rev-parse --short HEAD)"'","via":"ship","completed":COMPLETED,"converged":CONVERGED,"cycles":CYCLES}' --finish REVIEW_START
|
|
```
|
|
Substitute TIMESTAMP (ISO 8601), STATUS ("clean" if no issues, "issues_found" otherwise),
|
|
and N values from the remaining unresolved findings, not the original pre-fix totals. The `via:"ship"` distinguishes from standalone `/review` runs.
|
|
- `REVIEW_START` = the token captured in item 2 before this pass read the diff. `COMPLETED` = true only if the checklist and dispatched specialists completed; missing coverage is false, never clean. `CONVERGED` = true only for a completed pass that applied zero fixes. `CYCLES` = fix cycles performed (0 for a first-pass completion). Never recapture at persistence to certify fixes that have not been reviewed.
|
|
- `quality_score` = the PR Quality Score computed in Step 9.2 (e.g., 7.5). If specialists were skipped (small diff), use `10.0`
|
|
- `specialists` = the per-specialist stats object compiled in Step 9.2. Each specialist that was considered gets an entry: `{"dispatched":true/false,"findings":N,"critical":N,"informational":N}` if dispatched, or `{"dispatched":false,"reason":"scope|gated"}` if skipped. Example: `{"testing":{"dispatched":true,"findings":2,"critical":0,"informational":2},"security":{"dispatched":false,"reason":"scope"}}`
|
|
- `findings` = array of per-finding records. For each finding (from checklist pass and specialists), include: `{"fingerprint":"path:line:category","severity":"CRITICAL|INFORMATIONAL","action":"ACTION"}`. ACTION is `"auto-fixed"`, `"fixed"` (user approved), or `"skipped"` (user chose Skip).
|
|
|
|
Save the review output — it goes into the PR body in Step 19.
|
|
|
|
---
|