spec-kitty / spec-kitty/spec-kitty
`--self-review-fallback` force_count accounting is reported inverted
- Dominant language
- Python
- Stars
- 1.6k
- Forks
- 165
- Avg merge
- 14h 52m
- Merged PRs (30d)
- 303
Description
## Summary
The `--self-review-fallback` `force_count` accounting is **reported inverted** (maintainer field report, captured from #3445). Because `force_count` feeds the merge-preflight reviewer-independence / hollow-review signal, an inverted sense means that governance warning can fire when it should not, or stay silent when it should fire.
## Why this must be fixed first
#3445 proposes making reviewer-independence a configurable **hard-block** wired onto exactly this accounting. Wiring a hard gate onto an inverted counter would refuse legitimate reviews or wave through genuine self-reviews. The #3445 body calls this out explicitly: *"its `force_count` accounting is currently reported inverted (track that separately before wiring a hard-block onto it)."* This is that separate ticket.
## Code pointers (for verification + fix)
- **Increment:** `src/specify_cli/status/reducer.py:191` — `force_count = prior_force_count + (1 if event.force else 0)`.
- **Reported / warned:** `src/specify_cli/merge/preflight.py:477-509` (`_collect_force_count_warnings`) — the `force_count >= 2` hollow-review warning, suppressed when `_independent_reviewer_confirmed` (`:458-474`) proves the approving actor differs from the implementing actor.
- **Enforced:** `src/specify_cli/cli/commands/agent/tasks_parsing_validation.py:282` — `--self-review-fallback requires --force so force_count records the independence override.`
## Acceptance
- [ ] Confirm the inversion with a focused test reproducing the reported sense (which direction is wrong: the recorded count, the warning threshold comparison, or the operator-facing report string).
- [ ] Fix so the reported/enforced sense matches the real independence-override count.
- [ ] Regression test pinning the corrected sense, referencing this issue.
Blocks: #3445 (configurable-strictness reviewer independence). Related: mission `review-claim-role-aware-gate`, epic #3044 (review-artifact integrity).
Contributor guide
Research direction
Start with the force_count increment in src/specify_cli/status/reducer.py:191, then trace its reporting and warning behavior in src/specify_cli/merge/preflight.py:458-509 and the enforcement point in tasks_parsing_validation.py:282. Reproduce both independence-override and self-review cases to identify which sense is inverted. Done means the reported and enforced count match the real override count, with a focused regression test referencing this issue.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cli, testing
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 62/100