[bug][mcp] Conflict-fix lease lifecycle: chain termination by matching terminal markers and TTL handling #847

Open
opened 2026-07-23 03:46:15 -05:00 by jcwalker3 · 1 comment
Owner

Defect Summary

The conflict-fix lease lifecycle parser does not properly process matching terminal markers (e.g. phase=released) to terminate preceding phase=claimed conflict-fix lease markers, nor does it invalidate expired conflict-fix claims whose TTL has passed.

Required Behavior

  1. Chain Termination: A later valid, matching phase=released marker must terminate the corresponding earlier phase=claimed conflict-fix lease claim.
  2. TTL Expiration: Expired conflict-fix claims whose TTL has elapsed must be treated as inactive.
  3. Chain-Correlation Safety: Mismatched, malformed, or out-of-sequence markers must not corrupt or terminate a different claim. Chain correlation must safely compare relevant markers (e.g. matching PR number, profile, head_before, and optional branch).
  4. Historical Context: In PR #818, conflict-fix lease claim tracking encountered issues due to missing terminal chain-termination and TTL evaluation. Historical PR #818 sequence serves as reproduction evidence.

Regression Expectations

  • Unit test coverage in tests/test_pr_work_lease.py proving matching terminal markers terminate earlier claims.
  • Expiration tests proving expired claims become inactive after TTL.
  • Mismatched/malformed marker handling tests ensuring chain-correlation safety.
## Defect Summary The conflict-fix lease lifecycle parser does not properly process matching terminal markers (e.g. `phase=released`) to terminate preceding `phase=claimed` conflict-fix lease markers, nor does it invalidate expired conflict-fix claims whose TTL has passed. ### Required Behavior 1. **Chain Termination**: A later valid, matching `phase=released` marker must terminate the corresponding earlier `phase=claimed` conflict-fix lease claim. 2. **TTL Expiration**: Expired conflict-fix claims whose TTL has elapsed must be treated as inactive. 3. **Chain-Correlation Safety**: Mismatched, malformed, or out-of-sequence markers must not corrupt or terminate a different claim. Chain correlation must safely compare relevant markers (e.g. matching PR number, profile, head_before, and optional branch). 4. **Historical Context**: In PR #818, conflict-fix lease claim tracking encountered issues due to missing terminal chain-termination and TTL evaluation. Historical PR #818 sequence serves as reproduction evidence. ### Regression Expectations - Unit test coverage in `tests/test_pr_work_lease.py` proving matching terminal markers terminate earlier claims. - Expiration tests proving expired claims become inactive after TTL. - Mismatched/malformed marker handling tests ensuring chain-correlation safety.
jcwalker3 added the status:in-progress label 2026-07-23 03:48:55 -05:00
Author
Owner

Issue claim heartbeat

<!-- gitea-issue-claim-heartbeat:v1 --> **Issue claim heartbeat** - kind: claim - issue: #847 - branch: pending - phase: claimed - profile: prgs-author - pr: none - blocker: none - next_action: create worktree and begin implementation
Sign in to join this conversation.
No labels status:in-progress
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

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