Skip to content

fix: match action step review hashes on resolve - #775

Open
jimmybrancaccio wants to merge 1 commit into
peteromallet:mainfrom
jimmybrancaccio:fix/step-ref-auto-completion
Open

jimmybrancaccio wants to merge 1 commit into
peteromallet:mainfrom
jimmybrancaccio:fix/step-ref-auto-completion

Conversation

@jimmybrancaccio

Copy link
Copy Markdown

Problem

Resolving one review finding auto-completes unrelated cluster steps when triage stored issue_refs as review summary hashes. The completion helper treats those hashes as full issue-ID suffixes, so none appear in queue_order and every such step looks resolved.

Observed in a real plan: resolving one authorization finding marked seven unrelated steps across four clusters complete.

Fix

Build resolved and still-open reference sets from both full work-item IDs and review summary_hash values. A step now completes only when this resolution touched one of its references and none of its references remain open.

Validation

  • python -m pytest desloppify/tests/plan/test_step_completion_direct.py desloppify/tests/commands/resolve -q — 48 passed
  • Full suite — 5,813 passed, 3 skipped, with one unrelated existing Nim tree-sitter grammar/version failure (proc_declaration is unavailable in the installed grammar)

Copilot AI lite review requested due to automatic review settings September 22, 2026 19:23

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

Three moderate findings remain unresolved.

Get a fresh assessment by requesting another Copilot review.

Review effort: Lite
Findings: 3 Medium severity

Open (3)
What changed in this PR

This pull request fixes living-plan step completion for review summary hashes, preventing unrelated steps from being auto-completed.

Changes:

  • Tracks resolved and open references by full IDs and summary hashes.
  • Updates completion and resolve integration.
  • Adds regression coverage and updates test mocks.
File Findings
desloppify/​tests/​plan/​test_step_completion_direct.py No findings.
desloppify/​tests/​commands/​resolve/​test_living_plan_direct.py No findings.
desloppify/​engine/​_plan/​step_completion.py Moderate (3 votes): preserve suffix matching for resolved and open references.
desloppify/​app/​commands/​resolve/​living_plan.py Moderate (3 votes): account for reopened IDs; moderate (2 votes): preserve queue-based fallback when state is unavailable.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +111 to +112
if issue.get("status") == "open" and issue_id not in resolved_ids:
open_refs.update(refs)
Comment on lines +138 to +141
resolved_refs, open_refs = _step_ref_sets(state, all_resolved)
step_messages = auto_complete_steps(
plan, resolved_refs=resolved_refs, open_refs=open_refs
)
Comment on lines +26 to +35
if resolved_refs is not None and not any(ref in resolved_refs for ref in refs):
continue
if open_refs is not None:
all_gone = all(ref not in open_refs for ref in refs)
else:
# Match by suffix: ref "abc123" matches "review::path::abc123"
all_gone = all(
not any(qid.endswith(ref) or qid == ref for qid in queue_set)
for ref in refs
)
github-actions Bot added a commit to citizenadam/desloppify that referenced this pull request Sep 22, 2026

This branch has not been deployed

No deployments
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