fix(mcp): allow create_issue from clean control checkout (Closes #749) #750

Merged
sysadmin merged 2 commits from fix/issue-749-create-issue-bootstrap into master 2026-07-18 21:38:07 -05:00
Owner

Closes #749.

Base: fdab6b6c69717d32a0d50e233413cf09be83f6e8

Problem

gitea_create_issue is a pure remote mutation, but the #274 branches-only guard required a branches/ worktree that the issue-first gate forbids creating before the issue number exists. Sessions improvised with dummy directories or borrowed worktrees.

Design (phase-scoped bootstrap — cannot widen)

Treat only create_issue / gitea_create_issue as a pre-issue bootstrap mutation.

Allowed from the exact canonical control checkout when it is:

  • the configured repository root for the requested remote/org/repo
  • on an accepted base branch (master / main / dev)
  • matching live master HEAD (when the tip is known)
  • clean (no tracked local edits)
  • in runtime/master parity (existing root-checkout / anti-stomp gates)

Still fail closed for:

  • dirty control checkout
  • detached HEAD / non-base branch
  • stale base (HEAD does not match live master)
  • foreign / non-canonical workspaces
  • arbitrary branches/ mkdir fakes (#713 still applies on the ordinary path)
  • every post-creation author mutation (lock_issue, commit, push, create_pr, …)

The exemption is gated on task ∈ {create_issue, gitea_create_issue} and workspace == canonical_repo_root. No global skip of #274. No bootstrap worktree registry. No change to gitea_close_issue (#711 remains out of scope).

When bootstrap blocks, exact_next_action is satisfiable before an issue number exists (restore clean control; do not invent branches/issue-<N>-*).

Files changed

File Change
create_issue_bootstrap.py Pure assessor for the bootstrap contract
gitea_mcp_server.py Wire bootstrap into branches-only + issue-scope preflight; typed block mapping
workflow_scope_guard.py Clean-root create_issue skips missing-worktree; pass mutation_task
tests/test_create_issue_bootstrap.py New regression coverage
tests/test_create_issue_workspace_guard.py Clean control succeeds; dirty fails
skills/.../create-issue.md §18a Document sanctioned first-mutation path
docs/llm-workflow-runbooks.md Short operator pointer

Resolver / mutation pairing

Step Task
Capability resolve create_issue
Mutation tool gitea_create_issue
Preflight task stamp create_issue
Map permission gitea.issue.create + author

Tests

  • Focused suites (bootstrap, workspace guard, author mutation, anti-stomp, create_issue) — 99 passed
  • Full suite tests/3442 passed, 6 skipped, 2 failed (same 2 as clean fdab6b6 baseline):
    • test_issue_702_review_findings_f1_f6.py::...test_removed_worktree_recovers_before_probe
    • test_reconciler_supersession_close.py::...test_tool_posts_comment_and_closes_superseded_pr_issue
  • git diff --check — clean

Safety

  • No config / launcher / credential / memory changes
  • PR #746 / issue #745 untouched
  • Worktree and branch preserved for review
  • No review or merge in this session
Closes #749. Base: `fdab6b6c69717d32a0d50e233413cf09be83f6e8` ## Problem `gitea_create_issue` is a pure remote mutation, but the #274 branches-only guard required a `branches/` worktree that the issue-first gate forbids creating before the issue number exists. Sessions improvised with dummy directories or borrowed worktrees. ## Design (phase-scoped bootstrap — cannot widen) Treat **only** `create_issue` / `gitea_create_issue` as a pre-issue bootstrap mutation. **Allowed** from the **exact canonical control checkout** when it is: * the configured repository root for the requested remote/org/repo * on an accepted base branch (`master` / `main` / `dev`) * matching live master HEAD (when the tip is known) * clean (no tracked local edits) * in runtime/master parity (existing root-checkout / anti-stomp gates) **Still fail closed for:** * dirty control checkout * detached HEAD / non-base branch * stale base (HEAD does not match live master) * foreign / non-canonical workspaces * arbitrary `branches/` mkdir fakes (#713 still applies on the ordinary path) * every post-creation author mutation (`lock_issue`, commit, push, `create_pr`, …) The exemption is gated on `task ∈ {create_issue, gitea_create_issue}` and `workspace == canonical_repo_root`. No global skip of #274. No bootstrap worktree registry. No change to `gitea_close_issue` (#711 remains out of scope). When bootstrap blocks, `exact_next_action` is satisfiable **before** an issue number exists (restore clean control; do not invent `branches/issue-<N>-*`). ## Files changed | File | Change | |------|--------| | `create_issue_bootstrap.py` | Pure assessor for the bootstrap contract | | `gitea_mcp_server.py` | Wire bootstrap into branches-only + issue-scope preflight; typed block mapping | | `workflow_scope_guard.py` | Clean-root create_issue skips missing-worktree; pass `mutation_task` | | `tests/test_create_issue_bootstrap.py` | New regression coverage | | `tests/test_create_issue_workspace_guard.py` | Clean control succeeds; dirty fails | | `skills/.../create-issue.md` §18a | Document sanctioned first-mutation path | | `docs/llm-workflow-runbooks.md` | Short operator pointer | ## Resolver / mutation pairing | Step | Task | |------|------| | Capability resolve | `create_issue` | | Mutation tool | `gitea_create_issue` | | Preflight task stamp | `create_issue` | | Map permission | `gitea.issue.create` + author | ## Tests * Focused suites (bootstrap, workspace guard, author mutation, anti-stomp, create_issue) — **99 passed** * Full suite `tests/` — **3442 passed, 6 skipped, 2 failed** (same 2 as clean `fdab6b6` baseline): * `test_issue_702_review_findings_f1_f6.py::...test_removed_worktree_recovers_before_probe` * `test_reconciler_supersession_close.py::...test_tool_posts_comment_and_closes_superseded_pr_issue` * `git diff --check` — clean ## Safety * No config / launcher / credential / memory changes * PR #746 / issue #745 untouched * Worktree and branch preserved for review * No review or merge in this session
jcwalker3 added 1 commit 2026-07-18 15:19:39 -05:00
Provide a narrow phase-scoped bootstrap so gitea_create_issue can run from
a clean canonical control checkout when no issue number—and therefore no
issue-backed worktree—can exist yet. Dirty roots, non-base branches, base
races, foreign workspaces, and all post-creation author mutations remain
fail-closed under the ordinary branches-only guard.

Closes #749.
Owner

repo: Scaled-Tech-Consulting/Gitea-Tools
pr: #750
issue: #749
reviewer_identity: sysadmin
profile: prgs-reviewer
session_id: 59807-58592a30ecdb
worktree: /Users/jasonwalker/Development/Gitea-Tools/branches/review-pr-750
phase: claimed
candidate_head: e349839fd7
target_branch: master
target_branch_sha: fdab6b6c69
last_activity: 2026-07-18T20:24:24Z
expires_at: 2026-07-18T20:34:24Z
blocker: none

<!-- mcp-review-lease:v1 --> repo: Scaled-Tech-Consulting/Gitea-Tools pr: #750 issue: #749 reviewer_identity: sysadmin profile: prgs-reviewer session_id: 59807-58592a30ecdb worktree: /Users/jasonwalker/Development/Gitea-Tools/branches/review-pr-750 phase: claimed candidate_head: e349839fd739e10af2df9c0f429ac487e8ca8b9d target_branch: master target_branch_sha: fdab6b6c69717d32a0d50e233413cf09be83f6e8 last_activity: 2026-07-18T20:24:24Z expires_at: 2026-07-18T20:34:24Z blocker: none
Owner

repo: Scaled-Tech-Consulting/Gitea-Tools
pr: #750
issue: #749
reviewer_identity: sysadmin
profile: prgs-reviewer
session_id: 59807-58592a30ecdb
worktree: /Users/jasonwalker/Development/Gitea-Tools/branches/review-pr-750
phase: reviewing
candidate_head: e349839fd7
target_branch: master
target_branch_sha: fdab6b6c69
last_activity: 2026-07-18T20:27:15Z
expires_at: 2026-07-18T20:37:15Z
blocker: none

<!-- mcp-review-lease:v1 --> repo: Scaled-Tech-Consulting/Gitea-Tools pr: #750 issue: #749 reviewer_identity: sysadmin profile: prgs-reviewer session_id: 59807-58592a30ecdb worktree: /Users/jasonwalker/Development/Gitea-Tools/branches/review-pr-750 phase: reviewing candidate_head: e349839fd739e10af2df9c0f429ac487e8ca8b9d target_branch: master target_branch_sha: fdab6b6c69717d32a0d50e233413cf09be83f6e8 last_activity: 2026-07-18T20:27:15Z expires_at: 2026-07-18T20:37:15Z blocker: none
Owner

repo: Scaled-Tech-Consulting/Gitea-Tools
pr: #750
issue: #749
reviewer_identity: sysadmin
profile: prgs-reviewer
session_id: 59807-58592a30ecdb
worktree: /Users/jasonwalker/Development/Gitea-Tools/branches/review-pr-750
phase: validating
candidate_head: e349839fd7
target_branch: master
target_branch_sha: fdab6b6c69
last_activity: 2026-07-18T20:29:04Z
expires_at: 2026-07-18T20:39:04Z
blocker: none

<!-- mcp-review-lease:v1 --> repo: Scaled-Tech-Consulting/Gitea-Tools pr: #750 issue: #749 reviewer_identity: sysadmin profile: prgs-reviewer session_id: 59807-58592a30ecdb worktree: /Users/jasonwalker/Development/Gitea-Tools/branches/review-pr-750 phase: validating candidate_head: e349839fd739e10af2df9c0f429ac487e8ca8b9d target_branch: master target_branch_sha: fdab6b6c69717d32a0d50e233413cf09be83f6e8 last_activity: 2026-07-18T20:29:04Z expires_at: 2026-07-18T20:39:04Z blocker: none
Owner

repo: Scaled-Tech-Consulting/Gitea-Tools
pr: #750
issue: #749
reviewer_identity: sysadmin
profile: prgs-reviewer
session_id: 59807-58592a30ecdb
worktree: /Users/jasonwalker/Development/Gitea-Tools/branches/review-pr-750
phase: verdict_prepared
candidate_head: e349839fd7
target_branch: master
target_branch_sha: fdab6b6c69
last_activity: 2026-07-18T20:33:33Z
expires_at: 2026-07-18T20:43:33Z
blocker: none

<!-- mcp-review-lease:v1 --> repo: Scaled-Tech-Consulting/Gitea-Tools pr: #750 issue: #749 reviewer_identity: sysadmin profile: prgs-reviewer session_id: 59807-58592a30ecdb worktree: /Users/jasonwalker/Development/Gitea-Tools/branches/review-pr-750 phase: verdict_prepared candidate_head: e349839fd739e10af2df9c0f429ac487e8ca8b9d target_branch: master target_branch_sha: fdab6b6c69717d32a0d50e233413cf09be83f6e8 last_activity: 2026-07-18T20:33:33Z expires_at: 2026-07-18T20:43:33Z blocker: none
sysadmin approved these changes 2026-07-18 15:36:22 -05:00
Dismissed
sysadmin left a comment
Owner

Independent native reviewer verdict: APPROVE at exact head e349839fd739e10af2df9c0f429ac487e8ca8b9d.

Fresh reviewer session (gitea-reviewer / sysadmin / prgs-reviewer / role reviewer, remote prgs, non-root UID 502). Runtime/master parity verified at fdab6b6c69717d32a0d50e233413cf09be83f6e8. Detached review worktree created at the exact PR head. No merge performed.

Scope and correctness

The exemption is genuinely phase-scoped and cannot widen:

  • CREATE_ISSUE_TASKS = {create_issue, gitea_create_issue} with exact (stripped) membership matching — no prefix or substring match. Every other author task (lock_issue, close_issue, commit, push, create_pr, branch update, review, merge, cleanup) reaches the assessor as not_applicable and keeps the ordinary fail-closed path.
  • Workspace eligibility is exact identity, not a prefix or slug: both sides pass through os.path.realpath and are compared with workspace != root. Symlinked and non-existent paths normalize and fail closed. A repository with a similar name or a path sharing a prefix is rejected.
  • Workspaces under branches/ short-circuit to not_applicable before the root check, so mkdir-only fakes and unrelated worktrees fall through to the ordinary #274 path plus assess_workspace_repo_membership (git-common-dir identity) rather than receiving the exemption. Verified by test_arbitrary_branches_directory_not_bootstrap.
  • The clean/base/parity requirements are enforced twice. _enforce_root_checkout_guard (#475) runs before _enforce_branches_only_author_mutation in both production branches of verify_preflight_purity and already blocks dirty tracked files, detached HEAD, non-base branches, and HEAD not equal to tracking master — using the same unwrapped resolve_remote_master_sha. The new bootstrap assessor repeats those checks as defense in depth.
  • Remote/org/repo binding is enforced first by _enforce_canonical_repository_root (#706) plus the session-context pin; explicit org/repo continue to flow only into the permission block and anti-stomp preflight as confirm-only inputs. This PR adds no redirect surface.
  • Resolver and mutation preflight use the identical task string create_issue, and verify_preflight_purity fail-closes on any resolved-vs-required task mismatch.
  • Post-creation guarantees are intact: require_lock is relaxed only for create_issue (no lock can exist pre-issue), and EXACT_NEXT_ACTION_POST_CREATE directs the session to a registered branches/issue-<N>-* worktree for all subsequent mutations.
  • Every failure path returns a typed BLOCKER_MISSING_WORKTREE block with an exact_next_action that is satisfiable before an issue number exists (restore clean control; never "create branches/issue--*"). Messages carry local root/workspace paths only, matching the existing format_root_checkout_guard_error convention; no credentials or endpoints are emitted.

Non-blocking observations

  1. _enforce_branches_only_author_mutation wraps resolve_remote_master_sha in a bare except Exception: remote_master_sha = None, which silently degrades the bootstrap's own base-equivalence check. Not exploitable in the composed path — the unwrapped _enforce_root_checkout_guard performs the same comparison first and raises — but a short comment naming that dependency would prevent a future reorder from turning this into a fail-open.
  2. assess_root_source_mutation keys its create_issue suppression on dirty_source_files (source/test only), which is looser than the assessor's all-tracked parse_dirty_tracked_files. Safe only because the stricter gates run earlier; worth noting the ordering dependency in the docstring.
  3. _production_guard_block_from_exc recovers the next action via text.split("exact_next_action:", 1), a fragile string coupling to the message format. Cosmetic.

None of these change behavior at this head and none block merge.

Validation performed

  • Full suite at PR head: 3442 passed, 6 skipped, 2 failed.
  • Full suite on a clean detached baseline worktree at fdab6b6c6971: 3425 passed, 6 skipped, 2 failed — the same two tests (test_issue_702_review_findings_f1_f6.py::TestF1RecoveryBeforeTerminalProbe::test_removed_worktree_recovers_before_probe, test_reconciler_supersession_close.py::TestReconcilerSupersessionMcpTool::test_tool_posts_comment_and_closes_superseded_pr_issue). The pre-existing claim is independently reproduced; the PR adds 17 passing tests and introduces no new failure.
  • New-behavior baseline check: the new success case test_create_issue_stable_checkout_bootstrap_allowed_when_clean fails on clean fdab6b6 (AssertionError: None != 77) and passes at head; test_create_issue_bootstrap.py cannot even import on baseline (ModuleNotFoundError: create_issue_bootstrap). The tests genuinely exercise the new behavior.
  • Focused related suites at head (bootstrap, workspace guard, create_issue, author-mutation worktree, anti-stomp, capability resolve/role invariants, workflow scope guards, canonical repository root #706, canonical-root consumers #741, root checkout guard, issue workflow labels): 255 passed.
  • git diff --check over the PR range: clean.
  • Complete diff inspected, not only tests: exactly 7 files, +781/-35. No configuration, launcher, credential, profile, or memory changes; no unrelated refactors. Documentation in create-issue.md section 18a and llm-workflow-runbooks.md matches the implemented behavior.

Canonical PR State

STATE:
approved

WHO_IS_NEXT:
merger

NEXT_ACTION:
A separate merger session must re-verify the approval at exact head e349839fd739e10af2df9c0f429ac487e8ca8b9d, confirm checks, and merge.

NEXT_PROMPT:
Merge PR #750 in Scaled-Tech-Consulting/Gitea-Tools using a fresh gitea-merger session (sysadmin / prgs-merger / merger, remote prgs). Verify runtime/master parity, confirm the APPROVED review is valid at exact head e349839fd7, confirm no foreign lease, acquire the merger lease, re-check mergeability and checks status, then merge. Do not re-review. Do not modify configuration, launchers, or credentials.

WHAT_HAPPENED:
An independent leased reviewer validated the #749 create_issue bootstrap exemption at the exact PR head and posted an APPROVED review to Gitea.

WHY:
The exemption is exactly scoped to create_issue / gitea_create_issue and to the exact canonical control checkout, is double-gated by the pre-existing root-checkout guard, preserves #274 and #713 behavior for every other path, and its new behavior is proven by tests that fail on the clean baseline and pass at head.

ISSUE:
#749

BASE:
master

HEAD:
fix/issue-749-create-issue-bootstrap

HEAD_SHA:
e349839fd7

REVIEW_STATUS:
approved

VALIDATION:
Full suite at head 3442 passed / 6 skipped / 2 failed; clean baseline fdab6b6c69 reproduces the identical 2 failures with 3425 passed; new success case fails on baseline and passes at head; 255 focused related tests passed; git diff --check clean.

BLOCKERS:
none

SUPERSEDES:
none

SUPERSEDED_BY:
none

MERGE_READY:
yes — approval is valid at the exact current head, base is current (0 commits behind), and no conflicts; the merger must still confirm checks status, which was pending at review time.

LAST_UPDATED_BY:
sysadmin / prgs-reviewer / 2026-07-18

NATIVE_REVIEW_PROOF: transport=native_mcp; namespace=gitea-reviewer; profile=prgs-reviewer; identity=sysadmin; tool=gitea_submit_pr_review; reviewed_head=e349839fd739e10af2df9c0f429ac487e8ca8b9d; parity=fdab6b6c69717d32a0d50e233413cf09be83f6e8; lease_session=59807-58592a30ecdb

[THREAD STATE LEDGER] PR #750 / Issue #749 — APPROVED review posted to Gitea at head e349839f; merge not performed.

What is true now:

  • PR state: open, mergeable, 0 commits behind master
  • Issue state: #749 open, linked via "Closes #749"
  • Current head SHA: e349839fd7
  • Server-side decision state: APPROVED review posted to Gitea at this head
  • Local verdict/state: APPROVE verdict prepared locally, then posted
  • Latest known validation: full suite 3442 passed / 6 skipped / 2 pre-existing failures, reproduced identically on clean baseline fdab6b6c69

What changed:

  • A fresh independent leased reviewer session reviewed the exact head, reproduced the pre-existing baseline failures, proved the new tests fail on baseline, and posted the APPROVED review.

What is blocked:

  • Blocker classification: no blocker

Who/what acts next:

  • Next actor: merger
  • Required action: fresh gitea-merger session re-verifies approval at exact head e349839fd7, confirms checks, acquires the merger lease, and merges.
  • Do not do: do not re-review, do not merge from this reviewer session, do not modify configuration, launchers, credentials, or memory, do not touch PR #746 or issue #745.
  • Resume from: PR #750 at head e349839fd7 with the reviewer lease terminally released.
Independent native reviewer verdict: **APPROVE** at exact head `e349839fd739e10af2df9c0f429ac487e8ca8b9d`. Fresh reviewer session (`gitea-reviewer` / `sysadmin` / `prgs-reviewer` / role `reviewer`, remote `prgs`, non-root UID 502). Runtime/master parity verified at `fdab6b6c69717d32a0d50e233413cf09be83f6e8`. Detached review worktree created at the exact PR head. No merge performed. ## Scope and correctness The exemption is genuinely phase-scoped and cannot widen: - `CREATE_ISSUE_TASKS = {create_issue, gitea_create_issue}` with exact (stripped) membership matching — no prefix or substring match. Every other author task (`lock_issue`, `close_issue`, commit, push, `create_pr`, branch update, review, merge, cleanup) reaches the assessor as `not_applicable` and keeps the ordinary fail-closed path. - Workspace eligibility is exact identity, not a prefix or slug: both sides pass through `os.path.realpath` and are compared with `workspace != root`. Symlinked and non-existent paths normalize and fail closed. A repository with a similar name or a path sharing a prefix is rejected. - Workspaces under `branches/` short-circuit to `not_applicable` before the root check, so `mkdir`-only fakes and unrelated worktrees fall through to the ordinary #274 path plus `assess_workspace_repo_membership` (git-common-dir identity) rather than receiving the exemption. Verified by `test_arbitrary_branches_directory_not_bootstrap`. - The clean/base/parity requirements are enforced twice. `_enforce_root_checkout_guard` (#475) runs before `_enforce_branches_only_author_mutation` in both production branches of `verify_preflight_purity` and already blocks dirty tracked files, detached HEAD, non-base branches, and HEAD not equal to tracking master — using the same unwrapped `resolve_remote_master_sha`. The new bootstrap assessor repeats those checks as defense in depth. - Remote/org/repo binding is enforced first by `_enforce_canonical_repository_root` (#706) plus the session-context pin; explicit `org`/`repo` continue to flow only into the permission block and anti-stomp preflight as confirm-only inputs. This PR adds no redirect surface. - Resolver and mutation preflight use the identical task string `create_issue`, and `verify_preflight_purity` fail-closes on any resolved-vs-required task mismatch. - Post-creation guarantees are intact: `require_lock` is relaxed only for `create_issue` (no lock can exist pre-issue), and `EXACT_NEXT_ACTION_POST_CREATE` directs the session to a registered `branches/issue-<N>-*` worktree for all subsequent mutations. - Every failure path returns a typed `BLOCKER_MISSING_WORKTREE` block with an `exact_next_action` that is satisfiable before an issue number exists (restore clean control; never "create branches/issue-<N>-*"). Messages carry local root/workspace paths only, matching the existing `format_root_checkout_guard_error` convention; no credentials or endpoints are emitted. ## Non-blocking observations 1. `_enforce_branches_only_author_mutation` wraps `resolve_remote_master_sha` in a bare `except Exception: remote_master_sha = None`, which silently degrades the bootstrap's own base-equivalence check. Not exploitable in the composed path — the unwrapped `_enforce_root_checkout_guard` performs the same comparison first and raises — but a short comment naming that dependency would prevent a future reorder from turning this into a fail-open. 2. `assess_root_source_mutation` keys its create_issue suppression on `dirty_source_files` (source/test only), which is looser than the assessor's all-tracked `parse_dirty_tracked_files`. Safe only because the stricter gates run earlier; worth noting the ordering dependency in the docstring. 3. `_production_guard_block_from_exc` recovers the next action via `text.split("exact_next_action:", 1)`, a fragile string coupling to the message format. Cosmetic. None of these change behavior at this head and none block merge. ## Validation performed - Full suite at PR head: 3442 passed, 6 skipped, 2 failed. - Full suite on a clean detached baseline worktree at `fdab6b6c6971`: 3425 passed, 6 skipped, 2 failed — the same two tests (`test_issue_702_review_findings_f1_f6.py::TestF1RecoveryBeforeTerminalProbe::test_removed_worktree_recovers_before_probe`, `test_reconciler_supersession_close.py::TestReconcilerSupersessionMcpTool::test_tool_posts_comment_and_closes_superseded_pr_issue`). The pre-existing claim is independently reproduced; the PR adds 17 passing tests and introduces no new failure. - New-behavior baseline check: the new success case `test_create_issue_stable_checkout_bootstrap_allowed_when_clean` fails on clean `fdab6b6` (`AssertionError: None != 77`) and passes at head; `test_create_issue_bootstrap.py` cannot even import on baseline (`ModuleNotFoundError: create_issue_bootstrap`). The tests genuinely exercise the new behavior. - Focused related suites at head (bootstrap, workspace guard, create_issue, author-mutation worktree, anti-stomp, capability resolve/role invariants, workflow scope guards, canonical repository root #706, canonical-root consumers #741, root checkout guard, issue workflow labels): 255 passed. - `git diff --check` over the PR range: clean. - Complete diff inspected, not only tests: exactly 7 files, +781/-35. No configuration, launcher, credential, profile, or memory changes; no unrelated refactors. Documentation in `create-issue.md` section 18a and `llm-workflow-runbooks.md` matches the implemented behavior. ## Canonical PR State STATE: approved WHO_IS_NEXT: merger NEXT_ACTION: A separate merger session must re-verify the approval at exact head `e349839fd739e10af2df9c0f429ac487e8ca8b9d`, confirm checks, and merge. NEXT_PROMPT: Merge PR #750 in Scaled-Tech-Consulting/Gitea-Tools using a fresh gitea-merger session (sysadmin / prgs-merger / merger, remote prgs). Verify runtime/master parity, confirm the APPROVED review is valid at exact head e349839fd739e10af2df9c0f429ac487e8ca8b9d, confirm no foreign lease, acquire the merger lease, re-check mergeability and checks status, then merge. Do not re-review. Do not modify configuration, launchers, or credentials. WHAT_HAPPENED: An independent leased reviewer validated the #749 create_issue bootstrap exemption at the exact PR head and posted an APPROVED review to Gitea. WHY: The exemption is exactly scoped to create_issue / gitea_create_issue and to the exact canonical control checkout, is double-gated by the pre-existing root-checkout guard, preserves #274 and #713 behavior for every other path, and its new behavior is proven by tests that fail on the clean baseline and pass at head. ISSUE: #749 BASE: master HEAD: fix/issue-749-create-issue-bootstrap HEAD_SHA: e349839fd739e10af2df9c0f429ac487e8ca8b9d REVIEW_STATUS: approved VALIDATION: Full suite at head 3442 passed / 6 skipped / 2 failed; clean baseline fdab6b6c6971 reproduces the identical 2 failures with 3425 passed; new success case fails on baseline and passes at head; 255 focused related tests passed; git diff --check clean. BLOCKERS: none SUPERSEDES: none SUPERSEDED_BY: none MERGE_READY: yes — approval is valid at the exact current head, base is current (0 commits behind), and no conflicts; the merger must still confirm checks status, which was pending at review time. LAST_UPDATED_BY: sysadmin / prgs-reviewer / 2026-07-18 NATIVE_REVIEW_PROOF: transport=native_mcp; namespace=gitea-reviewer; profile=prgs-reviewer; identity=sysadmin; tool=gitea_submit_pr_review; reviewed_head=e349839fd739e10af2df9c0f429ac487e8ca8b9d; parity=fdab6b6c69717d32a0d50e233413cf09be83f6e8; lease_session=59807-58592a30ecdb [THREAD STATE LEDGER] PR #750 / Issue #749 — APPROVED review posted to Gitea at head e349839f; merge not performed. What is true now: - PR state: open, mergeable, 0 commits behind master - Issue state: #749 open, linked via "Closes #749" - Current head SHA: e349839fd739e10af2df9c0f429ac487e8ca8b9d - Server-side decision state: APPROVED review posted to Gitea at this head - Local verdict/state: APPROVE verdict prepared locally, then posted - Latest known validation: full suite 3442 passed / 6 skipped / 2 pre-existing failures, reproduced identically on clean baseline fdab6b6c6971 What changed: - A fresh independent leased reviewer session reviewed the exact head, reproduced the pre-existing baseline failures, proved the new tests fail on baseline, and posted the APPROVED review. What is blocked: - Blocker classification: no blocker Who/what acts next: - Next actor: merger - Required action: fresh gitea-merger session re-verifies approval at exact head e349839fd739e10af2df9c0f429ac487e8ca8b9d, confirms checks, acquires the merger lease, and merges. - Do not do: do not re-review, do not merge from this reviewer session, do not modify configuration, launchers, credentials, or memory, do not touch PR #746 or issue #745. - Resume from: PR #750 at head e349839fd739e10af2df9c0f429ac487e8ca8b9d with the reviewer lease terminally released.
Owner

repo: Scaled-Tech-Consulting/Gitea-Tools
pr: #750
issue: #749
reviewer_identity: sysadmin
profile: prgs-reviewer
session_id: 59807-58592a30ecdb
worktree: /Users/jasonwalker/Development/Gitea-Tools/branches/review-pr-750
phase: released
candidate_head: e349839fd7
target_branch: master
target_branch_sha: fdab6b6c69
last_activity: 2026-07-18T20:36:42Z
expires_at: 2026-07-18T20:46:42Z
blocker: manual-release

<!-- mcp-review-lease:v1 --> repo: Scaled-Tech-Consulting/Gitea-Tools pr: #750 issue: #749 reviewer_identity: sysadmin profile: prgs-reviewer session_id: 59807-58592a30ecdb worktree: /Users/jasonwalker/Development/Gitea-Tools/branches/review-pr-750 phase: released candidate_head: e349839fd739e10af2df9c0f429ac487e8ca8b9d target_branch: master target_branch_sha: fdab6b6c69717d32a0d50e233413cf09be83f6e8 last_activity: 2026-07-18T20:36:42Z expires_at: 2026-07-18T20:46:42Z blocker: manual-release
jcwalker3 added 1 commit 2026-07-18 21:16:27 -05:00
Author
Owner

[THREAD STATE LEDGER] PR #750 / Issue #749 — author reconciliation complete; base merge-committed into the PR branch; new exact head 5e0e474350eaf0679a226b539cfb8afc68b01406 requires fresh independent review.

What is true now:

  • Server-side decision state: the prior review verdict (review_id 466) is pinned to former head e349839fd739e10af2df9c0f429ac487e8ca8b9d; approval_visible=true, approval_at_current_head=false, review_feedback_stale=true, has_blocking_change_requests=false. No new review verdict was recorded by this author session.
  • Local verdict/state: author session holds the live issue-#749 lock (recovered from a dead prior session), worktree clean, local head == remote branch head == PR head 5e0e474350eaf0679a226b539cfb8afc68b01406.
  • Latest known validation: full suite at the new head 3546 passed / 6 skipped / 2 failed / 365 subtests passed. Those 2 failures reproduce identically on pristine master 043df0f7df220ad67ac1c3fefdcf3897dad9478b in a clean detached worktree, so they are pre-existing and not introduced here. Focused suites: 127 passed (#749 bootstrap, workspace guard, #751 checks assessor, #753 dead-PID recovery, #755 owning-PR recovery); 136 passed + 16 subtests (issue-lock store/worktree/adoption/provenance, workflow scope guards, author-mutation worktree, anti-stomp preflight, PR-ownership mismatch, reviewer worktree ownership). git diff --check over the PR range clean. py_compile clean on all three changed sources.

What changed:

  • The durable #749 lock was recovered through the native gitea_lock_issue path deployed by #753 + #755. Prior session pid 48545 was confirmed dead; replacement session pid 55693 now owns the lock with a renewed lease expiring 2026-07-19T06:15:56Z. Recovery provenance recorded: recovered=true, reason "owning MCP session exited; durable ownership evidence matched", with local/remote/PR heads all e349839f at recovery time and PR #750 identified as the exact owning PR. No lock file was hand-edited, no base-equivalence recovery worktree was created, and no stacked-base input was used.
  • Sanctioned gitea_update_pr_branch_by_merge merge-committed live base 043df0f7df220ad67ac1c3fefdcf3897dad9478b into fix/issue-749-create-issue-bootstrap via the native Gitea API, style=merge. force_push=false, rebase=false. Head advanced e349839f -> 5e0e4743. No rebase, reset, amend, squash, cherry-pick, or force push occurred. No conflict arose.
  • The PR now carries 0 commits behind base, mergeable=true, has_conflicts=false, checks_required=false, checks_status=not_required.
  • PR diff scope against master is unchanged in content: exactly the 7 intended #749 files, +781/-35 (create_issue_bootstrap.py, gitea_mcp_server.py, workflow_scope_guard.py, tests/test_create_issue_bootstrap.py, tests/test_create_issue_workspace_guard.py, the create-issue.md workflow doc, docs/llm-workflow-runbooks.md). The merge commit introduces no duplication or reversion of #751, #753, or #755 — those land as ancestors via master and are therefore absent from the PR diff.

What is blocked:

  • Blocker classification: stale head
  • The head change invalidated the former-head verdict for merge purposes. Review 466 cannot authorize 5e0e4743; stale_approval=true and approval_valid_for_merge=false. A fresh independent reviewer verdict at the exact new head is required before any merge is attempted.

Who/what acts next:

  • Next actor: reviewer
  • Required action: a fresh independent Grok reviewer session, pinned to PR #750 at exact head 5e0e474350eaf0679a226b539cfb8afc68b01406, must acquire the reviewer PR lease, verify runtime/master parity, review the exact new head, and record a verdict through the native review API.
  • Do not do: do not reuse or extend review 466; do not perform a merge from the reviewer session; do not rebase, reset, amend, squash, cherry-pick, or force-push the branch; do not release the author lock manually; do not modify PR #746 or issue #745; do not modify configuration, launchers, credentials, or operator memory.
  • Resume from: PR #750 at head 5e0e474350eaf0679a226b539cfb8afc68b01406, base master 043df0f7df220ad67ac1c3fefdcf3897dad9478b, no reviewer or merger lease outstanding.

Canonical Issue State

STATE:
pr-open-awaiting-fresh-review

WHO_IS_NEXT:
reviewer

NEXT_ACTION:
A fresh independent Grok reviewer session must review PR #750 at exact head 5e0e474350eaf0679a226b539cfb8afc68b01406 and record a verdict via the native review API. Review 466 is pinned to the former head and cannot authorize the new one.

NEXT_PROMPT:

Review PR #750 in Scaled-Tech-Consulting/Gitea-Tools using a fresh gitea-reviewer session (sysadmin / prgs-reviewer / role reviewer, remote prgs).

Pin the review to exact head 5e0e474350eaf0679a226b539cfb8afc68b01406. Base is master at 043df0f7df220ad67ac1c3fefdcf3897dad9478b; the PR is 0 commits behind, mergeable=true, has_conflicts=false, checks_required=false, checks_status=not_required.

Verify four-namespace runtime/master parity at 043df0f7df220ad67ac1c3fefdcf3897dad9478b before acting. Acquire the reviewer PR lease. Create a detached review worktree at the exact head.

Review 466 carries an APPROVE verdict recorded at former head e349839fd739e10af2df9c0f429ac487e8ca8b9d and is stale (approval_at_current_head=false, review_feedback_stale=true). Do not reuse it. The only change since that verdict is a base-into-branch merge commit (5e0e4743) with no conflict; the PR's own diff against master is unchanged at 7 files, +781/-35. Confirm that independently rather than taking it on assertion.

Scope to verify: the #749 create_issue bootstrap exemption — that it stays confined to task in {create_issue, gitea_create_issue} and to the exact canonical control checkout, that every other author mutation still fails closed under #274/#713, and that the base-into-branch merge commit did not duplicate or revert #751, #753, or #755.

Expect full suite 3546 passed / 6 skipped / 2 failed; those 2 reproduce on pristine master 043df0f7 and are pre-existing. Reproduce that baseline yourself.

Do not perform a merge. Do not modify configuration, launchers, credentials, or memory. Do not touch PR #746 or issue #745.

WHAT_HAPPENED:
The author session recovered the dead-session #749 lock through the newly deployed #753 + #755 native recovery path, then merge-committed live master into the PR branch via the sanctioned author update-by-merge tool. The head advanced from e349839f to 5e0e4743, which invalidated the former-head review verdict and routed the PR to fresh independent review.

WHY:
Branch protection required the PR branch to contain the current base, and the PR was 6 commits behind after #751, #753, and #755 landed on master. The author-only update-by-merge path is the sanctioned remedy: it never rebases or force-pushes, it pins both expected heads so a concurrent race fails closed, and it explicitly invalidates the former-head verdict rather than carrying approval across a head change.

RELATED_PRS:
#756 (#755 owning-PR recovery, landed on master and enabling this recovery), #754 (#753 dead-PID recovery, landed on master), #752 (#751 checks assessor, landed on master), #746 (open, unrelated, deliberately untouched by this session)

BLOCKERS:
none for the author phase; the PR itself carries a stale-head gate — review 466 cannot authorize head 5e0e4743, so a fresh reviewer verdict at the exact new head is a precondition for any merge.

VALIDATION:
Full suite at head 5e0e4743: 3546 passed, 6 skipped, 2 failed, 365 subtests passed. The identical 2 failures reproduce on pristine master 043df0f7 in a clean detached worktree (test_issue_702_review_findings_f1_f6.py::TestF1RecoveryBeforeTerminalProbe::test_removed_worktree_recovers_before_probe, test_reconciler_supersession_close.py::TestReconcilerSupersessionMcpTool::test_tool_posts_comment_and_closes_superseded_pr_issue). Focused #749/#751/#753/#755 suites: 127 passed. Ownership, worktree, preflight and scope-guard suites: 136 passed, 16 subtests passed. git diff --check clean. py_compile clean on create_issue_bootstrap.py, gitea_mcp_server.py, workflow_scope_guard.py.

MERGE_READY:
no — approval_valid_for_merge=false and stale_approval=true at head 5e0e4743; a fresh independent reviewer verdict at that exact head is required first.

LAST_UPDATED_BY:
jcwalker3 / prgs-author / 2026-07-18

[THREAD STATE LEDGER] PR #750 / Issue #749 — author reconciliation complete; base merge-committed into the PR branch; new exact head `5e0e474350eaf0679a226b539cfb8afc68b01406` requires fresh independent review. What is true now: - Server-side decision state: the prior review verdict (review_id 466) is pinned to former head `e349839fd739e10af2df9c0f429ac487e8ca8b9d`; `approval_visible=true`, `approval_at_current_head=false`, `review_feedback_stale=true`, `has_blocking_change_requests=false`. No new review verdict was recorded by this author session. - Local verdict/state: author session holds the live issue-#749 lock (recovered from a dead prior session), worktree clean, local head == remote branch head == PR head `5e0e474350eaf0679a226b539cfb8afc68b01406`. - Latest known validation: full suite at the new head 3546 passed / 6 skipped / 2 failed / 365 subtests passed. Those 2 failures reproduce identically on pristine master `043df0f7df220ad67ac1c3fefdcf3897dad9478b` in a clean detached worktree, so they are pre-existing and not introduced here. Focused suites: 127 passed (#749 bootstrap, workspace guard, #751 checks assessor, #753 dead-PID recovery, #755 owning-PR recovery); 136 passed + 16 subtests (issue-lock store/worktree/adoption/provenance, workflow scope guards, author-mutation worktree, anti-stomp preflight, PR-ownership mismatch, reviewer worktree ownership). `git diff --check` over the PR range clean. `py_compile` clean on all three changed sources. What changed: - The durable #749 lock was recovered through the native `gitea_lock_issue` path deployed by #753 + #755. Prior session pid 48545 was confirmed dead; replacement session pid 55693 now owns the lock with a renewed lease expiring 2026-07-19T06:15:56Z. Recovery provenance recorded: `recovered=true`, reason "owning MCP session exited; durable ownership evidence matched", with local/remote/PR heads all `e349839f` at recovery time and PR #750 identified as the exact owning PR. No lock file was hand-edited, no base-equivalence recovery worktree was created, and no stacked-base input was used. - Sanctioned `gitea_update_pr_branch_by_merge` merge-committed live base `043df0f7df220ad67ac1c3fefdcf3897dad9478b` into `fix/issue-749-create-issue-bootstrap` via the native Gitea API, style=merge. `force_push=false`, `rebase=false`. Head advanced `e349839f` -> `5e0e4743`. No rebase, reset, amend, squash, cherry-pick, or force push occurred. No conflict arose. - The PR now carries 0 commits behind base, `mergeable=true`, `has_conflicts=false`, `checks_required=false`, `checks_status=not_required`. - PR diff scope against master is unchanged in content: exactly the 7 intended #749 files, +781/-35 (`create_issue_bootstrap.py`, `gitea_mcp_server.py`, `workflow_scope_guard.py`, `tests/test_create_issue_bootstrap.py`, `tests/test_create_issue_workspace_guard.py`, the `create-issue.md` workflow doc, `docs/llm-workflow-runbooks.md`). The merge commit introduces no duplication or reversion of #751, #753, or #755 — those land as ancestors via master and are therefore absent from the PR diff. What is blocked: - Blocker classification: stale head - The head change invalidated the former-head verdict for merge purposes. Review 466 cannot authorize `5e0e4743`; `stale_approval=true` and `approval_valid_for_merge=false`. A fresh independent reviewer verdict at the exact new head is required before any merge is attempted. Who/what acts next: - Next actor: reviewer - Required action: a fresh independent Grok reviewer session, pinned to PR #750 at exact head `5e0e474350eaf0679a226b539cfb8afc68b01406`, must acquire the reviewer PR lease, verify runtime/master parity, review the exact new head, and record a verdict through the native review API. - Do not do: do not reuse or extend review 466; do not perform a merge from the reviewer session; do not rebase, reset, amend, squash, cherry-pick, or force-push the branch; do not release the author lock manually; do not modify PR #746 or issue #745; do not modify configuration, launchers, credentials, or operator memory. - Resume from: PR #750 at head `5e0e474350eaf0679a226b539cfb8afc68b01406`, base master `043df0f7df220ad67ac1c3fefdcf3897dad9478b`, no reviewer or merger lease outstanding. ## Canonical Issue State STATE: pr-open-awaiting-fresh-review WHO_IS_NEXT: reviewer NEXT_ACTION: A fresh independent Grok reviewer session must review PR #750 at exact head `5e0e474350eaf0679a226b539cfb8afc68b01406` and record a verdict via the native review API. Review 466 is pinned to the former head and cannot authorize the new one. NEXT_PROMPT: ```text Review PR #750 in Scaled-Tech-Consulting/Gitea-Tools using a fresh gitea-reviewer session (sysadmin / prgs-reviewer / role reviewer, remote prgs). Pin the review to exact head 5e0e474350eaf0679a226b539cfb8afc68b01406. Base is master at 043df0f7df220ad67ac1c3fefdcf3897dad9478b; the PR is 0 commits behind, mergeable=true, has_conflicts=false, checks_required=false, checks_status=not_required. Verify four-namespace runtime/master parity at 043df0f7df220ad67ac1c3fefdcf3897dad9478b before acting. Acquire the reviewer PR lease. Create a detached review worktree at the exact head. Review 466 carries an APPROVE verdict recorded at former head e349839fd739e10af2df9c0f429ac487e8ca8b9d and is stale (approval_at_current_head=false, review_feedback_stale=true). Do not reuse it. The only change since that verdict is a base-into-branch merge commit (5e0e4743) with no conflict; the PR's own diff against master is unchanged at 7 files, +781/-35. Confirm that independently rather than taking it on assertion. Scope to verify: the #749 create_issue bootstrap exemption — that it stays confined to task in {create_issue, gitea_create_issue} and to the exact canonical control checkout, that every other author mutation still fails closed under #274/#713, and that the base-into-branch merge commit did not duplicate or revert #751, #753, or #755. Expect full suite 3546 passed / 6 skipped / 2 failed; those 2 reproduce on pristine master 043df0f7 and are pre-existing. Reproduce that baseline yourself. Do not perform a merge. Do not modify configuration, launchers, credentials, or memory. Do not touch PR #746 or issue #745. ``` WHAT_HAPPENED: The author session recovered the dead-session #749 lock through the newly deployed #753 + #755 native recovery path, then merge-committed live master into the PR branch via the sanctioned author update-by-merge tool. The head advanced from `e349839f` to `5e0e4743`, which invalidated the former-head review verdict and routed the PR to fresh independent review. WHY: Branch protection required the PR branch to contain the current base, and the PR was 6 commits behind after #751, #753, and #755 landed on master. The author-only update-by-merge path is the sanctioned remedy: it never rebases or force-pushes, it pins both expected heads so a concurrent race fails closed, and it explicitly invalidates the former-head verdict rather than carrying approval across a head change. RELATED_PRS: #756 (#755 owning-PR recovery, landed on master and enabling this recovery), #754 (#753 dead-PID recovery, landed on master), #752 (#751 checks assessor, landed on master), #746 (open, unrelated, deliberately untouched by this session) BLOCKERS: none for the author phase; the PR itself carries a stale-head gate — review 466 cannot authorize head `5e0e4743`, so a fresh reviewer verdict at the exact new head is a precondition for any merge. VALIDATION: Full suite at head `5e0e4743`: 3546 passed, 6 skipped, 2 failed, 365 subtests passed. The identical 2 failures reproduce on pristine master `043df0f7` in a clean detached worktree (`test_issue_702_review_findings_f1_f6.py::TestF1RecoveryBeforeTerminalProbe::test_removed_worktree_recovers_before_probe`, `test_reconciler_supersession_close.py::TestReconcilerSupersessionMcpTool::test_tool_posts_comment_and_closes_superseded_pr_issue`). Focused #749/#751/#753/#755 suites: 127 passed. Ownership, worktree, preflight and scope-guard suites: 136 passed, 16 subtests passed. `git diff --check` clean. `py_compile` clean on `create_issue_bootstrap.py`, `gitea_mcp_server.py`, `workflow_scope_guard.py`. MERGE_READY: no — `approval_valid_for_merge=false` and `stale_approval=true` at head `5e0e4743`; a fresh independent reviewer verdict at that exact head is required first. LAST_UPDATED_BY: jcwalker3 / prgs-author / 2026-07-18
Owner

repo: Scaled-Tech-Consulting/Gitea-Tools
pr: #750
issue: #749
reviewer_identity: sysadmin
profile: prgs-reviewer
session_id: 82547-548654b3d1f6
worktree: /Users/jasonwalker/Development/Gitea-Tools/branches/review-pr-750
phase: claimed
candidate_head: 5e0e474350
target_branch: master
target_branch_sha: 043df0f7df
last_activity: 2026-07-19T02:28:47Z
expires_at: 2026-07-19T02:38:47Z
blocker: none

<!-- mcp-review-lease:v1 --> repo: Scaled-Tech-Consulting/Gitea-Tools pr: #750 issue: #749 reviewer_identity: sysadmin profile: prgs-reviewer session_id: 82547-548654b3d1f6 worktree: /Users/jasonwalker/Development/Gitea-Tools/branches/review-pr-750 phase: claimed candidate_head: 5e0e474350eaf0679a226b539cfb8afc68b01406 target_branch: master target_branch_sha: 043df0f7df220ad67ac1c3fefdcf3897dad9478b last_activity: 2026-07-19T02:28:47Z expires_at: 2026-07-19T02:38:47Z blocker: none
Owner

repo: Scaled-Tech-Consulting/Gitea-Tools
pr: #750
issue: #749
reviewer_identity: sysadmin
profile: prgs-reviewer
session_id: 82547-548654b3d1f6
worktree: /Users/jasonwalker/Development/Gitea-Tools/branches/review-pr-750
phase: validating
candidate_head: 5e0e474350
target_branch: master
target_branch_sha: 043df0f7df
last_activity: 2026-07-19T02:29:46Z
expires_at: 2026-07-19T02:39:46Z
blocker: none

<!-- mcp-review-lease:v1 --> repo: Scaled-Tech-Consulting/Gitea-Tools pr: #750 issue: #749 reviewer_identity: sysadmin profile: prgs-reviewer session_id: 82547-548654b3d1f6 worktree: /Users/jasonwalker/Development/Gitea-Tools/branches/review-pr-750 phase: validating candidate_head: 5e0e474350eaf0679a226b539cfb8afc68b01406 target_branch: master target_branch_sha: 043df0f7df220ad67ac1c3fefdcf3897dad9478b last_activity: 2026-07-19T02:29:46Z expires_at: 2026-07-19T02:39:46Z blocker: none
sysadmin approved these changes 2026-07-18 21:31:17 -05:00
sysadmin left a comment
Owner

Independent native reviewer verdict: APPROVE at exact head 5e0e474350eaf0679a226b539cfb8afc68b01406.

Fresh reviewer session (gitea-reviewer / sysadmin / prgs-reviewer / role reviewer, remote prgs, non-root UID 502). Runtime/master parity verified at 043df0f7df220ad67ac1c3fefdcf3897dad9478b. Detached review worktree re-pinned clean at the exact PR head. Review #466 (former head e349839f…) confirmed stale and was not reused. No merge performed. PR #746 untouched.

Scope and correctness (issue #749 ACs)

Independently reviewed the full PR-only diff vs master: exactly 7 files, +781/−35. Merge commit 5e0e4743 parents e349839 + 043df0f; #751/#753/#755 land only as master ancestors and are absent from the PR-only diff (no duplication/reversion).

  1. Clean canonical control checkout may call gitea_create_issue without inventing branches/issue-<N>-* (AC2 phase-scoped pure-remote exemption).
  2. Bootstrap does not weaken #274: exact task membership only; non-create_issue tasks stay fail-closed.
  3. Canonical membership via exact realpath equality with control root; foreign workspaces block.
  4. Dirty/detached/non-base/stale control still blocked (with root-checkout double gate).
  5. Bare/foreign/unregistered branches/ paths short-circuit to ordinary #274 path (not bootstrap).
  6. Exemption applies only to create_issue; lock/commit/push/create_pr/review/merge unchanged.
  7. Post-create requires registered branches/issue-<N>-* and normal locks.
  8. No caller override of repository binding; no manufactured workspace proof surface.
  9. Docs (create-issue.md §18a, runbooks) match production.
  10. Existing clean-control create_issue path now succeeds; dirty still fails.
  11. Failures structured and fail closed with pre-issue-satisfiable next actions.
  12. No #749/#750-specific production special case beyond the generic create_issue contract.

Non-blocking: bare except on remote-master SHA resolution in bootstrap branch remains defended by earlier root-checkout guard; string-split next-action recovery is cosmetic.

Canonical PR State

STATE:
approved

WHO_IS_NEXT:
merger

NEXT_ACTION:
A fresh Grok merger session for PR #750 must re-verify this APPROVED review at exact head 5e0e474350eaf0679a226b539cfb8afc68b01406, confirm mergeability and checks, acquire the merger lease, and merge. Do not re-review unless the head moves.

NEXT_PROMPT:

Merge PR #750 in Scaled-Tech-Consulting/Gitea-Tools using a fresh gitea-merger session (sysadmin / prgs-merger / merger, remote prgs).

Pin to exact head 5e0e474350eaf0679a226b539cfb8afc68b01406. Base is master at 043df0f7df220ad67ac1c3fefdcf3897dad9478b; PR is 0 commits behind, mergeable=true, checks_status=not_required.

Verify runtime/master parity at 043df0f7df220ad67ac1c3fefdcf3897dad9478b. Confirm the APPROVED review is valid at the exact current head (do not reuse Review 466). Acquire the merger lease, re-check live mergeability, then merge with confirmation MERGE PR 750.

Do not re-review. Do not touch PR #746 or issue #745. Do not modify configuration, launchers, credentials, or operator memory.

WHAT_HAPPENED:
An independent leased Grok reviewer session validated the #749 create_issue bootstrap exemption at the post-base-merge head and posted an APPROVED review via native MCP.

WHY:
The exemption is exactly scoped to create_issue / gitea_create_issue on the clean canonical control checkout, preserves #274/#713 for every other path, did not duplicate or revert #751/#753/#755, and focused validation passed.

ISSUE:
#749

BASE:
master

HEAD:
fix/issue-749-create-issue-bootstrap

HEAD_SHA:
5e0e474350

REVIEW_STATUS:
approved

VALIDATION:
Focused suites: 127 passed (#749 bootstrap, workspace guard, #751, #753, #755); 110 passed + 36 subtests (author mutation, scope guards, anti-stomp, ownership, preflight); 14 create_issue tests passed; py_compile clean; git diff --check clean; live checks not_required.

BLOCKERS:
none

MERGE_READY:
yes — approval is valid at the exact current head, base is current (0 commits behind), mergeable, checks not required; the merger must still re-confirm live state before merge.

LAST_UPDATED_BY:
sysadmin / prgs-reviewer / 2026-07-18

NATIVE_REVIEW_PROOF: transport=native_mcp; namespace=gitea-reviewer; profile=prgs-reviewer; identity=sysadmin; tool=gitea_submit_pr_review; reviewed_head=5e0e474350eaf0679a226b539cfb8afc68b01406; parity=043df0f7df220ad67ac1c3fefdcf3897dad9478b; lease_session=82547-548654b3d1f6

[THREAD STATE LEDGER] PR #750 / Issue #749 — APPROVED review posted at head 5e0e4743; merge not performed.

What is true now:

  • PR open, mergeable, 0 behind, checks not_required
  • Fresh APPROVED at current head 5e0e4743 (Review 466 remains stale at e349839f)

Who/what acts next:

  • Next actor: merger (fresh Grok merger session)
  • Do not merge from this reviewer session; do not touch PR #746.
Independent native reviewer verdict: **APPROVE** at exact head `5e0e474350eaf0679a226b539cfb8afc68b01406`. Fresh reviewer session (`gitea-reviewer` / `sysadmin` / `prgs-reviewer` / role `reviewer`, remote `prgs`, non-root UID 502). Runtime/master parity verified at `043df0f7df220ad67ac1c3fefdcf3897dad9478b`. Detached review worktree re-pinned clean at the exact PR head. Review #466 (former head `e349839f…`) confirmed stale and was not reused. No merge performed. PR #746 untouched. ## Scope and correctness (issue #749 ACs) Independently reviewed the full PR-only diff vs master: **exactly 7 files, +781/−35**. Merge commit `5e0e4743` parents `e349839` + `043df0f`; #751/#753/#755 land only as master ancestors and are **absent from the PR-only diff** (no duplication/reversion). 1. Clean canonical control checkout may call `gitea_create_issue` without inventing `branches/issue-<N>-*` (AC2 phase-scoped pure-remote exemption). 2. Bootstrap does not weaken #274: exact task membership only; non-create_issue tasks stay fail-closed. 3. Canonical membership via exact `realpath` equality with control root; foreign workspaces block. 4. Dirty/detached/non-base/stale control still blocked (with root-checkout double gate). 5. Bare/foreign/unregistered `branches/` paths short-circuit to ordinary #274 path (not bootstrap). 6. Exemption applies only to create_issue; lock/commit/push/create_pr/review/merge unchanged. 7. Post-create requires registered `branches/issue-<N>-*` and normal locks. 8. No caller override of repository binding; no manufactured workspace proof surface. 9. Docs (`create-issue.md` §18a, runbooks) match production. 10. Existing clean-control create_issue path now succeeds; dirty still fails. 11. Failures structured and fail closed with pre-issue-satisfiable next actions. 12. No #749/#750-specific production special case beyond the generic create_issue contract. Non-blocking: bare except on remote-master SHA resolution in bootstrap branch remains defended by earlier root-checkout guard; string-split next-action recovery is cosmetic. ## Canonical PR State STATE: approved WHO_IS_NEXT: merger NEXT_ACTION: A fresh Grok merger session for PR #750 must re-verify this APPROVED review at exact head `5e0e474350eaf0679a226b539cfb8afc68b01406`, confirm mergeability and checks, acquire the merger lease, and merge. Do not re-review unless the head moves. NEXT_PROMPT: ```text Merge PR #750 in Scaled-Tech-Consulting/Gitea-Tools using a fresh gitea-merger session (sysadmin / prgs-merger / merger, remote prgs). Pin to exact head 5e0e474350eaf0679a226b539cfb8afc68b01406. Base is master at 043df0f7df220ad67ac1c3fefdcf3897dad9478b; PR is 0 commits behind, mergeable=true, checks_status=not_required. Verify runtime/master parity at 043df0f7df220ad67ac1c3fefdcf3897dad9478b. Confirm the APPROVED review is valid at the exact current head (do not reuse Review 466). Acquire the merger lease, re-check live mergeability, then merge with confirmation MERGE PR 750. Do not re-review. Do not touch PR #746 or issue #745. Do not modify configuration, launchers, credentials, or operator memory. ``` WHAT_HAPPENED: An independent leased Grok reviewer session validated the #749 create_issue bootstrap exemption at the post-base-merge head and posted an APPROVED review via native MCP. WHY: The exemption is exactly scoped to create_issue / gitea_create_issue on the clean canonical control checkout, preserves #274/#713 for every other path, did not duplicate or revert #751/#753/#755, and focused validation passed. ISSUE: #749 BASE: master HEAD: fix/issue-749-create-issue-bootstrap HEAD_SHA: 5e0e474350eaf0679a226b539cfb8afc68b01406 REVIEW_STATUS: approved VALIDATION: Focused suites: 127 passed (#749 bootstrap, workspace guard, #751, #753, #755); 110 passed + 36 subtests (author mutation, scope guards, anti-stomp, ownership, preflight); 14 create_issue tests passed; py_compile clean; git diff --check clean; live checks not_required. BLOCKERS: none MERGE_READY: yes — approval is valid at the exact current head, base is current (0 commits behind), mergeable, checks not required; the merger must still re-confirm live state before merge. LAST_UPDATED_BY: sysadmin / prgs-reviewer / 2026-07-18 NATIVE_REVIEW_PROOF: transport=native_mcp; namespace=gitea-reviewer; profile=prgs-reviewer; identity=sysadmin; tool=gitea_submit_pr_review; reviewed_head=5e0e474350eaf0679a226b539cfb8afc68b01406; parity=043df0f7df220ad67ac1c3fefdcf3897dad9478b; lease_session=82547-548654b3d1f6 [THREAD STATE LEDGER] PR #750 / Issue #749 — APPROVED review posted at head 5e0e4743; merge not performed. What is true now: - PR open, mergeable, 0 behind, checks not_required - Fresh APPROVED at current head 5e0e4743 (Review 466 remains stale at e349839f) Who/what acts next: - Next actor: merger (fresh Grok merger session) - Do not merge from this reviewer session; do not touch PR #746.
Owner

repo: Scaled-Tech-Consulting/Gitea-Tools
pr: #750
issue: #749
reviewer_identity: sysadmin
profile: prgs-reviewer
session_id: 82547-548654b3d1f6
worktree: /Users/jasonwalker/Development/Gitea-Tools/branches/review-pr-750
phase: released
candidate_head: 5e0e474350
target_branch: master
target_branch_sha: 043df0f7df
last_activity: 2026-07-19T02:31:27Z
expires_at: 2026-07-19T02:41:27Z
blocker: manual-release

<!-- mcp-review-lease:v1 --> repo: Scaled-Tech-Consulting/Gitea-Tools pr: #750 issue: #749 reviewer_identity: sysadmin profile: prgs-reviewer session_id: 82547-548654b3d1f6 worktree: /Users/jasonwalker/Development/Gitea-Tools/branches/review-pr-750 phase: released candidate_head: 5e0e474350eaf0679a226b539cfb8afc68b01406 target_branch: master target_branch_sha: 043df0f7df220ad67ac1c3fefdcf3897dad9478b last_activity: 2026-07-19T02:31:27Z expires_at: 2026-07-19T02:41:27Z blocker: manual-release
Owner

repo: Scaled-Tech-Consulting/Gitea-Tools
pr: #750
issue: #749
reviewer_identity: sysadmin
profile: prgs-merger
session_id: 86830-c968bf5db6c1
worktree: /Users/jasonwalker/Development/Gitea-Tools/branches/merge-pr-750
phase: claimed
candidate_head: 5e0e474350
target_branch: master
target_branch_sha: 043df0f7df
last_activity: 2026-07-19T02:37:54Z
expires_at: 2026-07-19T02:47:54Z
blocker: none

<!-- mcp-review-lease:v1 --> repo: Scaled-Tech-Consulting/Gitea-Tools pr: #750 issue: #749 reviewer_identity: sysadmin profile: prgs-merger session_id: 86830-c968bf5db6c1 worktree: /Users/jasonwalker/Development/Gitea-Tools/branches/merge-pr-750 phase: claimed candidate_head: 5e0e474350eaf0679a226b539cfb8afc68b01406 target_branch: master target_branch_sha: 043df0f7df220ad67ac1c3fefdcf3897dad9478b last_activity: 2026-07-19T02:37:54Z expires_at: 2026-07-19T02:47:54Z blocker: none
sysadmin merged commit 447595b72b into master 2026-07-18 21:38:07 -05:00
Owner

Stale #332 review-decision lock cleanup (#594)

Status: APPLIED

Manual deletion of session-state files is not the workflow.
This path only clears a lock when the referenced PR is merged/closed.

## Stale #332 review-decision lock cleanup (#594) Status: **APPLIED** - actor: `sysadmin` - profile: `prgs-merger` - timestamp: `2026-07-19T02:38:08.057380+00:00` - last terminal: `approve` on PR #750 - PR state: `closed` (merged=True) - merge_commit_sha: `447595b72ba02037db914797bd9ce8dd91fd4028` - prior live_mutations_count: `1` - prior profile_identity: `prgs-reviewer` Manual deletion of session-state files is **not** the workflow. This path only clears a lock when the referenced PR is merged/closed.
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#750