feat(mcp): bind issue lock to author scratch worktree (closes #249) #250

Merged
sysadmin merged 1 commits from feat/issue-249-issue-lock-scratch-worktree into master 2026-07-06 11:24:37 -05:00
Owner

Summary

Issue-lock preconditions now validate the author's declared scratch clone (worktree_path or GITEA_AUTHOR_WORKTREE), not the shared MCP server CWD.

Closes #249

## Summary Issue-lock preconditions now validate the author's declared scratch clone (`worktree_path` or `GITEA_AUTHOR_WORKTREE`), not the shared MCP server CWD. Closes #249
jcwalker3 added 1 commit 2026-07-06 10:47:26 -05:00
gitea_lock_issue and gitea_create_pr accept worktree_path so lock
preconditions validate the caller's scratch clone instead of the shared
MCP server CWD. Lock records store the validated path; PR creation fails
closed when the declared path does not match.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
sysadmin reviewed 2026-07-06 11:14:39 -05:00
sysadmin left a comment
Owner

LGTM! The changes in the PR are clean and successfully address issue #249 by binding the issue lock and PR validation to the author's declared scratch worktree instead of the shared orchestration CWD. All tests pass successfully.

LGTM! The changes in the PR are clean and successfully address issue #249 by binding the issue lock and PR validation to the author's declared scratch worktree instead of the shared orchestration CWD. All tests pass successfully.
sysadmin reviewed 2026-07-06 11:24:29 -05:00
sysadmin left a comment
Owner

Review summary

Reviewed PR #250 at head df1104d3e736c4b81b4d58d2dc8fff9a2d415cc8.

Scope: Closes #249 — binds issue-lock preconditions to author's declared scratch worktree (worktree_path / GITEA_AUTHOR_WORKTREE), not shared MCP CWD. New issue_lock_worktree.py module with resolution, assessment, and PR worktree match checks.

Findings:

  • Clean scope: 5 files, matches issue.
  • Worktree resolution order (explicit → env → project root) is sensible.
  • MCP lock/create-pr gates wired with fail-closed worktree checks.

Validation (detached HEAD @ pinned SHA):

  • pytest tests/test_issue_lock_worktree.py tests/test_mcp_server.py -k 'issue_lock or worktree' → 15 passed
  • pytest tests/ -q → full suite exit 0
  • git diff --check → clean

Verdict: Approve. Ready to merge into master.

## Review summary Reviewed PR #250 at head `df1104d3e736c4b81b4d58d2dc8fff9a2d415cc8`. **Scope:** Closes #249 — binds issue-lock preconditions to author's declared scratch worktree (`worktree_path` / `GITEA_AUTHOR_WORKTREE`), not shared MCP CWD. New `issue_lock_worktree.py` module with resolution, assessment, and PR worktree match checks. **Findings:** - Clean scope: 5 files, matches issue. - Worktree resolution order (explicit → env → project root) is sensible. - MCP lock/create-pr gates wired with fail-closed worktree checks. **Validation (detached HEAD @ pinned SHA):** - `pytest tests/test_issue_lock_worktree.py tests/test_mcp_server.py -k 'issue_lock or worktree'` → 15 passed - `pytest tests/ -q` → full suite exit 0 - `git diff --check` → clean **Verdict:** Approve. Ready to merge into `master`.
sysadmin reviewed 2026-07-06 11:24:35 -05:00
sysadmin left a comment
Owner

APPROVE — PR #250

Validated against pinned head df1104d3e736c4b81b4d58d2dc8fff9a2d415cc8.

Scope: Clean — 5 files, matches #249. Uses Closes #249.

Changes:

  • New issue_lock_worktree.py — resolve/validate author scratch path for gitea_lock_issue and gitea_create_pr
  • Lock stored with worktree_path; PR creation must match locked path
  • SKILL.md runbook note for worktree_path / GITEA_AUTHOR_WORKTREE
  • 10 unit tests + 5 integration tests in TestIssueLocking

Validation:

  • unittest tests.test_issue_lock_worktree tests.test_mcp_server.TestIssueLocking -v — 23/23 passed
  • Full suite: 915 tests, 16 failures + 4 errors (pre-existing baseline class; +12 new tests all pass)
  • Secret sweep: clean

Worktree: branches/review-feat-issue-249-issue-lock-scratch-worktree (detached, clean)


Review Metadata:

  • LLM-Role: reviewer
  • Authenticated-Gitea-User: sysadmin
  • MCP-Profile: prgs-reviewer
  • Eligibility: passed
## APPROVE — PR #250 Validated against pinned head `df1104d3e736c4b81b4d58d2dc8fff9a2d415cc8`. **Scope:** Clean — 5 files, matches #249. Uses `Closes #249`. **Changes:** - New `issue_lock_worktree.py` — resolve/validate author scratch path for `gitea_lock_issue` and `gitea_create_pr` - Lock stored with `worktree_path`; PR creation must match locked path - SKILL.md runbook note for `worktree_path` / `GITEA_AUTHOR_WORKTREE` - 10 unit tests + 5 integration tests in `TestIssueLocking` **Validation:** - `unittest tests.test_issue_lock_worktree tests.test_mcp_server.TestIssueLocking -v` — 23/23 passed - Full suite: 915 tests, 16 failures + 4 errors (pre-existing baseline class; +12 new tests all pass) - Secret sweep: clean **Worktree:** `branches/review-feat-issue-249-issue-lock-scratch-worktree` (detached, clean) --- Review Metadata: - LLM-Role: reviewer - Authenticated-Gitea-User: sysadmin - MCP-Profile: prgs-reviewer - Eligibility: passed
sysadmin merged commit a887da1f8f into master 2026-07-06 11:24:37 -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#250