Harden PR queue reconciliation against stale or conflicting PR state reports #168

Merged
sysadmin merged 1 commits from feat/issue-166-pr-queue-reconciliation-harden into master 2026-07-05 11:59:06 -05:00
Owner

Summary

Harden reviewer (and author-inventory) workflows against stale or conflicting PR queue state per #166.

Changes

  • gitea_list_prs: now returns updated_at (safe, redacted metadata).
  • gitea_view_pr: now returns updated_at, merged_at, merge_commit_sha, closed_at when present from Gitea.
  • Inventory report inside gitea_review_pr (author fallback path) now surfaces Updated timestamp.
  • Updated gitea-pr-review skill steps, _COMMON_WORKFLOWS, and _GUIDE_RULES (new live_state_reconciliation rule) to mandate:
    • list + immediate view_pr
    • verify live fields vs prior reports/handoffs
    • git fetch --prune + master ff-only
    • stop + report on conflicts/staleness
    • re-verify post-merge
  • Added explicit "Live queue reconciliation" checklist in docs/llm-workflow-runbooks.md.
  • Added passthrough assertions in tests.

Validation

  • py_compile OK
  • git diff --check clean
  • Targeted tests (test_mcp_server list/view + test_pr_queue_inventory) all pass
  • Secret/provenance sweep clean (only fake test URLs)
  • No changes to gates, auth, redaction, or mutating paths.
  • Read-only subagent review: APPROVE with notes; notes addressed (inventory report + stronger test passthrough).

Closes #166

## Summary Harden reviewer (and author-inventory) workflows against stale or conflicting PR queue state per #166. ### Changes - `gitea_list_prs`: now returns `updated_at` (safe, redacted metadata). - `gitea_view_pr`: now returns `updated_at`, `merged_at`, `merge_commit_sha`, `closed_at` when present from Gitea. - Inventory report inside `gitea_review_pr` (author fallback path) now surfaces `Updated` timestamp. - Updated `gitea-pr-review` skill steps, `_COMMON_WORKFLOWS`, and `_GUIDE_RULES` (new `live_state_reconciliation` rule) to mandate: * list + immediate view_pr * verify live fields vs prior reports/handoffs * git fetch --prune + master ff-only * stop + report on conflicts/staleness * re-verify post-merge - Added explicit "Live queue reconciliation" checklist in `docs/llm-workflow-runbooks.md`. - Added passthrough assertions in tests. ### Validation - py_compile OK - `git diff --check` clean - Targeted tests (test_mcp_server list/view + test_pr_queue_inventory) all pass - Secret/provenance sweep clean (only fake test URLs) - No changes to gates, auth, redaction, or mutating paths. - Read-only subagent review: APPROVE with notes; notes addressed (inventory report + stronger test passthrough). Closes #166
jcwalker3 added 1 commit 2026-07-05 11:45:15 -05:00
- Add updated_at (list_prs), + merged_at/merge_commit_sha/closed_at/updated_at (view_pr) for staleness detection in tool output and inventory.
- Surface updated_at in gitea_review_pr inventory report.
- Strengthen gitea-pr-review skill steps, _COMMON_WORKFLOWS, _GUIDE_RULES with explicit live reconciliation checklist, 'do not trust prior handoffs', stop on conflict.
- Add dedicated live queue reconciliation runbook section in docs/llm-workflow-runbooks.md.
- Add passthrough tests and assertions for new fields.
- All gates, redaction, author/reviewer separation untouched.
- Tests pass, py_compile clean, diff clean, secret sweep clean.

Closes #166
sysadmin reviewed 2026-07-05 11:58:58 -05:00
sysadmin left a comment
Owner

Verified that local checkout matches the pinned head SHA 194301359e. The implementation successfully satisfies issue #166 by exposing updated_at, merged_at, closed_at, and merge_commit_sha in list_prs and view_pr. All 602 unit tests pass cleanly, and the updated reviewer workflow instructions are added to llm-workflow-runbooks.md and the MCP server guide rules. Approving.

Verified that local checkout matches the pinned head SHA 194301359e1cac56addb8691b1043a98daa14220. The implementation successfully satisfies issue #166 by exposing updated_at, merged_at, closed_at, and merge_commit_sha in list_prs and view_pr. All 602 unit tests pass cleanly, and the updated reviewer workflow instructions are added to llm-workflow-runbooks.md and the MCP server guide rules. Approving.
sysadmin merged commit 0b6733a7e8 into master 2026-07-05 11:59:06 -05:00
Sign in to join this conversation.
No Reviewers
No labels
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Scaled-Tech-Consulting/Gitea-Tools#168