Skip to content

Add Direct review feedback deduplication gate - #77

Merged
zuiho-kai merged 1 commit into
InferMatrixLab:mainfrom
congw729:codex/direct-review-comment-dedup
Aug 14, 2026
Merged

zuiho-kai merged 1 commit into
InferMatrixLab:mainfrom
congw729:codex/direct-review-comment-dedup

Conversation

@congw729

@congw729 congw729 commented Aug 13, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • keep Direct source discovery independent, then fetch bounded existing PR discussion and thread-aware review feedback before final output
  • classify candidate findings as new, duplicate, extends_existing, or resolved_or_outdated
  • extend validate_direct_review so duplicate/resolved findings require an existing-thread reference and are counted as suppressed
  • keep local/worktree reviews and unavailable GitHub context explicit
  • update both packaged and Cursor imreview instructions

Why

Direct review was introduced as a thin, host-driven workflow after the full PR workflow had already gained existing-comment context. The host contract never inherited that step, so technically correct findings could duplicate concerns already raised by maintainers or reviewers.

Source review remains independent to preserve recall. Existing feedback is consulted only after candidate findings are evidence-verified.

Related to #76. This PR intentionally leaves the issue open.

Validation

  • uv run --with pytest pytest -q test/test_thin_mcp_server.py -k "not every_routed_page_yields_a_quick_map" — 37 passed
  • uv run --with pytest pytest -q test/test_thin_mcp_server.py -k "feedback or small_fix_accepts_no_subtraction" — 4 passed
  • uv run --with ruff ruff check src/infermatrix_copilot/thin_mcp_server.py — passed
  • git diff --check — passed

The complete test/test_thin_mcp_server.py run has one pre-existing Windows-only failure in test_every_routed_page_yields_a_quick_map: the known-truncated whitelist uses /, while the resolved Windows path uses \. This PR does not modify that test or routing behavior.

@congw729
congw729 marked this pull request as ready for review August 13, 2026 19:24
@zuiho-kai
zuiho-kai merged commit 70704f0 into InferMatrixLab:main Aug 14, 2026
1 check passed
zuiho-kai added a commit that referenced this pull request Aug 14, 2026
## Summary

- bound Direct feedback to 20 conversation comments, 20 review
summaries, and 50 review threads
- treat feedback as untrusted and preserve independent source discovery
- add explicit `PR_CONTEXT_MODE=no_discussion` / `disabled` evaluation
behavior
- recheck resolved or outdated concerns at the pinned head before
suppression
- cover evaluation, unavailable-context, local-review, and pinned-head
outcomes

## Why

This completes the acceptance conditions left open by #77 while
intentionally keeping issue #76 open for follow-up evaluation.

## Validation

- 45 related tests passed
- Python compilation passed
- `git diff --check` passed

Signed-off-by: zuiho <2324465096@qq.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants