fix(loop-memory): repair planning intake tree reconciliation#188
Conversation
|
Warning Review limit reached
Next review available in: 28 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (5)
📝 WalkthroughWalkthroughThis PR adds the WS-ENG-007-00R1 planning-intake recovery contract, strengthens recursive Git tree canonicalization, updates recovery policy and manifests, expands gate regression coverage, and records review evidence while keeping successor chunks stopped pending explicit signed starts. ChangesWS-ENG-007 Planning-Intake Recovery
Estimated code review effort: 4 (Complex) | ~45 minutes Sequence Diagram(s)sequenceDiagram
participant GitHub
participant PlanningIntake
participant RecoveryPolicy
participant SignedMemory
GitHub->>PlanningIntake: return recursive tree and PR file data
PlanningIntake->>PlanningIntake: canonicalize leaves and validate deltas
PlanningIntake->>RecoveryPolicy: verify pinned PR 187 and 00R1 sequence
RecoveryPolicy->>SignedMemory: consume ephemeral recovery authority
SignedMemory-->>PlanningIntake: preserve stopped successor chunks
Possibly related PRs
🚥 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: 2
🤖 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
@.agent-loop/initiatives/WS-ENG-007-concurrent-pr-review-reconciliation/DECISIONS.md:
- Around line 60-62: Update the paragraph in DECISIONS.md so the PR `#187`
reference is not placed at the start of the line; keep the literal “PR `#187`”
wording while joining or reflowing the sentence to avoid Markdown interpreting
`#187` as a heading.
In
@.agent-loop/initiatives/WS-ENG-007-concurrent-pr-review-reconciliation/RISKS.md:
- Line 13: Update the “Planning intake cannot enter signed history” mitigation
in RISKS.md to limit preservation to validated, supported non-tree leaf entries
rather than every non-tree identity, while retaining the requirement to filter
directory entries from the GitHub recursive tree map and recover PR `#187` plus
00R1 through the consumed two-merge certificate.
🪄 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: 09205d7e-64ef-4305-8b59-19c82286444b
📒 Files selected for processing (13)
.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/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-00R1-planning-intake-tree-recovery.md.agent-loop/initiatives/WS-ENG-007-concurrent-pr-review-reconciliation/reviews/WS-ENG-007-00R1-external-review-response.md.agent-loop/initiatives/WS-ENG-007-concurrent-pr-review-reconciliation/reviews/WS-ENG-007-00R1-internal-review-evidence.md.agent-loop/initiatives/WS-ENG-007-concurrent-pr-review-reconciliation/reviews/WS-ENG-007-00R1-pr-trust-bundle.md.agent-loop/merge-intents/WS-ENG-007-00R1.json.agent-loop/policies/loop-memory-recovery.jsondocs/operations_post_merge_memory.mdscripts/test_agent_gates.pyscripts/update_post_merge_memory.py
PR Trust Bundle: WS-ENG-007-00R1
Goal
Repair the signed planning-intake reconciliation failure without weakening
ordinary start authority or changing workflow permissions.
Root Cause And Fix
GitHub's recursive tree API included six directory objects in PR #187's
19-entry tree response, while the PR inventory and independent
git ls-tree -rchecker correctly contained 13 leaf files. The updater now validates the full
response, rejects malformed or ambiguous prefix structure, and excludes only
exact
tree/040000directory entries from the canonical leaf map.Recovery Boundary
The one-use certificate names only PR #187, merge
8928ba80eeaf31e609dbdeda7d2cc22e9ea482c8,WS-ENG-007-PLAN, and the directnext merge
WS-ENG-007-00R1. Both temporary exemptions are consumed beforesigning and never persist. Replay, wrong identity, wrong order, intervening
merge, partial consumption, or failed required checks fails closed.
Evidence
c620610e20061b9755c825ed2dc1f89ba80bef4aafter findings were repaired.branch protection, product lifecycle, or human merge authority changed.
Human Review Focus
Confirm canonical tree comparison excludes only validated directory entries,
the production recovery identities are exact, and recovery cannot start either
successor.
Human Merge Ownership
Only the user may approve and merge this PR. Because recovery is adjacency
bound, no other PR may merge first. After successful post-merge reconciliation,
WS-ENG-007-01andWS-ENG-006-01still require separate explicit signedstarts.
Summary by CodeRabbit
Bug Fixes
Documentation