fix(loop-memory): canonicalize trusted check reruns#189
Conversation
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (4)
📝 WalkthroughWalkthroughWS-ENG-007 adds canonical protected-check rerun selection, Schema v3 recovery certificates with ordered recovered merges, adjacent merge validation, versioned recovery transport, regression tests, and updated recovery documentation and state. ChangesWS-ENG-007 canonical recovery
Estimated code review effort: 4 (Complex) | ~45 minutes Sequence Diagram(s)sequenceDiagram
participant GitHubCheckRuns
participant ProtectedCheckValidator
participant RecoveryPlanner
participant LoopMemory
GitHubCheckRuns->>ProtectedCheckValidator: provide matching check-run history
ProtectedCheckValidator->>ProtectedCheckValidator: validate provenance and select latest completed invocation
ProtectedCheckValidator->>RecoveryPlanner: return canonical protected-check results
RecoveryPlanner->>LoopMemory: prepare ordered adjacent merge exemptions
LoopMemory->>RecoveryPlanner: consume and validate recovery inventory
Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs/operations_post_merge_memory.md`:
- Around line 264-267: Update the paragraph under “WS-ENG-007 Canonical
Check-Evidence Recovery” so the “#187” PR reference does not begin a Markdown
heading; keep it attached to the preceding line or indent the continuation while
preserving the paragraph’s wording.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: a6c7225f-9935-4a43-96af-7852878d8050
📒 Files selected for processing (17)
.agent-loop/initiatives/WS-ENG-007-concurrent-pr-review-reconciliation/CHUNK_MAP.md.agent-loop/initiatives/WS-ENG-007-concurrent-pr-review-reconciliation/DECISIONS.md.agent-loop/initiatives/WS-ENG-007-concurrent-pr-review-reconciliation/DISCOVERY.md.agent-loop/initiatives/WS-ENG-007-concurrent-pr-review-reconciliation/INTENT.md.agent-loop/initiatives/WS-ENG-007-concurrent-pr-review-reconciliation/PLAN.md.agent-loop/initiatives/WS-ENG-007-concurrent-pr-review-reconciliation/RISKS.md.agent-loop/initiatives/WS-ENG-007-concurrent-pr-review-reconciliation/STATUS.md.agent-loop/initiatives/WS-ENG-007-concurrent-pr-review-reconciliation/chunks/WS-ENG-007-00R2-canonical-check-recovery.md.agent-loop/initiatives/WS-ENG-007-concurrent-pr-review-reconciliation/reviews/WS-ENG-007-00R2-external-review-response.md.agent-loop/initiatives/WS-ENG-007-concurrent-pr-review-reconciliation/reviews/WS-ENG-007-00R2-internal-review-evidence.md.agent-loop/initiatives/WS-ENG-007-concurrent-pr-review-reconciliation/reviews/WS-ENG-007-00R2-pr-trust-bundle.md.agent-loop/merge-intents/WS-ENG-007-00R2.json.agent-loop/policies/loop-memory-recovery.jsondocs/operations_post_merge_memory.mdscripts/test_agent_gates.pyscripts/test_update_post_merge_memory.pyscripts/update_post_merge_memory.py
|
@coderabbitai review |
✅ Action performedReview finished.
|
PR Trust Bundle: WS-ENG-007-00R2
Goal
Make signed loop-memory reconciliation stable under legitimate trusted check
reruns and recover the exact PR #187 → PR #188 → 00R2 sequence once.
Design
Every same-name protected check candidate is validated before selection.
Completed trusted invocations are ordered by timezone-normalized
started_atand strict positive check-run ID. Completion time cannot reorder invocations;
the newest invocation must succeed. Any malformed, foreign, incomplete,
wrong-head, unknown-conclusion, or duplicate-ID evidence fails closed.
Policy schema v3 names at most two recovered merges and the activation. The
production certificate pins PR #187, PR #188, and direct-next 00R2 in exact
first-parent order. Protected provenance is checked on every head. Temporary
identities are consumed before signing and never serialize or replay.
Recovery-file schema v1 remains limited to two identities. Schema v2 is emitted
only for an exact three-identity result and requires exactly three on every
reload.
Evidence
bb3f03b3b9026a7eb3a9adb40e657e07c4eafac3after findings were repaired.permission, product behavior, or human merge authority changed.
Human Review Focus
Confirm newer invocation failure cannot be hidden, all three merge heads receive
protected provenance validation, and recovery transport/policy versions remain
closed and non-reusable.
Human Merge Ownership
Only the user may approve and merge this PR. No other PR may merge first. After
signed reconciliation, both successors remain stopped pending separate explicit
starts.
Summary by CodeRabbit
Reliability
Documentation
Tests